| 88 | ShardingPolicy::SingleShard))); |
| 89 | |
| 90 | TEST_P(CacheTest, TrackMemory) { |
| 91 | if (mem_tracker_) { |
| 92 | Insert(100, 100, 1); |
| 93 | ASSERT_EQ(1, mem_tracker_->consumption()); |
| 94 | UpdateCharge(100, 2); |
| 95 | ASSERT_EQ(2, mem_tracker_->consumption()); |
| 96 | Erase(100); |
| 97 | ASSERT_EQ(0, mem_tracker_->consumption()); |
| 98 | ASSERT_EQ(2, mem_tracker_->peak_consumption()); |
| 99 | } |
| 100 | } |
| 101 | |
| 102 | TEST_P(CacheTest, HitAndMiss) { |
| 103 | ASSERT_EQ(-1, Lookup(100)); |
nothing calls this directly
no test coverage detected