X-Git-Url: http://wagner.pp.ru/gitweb/?a=blobdiff_plain;f=test_ciphers.c;h=77810e731642e33db2b5501dfa1615d03e8f9b2e;hb=336c30e54ca42f54641ee06c9dce26ecd454b6ea;hp=15c7511bfb1a101d6c2b6e90b40b829c329167b1;hpb=cded1d0aa04a386faa3778d0b029c78abd996e93;p=openssl-gost%2Fengine.git diff --git a/test_ciphers.c b/test_ciphers.c index 15c7511..77810e7 100644 --- a/test_ciphers.c +++ b/test_ciphers.c @@ -28,9 +28,9 @@ #define cDBLUE "\033[0;34m" #define cNORM "\033[m" #define TEST_ASSERT(e) {if ((test = (e))) \ - printf(cRED "Test FAILED\n" cNORM); \ + printf(cRED "Test FAILED" cNORM "\n"); \ else \ - printf(cGREEN "Test passed\n" cNORM);} + printf(cGREEN "Test passed" cNORM "\n");} /* Pragma to allow commenting out some tests. */ #pragma GCC diagnostic ignored "-Wunused-const-variable" @@ -276,7 +276,6 @@ static struct testcase { .iv = iv_ctr, .iv_size = sizeof(iv_ctr) / 2, }, -#if 0 { .nid = NID_magma_cbc, .block = 8, @@ -287,7 +286,6 @@ static struct testcase { .iv = iv_cbc, .iv_size = sizeof(iv_cbc), }, -#endif { 0 } }; @@ -480,7 +478,7 @@ int main(int argc, char **argv) const EVP_CIPHER *type = EVP_get_cipherbynid(t->nid); const char *name = EVP_CIPHER_name(type); - printf(cBLUE "# Tests for %s [%s]\n" cNORM, name, standard); + printf(cBLUE "# Tests for %s [%s]" cNORM "\n", name, standard); for (inplace = 0; inplace <= 1; inplace++) ret |= test_block(type, name, t->block, t->plaintext, t->key, t->expected, t->size, @@ -501,15 +499,15 @@ int main(int argc, char **argv) if (t->nid == nids[k]) break; if (!t->nid) - printf(cMAGENT "Cipher %s is untested!\n" cNORM, OBJ_nid2sn(nids[k])); + printf(cMAGENT "Cipher %s is untested!" cNORM "\n", OBJ_nid2sn(nids[k])); } ENGINE_finish(eng); 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; }