MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / TEST

Function TEST

tensorflow/core/lib/core/coding_test.cc:24–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22namespace core {
23
24TEST(Coding, Fixed16) {
25 static const uint16 N = 50000;
26
27 string s;
28 for (uint16 v = 0; v < N; v++) {
29 char buf[sizeof(uint16)];
30 EncodeFixed16(buf, v);
31 s.append(buf, sizeof(buf));
32 }
33
34 const char* p = s.data();
35 for (uint16 v = 0; v < N; v++) {
36 uint16 actual = DecodeFixed16(p);
37 ASSERT_EQ(v, actual);
38 p += sizeof(uint16);
39 }
40}
41
42TEST(Coding, Fixed32) {
43 static const uint32 N = 100000;

Callers

nothing calls this directly

Calls 14

EncodeFixed16Function · 0.85
DecodeFixed16Function · 0.85
EncodeFixed32Function · 0.85
DecodeFixed32Function · 0.85
EncodeFixed64Function · 0.85
DecodeFixed64Function · 0.85
PutVarint32Function · 0.85
GetVarint32PtrFunction · 0.85
PutVarint64Function · 0.85
GetVarint64PtrFunction · 0.85
appendMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected