- Integrated modified Nibbler and test code from kronisk.  These
  changes make both test and Nibbler standalone objects, with configurable
  features.
This commit is contained in:
Paul Beckingham
2012-01-05 17:37:50 -05:00
parent a262d41828
commit fb38dca1db
4 changed files with 74 additions and 12 deletions

View File

@@ -29,9 +29,6 @@
#include <iomanip>
#include <string.h>
#include <math.h>
#include <main.h>
#include <util.h>
#include <text.h>
#include <test.h>
///////////////////////////////////////////////////////////////////////////////
@@ -394,9 +391,9 @@ void UnitTest::is (
///////////////////////////////////////////////////////////////////////////////
void UnitTest::diag (const std::string& text)
{
std::string trimmed = trim (text, " \t\n\r\f");
std::cout << "# " << trimmed << "\n";
std::string::size_type start = text.find_first_not_of (" \t\n\r\f");
std::string::size_type end = text.find_last_not_of (" \t\n\r\f");
std::cout << "# " << text.substr (start, end - start + 1);
}
///////////////////////////////////////////////////////////////////////////////