Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestLRU_Values (0.75 sec)

  1. tests/lru_test.go

    	lc.Add("key1", &newVal)
    
    	value, exists = lc.Get("key1")
    	if value != &newVal || !exists {
    		t.Fatalf("unexpected value or existence flag for key1: value=%v, exists=%v", value, exists)
    	}
    }
    
    func TestLRU_Values(t *testing.T) {
    	lc := lru.NewLRU[string, string](3, nil, 0)
    
    	lc.Add("key1", "val1")
    	lc.Add("key2", "val2")
    	lc.Add("key3", "val3")
    
    	values := lc.Values()
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Sun May 25 07:40:40 UTC 2025
    - 10.4K bytes
    - Viewed (0)
Back to top