aboutsummaryrefslogtreecommitdiff
path: root/src/common/test.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2003-04-16 15:24:09 +0000
committerNick Mathewson <nickm@torproject.org>2003-04-16 15:24:09 +0000
commitacc33c18e2ea0e18cb0b2970a14c32ddbd7db833 (patch)
tree176142d3f232f5c309d78f0c88d41ee3906753d0 /src/common/test.h
parente1d37ed6abffca3bab3f43794a850709f8c4fe77 (diff)
downloadtor-acc33c18e2ea0e18cb0b2970a14c32ddbd7db833.tar
tor-acc33c18e2ea0e18cb0b2970a14c32ddbd7db833.tar.gz
Tests for crypto; more tests for buffers
svn:r234
Diffstat (limited to 'src/common/test.h')
-rw-r--r--src/common/test.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/common/test.h b/src/common/test.h
index fe3710094..8be3afd77 100644
--- a/src/common/test.h
+++ b/src/common/test.h
@@ -88,6 +88,16 @@
return; \
} STMT_END
+#define test_memneq(expr1, expr2, len) \
+ STMT_BEGIN if(memcmp(expr1,expr2,len)) { printf("."); } else { \
+ printf("\nFile %s: line %d (%s): Assertion failed: (%s!=%s)\n", \
+ __FILE__, \
+ __LINE__, \
+ __PRETTY_FUNCTION__, \
+ #expr1, #expr2); \
+ return; \
+ } STMT_END
+
#endif
/*