diff options
Diffstat (limited to 'lib/io/test')
-rw-r--r-- | lib/io/test/istream_mem.c | 3 | ||||
-rw-r--r-- | lib/io/test/istream_read.c | 1 | ||||
-rw-r--r-- | lib/io/test/istream_skip.c | 1 | ||||
-rw-r--r-- | lib/io/test/stream_splice.c | 1 | ||||
-rw-r--r-- | lib/io/test/xfrm.c | 2 |
5 files changed, 2 insertions, 6 deletions
diff --git a/lib/io/test/istream_mem.c b/lib/io/test/istream_mem.c index 84da9a9..a486899 100644 --- a/lib/io/test/istream_mem.c +++ b/lib/io/test/istream_mem.c @@ -63,8 +63,9 @@ int main(int argc, char **argv) TEST_EQUAL_UI(ptr[j], byte_at_offset(i + j)); } - istream_advance_buffer(in, eat_all ? size : (size / 2)); + diff = eat_all ? size : (size / 2); eat_all = !eat_all; + istream_advance_buffer(in, diff); } sqfs_drop(in); diff --git a/lib/io/test/istream_read.c b/lib/io/test/istream_read.c index 176832b..8ba4540 100644 --- a/lib/io/test/istream_read.c +++ b/lib/io/test/istream_read.c @@ -100,7 +100,6 @@ int main(int argc, char **argv) TEST_ASSERT(read_off <= end2); } - TEST_ASSERT(dummy->buffer_used == 0); sqfs_drop(dummy); return EXIT_SUCCESS; } diff --git a/lib/io/test/istream_skip.c b/lib/io/test/istream_skip.c index 15d7f5d..3a02c8c 100644 --- a/lib/io/test/istream_skip.c +++ b/lib/io/test/istream_skip.c @@ -89,7 +89,6 @@ int main(int argc, char **argv) TEST_ASSERT(read_off <= end2); } - TEST_ASSERT(dummy->buffer_used == 0); sqfs_drop(dummy); return EXIT_SUCCESS; } diff --git a/lib/io/test/stream_splice.c b/lib/io/test/stream_splice.c index 223c39d..754f9cb 100644 --- a/lib/io/test/stream_splice.c +++ b/lib/io/test/stream_splice.c @@ -91,7 +91,6 @@ int main(int argc, char **argv) TEST_EQUAL_UI(total, out_offset); } - TEST_ASSERT(in->buffer_used == 0); TEST_EQUAL_UI(total, end2); TEST_EQUAL_UI(out_offset, end2); sqfs_drop(in); diff --git a/lib/io/test/xfrm.c b/lib/io/test/xfrm.c index 95b1f72..323987c 100644 --- a/lib/io/test/xfrm.c +++ b/lib/io/test/xfrm.c @@ -439,8 +439,6 @@ static void run_unpack_test(const void *blob, size_t size) ret = istream_read(istream, &c, 1); TEST_EQUAL_I(ret, 0); - TEST_EQUAL_UI(mem_istream->buffer_used, 0); - sqfs_drop(istream); TEST_EQUAL_UI(((sqfs_object_t *)mem_istream)->refcount, 1); TEST_EQUAL_UI(((sqfs_object_t *)xfrm)->refcount, 1); |