MCPcopy
hub / github.com/austingebauer/go-leetcode / TestLRUCache_4

Function TestLRUCache_4

lru_cache_146/solution_test.go:47–52  ·  view source on GitHub ↗

* ["LRUCache","put","put","get","put","put","get"] [[2],[2,1],[2,2],[2],[1,1],[4,1],[2]] */

(t *testing.T)

Source from the content-addressed store, hash-verified

45[[2],[2,1],[2,2],[2],[1,1],[4,1],[2]]
46*/
47func TestLRUCache_4(t *testing.T) {
48 cache := Constructor(2)
49 cache.Put(2, 1)
50 cache.Put(2, 2)
51 assert.Equal(t, 2, cache.Get(2))
52}
53
54/*
55["LRUCache","put","put","put","put","get","get"]

Callers

nothing calls this directly

Calls 3

PutMethod · 0.80
ConstructorFunction · 0.70
GetMethod · 0.45

Tested by

no test coverage detected