Brian Silverman | 803b7a5 | 2014-01-01 13:21:18 -0800 | [diff] [blame^] | 1 | #include "cape/cows.h" |
2 | |||||
3 | #include <gtest/gtest.h> | ||||
4 | |||||
5 | namespace testing { | ||||
6 | |||||
7 | TEST(CowsTest, StupidZeros) { | ||||
8 | static const uint8_t kTestInput[] = {0x02, 0x00, 0x00, 0x00, 0x00, 0x08, 0x01, | ||||
9 | 0x00}; | ||||
10 | uint32_t input[3]; | ||||
11 | memcpy(input, kTestInput, 12); | ||||
12 | uint32_t output[2]; | ||||
13 | EXPECT_EQ( | ||||
14 | 1u, cows_unstuff(input, sizeof(kTestInput), output, sizeof(output) * 4)); | ||||
15 | } | ||||
16 | |||||
17 | } // namespace testing |