Tests: Fixed bug in ::diag

This commit is contained in:
Paul Beckingham 2016-03-29 22:42:21 -04:00
parent a8177a33d7
commit 0870c7965f

View file

@ -416,6 +416,8 @@ void UnitTest::diag (const std::string& text)
{
auto start = text.find_first_not_of (" \t\n\r\f");
auto end = text.find_last_not_of (" \t\n\r\f");
if (start != std::string::npos &&
end != std::string::npos)
std::cout << "# " << text.substr (start, end - start + 1) << "\n";
}