| 314 | } |
| 315 | |
| 316 | CO_TEST_F(InterfaceTest, basic) { |
| 317 | co_await allocateAndInsertItem(); |
| 318 | |
| 319 | auto readHandle = CO_ASSERT_OK(co_await cache_.find(key_)); |
| 320 | CO_ASSERT_TRUE(readHandle.has_value()); |
| 321 | checkItemFields(readHandle.value()); |
| 322 | |
| 323 | { |
| 324 | auto writeHandle = CO_ASSERT_OK(co_await cache_.findToWrite(key_)); |
| 325 | CO_ASSERT_TRUE(writeHandle.has_value()); |
| 326 | checkItemFields(writeHandle.value()); |
| 327 | writeHandle->markDirty(); |
| 328 | } |
| 329 | EXPECT_EQ(cache_.writeBacks_, 1); |
| 330 | |
| 331 | auto removed = CO_ASSERT_OK(co_await cache_.remove(key_)); |
| 332 | EXPECT_TRUE(removed); |
| 333 | EXPECT_FALSE(this->cache_.cachedItems_.contains(this->key_)); |
| 334 | } |
| 335 | |
| 336 | CO_TEST_F(InterfaceTest, replace) { |
| 337 | co_await allocateAndInsertItem(); |
nothing calls this directly
no test coverage detected