Tests: test_filter_str: Tweak comments and white space

(cherry picked from commit 4f6af853bc)
This commit is contained in:
Lasse Collin 2024-04-23 16:26:06 +03:00
parent c35e10fb37
commit ef35365984
1 changed files with 3 additions and 0 deletions

View File

@ -461,6 +461,7 @@ test_lzma_str_from_filters(void)
lzma_options_lzma opts; lzma_options_lzma opts;
assert_false(lzma_lzma_preset(&opts, LZMA_PRESET_DEFAULT)); assert_false(lzma_lzma_preset(&opts, LZMA_PRESET_DEFAULT));
// Test with too many Filters (array terminated after 4+ filters). // Test with too many Filters (array terminated after 4+ filters).
lzma_filter oversized_filters[LZMA_FILTERS_MAX + 2]; lzma_filter oversized_filters[LZMA_FILTERS_MAX + 2];
@ -599,6 +600,8 @@ test_lzma_str_list_filters(void)
assert_lzma_ret(lzma_str_list_filters(&str, LZMA_VLI_UNKNOWN, assert_lzma_ret(lzma_str_list_filters(&str, LZMA_VLI_UNKNOWN,
LZMA_STR_ENCODER, NULL), LZMA_OK); LZMA_STR_ENCODER, NULL), LZMA_OK);
// NOTE: Just checking for "contains" is a bit weak check as
// "arm" matches "armthumb" and "arm64" too.
for (uint32_t i = 0; i < ARRAY_SIZE(supported_encoders); i++) for (uint32_t i = 0; i < ARRAY_SIZE(supported_encoders); i++)
assert_str_contains(str, supported_encoders[i]); assert_str_contains(str, supported_encoders[i]);