Mon, 25 Jul 2022 14:16:49 +0200
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) {