diff options
Diffstat (limited to 'tests/unit')
| -rw-r--r-- | tests/unit/curlcheck.h | 10 | 
1 files changed, 10 insertions, 0 deletions
| diff --git a/tests/unit/curlcheck.h b/tests/unit/curlcheck.h index 88ee80afa..57babe5c7 100644 --- a/tests/unit/curlcheck.h +++ b/tests/unit/curlcheck.h @@ -30,6 +30,16 @@      unitfail++;                                                         \    } +/* fail() is for when the test case figured out by itself that a check +   proved a failure */ +#define fail(msg) do {                                                 \ +    fprintf(stderr, "%s:%d test failed: '%s'\n",                       \ +            __FILE__, __LINE__, msg);                                  \ +    unitfail++;                                                        \ +  } while(0) + + +  extern int unitfail;  #define UNITTEST_START                          \ | 
