aboutsummaryrefslogtreecommitdiff
path: root/tests/test_check.c
diff options
context:
space:
mode:
authorJia Tan <jiat0218@gmail.com>2022-10-05 23:54:12 +0800
committerLasse Collin <lasse.collin@tukaani.org>2022-10-06 17:34:27 +0300
commit84963318952064a93bfc52edd6b0ef70593384ee (patch)
treec89b493e4f8c3cde1644c4e2e2810cdf35a358db /tests/test_check.c
parentTests: Include mythread.h in the tests that use MYTHREAD_ENABLED. (diff)
downloadxz-84963318952064a93bfc52edd6b0ef70593384ee.tar.xz
Tests: Fix compilation issues.
test_bcj_exact_size, test_check, test_hardware, and test_index will all now compile and skip properly if encoders or decoders are disabled. Also fixed a small typo (disabed -> disabled). Thanks to Sebastian Andrzej Siewior.
Diffstat (limited to 'tests/test_check.c')
-rw-r--r--tests/test_check.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/test_check.c b/tests/test_check.c
index cbe6917d..3c3a6e46 100644
--- a/tests/test_check.c
+++ b/tests/test_check.c
@@ -157,6 +157,9 @@ test_lzma_check_size(void)
static void
test_lzma_get_check_st(void)
{
+#ifndef HAVE_DECODERS
+ assert_skip("Decoder support disabled");
+#else
const uint32_t flags = LZMA_TELL_ANY_CHECK |
LZMA_TELL_UNSUPPORTED_CHECK |
LZMA_TELL_NO_CHECK;
@@ -230,6 +233,7 @@ test_lzma_get_check_st(void)
#endif
lzma_end(&strm);
+#endif
}
@@ -237,7 +241,9 @@ static void
test_lzma_get_check_mt(void)
{
#ifndef MYTHREAD_ENABLED
- assert_skip("Threading support disabed");
+ assert_skip("Threading support disabled");
+#elif !defined(HAVE_DECODERS)
+ assert_skip("Decoder support disabled");
#else
const uint32_t flags = LZMA_TELL_ANY_CHECK |
LZMA_TELL_UNSUPPORTED_CHECK |