aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_block_header.c9
-rwxr-xr-xtests/test_compress.sh4
-rw-r--r--tests/test_filter_flags.c2
3 files changed, 9 insertions, 6 deletions
diff --git a/tests/test_block_header.c b/tests/test_block_header.c
index 1d8e9d39..7f94d837 100644
--- a/tests/test_block_header.c
+++ b/tests/test_block_header.c
@@ -24,6 +24,8 @@ static uint8_t buf[LZMA_BLOCK_HEADER_SIZE_MAX];
static lzma_block known_options;
static lzma_block decoded_options;
+static lzma_options_lzma opt_lzma;
+
static lzma_filter filters_none[1] = {
{
.id = LZMA_VLI_UNKNOWN,
@@ -34,7 +36,7 @@ static lzma_filter filters_none[1] = {
static lzma_filter filters_one[2] = {
{
.id = LZMA_FILTER_LZMA2,
- .options = (void *)(&lzma_preset_lzma[0]),
+ .options = &opt_lzma,
}, {
.id = LZMA_VLI_UNKNOWN,
}
@@ -53,7 +55,7 @@ static lzma_filter filters_four[5] = {
.options = NULL,
}, {
.id = LZMA_FILTER_LZMA2,
- .options = (void *)(&lzma_preset_lzma[0]),
+ .options = &opt_lzma,
}, {
.id = LZMA_VLI_UNKNOWN,
}
@@ -75,7 +77,7 @@ static lzma_filter filters_five[6] = {
.options = NULL,
}, {
.id = LZMA_FILTER_LZMA2,
- .options = (void *)(&lzma_preset_lzma[0]),
+ .options = &opt_lzma,
}, {
.id = LZMA_VLI_UNKNOWN,
}
@@ -230,6 +232,7 @@ int
main(void)
{
lzma_init();
+ succeed(lzma_lzma_preset(&opt_lzma, 0));
test1();
test2();
diff --git a/tests/test_compress.sh b/tests/test_compress.sh
index 49f3fd50..05668191 100755
--- a/tests/test_compress.sh
+++ b/tests/test_compress.sh
@@ -121,8 +121,8 @@ do
--armthumb \
--sparc
do
- test_lzma $ARGS --lzma2=dict=64KiB,fb=32,mode=fast
- test_lzma --subblock $ARGS --lzma2=dict=64KiB,fb=32,mode=fast
+ test_lzma $ARGS --lzma2=dict=64KiB,nice=32,mode=fast
+ test_lzma --subblock $ARGS --lzma2=dict=64KiB,nice=32,mode=fast
done
echo
diff --git a/tests/test_filter_flags.c b/tests/test_filter_flags.c
index 585138d1..2b53a688 100644
--- a/tests/test_filter_flags.c
+++ b/tests/test_filter_flags.c
@@ -200,7 +200,7 @@ static void
test_lzma(void)
{
// Test 1
- known_flags.id = LZMA_FILTER_LZMA;
+ known_flags.id = LZMA_FILTER_LZMA1;
known_flags.options = NULL;
expect(encode(99));