summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-02-11 12:14:00 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-02-11 12:14:00 (GMT)
commit0efa7c32aaf21a29b42b5926cc116007056843be (patch)
tree882f663a5dd0e65694bf6077b71086dd77fd7ff8 /3rdParty/CppUnit/src/TestResult.cpp
parent1d20eabbc32274b491b4c2bedf73d19933d97bfd (diff)
downloadswift-0efa7c32aaf21a29b42b5926cc116007056843be.zip
swift-0efa7c32aaf21a29b42b5926cc116007056843be.tar.bz2
Moved some modules into separate git modules.
Diffstat (limited to '3rdParty/CppUnit/src/TestResult.cpp')
m---------3rdParty/CppUnit0
-rw-r--r--3rdParty/CppUnit/src/TestResult.cpp196
2 files changed, 0 insertions, 196 deletions
diff --git a/3rdParty/CppUnit b/3rdParty/CppUnit
new file mode 160000
+Subproject b4c34eb947c6497c6387c55c7581ec875f4e7d4
diff --git a/3rdParty/CppUnit/src/TestResult.cpp b/3rdParty/CppUnit/src/TestResult.cpp
deleted file mode 100644
index 6be19f1..0000000
--- a/3rdParty/CppUnit/src/TestResult.cpp
+++ /dev/null
@@ -1,196 +0,0 @@
-#include <cppunit/Test.h>
-#include <cppunit/TestFailure.h>
-#include <cppunit/TestListener.h>
-#include <cppunit/TestResult.h>
-#include <cppunit/tools/Algorithm.h>
-#include <algorithm>
-#include "DefaultProtector.h"
-#include "ProtectorChain.h"
-#include "ProtectorContext.h"
-
-CPPUNIT_NS_BEGIN
-
-
-TestResult::TestResult( SynchronizationObject *syncObject )
- : SynchronizedObject( syncObject )
- , m_protectorChain( new ProtectorChain() )
- , m_stop( false )
-{
- m_protectorChain->push( new DefaultProtector() );
-}
-
-
-TestResult::~TestResult()
-{
- delete m_protectorChain;
-}
-
-
-void
-TestResult::reset()
-{
- ExclusiveZone zone( m_syncObject );
- m_stop = false;
-}
-
-
-void
-TestResult::addError( Test *test,
- Exception *e )
-{
- TestFailure failure( test, e, true );
- addFailure( failure );
-}
-
-
-void
-TestResult::addFailure( Test *test, Exception *e )
-{
- TestFailure failure( test, e, false );
- addFailure( failure );
-}
-
-
-void
-TestResult::addFailure( const TestFailure &failure )
-{
- ExclusiveZone zone( m_syncObject );
- for ( TestListeners::iterator it = m_listeners.begin();
- it != m_listeners.end();
- ++it )
- (*it)->addFailure( failure );
-}
-
-
-void
-TestResult::startTest( Test *test )
-{
- ExclusiveZone zone( m_syncObject );
- for ( TestListeners::iterator it = m_listeners.begin();
- it != m_listeners.end();
- ++it )
- (*it)->startTest( test );
-}
-
-
-void
-TestResult::endTest( Test *test )
-{
- ExclusiveZone zone( m_syncObject );
- for ( TestListeners::iterator it = m_listeners.begin();
- it != m_listeners.end();
- ++it )
- (*it)->endTest( test );
-}
-
-
-void
-TestResult::startSuite( Test *test )
-{
- ExclusiveZone zone( m_syncObject );
- for ( TestListeners::iterator it = m_listeners.begin();
- it != m_listeners.end();
- ++it )
- (*it)->startSuite( test );
-}
-
-
-void
-TestResult::endSuite( Test *test )
-{
- ExclusiveZone zone( m_syncObject );
- for ( TestListeners::iterator it = m_listeners.begin();
- it != m_listeners.end();
- ++it )
- (*it)->endSuite( test );
-}
-
-
-bool
-TestResult::shouldStop() const
-{
- ExclusiveZone zone( m_syncObject );
- return m_stop;
-}
-
-
-void
-TestResult::stop()
-{
- ExclusiveZone zone( m_syncObject );
- m_stop = true;
-}
-
-
-void
-TestResult::addListener( TestListener *listener )
-{
- ExclusiveZone zone( m_syncObject );
- m_listeners.push_back( listener );
-}
-
-
-void
-TestResult::removeListener ( TestListener *listener )
-{
- ExclusiveZone zone( m_syncObject );
- removeFromSequence( m_listeners, listener );
-}
-
-
-void
-TestResult::runTest( Test *test )
-{
- startTestRun( test );
- test->run( this );
- endTestRun( test );
-}
-
-
-void
-TestResult::startTestRun( Test *test )
-{
- ExclusiveZone zone( m_syncObject );
- for ( TestListeners::iterator it = m_listeners.begin();
- it != m_listeners.end();
- ++it )
- (*it)->startTestRun( test, this );
-}
-
-
-void
-TestResult::endTestRun( Test *test )
-{
- ExclusiveZone zone( m_syncObject );
- for ( TestListeners::iterator it = m_listeners.begin();
- it != m_listeners.end();
- ++it )
- (*it)->endTestRun( test, this );
-}
-
-
-bool
-TestResult::protect( const Functor &functor,
- Test *test,
- const std::string &shortDescription )
-{
- ProtectorContext context( test, this, shortDescription );
- return m_protectorChain->protect( functor, context );
-}
-
-
-void
-TestResult::pushProtector( Protector *protector )
-{
- m_protectorChain->push( protector );
-}
-
-
-void
-TestResult::popProtector()
-{
- m_protectorChain->pop();
-}
-
-
-CPPUNIT_NS_END