unrelacy: use new MODEL_ASSERT() macro
authorBrian Norris <banorris@uci.edu>
Sat, 3 Nov 2012 22:54:39 +0000 (15:54 -0700)
committerBrian Norris <banorris@uci.edu>
Sat, 3 Nov 2012 22:55:35 +0000 (15:55 -0700)
include/unrelacy.h

index d65ffc3..2c6c48d 100644 (file)
@@ -5,15 +5,12 @@
 #include <stdlib.h>
 #include <stdio.h>
 
+#include <model-assert.h>
+
 #define $
 
-#define _TEST_ASSERT(expr) \
-       if (!(expr)) { \
-               printf("Error: assertion failed at %s:%d\n", __FILE__, __LINE__); \
-               exit(EXIT_FAILURE); \
-       }
-#define ASSERT(expr) _TEST_ASSERT(expr)
-#define RL_ASSERT(expr) _TEST_ASSERT(expr)
+#define ASSERT(expr) MODEL_ASSERT(expr)
+#define RL_ASSERT(expr) MODEL_ASSERT(expr)
 
 #define RL_NEW new
 #define RL_DELETE(expr) delete expr