summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '3rdParty/CppUnit/src')
-rw-r--r--3rdParty/CppUnit/src/BriefTestProgressListener.cpp49
1 files changed, 49 insertions, 0 deletions
diff --git a/3rdParty/CppUnit/src/BriefTestProgressListener.cpp b/3rdParty/CppUnit/src/BriefTestProgressListener.cpp
new file mode 100644
index 0000000..c38cea0
--- /dev/null
+++ b/3rdParty/CppUnit/src/BriefTestProgressListener.cpp
@@ -0,0 +1,49 @@
+#include <cppunit/BriefTestProgressListener.h>
+#include <cppunit/Test.h>
+#include <cppunit/TestFailure.h>
+#include <cppunit/portability/Stream.h>
+
+
+CPPUNIT_NS_BEGIN
+
+
+BriefTestProgressListener::BriefTestProgressListener()
+ : m_lastTestFailed( false )
+{
+}
+
+
+BriefTestProgressListener::~BriefTestProgressListener()
+{
+}
+
+
+void
+BriefTestProgressListener::startTest( Test *test )
+{
+ stdCOut() << test->getName();
+ stdCOut().flush();
+
+ m_lastTestFailed = false;
+}
+
+
+void
+BriefTestProgressListener::addFailure( const TestFailure &failure )
+{
+ stdCOut() << " : " << (failure.isError() ? "error" : "assertion");
+ m_lastTestFailed = true;
+}
+
+
+void
+BriefTestProgressListener::endTest( Test *test )
+{
+ if ( !m_lastTestFailed )
+ stdCOut() << " : OK";
+ stdCOut() << "\n";
+}
+
+
+CPPUNIT_NS_END
+