1 ///////////////////////////////////////////////////////////////////////////////
3 /// \file test_hardware.c
4 /// \brief Tests src/liblzma/api/lzma/hardware.h API functions
6 /// Since the output values of these functions are hardware dependent, these
7 /// tests are trivial. They are simply used to detect errors and machines
8 /// that these function are not supported on.
12 // This file has been put into the public domain.
13 // You can do whatever you want with this file.
15 ///////////////////////////////////////////////////////////////////////////////
22 test_lzma_physmem(void)
24 // NOTE: Use _skip instead of _fail because 0 can also mean that we
25 // don't know how to get this information on this operating system.
26 if (lzma_physmem() == 0)
27 assert_skip("Could not determine amount of physical memory");
32 test_lzma_cputhreads(void)
34 #ifndef MYTHREAD_ENABLED
35 assert_skip("Threading support disabled");
37 if (lzma_cputhreads() == 0)
38 assert_skip("Could not determine cpu core count");
44 main(int argc
, char **argv
)
46 tuktest_start(argc
, argv
);
47 tuktest_run(test_lzma_physmem
);
48 tuktest_run(test_lzma_cputhreads
);