| 44 | }; |
| 45 | |
| 46 | TEST_F(TestLruCache, TestEvict) { |
| 47 | cache_.insert(TestCacheKey(1), "hello"); |
| 48 | cache_.insert(TestCacheKey(2), "hello"); |
| 49 | cache_.insert(TestCacheKey(1), "hello"); |
| 50 | cache_.insert(TestCacheKey(3), "hello"); |
| 51 | // should have evicted key 1 |
| 52 | ASSERT_EQ(2, cache_.size()); |
| 53 | ASSERT_EQ(cache_.get(TestCacheKey(1)), std::nullopt); |
| 54 | } |
| 55 | |
| 56 | TEST_F(TestLruCache, TestLruBehavior) { |
| 57 | cache_.insert(TestCacheKey(1), "hello"); |
nothing calls this directly
no test coverage detected