MCPcopy Create free account
hub / github.com/ddnet/ddnet / TEST

Function TEST

src/test/bytes_be_test.cpp:10–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8static const uint32_t UINT_DATA[] = {0u, 1u, 2u, 32u, 64u, 256u, 512u, 12345u, 123456u, 1234567u, 12345678u, 123456789u, 2147483647u, 2147483648u, 4294967295u};
9
10TEST(BytePacking, RoundtripInt)
11{
12 for(auto i : INT_DATA)
13 {
14 unsigned char aPacked[sizeof(int32_t)];
15 uint_to_bytes_be(aPacked, i);
16 EXPECT_EQ(bytes_be_to_uint(aPacked), i);
17 }
18}
19
20TEST(BytePacking, RoundtripUnsigned)
21{

Callers

nothing calls this directly

Calls 2

uint_to_bytes_beFunction · 0.85
bytes_be_to_uintFunction · 0.85

Tested by

no test coverage detected