diff -r 8ee818fa29f7 -r 81b2986d2b04 tests/test_buffer.c --- a/tests/test_buffer.c Tue Dec 10 00:09:55 2024 +0100 +++ b/tests/test_buffer.c Tue Dec 10 00:19:45 2024 +0100 @@ -263,7 +263,7 @@ buf.size = 6; buf.pos = 3; CX_TEST_DO { - int result = cxBufferSeek(&buf, 6, SEEK_SET); + int result = cxBufferSeek(&buf, 7, SEEK_SET); CX_TEST_ASSERT(result != 0); CX_TEST_ASSERT(buf.pos == 3); } @@ -315,7 +315,7 @@ buf.size = 6; buf.pos = 3; CX_TEST_DO { - int result = cxBufferSeek(&buf, 3, SEEK_CUR); + int result = cxBufferSeek(&buf, 4, SEEK_CUR); CX_TEST_ASSERT(result != 0); CX_TEST_ASSERT(buf.pos == 3); } @@ -342,9 +342,8 @@ buf.pos = 3; CX_TEST_DO { int result = cxBufferSeek(&buf, 0, SEEK_END); - // the (past-the-)end position is always invalid - CX_TEST_ASSERT(result != 0); - CX_TEST_ASSERT(buf.pos == 3); + CX_TEST_ASSERT(result == 0); + CX_TEST_ASSERT(buf.pos == 6); } cxBufferDestroy(&buf); }