summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-07-17 19:16:53 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-07-17 19:16:53 (GMT)
commitde745f71cff330f37637c73d44c30acfb6f70a93 (patch)
treee131055c43fdfc0b744f16be396df51222d6868a /3rdParty/CppUnit/src
parenta328466bc492c50c443e406b9325542a75182327 (diff)
downloadswift-contrib-de745f71cff330f37637c73d44c30acfb6f70a93.zip
swift-contrib-de745f71cff330f37637c73d44c30acfb6f70a93.tar.bz2
Extended CppUnit checker to have test selection.
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
+