aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/unit_ecdh.cpp
diff options
context:
space:
mode:
authorSimon Warta <[email protected]>2015-06-19 13:11:49 +0200
committerSimon Warta <[email protected]>2015-06-19 13:11:49 +0200
commit6750b13cc04e4a6a2f1aad364f74d0042d1da766 (patch)
treee4f4ee0dfe1787867218c1d8c334a2382318e057 /src/tests/unit_ecdh.cpp
parentb9c03ac33472b00a3eeb8bc00b7f37ef610a4eac (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/unit_ecdh.cpp')
-rw-r--r--src/tests/unit_ecdh.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/tests/unit_ecdh.cpp b/src/tests/unit_ecdh.cpp
index fafb61b46..8018bb8da 100644
--- a/src/tests/unit_ecdh.cpp
+++ b/src/tests/unit_ecdh.cpp
@@ -23,8 +23,8 @@
using namespace Botan;
-#define CHECK_MESSAGE(expr, print) try { if(!(expr)) { ++fails; std::cout << print << "\n"; } } catch(std::exception& e) { std::cout << __FUNCTION__ << ": " << e.what() << "\n"; }
-#define CHECK(expr) try { if(!(expr)) { ++fails; std::cout << #expr << "\n"; } } catch(std::exception& e) { std::cout << __FUNCTION__ << ": " << e.what() << "\n"; }
+#define CHECK_MESSAGE(expr, print) try { if(!(expr)) { ++fails; std::cout << print << std::endl; } } catch(std::exception& e) { std::cout << __FUNCTION__ << ": " << e.what() << std::endl; }
+#define CHECK(expr) try { if(!(expr)) { ++fails; std::cout << #expr << std::endl; } } catch(std::exception& e) { std::cout << __FUNCTION__ << ": " << e.what() << std::endl; }
namespace {
@@ -46,9 +46,9 @@ size_t test_ecdh_normal_derivation(RandomNumberGenerator& rng)
if(alice_key != bob_key)
{
- std::cout << "The two keys didn't match!\n";
- std::cout << "Alice's key was: " << alice_key.as_string() << "\n";
- std::cout << "Bob's key was: " << bob_key.as_string() << "\n";
+ std::cout << "The two keys didn't match!" << std::endl;
+ std::cout << "Alice's key was: " << alice_key.as_string() << std::endl;
+ std::cout << "Bob's key was: " << bob_key.as_string() << std::endl;
++fails;
}