MCPcopy Create free account
hub / github.com/Snapchat/Valdi / createContent

Function createContent

valdi/test/runtime/DiskCache_tests.cpp:45–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43};
44
45BytesView createContent(const char* filename) {
46 auto str = STRING_LITERAL(filename);
47 return BytesView(str.getInternedString(), reinterpret_cast<const Byte*>(str.getCStr()), str.length());
48}
49
50TEST(DiskCache, canStoreAndRetrieve) {
51 TemporaryDirectory directory;

Callers 1

TESTFunction · 0.85

Calls 4

getInternedStringMethod · 0.80
BytesViewClass · 0.50
getCStrMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected