]> git.ozlabs.org Git - ccan/blobdiff - ccan/talloc/test/run-external-alloc.c
talloc: use failtest to test failure paths.
[ccan] / ccan / talloc / test / run-external-alloc.c
index 013041feb9159de1741ea1f28a6a51877a1bb1d4..0dc9346075a84a49a53a39ca47d76de6873e7a73 100644 (file)
@@ -32,7 +32,7 @@ static void ext_unlock(void)
 int main(void)
 {
        char *p, *p2, *head;
-       plan_tests(13);
+       plan_tests(15);
 
        expected_parent = NULL;
        head = talloc_add_external(NULL, ext_realloc, ext_lock, ext_unlock);
@@ -62,6 +62,10 @@ int main(void)
        talloc_free(p);
        ok1(ext_free_count == 2);
 
+       expected_parent = NULL;
+       talloc_free(head);
+       ok1(ext_free_count == 3);
+
        ok1(lock_count == unlock_count);
 
        return exit_status();