diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-02-11 12:14:00 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-02-11 12:14:00 (GMT) |
commit | 0efa7c32aaf21a29b42b5926cc116007056843be (patch) | |
tree | 882f663a5dd0e65694bf6077b71086dd77fd7ff8 /3rdParty/CppUnit/cppunit/TestFixture.h | |
parent | 1d20eabbc32274b491b4c2bedf73d19933d97bfd (diff) | |
download | swift-contrib-0efa7c32aaf21a29b42b5926cc116007056843be.zip swift-contrib-0efa7c32aaf21a29b42b5926cc116007056843be.tar.bz2 |
Moved some modules into separate git modules.
Diffstat (limited to '3rdParty/CppUnit/cppunit/TestFixture.h')
m--------- | 3rdParty/CppUnit | 0 | ||||
-rw-r--r-- | 3rdParty/CppUnit/cppunit/TestFixture.h | 99 |
2 files changed, 0 insertions, 99 deletions
diff --git a/3rdParty/CppUnit b/3rdParty/CppUnit new file mode 160000 +Subproject b4c34eb947c6497c6387c55c7581ec875f4e7d4 diff --git a/3rdParty/CppUnit/cppunit/TestFixture.h b/3rdParty/CppUnit/cppunit/TestFixture.h deleted file mode 100644 index 1223adb..0000000 --- a/3rdParty/CppUnit/cppunit/TestFixture.h +++ /dev/null @@ -1,99 +0,0 @@ -#ifndef CPPUNIT_TESTFIXTURE_H // -*- C++ -*- -#define CPPUNIT_TESTFIXTURE_H - -#include <cppunit/Portability.h> - -CPPUNIT_NS_BEGIN - - -/*! \brief Wraps a test case with setUp and tearDown methods. - * \ingroup WritingTestFixture - * - * A TestFixture is used to provide a common environment for a set - * of test cases. - * - * To define a test fixture, do the following: - * - implement a subclass of TestCase - * - the fixture is defined by instance variables - * - initialize the fixture state by overriding setUp - * (i.e. construct the instance variables of the fixture) - * - clean-up after a test by overriding tearDown. - * - * Each test runs in its own fixture so there - * can be no side effects among test runs. - * Here is an example: - * - * \code - * class MathTest : public CppUnit::TestFixture { - * protected: - * int m_value1, m_value2; - * - * public: - * MathTest() {} - * - * void setUp () { - * m_value1 = 2; - * m_value2 = 3; - * } - * } - * \endcode - * - * For each test implement a method which interacts - * with the fixture. Verify the expected results with assertions specified - * by calling CPPUNIT_ASSERT on the expression you want to test: - * - * \code - * public: - * void testAdd () { - * int result = m_value1 + m_value2; - * CPPUNIT_ASSERT( result == 5 ); - * } - * \endcode - * - * Once the methods are defined you can run them. To do this, use - * a TestCaller. - * - * \code - * CppUnit::Test *test = new CppUnit::TestCaller<MathTest>( "testAdd", - * &MathTest::testAdd ); - * test->run(); - * \endcode - * - * - * The tests to be run can be collected into a TestSuite. - * - * \code - * public: - * static CppUnit::TestSuite *MathTest::suite () { - * CppUnit::TestSuite *suiteOfTests = new CppUnit::TestSuite; - * suiteOfTests->addTest(new CppUnit::TestCaller<MathTest>( - * "testAdd", &MathTest::testAdd)); - * suiteOfTests->addTest(new CppUnit::TestCaller<MathTest>( - * "testDivideByZero", &MathTest::testDivideByZero)); - * return suiteOfTests; - * } - * \endcode - * - * A set of macros have been created for convenience. They are located in HelperMacros.h. - * - * \see TestResult, TestSuite, TestCaller, - * \see CPPUNIT_TEST_SUB_SUITE, CPPUNIT_TEST, CPPUNIT_TEST_SUITE_END, - * \see CPPUNIT_TEST_SUITE_REGISTRATION, CPPUNIT_TEST_EXCEPTION, CPPUNIT_TEST_FAIL. - */ -class CPPUNIT_API TestFixture -{ -public: - virtual ~TestFixture() {}; - - //! \brief Set up context before running a test. - virtual void setUp() {}; - - //! Clean up after the test run. - virtual void tearDown() {}; -}; - - -CPPUNIT_NS_END - - -#endif |