diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-03-19 22:07:24 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-03-19 22:07:24 +0000 |
commit | 9199696182ed385b5645ffce6b0f8e7d74d57a35 (patch) | |
tree | 2dd20875044b762c8e1d3a5869728d67c661964d /src/common/test.h | |
parent | df3f37b84f81ec7757e056ff82530ef6e863fb95 (diff) | |
download | tor-9199696182ed385b5645ffce6b0f8e7d74d57a35.tar.gz tor-9199696182ed385b5645ffce6b0f8e7d74d57a35.zip |
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.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/test.h b/src/common/test.h index d30a458e02..d2b449db43 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"\ |