~mdw
/
disorder
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8120a81
)
Check unhex() returns non-NULL
author
Richard Kettlewell
<richard@deodand>
Thu, 17 Jun 2010 20:10:46 +0000
(21:10 +0100)
committer
Richard Kettlewell
<richard@deodand>
Thu, 17 Jun 2010 20:10:46 +0000
(21:10 +0100)
libtests/t-hex.c
patch
|
blob
|
blame
|
history
diff --git
a/libtests/t-hex.c
b/libtests/t-hex.c
index
a6f1b32
..
f2d5994
100644
(file)
--- 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);