MCPcopy Create free account
hub / github.com/ElementsProject/elements / TEST

Function TEST

src/leveldb/db/dbformat_test.cc:46–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44class FormatTest {};
45
46TEST(FormatTest, InternalKey_EncodeDecode) {
47 const char* keys[] = {"", "k", "hello", "longggggggggggggggggggggg"};
48 const uint64_t seq[] = {1,
49 2,
50 3,
51 (1ull << 8) - 1,
52 1ull << 8,
53 (1ull << 8) + 1,
54 (1ull << 16) - 1,
55 1ull << 16,
56 (1ull << 16) + 1,
57 (1ull << 32) - 1,
58 1ull << 32,
59 (1ull << 32) + 1};
60 for (int k = 0; k < sizeof(keys) / sizeof(keys[0]); k++) {
61 for (int s = 0; s < sizeof(seq) / sizeof(seq[0]); s++) {
62 TestKey(keys[k], seq[s], kTypeValue);
63 TestKey("hello", 1, kTypeDeletion);
64 }
65 }
66}
67
68TEST(FormatTest, InternalKey_DecodeFromEmpty) {
69 InternalKey internal_key;

Callers

nothing calls this directly

Calls 6

TestKeyFunction · 0.85
IKeyFunction · 0.85
ShortenFunction · 0.85
ShortSuccessorFunction · 0.85
DecodeFromMethod · 0.45
DebugStringMethod · 0.45

Tested by

no test coverage detected