Nuke warnings in tests
This commit is contained in:
+14
-14
@@ -22,7 +22,7 @@ START_TEST (test_uc_hex_encode_2)
|
||||
|
||||
uc_hex_encode(binary, sizeof binary, hex);
|
||||
|
||||
fail_if(strcmp(hex,"7F8081") != 0, "was %s", hex);
|
||||
fail_if(strcmp(hex,"7F8081") != 0);
|
||||
|
||||
}
|
||||
END_TEST
|
||||
@@ -34,7 +34,7 @@ START_TEST (test_uc_hex_encode_3)
|
||||
|
||||
uc_hex_encode(binary, sizeof binary, hex);
|
||||
|
||||
fail_if(strcmp(hex,"0001090B") != 0, "was %s", hex);
|
||||
fail_if(strcmp(hex,"0001090B") != 0);
|
||||
|
||||
}
|
||||
END_TEST
|
||||
@@ -62,7 +62,7 @@ START_TEST (test_uc_hex_decode_1)
|
||||
|
||||
fail_if(binary[0] != 0x1f);
|
||||
fail_if(binary[1] != 0x22);
|
||||
fail_if(res != binary + 1, "binary %p, res %p", &binary[0], res);
|
||||
fail_if(res != binary + 1);
|
||||
|
||||
}
|
||||
END_TEST
|
||||
@@ -78,7 +78,7 @@ START_TEST (test_uc_hex_decode_2)
|
||||
fail_if(binary[0] != 0x00);
|
||||
fail_if(binary[1] != 0xFF);
|
||||
fail_if(binary[2] != 0x80);
|
||||
fail_if(res != binary + 3, "binary %p, res %p", &binary[0], res);
|
||||
fail_if(res != binary + 3);
|
||||
|
||||
}
|
||||
END_TEST
|
||||
@@ -110,7 +110,7 @@ START_TEST (test_uc_hex_decode_empty_string)
|
||||
fail_if(binary[0] != 0x11);
|
||||
fail_if(binary[1] != 0x11);
|
||||
fail_if(binary[2] != 0x11);
|
||||
fail_if(res != binary, "length %zu\n", res - binary);
|
||||
fail_if(res != binary);
|
||||
|
||||
}
|
||||
END_TEST
|
||||
@@ -125,7 +125,7 @@ START_TEST (test_uc_hex_decode_spaces)
|
||||
fail_if(binary[0] != 0x11);
|
||||
fail_if(binary[1] != 0x12);
|
||||
fail_if(binary[2] != 0x13);
|
||||
fail_if(res != binary+3, "length %zu\n", res - binary);
|
||||
fail_if(res != binary+3);
|
||||
|
||||
}
|
||||
END_TEST
|
||||
@@ -141,7 +141,7 @@ START_TEST (test_uc_hex_decode_spaces2)
|
||||
fail_if(binary[0] != 0x11);
|
||||
fail_if(binary[1] != 0x12);
|
||||
fail_if(binary[2] != 0x13);
|
||||
fail_if(res != binary+3, "length %zu\n", res - binary);
|
||||
fail_if(res != binary+3);
|
||||
|
||||
}
|
||||
END_TEST
|
||||
@@ -156,7 +156,7 @@ START_TEST (test_uc_hex_decode_spaces_empty)
|
||||
|
||||
fail_if(binary[0] != 0x11);
|
||||
fail_if(binary[1] != 0x12);
|
||||
fail_if(res != binary, "length %zu\n", res - binary);
|
||||
fail_if(res != binary);
|
||||
|
||||
}
|
||||
END_TEST
|
||||
@@ -201,7 +201,7 @@ START_TEST (test_uc_hex_encode_delim_1)
|
||||
|
||||
res = uc_hex_encode_delim(binary, sizeof binary, hex, sizeof hex, " ");
|
||||
|
||||
fail_if(strcmp(hex, "FF 00 7F 0A ") != 0, "hex was '%s'", hex);
|
||||
fail_if(strcmp(hex, "FF 00 7F 0A ") != 0);
|
||||
*res = 0;
|
||||
fail_if(res != hex + 12);
|
||||
|
||||
@@ -216,8 +216,8 @@ START_TEST (test_uc_hex_encode_delim_2)
|
||||
|
||||
res = uc_hex_encode_delim(binary, sizeof binary, hex, sizeof hex, " \n");
|
||||
|
||||
fail_if(strcmp(hex, "FF \n00 ") != 0, "hex was '%s'", hex);
|
||||
fail_if(res != hex + 7, "sz was %zu", res - hex);
|
||||
fail_if(strcmp(hex, "FF \n00 ") != 0);
|
||||
fail_if(res != hex + 7);
|
||||
|
||||
}
|
||||
END_TEST
|
||||
@@ -230,7 +230,7 @@ START_TEST (test_uc_hex_encode_delim_zero_len)
|
||||
|
||||
res = uc_hex_encode_delim(binary, 0, hex, sizeof hex, " \n");
|
||||
|
||||
fail_if(strcmp(hex, "") != 0, "hex was '%s'", hex);
|
||||
fail_if(strcmp(hex, "") != 0);
|
||||
fail_if(res != hex);
|
||||
|
||||
}
|
||||
@@ -247,7 +247,7 @@ START_TEST (test_uc_hex_decode_lowercase)
|
||||
|
||||
fail_if(binary[0] != 0x1f);
|
||||
fail_if(binary[1] != 0x22);
|
||||
fail_if(res != binary + 1, "binary %p, res %p", &binary[0], res);
|
||||
fail_if(res != binary + 1);
|
||||
|
||||
}
|
||||
END_TEST
|
||||
@@ -263,7 +263,7 @@ Suite *hex_suite(void)
|
||||
tcase_add_test(tc, test_uc_hex_encode_delim_1);
|
||||
tcase_add_test(tc, test_uc_hex_encode_delim_2);
|
||||
tcase_add_test(tc, test_uc_hex_encode_delim_zero_len);
|
||||
|
||||
|
||||
|
||||
tcase_add_test(tc, test_uc_hex_decode_1);
|
||||
tcase_add_test(tc, test_uc_hex_decode_2);
|
||||
|
||||
Reference in New Issue
Block a user