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}; |
Brian Silverman | 0a151c9 | 2014-05-02 15:28:44 -0700 | [diff] [blame] | 10 | uint32_t input[2]; |
| 11 | memcpy(input, kTestInput, 8); |
Brian Silverman | 803b7a5 | 2014-01-01 13:21:18 -0800 | [diff] [blame] | 12 | uint32_t output[2]; |
| 13 | EXPECT_EQ( |
| 14 | 1u, cows_unstuff(input, sizeof(kTestInput), output, sizeof(output) * 4)); |
| 15 | } |
| 16 | |
| 17 | } // namespace testing |