diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-03-28 15:46:49 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-03-28 15:46:49 (GMT) |
commit | f53a1ef582494458301b97bf6e546be52d7ff7e8 (patch) | |
tree | 7571b5cbcbd8a8f1dd1c966c9045b6cb69f0e295 /3rdParty/CppUnit/src/include/cppunit/TestSuite.h | |
parent | 638345680d72ca6acaf123f2c8c1c391f696e371 (diff) | |
download | swift-contrib-f53a1ef582494458301b97bf6e546be52d7ff7e8.zip swift-contrib-f53a1ef582494458301b97bf6e546be52d7ff7e8.tar.bz2 |
Moving submodule contents back.
Diffstat (limited to '3rdParty/CppUnit/src/include/cppunit/TestSuite.h')
-rw-r--r-- | 3rdParty/CppUnit/src/include/cppunit/TestSuite.h | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/3rdParty/CppUnit/src/include/cppunit/TestSuite.h b/3rdParty/CppUnit/src/include/cppunit/TestSuite.h new file mode 100644 index 0000000..2b9cd8d --- /dev/null +++ b/3rdParty/CppUnit/src/include/cppunit/TestSuite.h @@ -0,0 +1,80 @@ +#ifndef CPPUNIT_TESTSUITE_H // -*- C++ -*- +#define CPPUNIT_TESTSUITE_H + +#include <cppunit/Portability.h> + +#if CPPUNIT_NEED_DLL_DECL +#pragma warning( push ) +#pragma warning( disable: 4251 ) // X needs to have dll-interface to be used by clients of class Z +#endif + +#include <cppunit/TestComposite.h> +#include <cppunit/portability/CppUnitVector.h> + +CPPUNIT_NS_BEGIN + + +#if CPPUNIT_NEED_DLL_DECL +// template class CPPUNIT_API std::vector<Test *>; +#endif + + +/*! \brief A Composite of Tests. + * \ingroup CreatingTestSuite + * + * It runs a collection of test cases. Here is an example. + * \code + * CppUnit::TestSuite *suite= new CppUnit::TestSuite(); + * suite->addTest(new CppUnit::TestCaller<MathTest> ( + * "testAdd", testAdd)); + * suite->addTest(new CppUnit::TestCaller<MathTest> ( + * "testDivideByZero", testDivideByZero)); + * \endcode + * Note that \link TestSuite TestSuites \endlink assume lifetime + * control for any tests added to them. + * + * TestSuites do not register themselves in the TestRegistry. + * \see Test + * \see TestCaller + */ +class CPPUNIT_API TestSuite : public TestComposite +{ +public: + /*! Constructs a test suite with the specified name. + */ + TestSuite( std::string name = "" ); + + ~TestSuite(); + + /*! Adds the specified test to the suite. + * \param test Test to add. Must not be \c NULL. + */ + void addTest( Test *test ); + + /*! Returns the list of the tests (DEPRECATED). + * \deprecated Use getChildTestCount() & getChildTestAt() of the + * TestComposite interface instead. + * \return Reference on a vector that contains the tests of the suite. + */ + const CppUnitVector<Test *> &getTests() const; + + /*! Destroys all the tests of the suite. + */ + virtual void deleteContents(); + + int getChildTestCount() const; + + Test *doGetChildTestAt( int index ) const; + +private: + CppUnitVector<Test *> m_tests; +}; + + +CPPUNIT_NS_END + +#if CPPUNIT_NEED_DLL_DECL +#pragma warning( pop ) +#endif + +#endif // CPPUNIT_TESTSUITE_H |