Skip to content
Snippets Groups Projects
Commit 7c5d888e authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

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.
parent adb49ad8
No related branches found
No related tags found
No related merge requests found
......@@ -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 \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment