- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for TestLRU_Add_ExceedsSize_RemovesOldest (0.36 sec)
-
tests/lru_test.go
lru.Add("key1", 1) if value, ok := lru.Get("key1"); !ok || value != 1 { t.Errorf("Expected key1 to be added with value 1, got %v", value) } } func TestLRU_Add_ExceedsSize_RemovesOldest(t *testing.T) { lru := lru.NewLRU[string, int](2, nil, time.Hour) lru.Add("key1", 1) lru.Add("key2", 2) lru.Add("key3", 3) if _, ok := lru.Get("key1"); ok {
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Sun May 25 07:40:40 UTC 2025 - 10.4K bytes - Viewed (0)