Endianness test

This commit is contained in:
cpq committed 2022-11-09 09:20:15 +00:00
1 parent e580d4e637
commit 28a4778187
7 files changed
+55 -65

No files matched your search

+16 -24
View File
@@ -2304,7 +2304,7 @@ static void w2(struct mg_connection *c, int ev, void *ev_data, void *fn_data) {
} else if (ev == MG_EV_WS_MSG) {
struct mg_ws_message *wm = (struct mg_ws_message *) ev_data;
MG_INFO(("Got WS, %lu", wm->data.len));
mg_hexdump(wm->data.ptr, wm->data.len);
//mg_hexdump(wm->data.ptr, wm->data.len);
if (wm->data.len == 9) {
ASSERT(mg_strcmp(wm->data, mg_str("hi there!")) == 0);
} else if (wm->data.len == 3) {
@@ -2635,21 +2635,17 @@ int main(void) {
test_str();
test_globmatch();
test_get_header_var();
if (MG_BIG_ENDIAN || sizeof(void *) != 4) test_rewrites();
test_rewrites();
test_check_ip_acl();
test_udp();
if (MG_BIG_ENDIAN || sizeof(void *) != 4) {
test_pipe();
test_packed();
}
test_pipe();
test_packed();
test_crc32();
test_multipart();
test_invalid_listen_addr();
if (MG_BIG_ENDIAN || sizeof(void *) != 4) {
test_http_chunked();
test_http_upload();
test_http_stream_buffer();
}
test_http_chunked();
test_http_upload();
test_http_stream_buffer();
test_http_parse();
test_util();
test_dns();
@@ -2660,20 +2656,16 @@ int main(void) {
test_base64();
test_http_get_var();
test_tls();
if (MG_BIG_ENDIAN || sizeof(void *) != 4) {
test_ws();
test_ws_fragmentation();
test_http_client();
}
if (sizeof(void *) != 4) test_http_server();
if (MG_BIG_ENDIAN || sizeof(void *) != 4) {
test_http_404();
test_http_no_content_length();
test_http_pipeline();
test_http_range();
}
test_ws();
test_ws_fragmentation();
test_http_client();
test_http_server();
test_http_404();
test_http_no_content_length();
test_http_pipeline();
test_http_range();
test_sntp();
if (MG_BIG_ENDIAN || sizeof(void *) != 4) test_mqtt();
test_mqtt();
printf("SUCCESS. Total tests: %d\n", s_num_tests);
return EXIT_SUCCESS;