X-Git-Url: https://git.distorted.org.uk/~mdw/disorder/blobdiff_plain/812b526d127c6657e571db8b33a58137af6709cd..dbad4ee4e5c16f0f3c26b0e2967350e531762d76:/libtests/t-hex.c diff --git a/libtests/t-hex.c b/libtests/t-hex.c index a6f1b32..f2d5994 100644 --- a/libtests/t-hex.c +++ b/libtests/t-hex.c @@ -52,12 +52,15 @@ static void test_hex(void) { check_string(hex(h, sizeof h), "00ff807f"); check_string(hex(0, 0), ""); u = unhex("00ff807f", &ul); + insist(u != 0); insist(ul == 4); insist(memcmp(u, h, 4) == 0); u = unhex("00FF807F", &ul); + insist(u != 0); insist(ul == 4); insist(memcmp(u, h, 4) == 0); u = unhex("", &ul); + insist(u != 0); insist(ul == 0); fprintf(stderr, "2 ERROR reports expected {\n"); insist(unhex("F", 0) == 0);