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

Function TEST

src/leveldb/util/coding_test.cc:14–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12class Coding {};
13
14TEST(Coding, Fixed32) {
15 std::string s;
16 for (uint32_t v = 0; v < 100000; v++) {
17 PutFixed32(&s, v);
18 }
19
20 const char* p = s.data();
21 for (uint32_t v = 0; v < 100000; v++) {
22 uint32_t actual = DecodeFixed32(p);
23 ASSERT_EQ(v, actual);
24 p += sizeof(uint32_t);
25 }
26}
27
28TEST(Coding, Fixed64) {
29 std::string s;

Callers

nothing calls this directly

Calls 15

PutFixed32Function · 0.85
DecodeFixed32Function · 0.85
PutFixed64Function · 0.85
DecodeFixed64Function · 0.85
PutVarint32Function · 0.85
GetVarint32PtrFunction · 0.85
VarintLengthFunction · 0.85
PutVarint64Function · 0.85
GetVarint64PtrFunction · 0.85
PutLengthPrefixedSliceFunction · 0.85
SliceClass · 0.70
GetLengthPrefixedSliceFunction · 0.70

Tested by

no test coverage detected