mirror of https://git.tukaani.org/xz.git
Tests: test_filter_str: Move one assertion and add a comment
(cherry picked from commit 26c69be805
)
This commit is contained in:
parent
ef35365984
commit
1c0dfaee63
|
@ -437,6 +437,10 @@ test_lzma_str_from_filters(void)
|
||||||
assert_true(lzma_str_to_filters("x86 lzma2", NULL, filters, 0, NULL)
|
assert_true(lzma_str_to_filters("x86 lzma2", NULL, filters, 0, NULL)
|
||||||
== 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),
|
assert_lzma_ret(lzma_str_from_filters(&output_str, filters, 0, NULL),
|
||||||
LZMA_OK);
|
LZMA_OK);
|
||||||
|
|
||||||
|
@ -445,9 +449,7 @@ test_lzma_str_from_filters(void)
|
||||||
free(output_str);
|
free(output_str);
|
||||||
|
|
||||||
// Test setting BCJ option to NULL.
|
// Test setting BCJ option to NULL.
|
||||||
assert_false(filters[0].options == NULL);
|
|
||||||
free(filters[0].options);
|
free(filters[0].options);
|
||||||
|
|
||||||
filters[0].options = NULL;
|
filters[0].options = NULL;
|
||||||
|
|
||||||
assert_lzma_ret(lzma_str_from_filters(&output_str, filters, 0, NULL),
|
assert_lzma_ret(lzma_str_from_filters(&output_str, filters, 0, NULL),
|
||||||
|
|
Loading…
Reference in New Issue