summaryrefslogtreecommitdiff
path: root/examples/cppunittest/TestPathTest.cpp
diff options
context:
space:
mode:
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" );
}