1 // SPDX-License-Identifier: 0BSD
3 ///////////////////////////////////////////////////////////////////////////////
5 /// \file test_hardware.c
6 /// \brief Tests src/liblzma/api/lzma/hardware.h API functions
8 /// Since the output values of these functions are hardware dependent, these
9 /// tests are trivial. They are simply used to detect errors and machines
10 /// that these function are not supported on.
14 ///////////////////////////////////////////////////////////////////////////////
21 test_lzma_physmem(void)
23 // NOTE: Use _skip instead of _fail because 0 can also mean that we
24 // don't know how to get this information on this operating system.
25 if (lzma_physmem() == 0)
26 assert_skip("Could not determine amount of physical memory");
31 test_lzma_cputhreads(void)
33 #ifndef MYTHREAD_ENABLED
34 assert_skip("Threading support disabled");
36 if (lzma_cputhreads() == 0)
37 assert_skip("Could not determine cpu core count");
43 main(int argc
, char **argv
)
45 tuktest_start(argc
, argv
);
46 tuktest_run(test_lzma_physmem
);
47 tuktest_run(test_lzma_cputhreads
);