Imported upstream 3.0.8
[tools/xdelta3.git] / testing / test.h
index 7de24fb..d1f1a22 100644 (file)
@@ -18,12 +18,12 @@ extern "C" {
 
 #define CHECK_OP(x,y,OP) \
   do { \
-    __typeof__(x) _x(x); \
-    __typeof__(x) _y(y); \
+    typeof(x) _x(x); \
+    typeof(x) _y(y); \
     if (!(_x OP _y)) { \
       cerr << __FILE__ << ":" << __LINE__ << " Check failed: " << #x " " #OP " " #y << endl; \
-      cerr << __FILE__ << ":" << __LINE__ << " {0} " << _x << endl; \
-      cerr << __FILE__ << ":" << __LINE__ << " {1} " << _y << endl; \
+      cerr << __FILE__ << ":" << __LINE__ << " Expected: " << _x << endl; \
+      cerr << __FILE__ << ":" << __LINE__ << " Actual: " << _y << endl; \
     abort(); \
     } } while (false)
 #undef CHECK
@@ -68,3 +68,5 @@ pair<T, U> make_pair(const T& t, const U& u) {
 
 using std::min;
 using std::max;
+
+