summaryrefslogtreecommitdiff
path: root/src/cppunit
diff options
context:
space:
mode:
authorBaptiste Lepilleur <gaiacrtn@free.fr>2002-07-12 04:59:58 +0000
committerBaptiste Lepilleur <gaiacrtn@free.fr>2002-07-12 04:59:58 +0000
commit10c39014e897d43e118e2ddd4f2c90b7de7ec517 (patch)
treeb27b56c7e70c4cd464b18be73aa7f4e416676b2e /src/cppunit
parent6943d47a76445bbfebc99859ed38698760354642 (diff)
downloadcppunit-10c39014e897d43e118e2ddd4f2c90b7de7ec517.tar.gz
Include/cppunit/config/Portability.
include/cppunit/config/Portability.h: If the compiler does not support namespace (CPPUNIT_HAVE_NAMESPACES=0), define CPPUNIT_NO_STD_NAMESPACE and CPPUNIT_NO_NAMESPACE. If CPPUNIT_NO_STD_NAMESPACE is defined, then CppUnit assumes that STL are in the global namespace. If CPPUNIT_NO_NAMESPACE is defined, then CppUnit classes are placed in the global namespace instead of the CppUnit namespace. * include/cppunit/config/config-bcb5.h: * include/cppunit/config/config-msvc6.h: added definition of macro CPPUNIT_HAVE_NAMESPACES. * include/cppunit/tools/StringTools.h: use CPPUNIT_WRAP_COLUMN as default parameter value for wrap(). * include/cppunit/*/*.h: * src/cppunit/*.cpp: changed all CppUnit namespace declaration to use macros CPPUNIT_NS_BEGIN and CPPUNIT_NS_END. Also, changed reference to CppUnit namespace (essentially in macros) using CPPUNIT_NS macro.
Diffstat (limited to 'src/cppunit')
-rw-r--r--src/cppunit/AdditionalMessage.cpp9
-rw-r--r--src/cppunit/Asserter.cpp5
-rw-r--r--src/cppunit/BeOsDynamicLibraryManager.cpp5
-rw-r--r--src/cppunit/BriefTestProgressListener.cpp5
-rw-r--r--src/cppunit/CompilerOutputter.cpp6
-rw-r--r--src/cppunit/DynamicLibraryManager.cpp5
-rw-r--r--src/cppunit/DynamicLibraryManagerException.cpp5
-rw-r--r--src/cppunit/Exception.cpp4
-rw-r--r--src/cppunit/Message.cpp6
-rw-r--r--src/cppunit/PlugInManager.cpp6
-rw-r--r--src/cppunit/RepeatedTest.cpp5
-rw-r--r--src/cppunit/SourceLine.cpp6
-rw-r--r--src/cppunit/StringTools.cpp109
-rw-r--r--src/cppunit/SynchronizedObject.cpp7
-rw-r--r--src/cppunit/Test.cpp5
-rw-r--r--src/cppunit/TestAssert.cpp4
-rw-r--r--src/cppunit/TestCase.cpp4
-rw-r--r--src/cppunit/TestComposite.cpp5
-rw-r--r--src/cppunit/TestFactoryRegistry.cpp4
-rw-r--r--src/cppunit/TestFailure.cpp6
-rw-r--r--src/cppunit/TestLeaf.cpp4
-rw-r--r--src/cppunit/TestNamer.cpp5
-rw-r--r--src/cppunit/TestPath.cpp4
-rw-r--r--src/cppunit/TestPlugInDefaultImpl.cpp6
-rw-r--r--src/cppunit/TestResult.cpp5
-rw-r--r--src/cppunit/TestResultCollector.cpp5
-rw-r--r--src/cppunit/TestRunner.cpp6
-rw-r--r--src/cppunit/TestSetUp.cpp5
-rw-r--r--src/cppunit/TestSuccessListener.cpp6
-rw-r--r--src/cppunit/TestSuite.cpp5
-rw-r--r--src/cppunit/TextOutputter.cpp5
-rw-r--r--src/cppunit/TextTestProgressListener.cpp5
-rw-r--r--src/cppunit/TextTestResult.cpp4
-rw-r--r--src/cppunit/TextTestRunner.cpp5
-rw-r--r--src/cppunit/TypeInfoHelper.cpp5
-rw-r--r--src/cppunit/UnixDynamicLibraryManager.cpp7
-rw-r--r--src/cppunit/Win32DynamicLibraryManager.cpp5
-rw-r--r--src/cppunit/XmlDocument.cpp7
-rw-r--r--src/cppunit/XmlElement.cpp5
-rw-r--r--src/cppunit/XmlOutputter.cpp15
-rw-r--r--src/cppunit/XmlOutputterHook.cpp5
-rw-r--r--src/cppunit/cppunit.dsp4
42 files changed, 154 insertions, 180 deletions
diff --git a/src/cppunit/AdditionalMessage.cpp b/src/cppunit/AdditionalMessage.cpp
index 49f73c7..9f3da13 100644
--- a/src/cppunit/AdditionalMessage.cpp
+++ b/src/cppunit/AdditionalMessage.cpp
@@ -1,8 +1,7 @@
#include <cppunit/AdditionalMessage.h>
-namespace CppUnit
-{
+CPPUNIT_NS_BEGIN
AdditionalMessage::AdditionalMessage()
@@ -24,14 +23,14 @@ AdditionalMessage::AdditionalMessage( const char *detail1 )
}
-AdditionalMessage::AdditionalMessage( const CppUnit::Message &other )
+AdditionalMessage::AdditionalMessage( const Message &other )
: SuperClass( other )
{
}
AdditionalMessage &
-AdditionalMessage::operator =( const CppUnit::Message &other )
+AdditionalMessage::operator =( const Message &other )
{
SuperClass::operator =( other );
@@ -39,4 +38,4 @@ AdditionalMessage::operator =( const CppUnit::Message &other )
}
-} // namespace CppUnit
+CPPUNIT_NS_END
diff --git a/src/cppunit/Asserter.cpp b/src/cppunit/Asserter.cpp
index 0b64f4f..1c72aff 100644
--- a/src/cppunit/Asserter.cpp
+++ b/src/cppunit/Asserter.cpp
@@ -3,8 +3,7 @@
#include <cppunit/Message.h>
-namespace CppUnit
-{
+CPPUNIT_NS_BEGIN
namespace Asserter
@@ -103,4 +102,4 @@ failNotEqualIf( bool shouldFail,
} // namespace Asserter
-} // namespace CppUnit
+CPPUNIT_NS_END
diff --git a/src/cppunit/BeOsDynamicLibraryManager.cpp b/src/cppunit/BeOsDynamicLibraryManager.cpp
index 30ff126..677ff9d 100644
--- a/src/cppunit/BeOsDynamicLibraryManager.cpp
+++ b/src/cppunit/BeOsDynamicLibraryManager.cpp
@@ -6,8 +6,7 @@
#include <kernel/image.h>
-namespace CppUnit
-{
+CPPUNIT_NS_BEGIN
DynamicLibraryManager::LibraryHandle
@@ -44,7 +43,7 @@ DynamicLibraryManager::getLastErrorDetail() const
}
-} // namespace CppUnit
+CPPUNIT_NS_END
#endif // defined(CPPUNIT_HAVE_BEOS_DLL_LOADER) \ No newline at end of file
diff --git a/src/cppunit/BriefTestProgressListener.cpp b/src/cppunit/BriefTestProgressListener.cpp
index 76bc2a3..953f659 100644
--- a/src/cppunit/BriefTestProgressListener.cpp
+++ b/src/cppunit/BriefTestProgressListener.cpp
@@ -4,8 +4,7 @@
#include <iostream>
-namespace CppUnit
-{
+CPPUNIT_NS_BEGIN
BriefTestProgressListener::BriefTestProgressListener()
@@ -46,5 +45,5 @@ BriefTestProgressListener::endTest( Test *test )
}
-} // namespace CppUnit
+CPPUNIT_NS_END
diff --git a/src/cppunit/CompilerOutputter.cpp b/src/cppunit/CompilerOutputter.cpp
index c394aff..67faf6a 100644
--- a/src/cppunit/CompilerOutputter.cpp
+++ b/src/cppunit/CompilerOutputter.cpp
@@ -7,8 +7,8 @@
#include <cppunit/tools/StringTools.h>
-namespace CppUnit
-{
+CPPUNIT_NS_BEGIN
+
CompilerOutputter::CompilerOutputter( TestResultCollector *result,
std::ostream &stream,
@@ -214,4 +214,4 @@ CompilerOutputter::wrapColumn() const
}
-} // namespace CppUnit
+CPPUNIT_NS_END
diff --git a/src/cppunit/DynamicLibraryManager.cpp b/src/cppunit/DynamicLibraryManager.cpp
index 2f281ef..e6f6294 100644
--- a/src/cppunit/DynamicLibraryManager.cpp
+++ b/src/cppunit/DynamicLibraryManager.cpp
@@ -3,8 +3,7 @@
#if !defined(CPPUNIT_NO_TESTPLUGIN)
#include <cppunit/plugin/DynamicLibraryManagerException.h>
-namespace CppUnit
-{
+CPPUNIT_NS_BEGIN
DynamicLibraryManager::DynamicLibraryManager( const std::string &libraryFileName )
@@ -72,7 +71,7 @@ DynamicLibraryManager::releaseLibrary()
}
-} // namespace CppUnit
+CPPUNIT_NS_END
#endif // !defined(CPPUNIT_NO_TESTPLUGIN)
diff --git a/src/cppunit/DynamicLibraryManagerException.cpp b/src/cppunit/DynamicLibraryManagerException.cpp
index a5f133b..71bbb76 100644
--- a/src/cppunit/DynamicLibraryManagerException.cpp
+++ b/src/cppunit/DynamicLibraryManagerException.cpp
@@ -2,8 +2,7 @@
#if !defined(CPPUNIT_NO_TESTPLUGIN)
-namespace CppUnit
-{
+CPPUNIT_NS_BEGIN
DynamicLibraryManagerException::DynamicLibraryManagerException(
@@ -36,7 +35,7 @@ DynamicLibraryManagerException::what() const throw()
}
-} // namespace CppUnit
+CPPUNIT_NS_END
#endif // !defined(CPPUNIT_NO_TESTPLUGIN)
diff --git a/src/cppunit/Exception.cpp b/src/cppunit/Exception.cpp
index 68d8e61..e9e3e37 100644
--- a/src/cppunit/Exception.cpp
+++ b/src/cppunit/Exception.cpp
@@ -1,7 +1,7 @@
#include <cppunit/Exception.h>
-namespace CppUnit {
+CPPUNIT_NS_BEGIN
#ifdef CPPUNIT_ENABLE_SOURCELINE_DEPRECATED
@@ -116,4 +116,4 @@ Exception::clone() const
}
-} // namespace CppUnit
+CPPUNIT_NS_END
diff --git a/src/cppunit/Message.cpp b/src/cppunit/Message.cpp
index 7eacb30..85f235e 100644
--- a/src/cppunit/Message.cpp
+++ b/src/cppunit/Message.cpp
@@ -2,8 +2,7 @@
#include <stdexcept>
-namespace CppUnit
-{
+CPPUNIT_NS_BEGIN
Message::Message()
@@ -146,6 +145,5 @@ Message::operator !=( const Message &other ) const
}
-
-} // namespace CppUnit
+CPPUNIT_NS_END
diff --git a/src/cppunit/PlugInManager.cpp b/src/cppunit/PlugInManager.cpp
index 35312e4..67fbfd2 100644
--- a/src/cppunit/PlugInManager.cpp
+++ b/src/cppunit/PlugInManager.cpp
@@ -7,9 +7,7 @@
#include <cppunit/plugin/DynamicLibraryManager.h>
-namespace CppUnit
-{
-
+CPPUNIT_NS_BEGIN
PlugInManager::PlugInManager()
@@ -106,6 +104,6 @@ PlugInManager::removeXmlOutputterHooks()
}
-} // namespace CppUnit
+CPPUNIT_NS_END
#endif // !defined(CPPUNIT_NO_TESTPLUGIN)
diff --git a/src/cppunit/RepeatedTest.cpp b/src/cppunit/RepeatedTest.cpp
index 58b1805..2533ca1 100644
--- a/src/cppunit/RepeatedTest.cpp
+++ b/src/cppunit/RepeatedTest.cpp
@@ -1,8 +1,7 @@
#include <cppunit/extensions/RepeatedTest.h>
#include <cppunit/TestResult.h>
-namespace CppUnit {
-
+CPPUNIT_NS_BEGIN
// Counts the number of test cases that will be run by this test.
@@ -27,4 +26,4 @@ RepeatedTest::run( TestResult *result )
}
-} // namespace TestAssert
+CPPUNIT_NS_END
diff --git a/src/cppunit/SourceLine.cpp b/src/cppunit/SourceLine.cpp
index feb356e..bd70709 100644
--- a/src/cppunit/SourceLine.cpp
+++ b/src/cppunit/SourceLine.cpp
@@ -1,8 +1,8 @@
#include <cppunit/SourceLine.h>
-namespace CppUnit
-{
+CPPUNIT_NS_BEGIN
+
SourceLine::SourceLine() :
m_lineNumber( -1 )
@@ -59,4 +59,4 @@ SourceLine::operator !=( const SourceLine &other ) const
}
-} // namespace CppUnit
+CPPUNIT_NS_END
diff --git a/src/cppunit/StringTools.cpp b/src/cppunit/StringTools.cpp
index 7dc50ea..46abd4a 100644
--- a/src/cppunit/StringTools.cpp
+++ b/src/cppunit/StringTools.cpp
@@ -2,79 +2,78 @@
#include <algorithm>
-namespace CppUnit
-{
+CPPUNIT_NS_BEGIN
+
-namespace StringTools
+std::string
+StringTools::toString( int value )
{
+ OStringStream stream;
+ stream << value;
+ return stream.str();
+}
- std::string toString( int value )
- {
- OStringStream stream;
- stream << value;
- return stream.str();
- }
- std::string toString( double value )
- {
- OStringStream stream;
- stream << value;
- return stream.str();
- }
+std::string
+StringTools::toString( double value )
+{
+ OStringStream stream;
+ stream << value;
+ return stream.str();
+}
- Strings split( const std::string &text,
- char separator )
+StringTools::Strings
+StringTools::split( const std::string &text,
+ char separator )
+{
+ Strings splittedText;
+
+ std::string::const_iterator itStart = text.begin();
+ while ( !text.empty() )
{
- Strings splittedText;
+ std::string::const_iterator itSeparator = std::find( itStart,
+ text.end(),
+ separator );
+ splittedText.push_back( text.substr( itStart - text.begin(),
+ itSeparator - itStart ) );
+ if ( itSeparator == text.end() )
+ break;
+ itStart = itSeparator +1;
+ }
- std::string::const_iterator itStart = text.begin();
- while ( !text.empty() )
- {
- std::string::const_iterator itSeparator = std::find( itStart,
- text.end(),
- separator );
- splittedText.push_back( text.substr( itStart - text.begin(),
- itSeparator - itStart ) );
- if ( itSeparator == text.end() )
- break;
- itStart = itSeparator +1;
- }
+ return splittedText;
+}
- return splittedText;
- }
+std::string
+StringTools::wrap( const std::string &text,
+ int wrapColumn )
+{
+ const char lineBreak = '\n';
+ Strings lines = split( text, lineBreak );
- std::string wrap( const std::string &text,
- int wrapColumn )
+ std::string wrapped;
+ for ( Strings::const_iterator it = lines.begin(); it != lines.end(); ++it )
{
- const char lineBreak = '\n';
- Strings lines = split( text, lineBreak );
+ if ( it != lines.begin() )
+ wrapped += lineBreak;
- std::string wrapped;
- for ( Strings::const_iterator it = lines.begin(); it != lines.end(); ++it )
+ const std::string &line = *it;
+ int index =0;
+ while ( index < line.length() )
{
- if ( it != lines.begin() )
+ std::string lineSlice( line.substr( index, wrapColumn ) );
+ wrapped += lineSlice;
+ index += wrapColumn;
+ if ( index < line.length() )
wrapped += lineBreak;
-
- const std::string &line = *it;
- int index =0;
- while ( index < line.length() )
- {
- std::string lineSlice( line.substr( index, wrapColumn ) );
- wrapped += lineSlice;
- index += wrapColumn;
- if ( index < line.length() )
- wrapped += lineBreak;
- }
}
-
- return wrapped;
}
-
-} // namespace StringTools
+ return wrapped;
+}
-} // namespace CppUnit
+CPPUNIT_NS_END
diff --git a/src/cppunit/SynchronizedObject.cpp b/src/cppunit/SynchronizedObject.cpp
index c4e9c50..1764538 100644
--- a/src/cppunit/SynchronizedObject.cpp
+++ b/src/cppunit/SynchronizedObject.cpp
@@ -1,10 +1,7 @@
#include <cppunit/SynchronizedObject.h>
-namespace CppUnit
-{
-
-
+CPPUNIT_NS_BEGIN
SynchronizedObject::SynchronizedObject( SynchronizationObject *syncObject )
@@ -31,5 +28,5 @@ SynchronizedObject::setSynchronizationObject( SynchronizationObject *syncObject
}
-} // namespace CppUnit
+CPPUNIT_NS_END
diff --git a/src/cppunit/Test.cpp b/src/cppunit/Test.cpp
index 3069f57..fef8be7 100644
--- a/src/cppunit/Test.cpp
+++ b/src/cppunit/Test.cpp
@@ -4,7 +4,8 @@
#include <stdexcept>
-namespace CppUnit {
+CPPUNIT_NS_BEGIN
+
Test *
Test::getChildTestAt( int index ) const
@@ -93,4 +94,4 @@ Test::checkIsValidIndex( int index ) const
}
-} // namespace CppUnit
+CPPUNIT_NS_END
diff --git a/src/cppunit/TestAssert.cpp b/src/cppunit/TestAssert.cpp
index e66db3c..8d9ad80 100644
--- a/src/cppunit/TestAssert.cpp
+++ b/src/cppunit/TestAssert.cpp
@@ -7,7 +7,7 @@
#include <cppunit/TestAssert.h>
-namespace CppUnit {
+CPPUNIT_NS_BEGIN
#ifdef CPPUNIT_ENABLE_SOURCELINE_DEPRECATED
@@ -70,4 +70,4 @@ TestAssert::assertDoubleEquals( double expected,
#endif
-}
+CPPUNIT_NS_END
diff --git a/src/cppunit/TestCase.cpp b/src/cppunit/TestCase.cpp
index 3ab0fbe..f2379c5 100644
--- a/src/cppunit/TestCase.cpp
+++ b/src/cppunit/TestCase.cpp
@@ -7,7 +7,7 @@
#include <cppunit/TestResult.h>
-namespace CppUnit {
+CPPUNIT_NS_BEGIN
/** Constructs a test case.
@@ -93,4 +93,4 @@ TestCase::getName() const
}
-} // namespace CppUnit
+CPPUNIT_NS_END
diff --git a/src/cppunit/TestComposite.cpp b/src/cppunit/TestComposite.cpp
index 1127a4c..4768791 100644
--- a/src/cppunit/TestComposite.cpp
+++ b/src/cppunit/TestComposite.cpp
@@ -2,7 +2,8 @@
#include <cppunit/TestResult.h>
-namespace CppUnit {
+CPPUNIT_NS_BEGIN
+
TestComposite::TestComposite( const std::string &name )
: m_name( name )
@@ -72,5 +73,5 @@ TestComposite::doEndSuite( TestResult *controller )
}
-} // namespace CppUnit
+CPPUNIT_NS_END
diff --git a/src/cppunit/TestFactoryRegistry.cpp b/src/cppunit/TestFactoryRegistry.cpp
index f42df2d..b4c8e4f 100644
--- a/src/cppunit/TestFactoryRegistry.cpp
+++ b/src/cppunit/TestFactoryRegistry.cpp
@@ -4,7 +4,7 @@
#include <assert.h>
-namespace CppUnit {
+CPPUNIT_NS_BEGIN
class TestFactoryRegistryList
@@ -156,4 +156,4 @@ TestFactoryRegistry::isValid()
}
-} // namespace CppUnit
+CPPUNIT_NS_END
diff --git a/src/cppunit/TestFailure.cpp b/src/cppunit/TestFailure.cpp
index 22e0ee9..e31e138 100644
--- a/src/cppunit/TestFailure.cpp
+++ b/src/cppunit/TestFailure.cpp
@@ -2,7 +2,8 @@
#include <cppunit/Test.h>
#include <cppunit/TestFailure.h>
-namespace CppUnit {
+CPPUNIT_NS_BEGIN
+
/// Constructs a TestFailure with the given test and exception.
TestFailure::TestFailure( Test *failedTest,
@@ -66,4 +67,5 @@ TestFailure::clone() const
return new TestFailure( m_failedTest, m_thrownException->clone(), m_isError );
}
-} // namespace CppUnit
+
+CPPUNIT_NS_END
diff --git a/src/cppunit/TestLeaf.cpp b/src/cppunit/TestLeaf.cpp
index 80160cb..3d8767c 100644
--- a/src/cppunit/TestLeaf.cpp
+++ b/src/cppunit/TestLeaf.cpp
@@ -1,7 +1,7 @@
#include <cppunit/TestLeaf.h>
-namespace CppUnit {
+CPPUNIT_NS_BEGIN
int
@@ -25,4 +25,4 @@ TestLeaf::doGetChildTestAt( int index ) const
return NULL; // never called, checkIsValidIndex() always throw.
}
-} // namespace CppUnit
+CPPUNIT_NS_END
diff --git a/src/cppunit/TestNamer.cpp b/src/cppunit/TestNamer.cpp
index b5e096c..c668ab2 100644
--- a/src/cppunit/TestNamer.cpp
+++ b/src/cppunit/TestNamer.cpp
@@ -3,8 +3,7 @@
#include <string>
-namespace CppUnit
-{
+CPPUNIT_NS_BEGIN
#if CPPUNIT_HAVE_RTTI
@@ -37,4 +36,4 @@ TestNamer::getTestNameFor( const std::string &testMethodName ) const
-} // namespace CppUnit
+CPPUNIT_NS_END
diff --git a/src/cppunit/TestPath.cpp b/src/cppunit/TestPath.cpp
index 00a7b33..6904590 100644
--- a/src/cppunit/TestPath.cpp
+++ b/src/cppunit/TestPath.cpp
@@ -4,7 +4,7 @@
#include <stdexcept>
-namespace CppUnit {
+CPPUNIT_NS_BEGIN
TestPath::TestPath()
@@ -248,4 +248,4 @@ TestPath::splitPathString( const std::string &pathAsString,
}
-} // namespace CppUnit
+CPPUNIT_NS_END
diff --git a/src/cppunit/TestPlugInDefaultImpl.cpp b/src/cppunit/TestPlugInDefaultImpl.cpp
index cd7cc98..54101e7 100644
--- a/src/cppunit/TestPlugInDefaultImpl.cpp
+++ b/src/cppunit/TestPlugInDefaultImpl.cpp
@@ -7,8 +7,8 @@
#include <cppunit/plugin/TestPlugInDefaultImpl.h>
-namespace CppUnit
-{
+CPPUNIT_NS_BEGIN
+
TestPlugInDefaultImpl::TestPlugInDefaultImpl()
{
@@ -57,7 +57,7 @@ TestPlugInDefaultImpl::uninitialize( TestFactoryRegistry *registry )
}
-} // namespace CppUnit
+CPPUNIT_NS_END
#endif // !defined(CPPUNIT_NO_TESTPLUGIN)
diff --git a/src/cppunit/TestResult.cpp b/src/cppunit/TestResult.cpp
index 39ec208..2b20e4c 100644
--- a/src/cppunit/TestResult.cpp
+++ b/src/cppunit/TestResult.cpp
@@ -4,7 +4,8 @@
#include <cppunit/TestResult.h>
#include <algorithm>
-namespace CppUnit {
+CPPUNIT_NS_BEGIN
+
/// Construct a TestResult
TestResult::TestResult( SynchronizationObject *syncObject )
@@ -183,4 +184,4 @@ TestResult::endTestRun( Test *test )
}
-} // namespace CppUnit
+CPPUNIT_NS_END
diff --git a/src/cppunit/TestResultCollector.cpp b/src/cppunit/TestResultCollector.cpp
index 1d6e057..eee791d 100644
--- a/src/cppunit/TestResultCollector.cpp
+++ b/src/cppunit/TestResultCollector.cpp
@@ -2,8 +2,7 @@
#include <cppunit/TestResultCollector.h>
-namespace CppUnit
-{
+CPPUNIT_NS_BEGIN
TestResultCollector::TestResultCollector( SynchronizationObject *syncObject )
@@ -106,5 +105,5 @@ TestResultCollector::tests() const
}
-} // namespace CppUnit
+CPPUNIT_NS_END
diff --git a/src/cppunit/TestRunner.cpp b/src/cppunit/TestRunner.cpp
index 5baf69e..91b07f6 100644
--- a/src/cppunit/TestRunner.cpp
+++ b/src/cppunit/TestRunner.cpp
@@ -3,8 +3,8 @@
#include <cppunit/TestResult.h>
-namespace CppUnit
-{
+CPPUNIT_NS_BEGIN
+
TestRunner::WrappingSuite::WrappingSuite( const std::string &name )
: TestSuite( name )
@@ -96,5 +96,5 @@ TestRunner::run( TestResult &controller,
}
-} // namespace CppUnit
+CPPUNIT_NS_END
diff --git a/src/cppunit/TestSetUp.cpp b/src/cppunit/TestSetUp.cpp
index a55339c..d4d8530 100644
--- a/src/cppunit/TestSetUp.cpp
+++ b/src/cppunit/TestSetUp.cpp
@@ -1,6 +1,7 @@
#include <cppunit/extensions/TestSetUp.h>
-namespace CppUnit {
+CPPUNIT_NS_BEGIN
+
TestSetUp::TestSetUp( Test *test ) : TestDecorator( test )
{
@@ -28,4 +29,4 @@ TestSetUp::run( TestResult *result )
}
-} // namespace CppUnit
+CPPUNIT_NS_END
diff --git a/src/cppunit/TestSuccessListener.cpp b/src/cppunit/TestSuccessListener.cpp
index 37047ec..3c9c821 100644
--- a/src/cppunit/TestSuccessListener.cpp
+++ b/src/cppunit/TestSuccessListener.cpp
@@ -1,9 +1,7 @@
#include <cppunit/TestSuccessListener.h>
-
-namespace CppUnit
-{
+CPPUNIT_NS_BEGIN
TestSuccessListener::TestSuccessListener( SynchronizationObject *syncObject )
@@ -42,5 +40,5 @@ TestSuccessListener::wasSuccessful() const
}
-} // namespace CppUnit
+CPPUNIT_NS_END
diff --git a/src/cppunit/TestSuite.cpp b/src/cppunit/TestSuite.cpp
index ff9c88b..e2db8ae 100644
--- a/src/cppunit/TestSuite.cpp
+++ b/src/cppunit/TestSuite.cpp
@@ -1,7 +1,8 @@
#include <cppunit/TestSuite.h>
#include <cppunit/TestResult.h>
-namespace CppUnit {
+CPPUNIT_NS_BEGIN
+
/// Default constructor
TestSuite::TestSuite( std::string name )
@@ -58,5 +59,5 @@ TestSuite::doGetChildTestAt( int index ) const
}
-} // namespace CppUnit
+CPPUNIT_NS_END
diff --git a/src/cppunit/TextOutputter.cpp b/src/cppunit/TextOutputter.cpp
index 8ca92f7..6dd54e5 100644
--- a/src/cppunit/TextOutputter.cpp
+++ b/src/cppunit/TextOutputter.cpp
@@ -5,8 +5,7 @@
#include <cppunit/TestResultCollector.h>
-namespace CppUnit
-{
+CPPUNIT_NS_BEGIN
TextOutputter::TextOutputter( TestResultCollector *result,
@@ -138,5 +137,5 @@ TextOutputter::printStatistics()
}
-} // namespace CppUnit
+CPPUNIT_NS_END
diff --git a/src/cppunit/TextTestProgressListener.cpp b/src/cppunit/TextTestProgressListener.cpp
index 409099e..cb0a833 100644
--- a/src/cppunit/TextTestProgressListener.cpp
+++ b/src/cppunit/TextTestProgressListener.cpp
@@ -3,8 +3,7 @@
#include <iostream>
-namespace CppUnit
-{
+CPPUNIT_NS_BEGIN
TextTestProgressListener::TextTestProgressListener()
@@ -40,5 +39,5 @@ TextTestProgressListener::endTestRun( Test *test,
}
-} // namespace CppUnit
+CPPUNIT_NS_END
diff --git a/src/cppunit/TextTestResult.cpp b/src/cppunit/TextTestResult.cpp
index 918b620..c155745 100644
--- a/src/cppunit/TextTestResult.cpp
+++ b/src/cppunit/TextTestResult.cpp
@@ -6,7 +6,7 @@
#include <iostream>
-namespace CppUnit {
+CPPUNIT_NS_BEGIN
TextTestResult::TextTestResult()
@@ -47,4 +47,4 @@ operator <<( std::ostream &stream,
}
-} // namespace CppUnit
+CPPUNIT_NS_END
diff --git a/src/cppunit/TextTestRunner.cpp b/src/cppunit/TextTestRunner.cpp
index 33c1908..47a9cda 100644
--- a/src/cppunit/TextTestRunner.cpp
+++ b/src/cppunit/TextTestRunner.cpp
@@ -10,7 +10,8 @@
#include <stdexcept>
-namespace CppUnit {
+CPPUNIT_NS_BEGIN
+
namespace TextUi {
/*! Constructs a new text runner.
@@ -128,4 +129,4 @@ TestRunner::setOutputter( Outputter *outputter )
} // namespace TextUi
-} // namespace CppUnit
+CPPUNIT_NS_END
diff --git a/src/cppunit/TypeInfoHelper.cpp b/src/cppunit/TypeInfoHelper.cpp
index 43709c3..5d56a19 100644
--- a/src/cppunit/TypeInfoHelper.cpp
+++ b/src/cppunit/TypeInfoHelper.cpp
@@ -6,7 +6,8 @@
#include <string>
-namespace CppUnit {
+CPPUNIT_NS_BEGIN
+
std::string
TypeInfoHelper::getClassName( const std::type_info &info )
@@ -28,6 +29,6 @@ TypeInfoHelper::getClassName( const std::type_info &info )
}
-} // namespace CppUnit
+CPPUNIT_NS_END
#endif // CPPUNIT_HAVE_RTTI
diff --git a/src/cppunit/UnixDynamicLibraryManager.cpp b/src/cppunit/UnixDynamicLibraryManager.cpp
index 1d27590..d6419f2 100644
--- a/src/cppunit/UnixDynamicLibraryManager.cpp
+++ b/src/cppunit/UnixDynamicLibraryManager.cpp
@@ -7,8 +7,7 @@
#include <unistd.h>
-namespace CppUnit
-{
+CPPUNIT_NS_BEGIN
DynamicLibraryManager::LibraryHandle
@@ -39,7 +38,7 @@ DynamicLibraryManager::getLastErrorDetail() const
}
-} // namespace CppUnit
+CPPUNIT_NS_END
-#endif // defined(CPPUNIT_HAVE_UNIX_DLL_LOADER)
+#endif // defined(CPPUNIT_HAVE_UNIX_DLL_LOADER) \ No newline at end of file
diff --git a/src/cppunit/Win32DynamicLibraryManager.cpp b/src/cppunit/Win32DynamicLibraryManager.cpp
index 249d692..543e520 100644
--- a/src/cppunit/Win32DynamicLibraryManager.cpp
+++ b/src/cppunit/Win32DynamicLibraryManager.cpp
@@ -12,8 +12,7 @@
#include <windows.h>
-namespace CppUnit
-{
+CPPUNIT_NS_BEGIN
DynamicLibraryManager::LibraryHandle
@@ -65,7 +64,7 @@ DynamicLibraryManager::getLastErrorDetail() const
}
-} // namespace CppUnit
+CPPUNIT_NS_END
#endif // defined(CPPUNIT_HAVE_WIN32_DLL_LOADER) \ No newline at end of file
diff --git a/src/cppunit/XmlDocument.cpp b/src/cppunit/XmlDocument.cpp
index b0bebab..141fb45 100644
--- a/src/cppunit/XmlDocument.cpp
+++ b/src/cppunit/XmlDocument.cpp
@@ -2,10 +2,7 @@
#include <cppunit/tools/XmlElement.h>
-namespace CppUnit
-{
-
-
+CPPUNIT_NS_BEGIN
XmlDocument::XmlDocument( const std::string &encoding,
@@ -85,5 +82,5 @@ XmlDocument::toString() const
}
-} // namespace CppUnit
+CPPUNIT_NS_END
diff --git a/src/cppunit/XmlElement.cpp b/src/cppunit/XmlElement.cpp
index fb73542..88c4746 100644
--- a/src/cppunit/XmlElement.cpp
+++ b/src/cppunit/XmlElement.cpp
@@ -3,8 +3,7 @@
#include <stdexcept>
-namespace CppUnit
-{
+CPPUNIT_NS_BEGIN
XmlElement::XmlElement( std::string elementName,
@@ -220,5 +219,5 @@ XmlElement::escape( std::string value ) const
}
-} // namespace CppUnit
+CPPUNIT_NS_END
diff --git a/src/cppunit/XmlOutputter.cpp b/src/cppunit/XmlOutputter.cpp
index a1c4345..ff18a80 100644
--- a/src/cppunit/XmlOutputter.cpp
+++ b/src/cppunit/XmlOutputter.cpp
@@ -10,19 +10,8 @@
#include <algorithm>
-namespace CppUnit
-{
-
-// XmlElement
-// //////////////////////////////////////////////////////////////////
-
-
-
-
-
+CPPUNIT_NS_BEGIN
-// XmlOutputter
-// //////////////////////////////////////////////////////////////////
XmlOutputter::XmlOutputter( TestResultCollector *result,
std::ostream &stream,
@@ -206,4 +195,4 @@ XmlOutputter::addSuccessfulTest( Test *test,
}
-} // namespace CppUnit
+CPPUNIT_NS_END
diff --git a/src/cppunit/XmlOutputterHook.cpp b/src/cppunit/XmlOutputterHook.cpp
index 40ff4d7..4b4e8d8 100644
--- a/src/cppunit/XmlOutputterHook.cpp
+++ b/src/cppunit/XmlOutputterHook.cpp
@@ -1,8 +1,7 @@
#include <cppunit/XmlOutputterHook.h>
-namespace CppUnit
-{
+CPPUNIT_NS_BEGIN
void
@@ -41,5 +40,5 @@ XmlOutputterHook::statisticsAdded( XmlDocument *document,
}
-} // namespace CppUnit
+CPPUNIT_NS_END
diff --git a/src/cppunit/cppunit.dsp b/src/cppunit/cppunit.dsp
index 3a5d61f..d618538 100644
--- a/src/cppunit/cppunit.dsp
+++ b/src/cppunit/cppunit.dsp
@@ -215,6 +215,10 @@ SOURCE=..\..\include\cppunit\Portability.h
# End Source File
# Begin Source File
+SOURCE=..\..\include\cppunit\config\PortabilityEpilog.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\include\cppunit\config\SelectDllLoader.h
# End Source File
# End Group