X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ffailtest%2Ffailtest.h;h=d4d9987b5e38e545244eebc18e0103a053149c8f;hp=4df286241d0ef35f8a271251861ae7d0f2c11ac7;hb=5802573130c841d10734e1b0dcdb0b13167f9c86;hpb=e50b1a072279e2ecf461f379094ff1726a4c19e9 diff --git a/ccan/failtest/failtest.h b/ccan/failtest/failtest.h index 4df28624..d4d9987b 100644 --- a/ccan/failtest/failtest.h +++ b/ccan/failtest/failtest.h @@ -196,6 +196,16 @@ extern enum failtest_result extern bool (*failtest_exit_check)(struct failtest_call *history, unsigned num); +/** + * failtest_has_failed - determine if a failure has occurred. + * + * Sometimes you want to exit immediately if you've experienced a failure. + * This is useful when you have four separate tests in your test suite, + * and you don't want to do the next one if you've had a failure in a + * previous one. + */ +extern bool failtest_has_failed(void); + /** * failtest_timeout_ms - how long to wait before killing child. *