1 #include <ccan/tal/autoptr/autoptr.h>
2 /* Include the C files directly. */
3 #include <ccan/tal/autoptr/autoptr.c>
4 #include <ccan/tap/tap.h>
11 /* This is how many tests you plan to run */
16 // Sets p1 to point to p2.
17 autonull_set_ptr(NULL, &p2, p1);
22 // Using p1 as the parent is the same. */
24 autonull_set_ptr(p1, &p2, p1);
29 // Freeing autodata deactivates it.
31 a = autonull_set_ptr(NULL, &p2, p1);
37 // Making p3 the parent means freeing p3 deactivates it.
40 autonull_set_ptr(p3, &p2, p1);
47 /* This exits depending on whether all tests passed */