fix two tests reading one byte too much

Mon, 25 Jul 2022 14:16:49 +0200

author
Mike Becker <universe@uap-core.de>
date
Mon, 25 Jul 2022 14:16:49 +0200
changeset 566
d3100c987a39
parent 565
d756746ea94f
child 567
f90a7cfe2480

fix two tests reading one byte too much

test/test_buffer.cpp file | annotate | diff | comparison | revisions
--- a/test/test_buffer.cpp	Mon Jul 25 14:01:45 2022 +0200
+++ b/test/test_buffer.cpp	Mon Jul 25 14:16:49 2022 +0200
@@ -430,7 +430,7 @@
     EXPECT_EQ(buf.size, 9);
     EXPECT_EQ(buf.pos, 9);
     EXPECT_GE(buf.capacity, 9);
-    EXPECT_EQ(memcmp(buf.space, "pretester\0", 10), 0);
+    EXPECT_EQ(memcmp(buf.space, "pretester", 9), 0);
 }
 
 TEST_F(BufferWrite, PutcWrapperFit) {
@@ -467,7 +467,7 @@
     EXPECT_EQ(buf.size, 9);
     EXPECT_EQ(buf.pos, 9);
     EXPECT_GE(buf.capacity, 9);
-    EXPECT_EQ(memcmp(buf.space, "prep\0\0\0\0a\0", 10), 0);
+    EXPECT_EQ(memcmp(buf.space, "prep\0\0\0\0a", 9), 0);
 }
 
 TEST_F(BufferWrite, PutStringWrapperFit) {

mercurial