mirror of
https://github.com/moparisthebest/curl
synced 2025-03-11 15:50:48 -04: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++; \
|
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;
|
extern int unitfail;
|
||||||
|
|
||||||
#define UNITTEST_START \
|
#define UNITTEST_START \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user