Rich Lane | d983aa5 | 2013-06-13 11:48:37 -0700 | [diff] [blame] | 1 | :: include('_copyright.c') |
| 2 | |
Rich Lane | 99c29c3 | 2013-05-29 17:09:21 -0700 | [diff] [blame] | 3 | /** |
| 4 | * @file test_main |
| 5 | * |
| 6 | * The main kickoff point for running all tests |
| 7 | */ |
| 8 | |
| 9 | #include <locitest/unittest.h> |
| 10 | #include <locitest/test_common.h> |
| 11 | |
YAMAMOTO Takashi | 071b591 | 2013-07-02 08:37:39 +0900 | [diff] [blame] | 12 | /* mcheck is a glibc extension */ |
| 13 | #if defined(__linux__) |
Rich Lane | 99c29c3 | 2013-05-29 17:09:21 -0700 | [diff] [blame] | 14 | #include <mcheck.h> |
| 15 | #define MCHECK_INIT mcheck(NULL) |
YAMAMOTO Takashi | 071b591 | 2013-07-02 08:37:39 +0900 | [diff] [blame] | 16 | #else |
Rich Lane | 99c29c3 | 2013-05-29 17:09:21 -0700 | [diff] [blame] | 17 | #define MCHECK_INIT do { } while (0) |
| 18 | #endif |
| 19 | |
| 20 | int |
| 21 | main(int argc, char *argv[]) |
| 22 | { |
| 23 | MCHECK_INIT; |
| 24 | |
| 25 | RUN_TEST(ident_macros); |
| 26 | |
| 27 | TEST_ASSERT(run_unified_accessor_tests() == TEST_PASS); |
| 28 | TEST_ASSERT(run_match_tests() == TEST_PASS); |
| 29 | |
| 30 | TEST_ASSERT(run_utility_tests() == TEST_PASS); |
| 31 | |
| 32 | /* These are deprecated by the unified accessor tests */ |
| 33 | TEST_ASSERT(run_scalar_acc_tests() == TEST_PASS); |
| 34 | TEST_ASSERT(run_list_tests() == TEST_PASS); |
| 35 | TEST_ASSERT(run_message_tests() == TEST_PASS); |
Rich Lane | 99c29c3 | 2013-05-29 17:09:21 -0700 | [diff] [blame] | 36 | |
| 37 | TEST_ASSERT(run_validator_tests() == TEST_PASS); |
| 38 | |
| 39 | TEST_ASSERT(run_list_limits_tests() == TEST_PASS); |
| 40 | |
| 41 | RUN_TEST(ext_objs); |
| 42 | |
Rich Lane | ccae031 | 2013-07-21 23:34:13 -0700 | [diff] [blame] | 43 | TEST_ASSERT(test_datafiles() == TEST_PASS); |
| 44 | |
Rich Lane | 99c29c3 | 2013-05-29 17:09:21 -0700 | [diff] [blame] | 45 | return global_error; |
| 46 | } |