-
Notifications
You must be signed in to change notification settings - Fork 139
/
Copy pathrunner.c
35 lines (30 loc) · 1 KB
/
runner.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include <check.h>
#include <stdio.h>
#include <syslog.h>
#include "test_art.c"
int main(void)
{
setlogmask(LOG_UPTO(LOG_DEBUG));
Suite *s1 = suite_create("art");
TCase *tc1 = tcase_create("art");
SRunner *sr = srunner_create(s1);
int nf;
// Add the art tests
suite_add_tcase(s1, tc1);
tcase_add_test(tc1, test_art_init_and_destroy);
tcase_add_test(tc1, test_art_insert);
tcase_add_test(tc1, test_art_insert_verylong);
tcase_add_test(tc1, test_art_insert_search);
tcase_add_test(tc1, test_art_insert_delete);
tcase_add_test(tc1, test_art_insert_random_delete);
tcase_add_test(tc1, test_art_insert_iter);
tcase_add_test(tc1, test_art_iter_prefix);
tcase_add_test(tc1, test_art_long_prefix);
tcase_add_test(tc1, test_art_insert_search_uuid);
tcase_add_test(tc1, test_art_max_prefix_len_scan_prefix);
tcase_set_timeout(tc1, 180);
srunner_run_all(sr, CK_ENV);
nf = srunner_ntests_failed(sr);
srunner_free(sr);
return nf == 0 ? 0 : 1;
}