From 251c1ff8aecaa608ef9e6041c2691d369430bf7b Mon Sep 17 00:00:00 2001 From: Baptiste Lepilleur Date: Sun, 14 Jul 2002 18:48:32 +0000 Subject: CodingGuideLines. CodingGuideLines.txt: added. CppUnit's coding guidelines for portability. * include/cppunit/portability/CppUnitStack.h: added. wrapper for std::stack. * include/cppunit/portability/CppUnitSet.h: added. wrapper for std::set. * include/cppunit/ui/text/TestRunner.h: fixed namespace definition for deprecated TestRunner. * include/cppunit/TestAssert.h: * src/cppunit/TestAssert.cpp: removed old deprecated functions that did not use SourceLine. Moved assertEquals() and assertDoubleEquals() into CppUnit namespace. * src/cppunit/TestFactoryRegistry.cpp: use CppUnitMap instead of std::map. * src/DllPlugInTester/CommandLineParser.h: use CppUnitDeque instead std::deque. * examples/cppunittest/*.h: * examples/cppunittest/*.cpp: removed all usage of CppUnitTest namespace. Everything is now in global space. * examples/*/*.h: * examples/*/*.cpp: replaced usage of CppUnit:: with CPPUNIT_NS::. * examples/ClockerPlugIn/ClockerModel.h: use CppUnit STL wrapper instead of STL container. --- examples/cppunittest/XmlUniformiser.cpp | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'examples/cppunittest/XmlUniformiser.cpp') diff --git a/examples/cppunittest/XmlUniformiser.cpp b/examples/cppunittest/XmlUniformiser.cpp index e884e20..f989081 100644 --- a/examples/cppunittest/XmlUniformiser.cpp +++ b/examples/cppunittest/XmlUniformiser.cpp @@ -1,9 +1,5 @@ #include "XmlUniformiser.h" -namespace CppUnitTest -{ - - int notEqualIndex( std::string expectedXml, @@ -36,10 +32,10 @@ checkXmlEqual( std::string expectedXml, message << "differ at index: " << index << "\n" << "expected: " << expected.substr(index) << "\n" << "but was : " << actual.substr( index ); - ::CPPUNIT_NS::Asserter::failNotEqual( expected, - actual, - sourceLine, - message.str() ); + CPPUNIT_NS::Asserter::failNotEqual( expected, + actual, + sourceLine, + message.str() ); } @@ -235,6 +231,3 @@ XmlUniformiser::removeTrailingSpaces() --index; m_stripped.resize( index ); } - - -} // namespace CppUnitTest -- cgit v1.2.1