int __cdecl main(void) { test_mg_strcasestr(); test_alloc_vprintf(); test_base64_encode(); test_match_prefix(); test_remove_double_dots(); test_should_keep_alive(); test_parse_http_message(); test_mg_download(); test_mg_get_var(); test_set_throttle(); test_next_option(); test_mg_stat(); test_skip_quoted(); test_mg_upload(); test_request_replies(); test_api_calls(); test_url_decode(); test_mg_get_cookie(); #ifdef USE_LUA test_lua(); #endif printf("%s\n", "PASSED"); return 0; }
int __cdecl main(void) { test_parse_port_string(); test_mg_strcasestr(); test_alloc_vprintf(); test_base64_encode(); test_match_prefix(); test_remove_double_dots(); test_should_keep_alive(); test_parse_http_message(); test_mg_download(); test_mg_get_var(); test_set_throttle(); test_next_option(); test_mg_stat(); test_skip_quoted(); test_mg_upload(); test_request_replies(); test_api_calls(); test_url_decode(); test_mg_get_cookie(); test_strtoll(); #ifdef USE_LUA test_lua(); #endif printf("TOTAL TESTS: %d, FAILED: %d\n", s_total_tests, s_failed_tests); return s_failed_tests == 0 ? EXIT_SUCCESS : EXIT_FAILURE; }
void MAIN_PRIVATE(void) { #if defined(_WIN32) /* test_parse_port_string requires WSAStartup for IPv6 */ WSADATA data; WSAStartup(MAKEWORD(2, 2), &data); #endif test_alloc_vprintf(0); test_mg_vsnprintf(0); test_remove_double_dots_and_double_slashes(0); test_parse_date_string(0); test_parse_port_string(0); test_parse_http_message(0); test_sha1(0); #if defined(_WIN32) WSACleanup(); #endif }