X-Git-Url: http://wagner.pp.ru/gitweb/?a=blobdiff_plain;f=test_curves.c;h=0b8b8f62fe01af2a8f6460e7947887837531cc08;hb=f3e84b52d2c5bf6774070b758714b90845d722d2;hp=973307b0fdec87727838e7c7d7b05545d0a5a9d5;hpb=32da2bf229ba8bebf2c6f6ac1fc016c49e867488;p=openssl-gost%2Fengine.git diff --git a/test_curves.c b/test_curves.c index 973307b..0b8b8f6 100644 --- a/test_curves.c +++ b/test_curves.c @@ -29,10 +29,13 @@ #define cBLUE "\033[1;34m" #define cDBLUE "\033[0;34m" #define cNORM "\033[m" -#define TEST_ASSERT(e) {if ((test = (e))) \ - printf(cRED " Test FAILED\n" cNORM); \ - else \ - printf(cGREEN " Test passed\n" cNORM);} +#define TEST_ASSERT(e) { \ + test = e; \ + if (test) \ + printf(cRED " Test FAILED" cNORM "\n"); \ + else \ + printf(cGREEN " Test passed" cNORM "\n"); \ +} struct test_curve { int nid; @@ -90,7 +93,7 @@ static int parameter_test(struct test_curve *tc) printf("\n"); if (!OBJ_nid2obj(nid)) { - printf(cRED "NID %d not found\n" cNORM, nid); + printf(cRED "NID %d not found" cNORM "\n", nid); return 1; } @@ -106,7 +109,7 @@ static int parameter_test(struct test_curve *tc) EC_KEY *ec; T(ec = EC_KEY_new()); if (!fill_GOST_EC_params(ec, nid)) { - printf(cRED "fill_GOST_EC_params FAIL\n" cNORM); + printf(cRED "fill_GOST_EC_params FAIL" cNORM "\n"); ERR_print_errors_fp(stderr); return 1; } @@ -239,8 +242,8 @@ int main(int argc, char **argv) ENGINE_free(eng); if (ret) - printf(cDRED "= Some tests FAILED!\n" cNORM); + printf(cDRED "= Some tests FAILED!" cNORM "\n"); else - printf(cDGREEN "= All tests passed!\n" cNORM); + printf(cDGREEN "= All tests passed!" cNORM "\n"); return ret; }