MCPcopy Create free account
hub / github.com/apple/foundationdb / verifyData

Function verifyData

flow/serialize.cpp:77–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75};
76
77void verifyData(StringRef value, int numObjects) {
78 {
79 // use BinaryReader
80 BinaryReader reader(value, IncludeVersion());
81 std::vector<OldStruct> data;
82 reader >> data;
83 ASSERT_EQ(data.size(), numObjects);
84 for (const auto& object : data) {
85 ASSERT(object.isSet());
86 }
87 }
88 {
89 // use ArenaReader
90 ArenaReader reader(Arena(), value, IncludeVersion());
91 std::vector<OldStruct> data;
92 reader >> data;
93 ASSERT_EQ(data.size(), numObjects);
94 for (const auto& oldObject : data) {
95 ASSERT(oldObject.isSet());
96 }
97 }
98}
99
100} // namespace
101

Callers 1

serialize.cppFile · 0.85

Calls 4

IncludeVersionFunction · 0.85
ArenaClass · 0.70
sizeMethod · 0.45
isSetMethod · 0.45

Tested by

no test coverage detected