MCPcopy Index your code
hub / github.com/apache/casbin / testCachePut

Function testCachePut

util/util_test.go:200–206  ·  view source on GitHub ↗
(t *testing.T, c *LRUCache, key string, value interface{})

Source from the content-addressed store, hash-verified

198}
199
200func testCachePut(t *testing.T, c *LRUCache, key string, value interface{}) {
201 c.Put(key, value)
202 v, o := c.Get(key)
203 if v != value || o != true {
204 t.Errorf("Put(%s, %s): didn't add value", key, value)
205 }
206}
207
208func testCacheEqual(t *testing.T, c *LRUCache, values []int) {
209 cacheValues := []int{}

Callers 1

TestLRUCacheFunction · 0.85

Calls 2

GetMethod · 0.65
PutMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…