]> git.ozlabs.org Git - ccan/blobdiff - ccan/tal/test/run-count.c
tal: make tal_len/tal_count(NULL) return 0.
[ccan] / ccan / tal / test / run-count.c
index 6a4eb4ab8ada57a9aef4d772fedf61160e6662a4..33049b9f78d3e2edc9e675ed2afc7450d9b9597d 100644 (file)
@@ -43,7 +43,11 @@ int main(void)
 
        tal_set_backend(my_alloc, my_realloc, my_free, NULL);
 
 
        tal_set_backend(my_alloc, my_realloc, my_free, NULL);
 
-       plan_tests(19 * 3);
+       plan_tests(2 + 19 * 3);
+
+       p1 = NULL;
+       ok1(tal_len(p1) == 0);
+       ok1(tal_count(p1) == 0);
 
        for (i = 0; i < 3; i++) {
                move = i;
 
        for (i = 0; i < 3; i++) {
                move = i;