* ["LRUCache","put","get","put","get","get"] [[1],[2,1],[2],[3,2],[2],[3]] */
(t *testing.T)
| 31 | [[1],[2,1],[2],[3,2],[2],[3]] |
| 32 | */ |
| 33 | func TestLRUCache_3(t *testing.T) { |
| 34 | cache := Constructor(1) |
| 35 | cache.Put(2, 1) |
| 36 | assert.Equal(t, 1, cache.Get(2)) |
| 37 | |
| 38 | cache.Put(3, 2) |
| 39 | assert.Equal(t, -1, cache.Get(2)) |
| 40 | assert.Equal(t, 2, cache.Get(3)) |
| 41 | } |
| 42 | |
| 43 | /* |
| 44 | ["LRUCache","put","put","get","put","put","get"] |
nothing calls this directly
no test coverage detected