blob: 36bf60cac16d1806fa66f1327b21bfe9f2847eb2 [file] [log] [blame]
Rich Laned983aa52013-06-13 11:48:37 -07001:: include('_copyright.c')
2
Rich Lane99c29c32013-05-29 17:09:21 -07003/**
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 Takashi071b5912013-07-02 08:37:39 +090012/* mcheck is a glibc extension */
13#if defined(__linux__)
Rich Lane99c29c32013-05-29 17:09:21 -070014#include <mcheck.h>
15#define MCHECK_INIT mcheck(NULL)
YAMAMOTO Takashi071b5912013-07-02 08:37:39 +090016#else
Rich Lane99c29c32013-05-29 17:09:21 -070017#define MCHECK_INIT do { } while (0)
18#endif
19
20int
21main(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 Lane99c29c32013-05-29 17:09:21 -070036
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 Laneccae0312013-07-21 23:34:13 -070043 TEST_ASSERT(test_datafiles() == TEST_PASS);
44
Rich Lane99c29c32013-05-29 17:09:21 -070045 return global_error;
46}