about summary refs log tree commit diff homepage
path: root/unittests/TreeStream
diff options
context:
space:
mode:
authorAndrea Mattavelli <andreamattavelli@gmail.com>2017-10-06 08:37:17 +0100
committerMartinNowack <martin.nowack@gmail.com>2017-10-06 13:33:18 +0200
commit085a119d95af224f96ef7ecb2a8f614f5552e321 (patch)
treeb5bab48ac93a623c53d801ebc22d676e3fb80675 /unittests/TreeStream
parentcc2a4e20bbfb7ca47a2f1629c67889ee150336da (diff)
downloadklee-085a119d95af224f96ef7ecb2a8f614f5552e321.tar.gz
Silenced warnings on comparison of integers of different signs in TreeStreamTest
Diffstat (limited to 'unittests/TreeStream')
-rw-r--r--unittests/TreeStream/TreeStreamTest.cpp8
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]);
 }