mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
curlcheck.h: add fail()
fail is a new function/macro that a test case can use to indicate a test failure for cases when the standard macros are not sufficient.
This commit is contained in:
parent
adb49ad8bb
commit
7c5d888ea6
@ -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 \
|
||||
|
Loading…
Reference in New Issue
Block a user