diff options
Diffstat (limited to 'testing/test.h')
-rw-r--r-- | testing/test.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/testing/test.h b/testing/test.h index 7de24fb..d1f1a22 100644 --- a/testing/test.h +++ b/testing/test.h @@ -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; + + |