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

Function TEST

valdi/test/runtime/MmapBuffer_tests.cpp:50–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48} // namespace
49
50TEST(MmapBuffer, CreateWritableProducesMappingOfRequestedSize) {
51 TemporaryDirectory dir;
52 constexpr size_t kSize = 4096;
53
54 auto result = MmapBuffer::createWritable(dir.child("writable.bin"), kSize);
55 ASSERT_TRUE(result.success()) << result.description();
56 ASSERT_EQ(kSize, result.value()->size());
57 ASSERT_NE(nullptr, result.value()->data());
58}
59
60TEST(MmapBuffer, CreateWritableRejectsZeroSize) {
61 TemporaryDirectory dir;

Callers

nothing calls this directly

Calls 10

descriptionMethod · 0.80
makeReadOnlyMethod · 0.80
valueMethod · 0.65
toStringMethod · 0.65
PathClass · 0.50
childMethod · 0.45
successMethod · 0.45
sizeMethod · 0.45
dataMethod · 0.45
failureMethod · 0.45

Tested by

no test coverage detected