]> git.ozlabs.org Git - ccan/blob - ccan/rbtree/test/run.c
Merge branch 'ronnie'
[ccan] / ccan / rbtree / test / run.c
1 #include <ccan/rbtree/rbtree.c>
2 #include <ccan/tap/tap.h>
3
4 int main(void)
5 {
6         /* This is how many tests you plan to run */
7         plan_tests(3);
8
9         /* Simple thing we expect to succeed */
10         ok1(some_test())
11         /* Same, with an explicit description of the test. */
12         ok(some_test(), "%s with no args should return 1", "some_test")
13         /* How to print out messages for debugging. */
14         diag("Address of some_test is %p", &some_test)
15         /* Conditional tests must be explicitly skipped. */
16 #if HAVE_SOME_FEATURE
17         ok1(test_some_feature())
18 #else
19         skip(1, "Don't have SOME_FEATURE")
20 #endif
21
22         /* This exits depending on whether all tests passed */
23         return exit_status();
24 }