From 1ec410ecd725f5a3ccb2d2fc16f48730d9d9fe43 Mon Sep 17 00:00:00 2001 From: dan miller Date: Fri, 19 Oct 2007 05:22:23 +0000 Subject: trying to fix my screwup, please hold on --- .../tests/CppTestHarness/HTMLTestReporter.cpp | 87 ---------------------- 1 file changed, 87 deletions(-) delete mode 100644 libraries/ode-0.9/tests/CppTestHarness/HTMLTestReporter.cpp (limited to 'libraries/ode-0.9\/tests/CppTestHarness/HTMLTestReporter.cpp') diff --git a/libraries/ode-0.9/tests/CppTestHarness/HTMLTestReporter.cpp b/libraries/ode-0.9/tests/CppTestHarness/HTMLTestReporter.cpp deleted file mode 100644 index fd4acb1..0000000 --- a/libraries/ode-0.9/tests/CppTestHarness/HTMLTestReporter.cpp +++ /dev/null @@ -1,87 +0,0 @@ -#include "HTMLTestReporter.h" - -#ifdef _MSC_VER -# pragma warning(disable:4996) // shut the secure crt stuff up, ctime is used correctly here. -#endif - -#include -#include -#include - -namespace CppTestHarness -{ - -void HTMLTestReporter::ReportFailure(char const* file, int const line, std::string const failure) -{ - std::stringstream msg; - msg << file << "(" << line << ") : " << failure; - - m_failureMessages.push_back(msg.str()); -} - -void HTMLTestReporter::ReportSingleResult(const std::string& testName, bool failed) -{ - ResultRecord r; - r.testName = testName; - r.failed = failed; - - //get reported failures and clear temp list - r.failureMessages = m_failureMessages; - m_failureMessages.clear(); - - m_results.push_back(r); -} - -void HTMLTestReporter::ReportSummary(int const testCount, int const failureCount) -{ - std::ostream& os = std::cout; - - //TODO: make all strings html safe - os << ""; - os << "\n"; - os << "\n"; - os << " Test Report\n"; - os << "\n"; - os << "\n"; - - std::time_t currtime; - std::time(&currtime); - - os << "

Test Report: " << std::ctime(&currtime) << "

\n"; - os << "

"; - os << testCount << " tests run.
\n"; - os << failureCount << " failed.
\n"; - os << "

"; - - os << ""; - - //for each single test - for (ResultList::iterator i = m_results.begin(); i != m_results.end(); ++i) - { - os << ""; - os << ""; - - if (i->failed) - os << ""; - else - os << ""; - - os << ""; - } - - os << "
" << i->testName << "FAILEDPASSED
"; - if (i->failed) os << "
    "; - - for (MessageList::iterator j = i->failureMessages.begin(); j != i->failureMessages.end(); ++j) - { - os << "
  • "<< *j << "
  • \n"; - } - - if (i->failed) os << "
"; - os << "
"; - os << ""; - os << ""; -} - -} - -- cgit v1.1