-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtst.c
45 lines (34 loc) · 928 Bytes
/
tst.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
35
36
37
38
39
40
41
42
43
44
45
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <CUnit/CUnit.h>
#include <CUnit/TestDB.h>
#include <CUnit/Basic.h>
extern CU_SuiteInfo osip_tests_suites[];
extern CU_SuiteInfo ev_tests_suites[];
/**
* main
* @brief The main function (first executed function)
*
* @return 0 in success, or positive value for erreur.
*/
int main(int argc, char * argv[])
{
CU_pSuite pSuite = NULL;
int i = 0;
/* initialize the CUnit test registry */
if (CUE_SUCCESS != CU_initialize_registry()) {
return CU_get_error();
}
if (CUE_SUCCESS != CU_register_suites(osip_tests_suites)) {
return CU_get_error();
}
if (CUE_SUCCESS != CU_register_suites(ev_tests_suites)) {
return CU_get_error();
}
/* Run all tests using the CUnit Basic interface */
CU_basic_set_mode(CU_BRM_VERBOSE);
CU_basic_run_tests();
CU_cleanup_registry();
return CU_get_error();
}