mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
d4fed28523
tests from unit-tests/*/*_t.c (now under test/unit). The valgrind/pool test is missing, since it's not really a unit test and probably not too valuable either. Available via "make unit" (and if --enable-testing was passed to configure, also executed by make check).
26 lines
483 B
C
26 lines
483 B
C
#include <CUnit/CUnit.h>
|
|
#include <CUnit/Basic.h>
|
|
|
|
#define DECL(n) \
|
|
extern CU_TestInfo n ## _list[]; \
|
|
int n ## _init(); \
|
|
int n ## _fini();
|
|
#define USE(n) { (char*) #n, n##_init, n##_fini, n##_list }
|
|
|
|
DECL(bitset);
|
|
DECL(regex);
|
|
|
|
CU_SuiteInfo suites[] = {
|
|
USE(bitset),
|
|
USE(regex),
|
|
CU_SUITE_INFO_NULL
|
|
};
|
|
|
|
int main() {
|
|
CU_initialize_registry();
|
|
CU_register_suites(suites);
|
|
CU_basic_set_mode(CU_BRM_VERBOSE);
|
|
CU_basic_run_tests();
|
|
return CU_get_number_of_failures() != 0;
|
|
}
|