X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libtest%2Ftest.h;h=3c3c37d1b0d10e97ca1d0821e3631b554416d25a;hb=1c2f1d893384cf632697ce46e21d2f0c1edfc389;hp=5c449ab02f9e3c0341b4c1638f3f70f83c93fa3d;hpb=25efe3485198149616820ab4e52d2f18f0abe5a7;p=awesomized%2Flibmemcached diff --git a/libtest/test.h b/libtest/test.h index 5c449ab0..3c3c37d1 100644 --- a/libtest/test.h +++ b/libtest/test.h @@ -40,6 +40,8 @@ #pragma GCC diagnostic ignored "-Wold-style-cast" #endif +#include + /** A structure describing the test case. */ @@ -61,17 +63,6 @@ do \ } \ } while (0) -#define test_assert(A, B) \ -do \ -{ \ - if ((A)) { \ - fprintf(stderr, "\n%s:%d: Assertion failed %s, with message %s, in %s", __FILE__, __LINE__, (B), #A, __func__ );\ - fprintf(stderr, "\n"); \ - libtest::create_core(); \ - assert((A)); \ - } \ -} while (0) - #define test_truth(A) \ do \ { \ @@ -170,7 +161,7 @@ do \ #define test_zero(__actual) \ do \ { \ - if (not libtest::_compare_zero(__FILE__, __LINE__, __func__, ((__actual)))) \ + if (libtest::_compare_zero(__FILE__, __LINE__, __func__, ((__actual))) == false) \ { \ libtest::create_core(); \ return TEST_FAILURE; \