aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2024-04-23 16:35:08 +0300
committerLasse Collin <lasse.collin@tukaani.org>2024-04-23 16:35:08 +0300
commit26c69be80523b05c84dea86c47c4ddd9a10945d7 (patch)
tree2427e04ec7921614d8c97bf1fe39e59b8d7e5a6f
parent4f6af853bc99904efb8b6c28a0af7b81a8476c1b (diff)
downloadxz-26c69be80523b05c84dea86c47c4ddd9a10945d7.tar.gz
Tests: test_filter_str: Move one assertion and add a comment
-rw-r--r--tests/test_filter_str.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/test_filter_str.c b/tests/test_filter_str.c
index c146270b..686dd77e 100644
--- a/tests/test_filter_str.c
+++ b/tests/test_filter_str.c
@@ -436,6 +436,10 @@ test_lzma_str_from_filters(void)
assert_true(lzma_str_to_filters("x86 lzma2", NULL, filters, 0, NULL)
== NULL);
+ // It always allocates the options structure even when it's not
+ // needed due to start_offset = 0 being the default.
+ assert_true(filters[0].options != NULL);
+
assert_lzma_ret(lzma_str_from_filters(&output_str, filters, 0, NULL),
LZMA_OK);
@@ -444,9 +448,7 @@ test_lzma_str_from_filters(void)
free(output_str);
// Test setting BCJ option to NULL.
- assert_false(filters[0].options == NULL);
free(filters[0].options);
-
filters[0].options = NULL;
assert_lzma_ret(lzma_str_from_filters(&output_str, filters, 0, NULL),