summaryrefslogtreecommitdiff
path: root/include/cppunit/Portability.h
diff options
context:
space:
mode:
authorBaptiste Lepilleur <gaiacrtn@free.fr>2002-08-28 21:20:52 +0000
committerBaptiste Lepilleur <gaiacrtn@free.fr>2002-08-28 21:20:52 +0000
commitedf9c347bd42b7940d39dd70049fb9895d3a3c5a (patch)
treea7cc6c6c82375385c16aa2d19aec7f534a3e8614 /include/cppunit/Portability.h
parent878a1e56ef0858e44310e48fa21781c13a2c0b53 (diff)
downloadcppunit-edf9c347bd42b7940d39dd70049fb9895d3a3c5a.tar.gz
Include/cppunit/Portability.
include/cppunit/Portability.h: added CPPUNIT_STATIC_CAST. * include/cppunit/extensions/TestFixtureFactory.h: extracted from HelperMacros.h. Added template class ConcretTestFixtureFactory. * include/cppunit/extensions/TestSuiteBuilderContext.h: * src/cppunit/TestSuiteBuilderContext.cpp: added. Context used to add test case to the fixture suite. Prevent future compatibility break for custom test API. * include/cppunit/extensions/HelperMacros.h: mostly rewritten. No longer use TestSuiteBuilder. Added support for abstract test fixture through macro CPPUNIT_TEST_SUITE_END_ABSTRACT. Made custom test API easier to use. * examples/cppunittest/HelperMacrosTest.h: * examples/cppunittest/HelperMacrosTest.cpp: updated against HelperMacros.h changes.
Diffstat (limited to 'include/cppunit/Portability.h')
-rw-r--r--include/cppunit/Portability.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/cppunit/Portability.h b/include/cppunit/Portability.h
index ce7ebea..d59183b 100644
--- a/include/cppunit/Portability.h
+++ b/include/cppunit/Portability.h
@@ -79,9 +79,14 @@
#if defined( CPPUNIT_HAVE_CPP_CAST )
# define CPPUNIT_CONST_CAST( TargetType, pointer ) \
const_cast<TargetType>( pointer )
+
+# define CPPUNIT_STATIC_CAST( TargetType, pointer ) \
+ static_cast<TargetType>( pointer )
#else // defined( CPPUNIT_HAVE_CPP_CAST )
# define CPPUNIT_CONST_CAST( TargetType, pointer ) \
((TargetType)( pointer ))
+# define CPPUNIT_STATIC_CAST( TargetType, pointer ) \
+ ((TargetType)( pointer ))
#endif // defined( CPPUNIT_HAVE_CPP_CAST )
// If CPPUNIT_NO_STD_NAMESPACE is defined then STL are in the global space.