blob: e75af6ba683ad2fe8e2cab895f04a12af68cd278 [file] [log] [blame]
Brian Silverman803b7a52014-01-01 13:21:18 -08001#include "cape/cows.h"
2
3#include <gtest/gtest.h>
4
5namespace testing {
6
7TEST(CowsTest, StupidZeros) {
8 static const uint8_t kTestInput[] = {0x02, 0x00, 0x00, 0x00, 0x00, 0x08, 0x01,
9 0x00};
Brian Silverman0a151c92014-05-02 15:28:44 -070010 uint32_t input[2];
11 memcpy(input, kTestInput, 8);
Brian Silverman803b7a52014-01-01 13:21:18 -080012 uint32_t output[2];
13 EXPECT_EQ(
14 1u, cows_unstuff(input, sizeof(kTestInput), output, sizeof(output) * 4));
15}
16
17} // namespace testing