summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <bbn@mjolner.dk>2020-10-26 15:35:00 +0100
committerBent Bisballe Nyeng <bbn@mjolner.dk>2020-10-26 15:35:00 +0100
commit3771bac729d07a2117be6aa29f8c824a8e3d60bc (patch)
tree3474b024cb9eb1b6914fbe0c35f5dbd0ef7b80a5
parentd709c0e783c4fd89382725ba3a468bce63362192 (diff)
Use ostringstream instead of stringstream for string building.
-rw-r--r--uunit.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/uunit.h b/uunit.h
index 44dc2a0..97f3ecc 100644
--- a/uunit.h
+++ b/uunit.h
@@ -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;