mirror of
https://github.com/obgm/libcoap.git
synced 2026-10-30 06:25:48 +03:00
Add in some new .in files, but still keep original files in distribution files. Essentially, use coap@LIBCOAP_API_VERSION@ (or equivalent) instead of coap2. so resultant files have the correct value. coap_config.h.lwip.in: (new) coap_config.h.riot.in: (new) include/coap2/coap.h.windows.in: (new) As per https://gcc.gnu.org/onlinedocs/cpp/Search-Path.html, many of the coap2/ prefixes are not required for #include, so these have been removed. Make sure that the test suite accesses the latest source version of coap@LIBCOAP_API_VERSION@/coap.h by creating a tests/test_common.h.in that makes the correct tests/test_common.h which is included in all of the test suite files.
46 lines
969 B
C
46 lines
969 B
C
#include <stdio.h>
|
|
|
|
#include <CUnit/CUnit.h>
|
|
#include <CUnit/Basic.h>
|
|
|
|
#include "test_common.h"
|
|
#include "test_uri.h"
|
|
#include "test_encode.h"
|
|
#include "test_options.h"
|
|
#include "test_pdu.h"
|
|
#include "test_error_response.h"
|
|
#include "test_session.h"
|
|
#include "test_sendqueue.h"
|
|
#include "test_wellknown.h"
|
|
#include "test_tls.h"
|
|
|
|
int
|
|
main(int argc COAP_UNUSED, char **argv COAP_UNUSED) {
|
|
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;
|
|
}
|
|
|
|
coap_startup();
|
|
t_init_uri_tests();
|
|
t_init_encode_tests();
|
|
t_init_option_tests();
|
|
t_init_pdu_tests();
|
|
t_init_error_response_tests();
|
|
t_init_session_tests();
|
|
t_init_sendqueue_tests();
|
|
t_init_wellknown_tests();
|
|
t_init_tls_tests();
|
|
|
|
CU_basic_set_mode(run_mode);
|
|
result = CU_basic_run_tests();
|
|
|
|
CU_cleanup_registry();
|
|
coap_cleanup();
|
|
|
|
return result;
|
|
}
|