Skip to content
Snippets Groups Projects
Commit 7b6554db authored by Oz Linden's avatar Oz Linden
Browse files

added quoting to clarify failure messages

parent 428adcb3
No related branches found
No related tags found
No related merge requests found
...@@ -158,8 +158,8 @@ namespace tut ...@@ -158,8 +158,8 @@ namespace tut
if( actual.find(expectedStart, 0) != 0 ) if( actual.find(expectedStart, 0) != 0 )
{ {
std::stringstream ss; std::stringstream ss;
ss << msg << ": " << "expected to find " << expectedStart ss << msg << ": " << "expected to find '" << expectedStart
<< " at start of actual " << actual; << "' at start of actual '" << actual << "'";
throw failure(ss.str().c_str()); throw failure(ss.str().c_str());
} }
} }
...@@ -172,8 +172,8 @@ namespace tut ...@@ -172,8 +172,8 @@ namespace tut
!= (actual.size() - expectedEnd.size()) ) != (actual.size() - expectedEnd.size()) )
{ {
std::stringstream ss; std::stringstream ss;
ss << msg << ": " << "expected to find " << expectedEnd ss << msg << ": " << "expected to find '" << expectedEnd
<< " at end of actual " << actual; << "' at end of actual '" << actual << "'";
throw failure(ss.str().c_str()); throw failure(ss.str().c_str());
} }
} }
...@@ -184,8 +184,8 @@ namespace tut ...@@ -184,8 +184,8 @@ namespace tut
if( actual.find(expectedSubString, 0) == std::string::npos ) if( actual.find(expectedSubString, 0) == std::string::npos )
{ {
std::stringstream ss; std::stringstream ss;
ss << msg << ": " << "expected to find " << expectedSubString ss << msg << ": " << "expected to find '" << expectedSubString
<< " in actual " << actual; << "' in actual '" << actual << "'";
throw failure(ss.str().c_str()); throw failure(ss.str().c_str());
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment