3 #include <CUnit/CUnit.h>
4 #include <CUnit/Basic.h>
6 /* #include <coap.h> */
9 #include "test_options.h"
11 #include "test_error_response.h"
12 #include "test_sendqueue.h"
13 #include "test_wellknown.h"
15 int main(int argc, char **argv)
18 CU_BasicRunMode run_mode = CU_BRM_VERBOSE;
20 if (CU_initialize_registry() != CUE_SUCCESS)
22 fprintf(stderr, "E: test framework initialization failed\n");
27 t_init_option_tests();
29 t_init_error_response_tests();
30 t_init_sendqueue_tests();
31 t_init_wellknown_tests();
33 CU_basic_set_mode(run_mode);
34 result = CU_basic_run_tests();
36 CU_cleanup_registry();
38 printf("\n\nknown bugs:\n");
39 printf("\t- Test: t_parse_uri5 ... FAILED\n"
40 "\t 1. test_uri.c:109 - CU_FAIL(\"invalid port not detected\")\n");
41 printf("\t- Test: t_parse_uri12 ... FAILED\n"
42 "\t 1. test_uri.c:301 - result == 4\n"
43 "\t 2. test_uri.c:302 - buflen == sizeof(uricheckbuf)\n"
44 "\t 3. test_uri.c:303 - CU_ASSERT_NSTRING_EQUAL(buf,uricheckbuf,buflen)\n"
45 "\t 4. test_uri.c:309 - buflen == sizeof(querycheckbuf)\n"
46 "\t 5. test_uri.c:310 - CU_ASSERT_NSTRING_EQUAL(buf,querycheckbuf,buflen)\n");
48 "\t- Test: t_error_response8 ... FAILED\n"
49 "\t 1. test_error_response.c:310 - response->length == sizeof(teststr)\n"
50 "\t 2. test_error_response.c:316 - memcmp(response->hdr, teststr, sizeof(teststr)) == 0\n");