]> git.ipfire.org Git - thirdparty/xz.git/commitdiff
Tests: test_index_hash: Add an assert_uint_eq(). 7/head
authorLasse Collin <lasse.collin@tukaani.org>
Fri, 6 Jan 2023 15:58:48 +0000 (17:58 +0200)
committerLasse Collin <lasse.collin@tukaani.org>
Fri, 6 Jan 2023 15:58:48 +0000 (17:58 +0200)
tests/test_index_hash.c

index 063ec0f2204897c88a1d0112369aa73d0221a647..2cf9113821cfcbf47e6d6e30c7d942996c03fef3 100644 (file)
@@ -140,6 +140,9 @@ generate_index(uint8_t *buf, const lzma_vli *unpadded_sizes,
 
        // Add the CRC32
        write32le(buf + out_pos, lzma_crc32(buf, out_pos, 0));
+       out_pos += 4;
+
+       assert_uint_eq(out_pos, index_max_size);
 }
 #endif
 #endif