aboutsummaryrefslogtreecommitdiff
path: root/src/common/test.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-03-19 22:07:24 +0000
committerNick Mathewson <nickm@torproject.org>2004-03-19 22:07:24 +0000
commit9199696182ed385b5645ffce6b0f8e7d74d57a35 (patch)
tree2dd20875044b762c8e1d3a5869728d67c661964d /src/common/test.h
parentdf3f37b84f81ec7757e056ff82530ef6e863fb95 (diff)
downloadtor-9199696182ed385b5645ffce6b0f8e7d74d57a35.tar
tor-9199696182ed385b5645ffce6b0f8e7d74d57a35.tar.gz
Add some wrappers around SPLAY_* for the common map-from-string-to-X case.
It will probably be less blindingly fast than using SPLAY_* directly, but only slightly so. svn:r1306
Diffstat (limited to 'src/common/test.h')
-rw-r--r--src/common/test.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/test.h b/src/common/test.h
index d30a458e0..d2b449db4 100644
--- a/src/common/test.h
+++ b/src/common/test.h
@@ -72,7 +72,7 @@ extern int have_failed;
#define test_streq(expr1, expr2) \
STMT_BEGIN \
- char *v1=(expr1), *v2=(expr2); \
+ const char *v1=(expr1), *v2=(expr2); \
if(!strcmp(v1,v2)) { printf("."); } else { \
have_failed = 1; \
printf("\nFile %s: line %d (%s): Assertion failed: (%s==%s)\n"\
@@ -87,7 +87,7 @@ extern int have_failed;
#define test_strneq(expr1, expr2) \
STMT_BEGIN \
- char *v1=(expr1), *v2=(expr2); \
+ const char *v1=(expr1), *v2=(expr2); \
if(strcmp(v1,v2)) { printf("."); } else { \
have_failed = 1; \
printf("\nFile %s: line %d (%s): Assertion failed: (%s!=%s)\n"\