]> 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 70f3dacda5588f0fe6f1fddf9f2893675f5558dc..0dc9346075a84a49a53a39ca47d76de6873e7a73 100644 (file)
@@ -1,5 +1,5 @@
-#include "talloc/talloc.c"
-#include "tap/tap.h"
+#include <ccan/talloc/talloc.c>
+#include <ccan/tap/tap.h>
 #include <assert.h>
 
 /* Much testing already done in run.c */
@@ -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();