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/StringToolsTest.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/StringToolsTest.cpp')
| -rw-r--r-- | examples/cppunittest/StringToolsTest.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/examples/cppunittest/StringToolsTest.cpp b/examples/cppunittest/StringToolsTest.cpp index e2c95cc..7d876f1 100644 --- a/examples/cppunittest/StringToolsTest.cpp +++ b/examples/cppunittest/StringToolsTest.cpp @@ -29,7 +29,7 @@ void StringToolsTest::testToStringInt() { std::string expected = "123456789"; - std::string actual = CppUnit::StringTools::toString( 123456789 ); + std::string actual = CPPUNIT_NS::StringTools::toString( 123456789 ); CPPUNIT_ASSERT_EQUAL( expected, actual ); } @@ -38,7 +38,7 @@ void StringToolsTest::testToStringDouble() { std::string expected = "1234.56"; - std::string actual = CppUnit::StringTools::toString( 1234.56 ); + std::string actual = CPPUNIT_NS::StringTools::toString( 1234.56 ); CPPUNIT_ASSERT_EQUAL( expected, actual ); } @@ -47,8 +47,8 @@ void StringToolsTest::testSplitEmptyString() { std::string text; - CppUnit::StringTools::Strings expected; - CppUnit::StringTools::Strings actual = CppUnit::StringTools::split( text, ';' ); + CPPUNIT_NS::StringTools::Strings expected; + CPPUNIT_NS::StringTools::Strings actual = CPPUNIT_NS::StringTools::split( text, ';' ); CPPUNIT_ASSERT_EQUAL( expected.size(), actual.size() ); CPPUNIT_ASSERT( expected == actual ); @@ -59,9 +59,9 @@ void StringToolsTest::testSplitOneItem() { std::string text = "1"; - CppUnit::StringTools::Strings expected; + CPPUNIT_NS::StringTools::Strings expected; expected.push_back( "1" ); - CppUnit::StringTools::Strings actual = CppUnit::StringTools::split( text, ';' ); + CPPUNIT_NS::StringTools::Strings actual = CPPUNIT_NS::StringTools::split( text, ';' ); CPPUNIT_ASSERT_EQUAL( expected.size(), actual.size() ); CPPUNIT_ASSERT( expected == actual ); @@ -72,10 +72,10 @@ void StringToolsTest::testSplitItemEmpty() { std::string text = "1;"; - CppUnit::StringTools::Strings expected; + CPPUNIT_NS::StringTools::Strings expected; expected.push_back( "1" ); expected.push_back( "" ); - CppUnit::StringTools::Strings actual = CppUnit::StringTools::split( text, ';' ); + CPPUNIT_NS::StringTools::Strings actual = CPPUNIT_NS::StringTools::split( text, ';' ); CPPUNIT_ASSERT_EQUAL( expected.size(), actual.size() ); CPPUNIT_ASSERT( expected == actual ); @@ -86,10 +86,10 @@ void StringToolsTest::testSplitTwoItem() { std::string text = "2;1"; - CppUnit::StringTools::Strings expected; + CPPUNIT_NS::StringTools::Strings expected; expected.push_back( "2" ); expected.push_back( "1" ); - CppUnit::StringTools::Strings actual = CppUnit::StringTools::split( text, ';' ); + CPPUNIT_NS::StringTools::Strings actual = CPPUNIT_NS::StringTools::split( text, ';' ); CPPUNIT_ASSERT_EQUAL( expected.size(), actual.size() ); CPPUNIT_ASSERT( expected == actual ); @@ -100,11 +100,11 @@ void StringToolsTest::testSplitEmptyTwoItem() { std::string text = ";1;2"; - CppUnit::StringTools::Strings expected; + CPPUNIT_NS::StringTools::Strings expected; expected.push_back( "" ); expected.push_back( "1" ); expected.push_back( "2" ); - CppUnit::StringTools::Strings actual = CppUnit::StringTools::split( text, ';' ); + CPPUNIT_NS::StringTools::Strings actual = CPPUNIT_NS::StringTools::split( text, ';' ); CPPUNIT_ASSERT_EQUAL( expected.size(), actual.size() ); CPPUNIT_ASSERT( expected == actual ); @@ -115,11 +115,11 @@ void StringToolsTest::testSplitEmptyItemEmpty() { std::string text = ";1;"; - CppUnit::StringTools::Strings expected; + CPPUNIT_NS::StringTools::Strings expected; expected.push_back( "" ); expected.push_back( "1" ); expected.push_back( "" ); - CppUnit::StringTools::Strings actual = CppUnit::StringTools::split( text, ';' ); + CPPUNIT_NS::StringTools::Strings actual = CPPUNIT_NS::StringTools::split( text, ';' ); CPPUNIT_ASSERT_EQUAL( expected.size(), actual.size() ); CPPUNIT_ASSERT( expected == actual ); @@ -130,13 +130,13 @@ void StringToolsTest::testSplitEmptyItemEmptyEmptyItem() { std::string text = ";1;;;2"; - CppUnit::StringTools::Strings expected; + CPPUNIT_NS::StringTools::Strings expected; expected.push_back( "" ); expected.push_back( "1" ); expected.push_back( "" ); expected.push_back( "" ); expected.push_back( "2" ); - CppUnit::StringTools::Strings actual = CppUnit::StringTools::split( text, ';' ); + CPPUNIT_NS::StringTools::Strings actual = CPPUNIT_NS::StringTools::split( text, ';' ); CPPUNIT_ASSERT_EQUAL( expected.size(), actual.size() ); CPPUNIT_ASSERT( expected == actual ); @@ -149,7 +149,7 @@ StringToolsTest::testWrapEmpty() std::string text = ""; std::string expected = ""; - std::string actual = CppUnit::StringTools::wrap( text, 6 ); + std::string actual = CPPUNIT_NS::StringTools::wrap( text, 6 ); CPPUNIT_ASSERT_EQUAL( expected, actual ); } @@ -160,7 +160,7 @@ StringToolsTest::testWrapNotNeeded() std::string text = "abcd"; std::string expected = text; - std::string actual = CppUnit::StringTools::wrap( text, 6 ); + std::string actual = CPPUNIT_NS::StringTools::wrap( text, 6 ); CPPUNIT_ASSERT_EQUAL( expected, actual ); } @@ -171,7 +171,7 @@ StringToolsTest::testWrapLimitNotNeeded() std::string text = "abcdef"; std::string expected = text; - std::string actual = CppUnit::StringTools::wrap( text, 6 ); + std::string actual = CPPUNIT_NS::StringTools::wrap( text, 6 ); CPPUNIT_ASSERT_EQUAL( expected, actual ); } @@ -182,7 +182,7 @@ StringToolsTest::testWrapOneNeeded() std::string text = "abcdefghi"; std::string expected = "abcdef\nghi"; - std::string actual = CppUnit::StringTools::wrap( text, 6 ); + std::string actual = CPPUNIT_NS::StringTools::wrap( text, 6 ); CPPUNIT_ASSERT_EQUAL( expected, actual ); } @@ -193,7 +193,7 @@ StringToolsTest::testWrapTwoNeeded() std::string text = "abcdefghijklmnop"; std::string expected = "abcdef\nghijkl\nmnop"; - std::string actual = CppUnit::StringTools::wrap( text, 6 ); + std::string actual = CPPUNIT_NS::StringTools::wrap( text, 6 ); CPPUNIT_ASSERT_EQUAL( expected, actual ); } @@ -204,7 +204,7 @@ StringToolsTest::testWrapLimitTwoNeeded() std::string text = "abcdefghijklmnopqr"; std::string expected = "abcdef\nghijkl\nmnopqr"; - std::string actual = CppUnit::StringTools::wrap( text, 6 ); + std::string actual = CPPUNIT_NS::StringTools::wrap( text, 6 ); CPPUNIT_ASSERT_EQUAL( expected, actual ); } @@ -215,7 +215,7 @@ StringToolsTest::testWrapOneNeededTwoNeeded() std::string text = "123456789\nabcdefghijklmno"; std::string expected = "123456\n789\nabcdef\nghijkl\nmno"; - std::string actual = CppUnit::StringTools::wrap( text, 6 ); + std::string actual = CPPUNIT_NS::StringTools::wrap( text, 6 ); CPPUNIT_ASSERT_EQUAL( expected, actual ); } @@ -226,7 +226,7 @@ StringToolsTest::testWrapNotNeededEmptyLinesOneNeeded() std::string text = "12345\n\n\n\nabcdefghi"; std::string expected = "12345\n\n\n\nabcdef\nghi"; - std::string actual = CppUnit::StringTools::wrap( text, 6 ); + std::string actual = CPPUNIT_NS::StringTools::wrap( text, 6 ); CPPUNIT_ASSERT_EQUAL( expected, actual ); } |
