diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-02-08 21:09:35 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-02-08 21:09:35 +0000 |
commit | 23a9c9695bf582990d808fc261f4e9ae88bdff1f (patch) | |
tree | d6b42a77197663a2c03cbd66546fbae3ea5cbedd /src/common/test.h | |
parent | 729555e1ca49ff140ceb65c8e9c108eae82d7120 (diff) | |
download | tor-23a9c9695bf582990d808fc261f4e9ae88bdff1f.tar.gz tor-23a9c9695bf582990d808fc261f4e9ae88bdff1f.zip |
r17968@catbus: nickm | 2008-02-07 14:11:02 -0500
Clean up IPv6-testing code in test.c; resolve a bunch of XXX020s.
svn:r13425
Diffstat (limited to 'src/common/test.h')
-rw-r--r-- | src/common/test.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/common/test.h b/src/common/test.h index 17ee166bd8..72dde2b007 100644 --- a/src/common/test.h +++ b/src/common/test.h @@ -23,16 +23,19 @@ extern int have_failed; -#define test_fail() \ +#define test_fail_msg(msg) \ STMT_BEGIN \ have_failed = 1; \ - printf("\nFile %s: line %d (%s): assertion failed.", \ + printf("\nFile %s: line %d (%s): %s", \ _SHORT_FILE_, \ __LINE__, \ - PRETTY_FUNCTION); \ + PRETTY_FUNCTION, \ + msg); \ return; \ STMT_END +#define test_fail() test_fail_msg("Assertion failed.") + #define test_assert(expr) \ STMT_BEGIN \ if (expr) { printf("."); fflush(stdout); } else { \ |