]> git.ipfire.org Git - thirdparty/xz.git/commitdiff
Tests: test_index: Verify also iter.block.number_in_stream
authorLasse Collin <lasse.collin@tukaani.org>
Sat, 27 Apr 2024 11:51:52 +0000 (14:51 +0300)
committerLasse Collin <lasse.collin@tukaani.org>
Tue, 21 May 2024 21:12:07 +0000 (00:12 +0300)
(cherry picked from commit 12313a3b6596cdcf012e180597f84d231f8730d3)

tests/test_index.c

index 9ad7eab796962c0baf0bc062e75c8351a6fcaeb2..b7e91c26c345d17d00c637d389ee317c1d931372 100644 (file)
@@ -703,6 +703,7 @@ test_lzma_index_iter_rewind(void)
                assert_false(lzma_index_iter_next(&iter,
                                LZMA_INDEX_ITER_BLOCK));
                assert_uint_eq(iter.block.number_in_file, i + 1);
+               assert_uint_eq(iter.block.number_in_stream, i + 1);
        }
 
        // Rewind back to the beginning and iterate over the Blocks again
@@ -713,6 +714,7 @@ test_lzma_index_iter_rewind(void)
                assert_false(lzma_index_iter_next(&iter,
                                LZMA_INDEX_ITER_BLOCK));
                assert_uint_eq(iter.block.number_in_file, i + 1);
+               assert_uint_eq(iter.block.number_in_stream, i + 1);
        }
 
        // Next concatenate two more lzma_indexes, iterate over them,