]> git.ipfire.org Git - thirdparty/xz.git/commitdiff
Tests: Fix test_filter_flags copy/paste error.
authorJia Tan <jiat0218@gmail.com>
Wed, 11 Jan 2023 12:58:31 +0000 (20:58 +0800)
committerLasse Collin <lasse.collin@tukaani.org>
Wed, 11 Jan 2023 15:31:54 +0000 (17:31 +0200)
tests/test_filter_flags.c

index 28e75d2f5d038bd5be968d2df0916045b7bfd3d4..5cfccea9165490f6932e8b3124b1b425fcdd215c 100644 (file)
@@ -108,7 +108,7 @@ test_lzma_filter_flags_size(void)
        // If the BCJ filters are not configured and built, then ARRAY_SIZE()
        // will return 0 and cause a warning because the for loop will never
        // execute since any unsigned number cannot be < 0 (-Werror=type-limits).
-       const uint32_t bcj_array_size = ARRAY_SIZE(bcj_filters_decoders);
+       const uint32_t bcj_array_size = ARRAY_SIZE(bcj_filters_encoders);
        for (uint32_t i = 0; i < bcj_array_size; i++) {
                assert_lzma_ret(lzma_filter_flags_size(&size,
                                &bcj_filters_encoders[i]), LZMA_OK);
@@ -220,7 +220,7 @@ test_lzma_filter_flags_encode(void)
                .start_offset = 257
        };
 
-       const uint32_t bcj_array_size = ARRAY_SIZE(bcj_filters_decoders);
+       const uint32_t bcj_array_size = ARRAY_SIZE(bcj_filters_encoders);
        for (uint32_t i = 0; i < bcj_array_size; i++) {
                // NULL options should pass for bcj filters
                verify_filter_flags_encode(&bcj_filters_encoders[i], true);