1 #include <stdio.h>
2 
3 #include <CUnit/CUnit.h>
4 #include <CUnit/Basic.h>
5 
6 /* #include <coap.h> */
7 
8 #include "test_uri.h"
9 #include "test_options.h"
10 #include "test_pdu.h"
11 #include "test_error_response.h"
12 #include "test_sendqueue.h"
13 #include "test_wellknown.h"
14 
15 #ifdef __GNUC__
16 #define UNUSED_PARAM __attribute__ ((unused))
17 #else /* not a GCC */
18 #define UNUSED_PARAM
19 #endif /* GCC */
20 
21 int
main(int argc UNUSED_PARAM,char ** argv UNUSED_PARAM)22 main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) {
23   CU_ErrorCode result;
24   CU_BasicRunMode run_mode = CU_BRM_VERBOSE;
25 
26   if (CU_initialize_registry() != CUE_SUCCESS) {
27     fprintf(stderr, "E: test framework initialization failed\n");
28     return -2;
29   }
30 
31   t_init_uri_tests();
32   t_init_option_tests();
33   t_init_pdu_tests();
34   t_init_error_response_tests();
35   t_init_sendqueue_tests();
36   t_init_wellknown_tests();
37 
38   CU_basic_set_mode(run_mode);
39   result = CU_basic_run_tests();
40 
41   CU_cleanup_registry();
42 
43   return result;
44 }
45