diff options
author | Bent Bisballe Nyeng <bbn@mjolner.dk> | 2020-10-26 15:35:00 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <bbn@mjolner.dk> | 2020-10-26 15:35:00 +0100 |
commit | 3771bac729d07a2117be6aa29f8c824a8e3d60bc (patch) | |
tree | 3474b024cb9eb1b6914fbe0c35f5dbd0ef7b80a5 | |
parent | d709c0e783c4fd89382725ba3a468bce63362192 (diff) |
Use ostringstream instead of stringstream for string building.
-rw-r--r-- | uunit.h | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -173,7 +173,7 @@ protected: { if(!value) { - std::stringstream ss; + std::ostringstream ss; ss << "assertion failed" << std::endl << "- Expression: " << expr << "" << std::endl; throw test_result{"", file, line, ss.str()}; @@ -188,7 +188,7 @@ protected: { if(std::fabs(expected - value) > 0.0000001) { - std::stringstream ss; + std::ostringstream ss; ss << "equality assertion failed" << std::endl << "- Expected: " << expected << "" << std::endl << "- Actual : " << value << "" << std::endl; @@ -201,7 +201,7 @@ protected: { if(expected != value) { - std::stringstream ss; + std::ostringstream ss; ss << "equality assertion failed" << std::endl << "- Expected: " << expected << "" << std::endl << "- Actual : " << value << "" << std::endl; |