diff options
Diffstat (limited to 'unittests/TreeStream/TreeStreamTest.cpp')
-rw-r--r-- | unittests/TreeStream/TreeStreamTest.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/unittests/TreeStream/TreeStreamTest.cpp b/unittests/TreeStream/TreeStreamTest.cpp index 09d62c6e..ceebf775 100644 --- a/unittests/TreeStream/TreeStreamTest.cpp +++ b/unittests/TreeStream/TreeStreamTest.cpp @@ -19,10 +19,10 @@ TEST(TreeStreamTest, Basic) { std::vector<unsigned char> out; tsw.readStream(tos.getID(), out); - ASSERT_EQ(out.size(), 7); + ASSERT_EQ(7u, out.size()); for (unsigned char c = 'a'; c <= 'g'; c++) - ASSERT_EQ(out[c - 'a'], c); + ASSERT_EQ(c, out[c - 'a']); } @@ -34,7 +34,7 @@ TEST(TreeStreamTest, WriteLargerThanBufferSize) { ASSERT_TRUE(tsw.good()); TreeOStream tos = tsw.open(); -#define NBYTES 5*4096 +#define NBYTES 5*4096UL char buf[NBYTES]; memset(buf, 'A', sizeof(buf)); tos.write(buf, NBYTES); @@ -42,7 +42,7 @@ TEST(TreeStreamTest, WriteLargerThanBufferSize) { std::vector<unsigned char> out; tsw.readStream(tos.getID(), out); - ASSERT_EQ(out.size(), NBYTES); + ASSERT_EQ(NBYTES, out.size()); for (unsigned i=0; i<out.size(); i++) ASSERT_EQ('A', out[i]); } |