MCPcopy Create free account
hub / github.com/facebook/CacheLib / makeFindByKey

Function makeFindByKey

cachelib/allocator/tests/ChainedHashTest.cpp:291–295  ·  view source on GitHub ↗

Helper to create a FindByKeyFn for tests.

Source from the content-addressed store, hash-verified

289
290// Helper to create a FindByKeyFn for tests.
291auto makeFindByKey(ChainedHashTest::Container& c) {
292 using Node = ChainedHashTest::Node;
293 using Handle = Node::Handle;
294 return [&c](folly::StringPiece key) -> Handle { return c.find(key); };
295}
296
297TEST_F(ChainedHashTest, LockGroupIteratorEmpty) {
298 Container c;

Callers 1

TEST_FFunction · 0.85

Calls 1

findMethod · 0.45

Tested by

no test coverage detected