diff options
author | Nick Mathewson <nickm@torproject.org> | 2003-04-16 15:24:09 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2003-04-16 15:24:09 +0000 |
commit | acc33c18e2ea0e18cb0b2970a14c32ddbd7db833 (patch) | |
tree | 176142d3f232f5c309d78f0c88d41ee3906753d0 /src/common/test.h | |
parent | e1d37ed6abffca3bab3f43794a850709f8c4fe77 (diff) | |
download | tor-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.h | 10 |
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 /* |