summaryrefslogtreecommitdiff
path: root/include/cppunit
diff options
context:
space:
mode:
authorSteve M. Robbins <smr@sumost.ca>2001-06-02 18:53:06 +0000
committerSteve M. Robbins <smr@sumost.ca>2001-06-02 18:53:06 +0000
commit99f54c0f4b53debc49f2081ce01158b2ed200c30 (patch)
treed4c749cba9bcbc44a9a496ff90f8cf0797f81580 /include/cppunit
parente3dfe8c45eec2adc487b938795d4fca3e5983f68 (diff)
downloadcppunit-99f54c0f4b53debc49f2081ce01158b2ed200c30.tar.gz
Replace CU_ by CPPUNIT_.
Diffstat (limited to 'include/cppunit')
-rw-r--r--include/cppunit/extensions/AutoRegisterSuite.h2
-rw-r--r--include/cppunit/extensions/HelperMacros.h90
-rw-r--r--include/cppunit/extensions/TestSuiteBuilder.h8
-rw-r--r--include/cppunit/extensions/TypeInfoHelper.h4
4 files changed, 52 insertions, 52 deletions
diff --git a/include/cppunit/extensions/AutoRegisterSuite.h b/include/cppunit/extensions/AutoRegisterSuite.h
index cec56c0..7033412 100644
--- a/include/cppunit/extensions/AutoRegisterSuite.h
+++ b/include/cppunit/extensions/AutoRegisterSuite.h
@@ -15,7 +15,7 @@ namespace CppUnit {
* This object is intented to be used as a static variable.
*
* \param TestCaseType Type of the test case which suite is registered.
- * \see CU_TEST_SUITE_REGISTRATION.
+ * \see CPPUNIT_TEST_SUITE_REGISTRATION.
*/
template<typename TestCaseType>
class AutoRegisterSuite
diff --git a/include/cppunit/extensions/HelperMacros.h b/include/cppunit/extensions/HelperMacros.h
index 5f634d5..12defe8 100644
--- a/include/cppunit/extensions/HelperMacros.h
+++ b/include/cppunit/extensions/HelperMacros.h
@@ -10,37 +10,37 @@
#include <cppunit/extensions/AutoRegisterSuite.h>
#include <cppunit/extensions/TestSuiteBuilder.h>
-// The macro __CU_SUITE_CTOR_ARGS expand to an expression used to construct
-// the TestSuiteBuilder with macro CU_TEST_SUITE.
+// The macro __CPPUNIT_SUITE_CTOR_ARGS expand to an expression used to construct
+// the TestSuiteBuilder with macro CPPUNIT_TEST_SUITE.
//
-// The name of the suite is obtained using RTTI if CU_USE_TYPEINFO is
+// The name of the suite is obtained using RTTI if CPPUNIT_USE_TYPEINFO is
// defined, otherwise it is extracted from the macro parameter
//
// This macro is for cppunit internal and should not be use otherwise.
-#ifdef CU_USE_TYPEINFO
-#define __CU_SUITE_CTOR_ARGS( ATestCaseType )
+#ifdef CPPUNIT_USE_TYPEINFO
+#define __CPPUNIT_SUITE_CTOR_ARGS( ATestCaseType )
-#else // CU_USE_TYPEINFO
-#define __CU_SUITE_CTOR_ARGS( ATestCaseType ) (std::string(#ATestCaseType))
+#else // CPPUNIT_USE_TYPEINFO
+#define __CPPUNIT_SUITE_CTOR_ARGS( ATestCaseType ) (std::string(#ATestCaseType))
-#endif // CU_USE_TYPEINFO
+#endif // CPPUNIT_USE_TYPEINFO
/** \file
* Macros intended to ease the definition of test suites.
*
* The macros
- * CU_TEST_SUITE(), CU_TEST(), and CU_TEST_SUITE_END()
+ * CPPUNIT_TEST_SUITE(), CPPUNIT_TEST(), and CPPUNIT_TEST_SUITE_END()
* are designed to facilitate easy creation of a test suite.
* For example,
*
* \code
* #include <cppunit/extensions/HelperMacros.h>
* class MyTest : public CppUnit::TestCase {
- * CU_TEST_SUITE( MyTest );
- * CU_TEST( testEquality );
- * CU_TEST( testSetName );
- * CU_TEST_SUITE_END();
+ * CPPUNIT_TEST_SUITE( MyTest );
+ * CPPUNIT_TEST( testEquality );
+ * CPPUNIT_TEST( testSetName );
+ * CPPUNIT_TEST_SUITE_END();
* public:
* void testEquality();
* void testSetName();
@@ -52,17 +52,17 @@
* named registerTests that you will not need to call directly.
* The second function
* \code static CppUnit::TestSuite *suite()\endcode
- * returns a pointer to the suite of tests defined by the CU_TEST()
+ * returns a pointer to the suite of tests defined by the CPPUNIT_TEST()
* macros.
*
* Rather than invoking suite() directly,
- * the macro CU_TEST_SUITE_REGISTRATION() is
+ * the macro CPPUNIT_TEST_SUITE_REGISTRATION() is
* used to create a static variable that automatically
* registers its test suite in a global registry.
* The registry yields a Test instance containing all the
* registered suites.
* \code
- * CU_TEST_SUITE_REGISTRATION( MyTest );
+ * CPPUNIT_TEST_SUITE_REGISTRATION( MyTest );
* CppUnit::Test* tp =
* CppUnit::TestFactoryRegistry::getRegistry().makeTest();
* \endcode
@@ -73,9 +73,9 @@
* \code
* template<typename CharType>
* class StringTest : public CppUnit::Testcase {
- * CU_TEST_SUITE( StringTest );
- * CU_TEST( testAppend );
- * CU_TEST_SUITE_END();
+ * CPPUNIT_TEST_SUITE( StringTest );
+ * CPPUNIT_TEST( testAppend );
+ * CPPUNIT_TEST_SUITE_END();
* public:
* ...
* };
@@ -84,8 +84,8 @@
* You need to add in an implementation file:
*
* \code
- * CU_TEST_SUITE_REGISTRATION( String<char> );
- * CU_TEST_SUITE_REGISTRATION( String<wchar_t> );
+ * CPPUNIT_TEST_SUITE_REGISTRATION( String<char> );
+ * CPPUNIT_TEST_SUITE_REGISTRATION( String<wchar_t> );
* \endcode
*/
@@ -93,13 +93,13 @@
/** Begin test suite
*
* This macro starts the declaration of a new test suite.
- * Use CU_TEST_SUB_SUITE() instead, if you wish to include the
+ * Use CPPUNIT_TEST_SUB_SUITE() instead, if you wish to include the
* test suite of the parent class.
*
* \param ATestCaseType Type of the test case class.
- * \see CU_TEST_SUB_SUITE, CU_TEST, CU_TEST_SUITE_END, CU_TEST_SUITE_REGISTRATION.
+ * \see CPPUNIT_TEST_SUB_SUITE, CPPUNIT_TEST, CPPUNIT_TEST_SUITE_END, CPPUNIT_TEST_SUITE_REGISTRATION.
*/
-#define CU_TEST_SUITE( ATestCaseType ) \
+#define CPPUNIT_TEST_SUITE( ATestCaseType ) \
private: \
typedef ATestCaseType __ThisTestCaseType; \
public: \
@@ -113,10 +113,10 @@
/** Begin test suite (includes parent suite)
*
* This macro may only be used in a class whose parent class
- * defines a test suite using CU_TEST_SUITE() or CU_TEST_SUB_SUITE().
+ * defines a test suite using CPPUNIT_TEST_SUITE() or CPPUNIT_TEST_SUB_SUITE().
*
* This macro begins the declaration of a test suite, in the same
- * manner as CU_TEST_SUITE(). In addition, the test suite of the
+ * manner as CPPUNIT_TEST_SUITE(). In addition, the test suite of the
* parent is automatically inserted in the test suite being
* defined.
*
@@ -125,10 +125,10 @@
* \code
* #include <cppunit/extensions/HelperMacros.h>
* class MySubTest : public MyTest {
- * CU_TEST_SUB_SUITE( MySubTest, MyTest );
- * CU_TEST( testAdd );
- * CU_TEST( testSub );
- * CU_TEST_SUITE_END();
+ * CPPUNIT_TEST_SUB_SUITE( MySubTest, MyTest );
+ * CPPUNIT_TEST( testAdd );
+ * CPPUNIT_TEST( testSub );
+ * CPPUNIT_TEST_SUITE_END();
* public:
* void testAdd();
* void testSub();
@@ -137,12 +137,12 @@
*
* \param ATestCaseType Type of the test case class.
* \param ASuperClass Type of the parent class.
- * \see CU_TEST_SUITE.
+ * \see CPPUNIT_TEST_SUITE.
*/
-#define CU_TEST_SUB_SUITE( ATestCaseType, ASuperClass ) \
+#define CPPUNIT_TEST_SUB_SUITE( ATestCaseType, ASuperClass ) \
private: \
typedef ASuperClass __ThisSuperClassType; \
- CU_TEST_SUITE( ATestCaseType ); \
+ CPPUNIT_TEST_SUITE( ATestCaseType ); \
__ThisSuperClassType::registerTests( suite, test )
@@ -150,9 +150,9 @@
* \param testMethod Name of the method of the test case to add to the
* suite. The signature of the method must be of
* type: void testMethod();
- * \see CU_TEST_SUITE.
+ * \see CPPUNIT_TEST_SUITE.
*/
-#define CU_TEST( testMethod ) \
+#define CPPUNIT_TEST( testMethod ) \
suite.addTestCaller( #testMethod, &__ThisTestCaseType::testMethod )
@@ -160,28 +160,28 @@
*
* After this macro, member access is set to "private".
*
- * \see CU_TEST_SUITE.
- * \see CU_TEST_SUITE_REGISTRATION.
+ * \see CPPUNIT_TEST_SUITE.
+ * \see CPPUNIT_TEST_SUITE_REGISTRATION.
*/
-#define CU_TEST_SUITE_END() \
+#define CPPUNIT_TEST_SUITE_END() \
} \
static CppUnit::Test *suite() \
{ \
__ThisTestCaseType *test =NULL; \
CppUnit::TestSuiteBuilder<__ThisTestCaseType> \
- suite __CU_SUITE_CTOR_ARGS( ATestCaseType ); \
+ suite __CPPUNIT_SUITE_CTOR_ARGS( ATestCaseType ); \
__ThisTestCaseType::registerTests( suite, test ); \
return suite.takeSuite(); \
} \
private:
-#define __CU_CONCATENATE_DIRECT( s1, s2 ) s1##s2
-#define __CU_CONCATENATE( s1, s2 ) __CU_CONCATENATE_DIRECT( s1, s2 )
+#define __CPPUNIT_CONCATENATE_DIRECT( s1, s2 ) s1##s2
+#define __CPPUNIT_CONCATENATE( s1, s2 ) __CPPUNIT_CONCATENATE_DIRECT( s1, s2 )
/** Decorates the specified string with the line number to obtain a unique name;
* @param str String to decorate.
*/
-#define __CU_MAKE_UNIQUE_NAME( str ) __CU_CONCATENATE( str, __LINE__ )
+#define __CPPUNIT_MAKE_UNIQUE_NAME( str ) __CPPUNIT_CONCATENATE( str, __LINE__ )
/** Register test suite into global registry.
@@ -194,11 +194,11 @@
* \param ATestCaseType Type of the test case class.
* \warning This macro should be used only once per line of code (the line
* number is used to name a hidden static variable).
- * \see CU_TEST_SUITE, CppUnit::AutoRegisterSuite.
+ * \see CPPUNIT_TEST_SUITE, CppUnit::AutoRegisterSuite.
*/
-#define CU_TEST_SUITE_REGISTRATION( ATestCaseType ) \
+#define CPPUNIT_TEST_SUITE_REGISTRATION( ATestCaseType ) \
static CppUnit::AutoRegisterSuite< ATestCaseType > \
- __CU_MAKE_UNIQUE_NAME(__autoRegisterSuite )
+ __CPPUNIT_MAKE_UNIQUE_NAME(__autoRegisterSuite )
#endif // CPPUNIT_EXTENSIONS_HELPERMACROS_H
diff --git a/include/cppunit/extensions/TestSuiteBuilder.h b/include/cppunit/extensions/TestSuiteBuilder.h
index 11b86fb..c1c6906 100644
--- a/include/cppunit/extensions/TestSuiteBuilder.h
+++ b/include/cppunit/extensions/TestSuiteBuilder.h
@@ -5,9 +5,9 @@
#include <cppunit/TestSuite.h>
#include <cppunit/TestCaller.h>
-#ifdef CU_USE_TYPEINFO
+#ifdef CPPUNIT_USE_TYPEINFO
#include <cppunit/extensions/TypeInfoHelper.h>
-#endif // CU_USE_TYPEINFO
+#endif // CPPUNIT_USE_TYPEINFO
namespace CppUnit {
@@ -17,13 +17,13 @@ namespace CppUnit {
public:
typedef void (Fixture::*TestMethod)();
-#ifdef CU_USE_TYPEINFO
+#ifdef CPPUNIT_USE_TYPEINFO
TestSuiteBuilder() :
m_suite( new TestSuite(
TypeInfoHelper::getClassName( typeid(Fixture) ) ) )
{
}
-#endif // CU_USE_TYPEINFO
+#endif // CPPUNIT_USE_TYPEINFO
TestSuiteBuilder( TestSuite *suite ) : m_suite( suite )
{
diff --git a/include/cppunit/extensions/TypeInfoHelper.h b/include/cppunit/extensions/TypeInfoHelper.h
index 8ce5b16..6dd6ae8 100644
--- a/include/cppunit/extensions/TypeInfoHelper.h
+++ b/include/cppunit/extensions/TypeInfoHelper.h
@@ -1,7 +1,7 @@
#ifndef CPPUNIT_TYPEINFOHELPER_H
#define CPPUNIT_TYPEINFOHELPER_H
-#ifdef CU_USE_TYPEINFO
+#ifdef CPPUNIT_USE_TYPEINFO
#include <typeinfo>
@@ -24,6 +24,6 @@ namespace CppUnit {
} // namespace CppUnit
-#endif // CU_USE_TYPEINFO
+#endif // CPPUNIT_USE_TYPEINFO
#endif // CPPUNIT_TYPEINFOHELPER_H