merge.
[m6w6/libmemcached] / tests / test.h
index cf19057250f347c755cb44c4acdd0b4d15a937b8..28388bbd7f0add79e79863005a50c5b11b36cf48 100644 (file)
@@ -147,7 +147,15 @@ void create_core(void);
 */
 const char *test_strerror(test_return_t code);
 
-#define test_truth(A) \
+#define test_fail(A) \
+do \
+{ \
+  fprintf(stderr, "\nFailed in %s:%d: %s\n", __FILE__, __LINE__, #A);\
+  create_core(); \
+  return TEST_FAILURE; \
+} while (0)
+
+#define test_true(A) \
 do \
 { \
   if (! (A)) { \