diff options
author | Simon Warta <[email protected]> | 2015-06-19 13:11:49 +0200 |
---|---|---|
committer | Simon Warta <[email protected]> | 2015-06-19 13:11:49 +0200 |
commit | 6750b13cc04e4a6a2f1aad364f74d0042d1da766 (patch) | |
tree | e4f4ee0dfe1787867218c1d8c334a2382318e057 /src/tests/test_mceliece.cpp | |
parent | b9c03ac33472b00a3eeb8bc00b7f37ef610a4eac (diff) |
Replace \n by std::endl in tests to ensure proper flushing
- Remove additional newlines in CHECK_MESSAGE call
- Remove redundant output of algo in aead_test()
Closes #115
Diffstat (limited to 'src/tests/test_mceliece.cpp')
-rw-r--r-- | src/tests/test_mceliece.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tests/test_mceliece.cpp b/src/tests/test_mceliece.cpp index ca497f542..f55492e95 100644 --- a/src/tests/test_mceliece.cpp +++ b/src/tests/test_mceliece.cpp @@ -25,8 +25,8 @@ using namespace Botan; -#define CHECK_MESSAGE(expr, print) do {if(!(expr)) {std::cout << print << "\n"; return 1;} }while(0) -#define CHECK(expr) do {if(!(expr)) { std::cout << #expr << "\n"; return 1; } }while(0) +#define CHECK_MESSAGE(expr, print) do {if(!(expr)) {std::cout << print << std::endl; return 1;} }while(0) +#define CHECK(expr) do {if(!(expr)) { std::cout << #expr << std::endl; return 1; } }while(0) namespace { @@ -178,7 +178,7 @@ size_t test_mceies(const McEliece_PrivateKey& sk, if(pt != dec) { - std::cout << "MCEIES " << hex_encode(pt) << " != " << hex_encode(dec) << "\n"; + std::cout << "MCEIES " << hex_encode(pt) << " != " << hex_encode(dec) << std::endl; ++fails; } @@ -196,7 +196,7 @@ size_t test_mceies(const McEliece_PrivateKey& sk, try { mceies_decrypt(sk, bad_ct, ad, ad_len); - std::cout << "Successfully decrypted manipulated ciphertext!\n"; + std::cout << "Successfully decrypted manipulated ciphertext!" << std::endl; ++fails; } catch(std::exception& e) { /* Yay */ } |