blob: 86f7ae6664f6941ce16c19bc68c9d243f3aa9aeb [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);
36 TEST_ASSERT(run_setup_from_add_tests() == TEST_PASS);
37
38 TEST_ASSERT(run_validator_tests() == TEST_PASS);
39
40 TEST_ASSERT(run_list_limits_tests() == TEST_PASS);
41
42 RUN_TEST(ext_objs);
43
Rich Laneccae0312013-07-21 23:34:13 -070044 TEST_ASSERT(test_datafiles() == TEST_PASS);
45
Rich Lane99c29c32013-05-29 17:09:21 -070046 return global_error;
47}