summaryrefslogtreecommitdiff
path: root/src/common/test.h
diff options
context:
space:
mode:
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 fe37100940..8be3afd77e 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
/*