CppUnit project page FAQ CppUnit home page

Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

TestResultCollector.h

Go to the documentation of this file.
00001 #ifndef CPPUNIT_TESTRESULTCOLLECTOR_H 00002 #define CPPUNIT_TESTRESULTCOLLECTOR_H 00003 00004 #include <cppunit/Portability.h> 00005 00006 #if CPPUNIT_NEED_DLL_DECL 00007 #pragma warning( push ) 00008 #pragma warning( disable: 4251 4660 ) // X needs to have dll-interface to be used by clients of class Z 00009 #endif 00010 00011 #include <cppunit/TestSuccessListener.h> 00012 #include <cppunit/portability/CppUnitDeque.h> 00013 00014 00015 CPPUNIT_NS_BEGIN 00016 00017 #if CPPUNIT_NEED_DLL_DECL 00018 // template class CPPUNIT_API std::deque<TestFailure *>; 00019 // template class CPPUNIT_API std::deque<Test *>; 00020 #endif 00021 00022 00036 class CPPUNIT_API TestResultCollector : public TestSuccessListener 00037 { 00038 public: 00039 typedef CppUnitDeque<TestFailure *> TestFailures; 00040 typedef CppUnitDeque<Test *> Tests; 00041 00042 00045 TestResultCollector( SynchronizationObject *syncObject = 0 ); 00046 00048 virtual ~TestResultCollector(); 00049 00050 void startTest( Test *test ); 00051 void addFailure( const TestFailure &failure ); 00052 00053 virtual void reset(); 00054 00055 virtual int runTests() const; 00056 virtual int testErrors() const; 00057 virtual int testFailures() const; 00058 virtual int testFailuresTotal() const; 00059 00060 virtual const TestFailures& failures() const; 00061 virtual const Tests &tests() const; 00062 00063 protected: 00064 Tests m_tests; 00065 TestFailures m_failures; 00066 int m_testErrors; 00067 00068 private: 00070 TestResultCollector( const TestResultCollector &copy ); 00071 00073 void operator =( const TestResultCollector &copy ); 00074 }; 00075 00076 00077 00078 CPPUNIT_NS_END 00079 00080 #if CPPUNIT_NEED_DLL_DECL 00081 #pragma warning( pop ) 00082 #endif 00083 00084 00085 #endif // CPPUNIT_TESTRESULTCOLLECTOR_H

SourceForge Logo hosts this site. Send comments to:
CppUnit Developers