X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libtest%2Ftest.h;h=0493f3106b1b4b657aefb312d6195fb49a141af5;hb=f0b9c972a973d997db6660680938dd5acb2baa46;hp=604e661c218f37a3c58db786a77c03d24ea57e32;hpb=7934f494b49e802ab8662e403e1395cb7e6eb62c;p=awesomized%2Flibmemcached diff --git a/libtest/test.h b/libtest/test.h index 604e661c..0493f310 100644 --- a/libtest/test.h +++ b/libtest/test.h @@ -228,6 +228,17 @@ do \ } \ } while (0) +#define test_compare_got(A,B,C) \ +do \ +{ \ + if ((A) != (B)) \ + { \ + fprintf(stderr, "\n%s:%d: Expected %s, got %s\n", __FILE__, __LINE__, #A, (C)); \ + create_core(); \ + return TEST_FAILURE; \ + } \ +} while (0) + #define test_false(A) \ do \ { \