diff options
| author | Baptiste Lepilleur <gaiacrtn@free.fr> | 2002-07-13 09:33:50 +0000 |
|---|---|---|
| committer | Baptiste Lepilleur <gaiacrtn@free.fr> | 2002-07-13 09:33:50 +0000 |
| commit | f1bf3276752a10a2cdf4e3cf3087399d199c4566 (patch) | |
| tree | 13dc67edcf465f44b9fe835f5e0b201511774d07 /examples/cppunittest/HelperMacrosTest.cpp | |
| parent | 570132ec2707c8bac6c27c758254f05e293fe613 (diff) | |
| download | cppunit-f1bf3276752a10a2cdf4e3cf3087399d199c4566.tar.gz | |
Include/cppunit/ui/text/TestRunner.
include/cppunit/ui/text/TestRunner.h:
* src/cppunit/TextTestRunner.cpp: Renamed TextUi::TestRunner
TextTestRunner and moved it to the CppUnit namespace. Added
a deprecated typedef for compatibility with previous version.
* include/cppunit/ui/text/TextTestRunner.h: added.
* include/cppunit/ui/mfc/TestRunner.h:
* src/cppunit/msvc6/testrunner/TestRunner.cpp: Renamed MfcUi::TestRunner
MfcTestRunner. Added deprecated typedef for compatibility. Renamed
TestRunner.cpp to MfcTestRunner.cpp.
* include/cppunit/ui/mfc/MfcTestRunner.h: added.
* include/cppunit/ui/qt/TestRunner.h:
* src/qttestrunner/TestRunner.cpp: renamed QtUi::TestRunner QtTestRunner
and moved it to CppUnit namespace. Added a deprecated typedef for
compatibility. Renamed TestRunner.cpp to QtTestRunner.cpp.
* include/cppunit/ui/qt/TestRunner.h:
* src/qttestrunner/TestRunner.h: Moved TestRunner to CppUnit namespace
and renamed it QtTestRunner. Added deprecated typedef for compatibility.
* include/cppunit/Asserter.h:
* src/cppunit/Asserter.cpp: changed namespace Asserter to a struct and
made all methods static.
* include/cppunit/extensions/HelperMacros.h:
* include/cppunit/extensions/SourceLine.h:
* include/cppunit/extensions/TestAssert.h:
* include/cppunit/extensions/TestPlugIn.h:
* include/cppunit/Portability.h: changed CPPUNIT_NS(symbol) to a
symbol macro that expand either to CppUnit or nothing. The symbol is
no longer a parameter.
* include/cppunit/portability/CppUnitVector.h:
* include/cppunit/portability/CppUnitDeque.h:
* include/cppunit/portability/CppUnitMap.h: added. STL Wrapper for
compilers that do not support template default argumenent and need
the allocator to be passed when instantiating STL container.
* examples/cppunittest/*.h:
* examples/cppunittest/*.cpp:
* src/msvc6/testrunner/*.h:
* src/msvc6/testrunner/*.cpp:
* src/msvc6/testpluginrunner/*.h:
* src/msvc6/testpluginrunner/*.cpp:
* src/qttestrunner/*.h:
* src/qttestrunner/*.cpp: replaced occurence of CppUnit:: by CPPUNIT_NS.
* src/cppunit/TestSuite.h:
replaced occurence of std::vector by CppUnitVector.
Diffstat (limited to 'examples/cppunittest/HelperMacrosTest.cpp')
| -rw-r--r-- | examples/cppunittest/HelperMacrosTest.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/examples/cppunittest/HelperMacrosTest.cpp b/examples/cppunittest/HelperMacrosTest.cpp index 3674416..311b4a7 100644 --- a/examples/cppunittest/HelperMacrosTest.cpp +++ b/examples/cppunittest/HelperMacrosTest.cpp @@ -10,7 +10,7 @@ - no unit test for CPPUNIT_TEST_SUITE_REGISTRATION... */ -class FailTestFixture : public CppUnit::TestFixture +class FailTestFixture : public CPPUNIT_NS::TestFixture { CPPUNIT_TEST_SUITE( FailTestFixture ); CPPUNIT_TEST_FAIL( testFail ); @@ -23,7 +23,7 @@ public: }; -class FailToFailTestFixture : public CppUnit::TestFixture +class FailToFailTestFixture : public CPPUNIT_NS::TestFixture { CPPUNIT_TEST_SUITE( FailToFailTestFixture ); CPPUNIT_TEST_FAIL( testFailToFail ); @@ -35,7 +35,7 @@ public: }; -class ExceptionTestFixture : public CppUnit::TestFixture +class ExceptionTestFixture : public CPPUNIT_NS::TestFixture { CPPUNIT_TEST_SUITE( ExceptionTestFixture ); CPPUNIT_TEST_EXCEPTION( testException, FailureException ); @@ -48,7 +48,7 @@ public: }; -class ExceptionNotCaughtTestFixture : public CppUnit::TestFixture +class ExceptionNotCaughtTestFixture : public CPPUNIT_NS::TestFixture { CPPUNIT_TEST_SUITE( ExceptionNotCaughtTestFixture ); CPPUNIT_TEST_EXCEPTION( testExceptionNotCaught, FailureException ); @@ -60,14 +60,14 @@ public: }; -class CustomTestTestFixture : public CppUnit::TestFixture +class CustomTestTestFixture : public CPPUNIT_NS::TestFixture { CPPUNIT_TEST_SUITE( CustomTestTestFixture ); CPPUNIT_TEST_CUSTOM( makeCustomTest ); CPPUNIT_TEST_SUITE_END(); public: - static CppUnit::Test *makeCustomTest( const ThisTestFixtureFactory &factory, - const CppUnit::TestNamer &namer ) + static CPPUNIT_NS::Test *makeCustomTest( const ThisTestFixtureFactory &factory, + const CPPUNIT_NS::TestNamer &namer ) { MockTestCase *test = new MockTestCase( namer.getTestNameFor( "myCustomTest" ) ); test->makeRunTestThrow(); @@ -76,15 +76,15 @@ public: }; -class CustomsTestTestFixture : public CppUnit::TestFixture +class CustomsTestTestFixture : public CPPUNIT_NS::TestFixture { CPPUNIT_TEST_SUITE( CustomsTestTestFixture ); CPPUNIT_TEST_CUSTOMS( addCustomTests ); CPPUNIT_TEST_SUITE_END(); public: - static void addCustomTests( CppUnit::TestSuite *suite, + static void addCustomTests( CPPUNIT_NS::TestSuite *suite, const ThisTestFixtureFactory &factory, - const CppUnit::TestNamer &namer ) + const CPPUNIT_NS::TestNamer &namer ) { MockTestCase *test1 = new MockTestCase( namer.getTestNameFor( "myCustomTest1" ) ); test1->makeRunTestThrow(); @@ -104,7 +104,7 @@ public: -class AddTestTestFixture : public CppUnit::TestFixture +class AddTestTestFixture : public CPPUNIT_NS::TestFixture { CPPUNIT_TEST_SUITE( AddTestTestFixture ); TEST_ADD_N_MOCK( 7 ); @@ -132,7 +132,7 @@ void HelperMacrosTest::setUp() { m_testListener = new MockTestListener( "mock-testlistener" ); - m_result = new CppUnit::TestResult(); + m_result = new CPPUNIT_NS::TestResult(); m_result->addListener( m_testListener ); } @@ -148,7 +148,7 @@ HelperMacrosTest::tearDown() void HelperMacrosTest::testNoSubclassing() { - std::auto_ptr<CppUnit::TestSuite> suite( BaseTestCase::suite() ); + std::auto_ptr<CPPUNIT_NS::TestSuite> suite( BaseTestCase::suite() ); CPPUNIT_ASSERT_EQUAL( 1, suite->countTestCases() ); m_testListener->setExpectedStartTestCall( 1 ); m_testListener->setExpectNoFailure(); @@ -161,7 +161,7 @@ HelperMacrosTest::testNoSubclassing() void HelperMacrosTest::testSubclassing() { - std::auto_ptr<CppUnit::TestSuite> suite( SubclassedTestCase::suite() ); + std::auto_ptr<CPPUNIT_NS::TestSuite> suite( SubclassedTestCase::suite() ); CPPUNIT_ASSERT_EQUAL( 2, suite->countTestCases() ); m_testListener->setExpectedStartTestCall( 2 ); m_testListener->setExpectedAddFailureCall( 1 ); @@ -174,7 +174,7 @@ HelperMacrosTest::testSubclassing() void HelperMacrosTest::testFail() { - std::auto_ptr<CppUnit::TestSuite> suite( FailTestFixture::suite() ); + std::auto_ptr<CPPUNIT_NS::TestSuite> suite( FailTestFixture::suite() ); m_testListener->setExpectedStartTestCall( 1 ); m_testListener->setExpectNoFailure(); @@ -186,7 +186,7 @@ HelperMacrosTest::testFail() void HelperMacrosTest::testFailToFail() { - std::auto_ptr<CppUnit::TestSuite> suite( FailToFailTestFixture::suite() ); + std::auto_ptr<CPPUNIT_NS::TestSuite> suite( FailToFailTestFixture::suite() ); m_testListener->setExpectedStartTestCall( 1 ); m_testListener->setExpectedAddFailureCall( 1 ); @@ -198,7 +198,7 @@ HelperMacrosTest::testFailToFail() void HelperMacrosTest::testException() { - std::auto_ptr<CppUnit::TestSuite> suite( ExceptionTestFixture::suite() ); + std::auto_ptr<CPPUNIT_NS::TestSuite> suite( ExceptionTestFixture::suite() ); m_testListener->setExpectedStartTestCall( 1 ); m_testListener->setExpectNoFailure(); @@ -210,7 +210,7 @@ HelperMacrosTest::testException() void HelperMacrosTest::testExceptionNotCaught() { - std::auto_ptr<CppUnit::TestSuite> suite( ExceptionNotCaughtTestFixture::suite() ); + std::auto_ptr<CPPUNIT_NS::TestSuite> suite( ExceptionNotCaughtTestFixture::suite() ); m_testListener->setExpectedStartTestCall( 1 ); m_testListener->setExpectedAddFailureCall( 1 ); @@ -222,7 +222,7 @@ HelperMacrosTest::testExceptionNotCaught() void HelperMacrosTest::testCustomTest() { - std::auto_ptr<CppUnit::TestSuite> suite( CustomTestTestFixture::suite() ); + std::auto_ptr<CPPUNIT_NS::TestSuite> suite( CustomTestTestFixture::suite() ); m_testListener->setExpectedStartTestCall( 1 ); m_testListener->setExpectedAddFailureCall( 1 ); @@ -234,7 +234,7 @@ HelperMacrosTest::testCustomTest() void HelperMacrosTest::testCustomTests() { - std::auto_ptr<CppUnit::TestSuite> suite( CustomsTestTestFixture::suite() ); + std::auto_ptr<CPPUNIT_NS::TestSuite> suite( CustomsTestTestFixture::suite() ); m_testListener->setExpectedStartTestCall( 2 ); m_testListener->setExpectedAddFailureCall( 1 ); @@ -246,7 +246,7 @@ HelperMacrosTest::testCustomTests() void HelperMacrosTest::testAddTest() { - std::auto_ptr<CppUnit::TestSuite> suite( AddTestTestFixture::suite() ); + std::auto_ptr<CPPUNIT_NS::TestSuite> suite( AddTestTestFixture::suite() ); m_testListener->setExpectedStartTestCall( 7 ); m_testListener->setExpectedAddFailureCall( 0 ); |
