Files
libcoap/tests/testdriver.c
T
Olaf Bergmann c6412f2038 Rework of option parser to support "Klaus encoding" (coap-13), unit tests
The subdirectory "tests" now contains a growing set of unit tests for the
libcoap API. To use this, you will need CUnit (see http://cunit.sourceforge.net)
and must configure with the option --with-tests.
2013-01-07 17:37:49 +01:00

30 lines
540 B
C

#include <stdio.h>
#include <CUnit/CUnit.h>
#include <CUnit/Basic.h>
/* #include <coap.h> */
#include "test_uri.h"
#include "test_options.h"
int
main(int argc, char **argv) {
CU_ErrorCode result;
CU_BasicRunMode run_mode = CU_BRM_VERBOSE;
if (CU_initialize_registry() != CUE_SUCCESS) {
fprintf(stderr, "E: test framework initialization failed\n");
return -2;
}
t_init_uri_tests();
t_init_option_tests();
CU_basic_set_mode(run_mode);
result = CU_basic_run_tests();
CU_cleanup_registry();
return result;
}