Commit 38690e44 authored by hyperxor's avatar hyperxor

Fix stream unit test

parent 2b00ea1b
......@@ -144,9 +144,11 @@ TEST(stream, test_cursor_offset_for_array) {
const char* data = "abcdefgh";
buffer.feed(data, strlen(data));
cursor.advance(4);
size_t shift = 4u;
cursor.advance(shift);
ASSERT_TRUE(strcmp(cursor.offset(), "efgh"));
std::string result{cursor.offset(), strlen(data) - shift};
ASSERT_EQ(result, "efgh");
}
TEST(stream, test_cursor_diff_for_array) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment