projects
/
platform
/
upstream
/
curl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
adb49ad
)
curlcheck.h: add fail()
author
Daniel Stenberg
<daniel@haxx.se>
Tue, 4 Jan 2011 22:09:19 +0000
(23:09 +0100)
committer
Daniel Stenberg
<daniel@haxx.se>
Tue, 4 Jan 2011 22:13:10 +0000
(23:13 +0100)
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.
tests/unit/curlcheck.h
patch
|
blob
|
history
diff --git
a/tests/unit/curlcheck.h
b/tests/unit/curlcheck.h
index
88ee80a
..
57babe5
100644
(file)
--- 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 \