MCPcopy Create free account
hub / github.com/comaps/comaps / UNIT_TEST

Function UNIT_TEST

libs/coding/coding_tests/text_storage_tests.cpp:42–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40}
41
42UNIT_TEST(TextStorage_Smoke)
43{
44 vector<uint8_t> buffer;
45 DumpStrings({} /* strings */, 10 /* blockSize */, buffer);
46
47 {
48 MemReader reader(buffer.data(), buffer.size());
49 BlockedTextStorageIndex index;
50 index.Read(reader);
51 TEST_EQUAL(index.GetNumStrings(), 0, ());
52 TEST_EQUAL(index.GetNumBlockInfos(), 0, ());
53 }
54
55 {
56 MemReader reader(buffer.data(), buffer.size());
57 BlockedTextStorage<decltype(reader)> ts(reader);
58 TEST_EQUAL(ts.GetNumStrings(), 0, ());
59 }
60}
61
62UNIT_TEST(TextStorage_Simple)
63{

Callers

nothing calls this directly

Calls 10

DumpStringsFunction · 0.85
GenerateRandomStringFunction · 0.85
GetNumBlockInfosMethod · 0.80
dataMethod · 0.45
sizeMethod · 0.45
ReadMethod · 0.45
GetNumStringsMethod · 0.45
ExtractStringMethod · 0.45
emplace_backMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected