| 8 | static const uint32_t UINT_DATA[] = {0u, 1u, 2u, 32u, 64u, 256u, 512u, 12345u, 123456u, 1234567u, 12345678u, 123456789u, 2147483647u, 2147483648u, 4294967295u}; |
| 9 | |
| 10 | TEST(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 | |
| 20 | TEST(BytePacking, RoundtripUnsigned) |
| 21 | { |
nothing calls this directly
no test coverage detected