summaryrefslogtreecommitdiff
path: root/examples/cppunittest/TestPathTest.cpp
diff options
context:
space:
mode:
authorBaptiste Lepilleur <gaiacrtn@free.fr>2002-07-13 09:33:50 +0000
committerBaptiste Lepilleur <gaiacrtn@free.fr>2002-07-13 09:33:50 +0000
commitf1bf3276752a10a2cdf4e3cf3087399d199c4566 (patch)
tree13dc67edcf465f44b9fe835f5e0b201511774d07 /examples/cppunittest/TestPathTest.cpp
parent570132ec2707c8bac6c27c758254f05e293fe613 (diff)
downloadcppunit-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/TestPathTest.cpp')
-rw-r--r--examples/cppunittest/TestPathTest.cpp64
1 files changed, 32 insertions, 32 deletions
diff --git a/examples/cppunittest/TestPathTest.cpp b/examples/cppunittest/TestPathTest.cpp
index bf89581..d664273 100644
--- a/examples/cppunittest/TestPathTest.cpp
+++ b/examples/cppunittest/TestPathTest.cpp
@@ -19,16 +19,16 @@ TestPathTest::~TestPathTest()
void
TestPathTest::setUp()
{
- m_path = new CppUnit::TestPath();
- m_test1 = new CppUnit::TestCase( "test1" );
- m_test2 = new CppUnit::TestCase( "test2" );
- m_test3 = new CppUnit::TestCase( "test3" );
- m_test4 = new CppUnit::TestCase( "test4" );
-
- m_suite1 = new CppUnit::TestSuite( "All Tests" );
- m_suite2 = new CppUnit::TestSuite( "Custom" );
- m_testSuite2a = new CppUnit::TestCase( "MyTest::testDefaultConstructor" );
- m_testSuite2b = new CppUnit::TestCase( "MyTest::testConstructor" );
+ m_path = new CPPUNIT_NS::TestPath();
+ m_test1 = new CPPUNIT_NS::TestCase( "test1" );
+ m_test2 = new CPPUNIT_NS::TestCase( "test2" );
+ m_test3 = new CPPUNIT_NS::TestCase( "test3" );
+ m_test4 = new CPPUNIT_NS::TestCase( "test4" );
+
+ m_suite1 = new CPPUNIT_NS::TestSuite( "All Tests" );
+ m_suite2 = new CPPUNIT_NS::TestSuite( "Custom" );
+ m_testSuite2a = new CPPUNIT_NS::TestCase( "MyTest::testDefaultConstructor" );
+ m_testSuite2b = new CPPUNIT_NS::TestCase( "MyTest::testConstructor" );
m_suite2->addTest( m_testSuite2a );
m_suite2->addTest( m_testSuite2b );
m_suite1->addTest( m_suite2 );
@@ -108,7 +108,7 @@ TestPathTest::testGetChildTestThrowIfNotValid()
void
TestPathTest::testAddPath()
{
- CppUnit::TestPath path;
+ CPPUNIT_NS::TestPath path;
path.add( m_test2 );
path.add( m_test3 );
@@ -125,7 +125,7 @@ TestPathTest::testAddPath()
void
TestPathTest::testAddInvalidPath()
{
- CppUnit::TestPath path;
+ CPPUNIT_NS::TestPath path;
m_path->add( path );
CPPUNIT_ASSERT( !m_path->isValid() );
@@ -236,7 +236,7 @@ TestPathTest::testInsertThrow2()
void
TestPathTest::testInsertPath()
{
- CppUnit::TestPath path;
+ CPPUNIT_NS::TestPath path;
path.add( m_test2 );
path.add( m_test3 );
@@ -255,7 +255,7 @@ TestPathTest::testInsertPath()
void
TestPathTest::testInsertPathThrow()
{
- CppUnit::TestPath path;
+ CPPUNIT_NS::TestPath path;
path.add( m_test2 );
m_path->insert( path, 1 );
@@ -265,7 +265,7 @@ TestPathTest::testInsertPathThrow()
void
TestPathTest::testInsertPathDontThrowIfInvalid()
{
- CppUnit::TestPath path;
+ CPPUNIT_NS::TestPath path;
m_path->insert( path, 1 );
}
@@ -273,7 +273,7 @@ TestPathTest::testInsertPathDontThrowIfInvalid()
void
TestPathTest::testRootConstructor()
{
- CppUnit::TestPath path( m_test1 );
+ CPPUNIT_NS::TestPath path( m_test1 );
CPPUNIT_ASSERT( path.isValid() );
CPPUNIT_ASSERT_EQUAL( 1, path.getTestCount() );
CPPUNIT_ASSERT( m_test1 == path.getTestAt(0) );
@@ -287,7 +287,7 @@ TestPathTest::testPathSliceConstructorCopyUntilEnd()
m_path->add( m_test2 );
m_path->add( m_test3 );
- CppUnit::TestPath path( *m_path, 1 );
+ CPPUNIT_NS::TestPath path( *m_path, 1 );
CPPUNIT_ASSERT_EQUAL( 2, path.getTestCount() );
CPPUNIT_ASSERT( m_test2 == path.getTestAt(0) );
@@ -302,7 +302,7 @@ TestPathTest::testPathSliceConstructorCopySpecifiedCount()
m_path->add( m_test2 );
m_path->add( m_test3 );
- CppUnit::TestPath path( *m_path, 0, 1 );
+ CPPUNIT_NS::TestPath path( *m_path, 0, 1 );
CPPUNIT_ASSERT_EQUAL( 1, path.getTestCount() );
CPPUNIT_ASSERT( m_test1 == path.getTestAt(0) );
@@ -314,7 +314,7 @@ TestPathTest::testPathSliceConstructorCopyNone()
{
m_path->add( m_test1 );
- CppUnit::TestPath path( *m_path, 0, 0 );
+ CPPUNIT_NS::TestPath path( *m_path, 0, 0 );
CPPUNIT_ASSERT_EQUAL( 0, path.getTestCount() );
}
@@ -325,7 +325,7 @@ TestPathTest::testPathSliceConstructorNegativeIndex()
m_path->add( m_test1 );
m_path->add( m_test2 );
- CppUnit::TestPath path( *m_path, -1, 2 );
+ CPPUNIT_NS::TestPath path( *m_path, -1, 2 );
CPPUNIT_ASSERT_EQUAL( 1, path.getTestCount() );
CPPUNIT_ASSERT( m_test1 == path.getTestAt(0) );
@@ -338,7 +338,7 @@ TestPathTest::testPathSliceConstructorAfterEndIndex()
m_path->add( m_test1 );
m_path->add( m_test2 );
- CppUnit::TestPath path( *m_path, 2, 5 );
+ CPPUNIT_NS::TestPath path( *m_path, 2, 5 );
CPPUNIT_ASSERT_EQUAL( 0, path.getTestCount() );
}
@@ -350,7 +350,7 @@ TestPathTest::testPathSliceConstructorNegativeIndexUntilEnd()
m_path->add( m_test1 );
m_path->add( m_test2 );
- CppUnit::TestPath path( *m_path, -1 );
+ CPPUNIT_NS::TestPath path( *m_path, -1 );
CPPUNIT_ASSERT_EQUAL( 2, path.getTestCount() );
CPPUNIT_ASSERT( m_test1 == path.getTestAt(0) );
@@ -364,7 +364,7 @@ TestPathTest::testPathSliceConstructorNegativeIndexNone()
m_path->add( m_test1 );
m_path->add( m_test2 );
- CppUnit::TestPath path( *m_path, -2, 1 );
+ CPPUNIT_NS::TestPath path( *m_path, -2, 1 );
CPPUNIT_ASSERT_EQUAL( 0, path.getTestCount() );
}
@@ -409,7 +409,7 @@ TestPathTest::testToStringHierarchy()
void
TestPathTest::testPathStringConstructorRoot()
{
- CppUnit::TestPath path( m_suite1, "/All Tests" );
+ CPPUNIT_NS::TestPath path( m_suite1, "/All Tests" );
CPPUNIT_ASSERT_EQUAL( 1, path.getTestCount() );
CPPUNIT_ASSERT( m_suite1 == path.getTestAt(0) );
@@ -419,7 +419,7 @@ TestPathTest::testPathStringConstructorRoot()
void
TestPathTest::testPathStringConstructorEmptyIsRoot()
{
- CppUnit::TestPath path( m_suite1, "" );
+ CPPUNIT_NS::TestPath path( m_suite1, "" );
CPPUNIT_ASSERT_EQUAL( 1, path.getTestCount() );
CPPUNIT_ASSERT( m_suite1 == path.getTestAt(0) );
@@ -429,7 +429,7 @@ TestPathTest::testPathStringConstructorEmptyIsRoot()
void
TestPathTest::testPathStringConstructorHierarchy()
{
- CppUnit::TestPath path( m_suite1, "/All Tests/Custom/MyTest::testDefaultConstructor" );
+ CPPUNIT_NS::TestPath path( m_suite1, "/All Tests/Custom/MyTest::testDefaultConstructor" );
CPPUNIT_ASSERT_EQUAL( 3, path.getTestCount() );
CPPUNIT_ASSERT( m_suite1 == path.getTestAt(0) );
@@ -441,14 +441,14 @@ TestPathTest::testPathStringConstructorHierarchy()
void
TestPathTest::testPathStringConstructorBadRootThrow()
{
- CppUnit::TestPath path( m_suite1, "/Custom" );
+ CPPUNIT_NS::TestPath path( m_suite1, "/Custom" );
}
void
TestPathTest::testPathStringConstructorRelativeRoot()
{
- CppUnit::TestPath path( m_suite1, "All Tests" );
+ CPPUNIT_NS::TestPath path( m_suite1, "All Tests" );
CPPUNIT_ASSERT_EQUAL( 1, path.getTestCount() );
CPPUNIT_ASSERT( m_suite1 == path.getTestAt(0) );
@@ -458,7 +458,7 @@ TestPathTest::testPathStringConstructorRelativeRoot()
void
TestPathTest::testPathStringConstructorRelativeRoot2()
{
- CppUnit::TestPath path( m_suite1, "Custom" );
+ CPPUNIT_NS::TestPath path( m_suite1, "Custom" );
CPPUNIT_ASSERT_EQUAL( 1, path.getTestCount() );
CPPUNIT_ASSERT( m_suite2 == path.getTestAt(0) );
@@ -468,14 +468,14 @@ TestPathTest::testPathStringConstructorRelativeRoot2()
void
TestPathTest::testPathStringConstructorThrow1()
{
- CppUnit::TestPath path( m_suite1, "/" );
+ CPPUNIT_NS::TestPath path( m_suite1, "/" );
}
void
TestPathTest::testPathStringConstructorRelativeHierarchy()
{
- CppUnit::TestPath path( m_suite1, "Custom/MyTest::testConstructor" );
+ CPPUNIT_NS::TestPath path( m_suite1, "Custom/MyTest::testConstructor" );
CPPUNIT_ASSERT_EQUAL( 2, path.getTestCount() );
CPPUNIT_ASSERT( m_suite2 == path.getTestAt(0) );
@@ -486,5 +486,5 @@ TestPathTest::testPathStringConstructorRelativeHierarchy()
void
TestPathTest::testPathStringConstructorBadRelativeHierarchyThrow()
{
- CppUnit::TestPath path( m_suite1, "Custom/MyBadTest::testConstructor" );
+ CPPUNIT_NS::TestPath path( m_suite1, "Custom/MyBadTest::testConstructor" );
}