CppUnit project page FAQ

Portability.h File Reference
#include <cppunit/config-auto.h>
#include <cppunit/config/CppUnitApi.h>
#include <cppunit/config/SelectDllLoader.h>
Include dependency graph for Portability.h:

Go to the source code of this file.

Macros

#define CPPUNIT_VERSION   "1.15.0"
 
#define CPPUNIT_ENABLE_NAKED_ASSERT   0
 
#define CPPUNIT_ENABLE_CU_TEST_MACROS   0
 
#define CPPUNIT_COMPILER_LOCATION_FORMAT   "%f:%l:"
 
#define CPPUNIT_CONST_CAST(TargetType, pointer)
 
#define CPPUNIT_STATIC_CAST(TargetType, pointer)
 
#define CPPUNIT_NS_BEGIN   namespace CppUnit {
 
#define CPPUNIT_NS_END   }
 
#define CPPUNIT_NS   CppUnit
 
#define CPPUNIT_STRINGIZE(symbol)
 
#define _CPPUNIT_DO_STRINGIZE(symbol)
 
#define CPPUNIT_JOIN(symbol1, symbol2)
 
#define _CPPUNIT_DO_JOIN(symbol1, symbol2)
 
#define _CPPUNIT_DO_JOIN2(symbol1, symbol2)
 
#define CPPUNIT_UNIQUE_COUNTER   __LINE__
 
#define CPPUNIT_MAKE_UNIQUE_NAME(prefix)
 
#define CPPUNIT_WRAP_COLUMN   79
 

Macro Definition Documentation

◆ _CPPUNIT_DO_JOIN

#define _CPPUNIT_DO_JOIN ( symbol1,
symbol2 )
Value:
_CPPUNIT_DO_JOIN2( symbol1, symbol2 )
#define _CPPUNIT_DO_JOIN2(symbol1, symbol2)
Definition Portability.h:149

◆ _CPPUNIT_DO_JOIN2

#define _CPPUNIT_DO_JOIN2 ( symbol1,
symbol2 )
Value:
symbol1##symbol2

◆ _CPPUNIT_DO_STRINGIZE

#define _CPPUNIT_DO_STRINGIZE ( symbol)
Value:
#symbol

◆ CPPUNIT_COMPILER_LOCATION_FORMAT

#define CPPUNIT_COMPILER_LOCATION_FORMAT   "%f:%l:"

◆ CPPUNIT_CONST_CAST

#define CPPUNIT_CONST_CAST ( TargetType,
pointer )
Value:
((TargetType)( pointer ))

◆ CPPUNIT_ENABLE_CU_TEST_MACROS

#define CPPUNIT_ENABLE_CU_TEST_MACROS   0

◆ CPPUNIT_ENABLE_NAKED_ASSERT

#define CPPUNIT_ENABLE_NAKED_ASSERT   0

◆ CPPUNIT_JOIN

#define CPPUNIT_JOIN ( symbol1,
symbol2 )
Value:
_CPPUNIT_DO_JOIN( symbol1, symbol2 )
#define _CPPUNIT_DO_JOIN(symbol1, symbol2)
Definition Portability.h:146

Joins to symbol after expanding them into string.

Use this macro to join two symbols. Example of usage:

#define MAKE_UNIQUE_NAME(prefix) CPPUNIT_JOIN( prefix, __LINE__ )

The macro defined in the example concatenate a given prefix with the line number to obtain a 'unique' identifier.

◆ CPPUNIT_MAKE_UNIQUE_NAME

#define CPPUNIT_MAKE_UNIQUE_NAME ( prefix)
Value:
#define CPPUNIT_UNIQUE_COUNTER
Definition Portability.h:154
#define CPPUNIT_JOIN(symbol1, symbol2)
Definition Portability.h:143

Adds the line number to the specified string to create a unique identifier.

Parameters
prefixPrefix added to the line number to create a unique identifier.
See also
CPPUNIT_TEST_SUITE_REGISTRATION for an example of usage.

◆ CPPUNIT_NS

#define CPPUNIT_NS   CppUnit

◆ CPPUNIT_NS_BEGIN

#define CPPUNIT_NS_BEGIN   namespace CppUnit {

◆ CPPUNIT_NS_END

#define CPPUNIT_NS_END   }

◆ CPPUNIT_STATIC_CAST

#define CPPUNIT_STATIC_CAST ( TargetType,
pointer )
Value:
((TargetType)( pointer ))

◆ CPPUNIT_STRINGIZE

#define CPPUNIT_STRINGIZE ( symbol)
Value:
#define _CPPUNIT_DO_STRINGIZE(symbol)
Definition Portability.h:123

Stringize a symbol.

Use this macro to convert a preprocessor symbol to a string.

Example of usage:

#define CPPUNIT_PLUGIN_EXPORTED_NAME cppunitTestPlugIn
#define CPPUNIT_STRINGIZE(symbol)
Definition Portability.h:120
#define CPPUNIT_PLUGIN_EXPORTED_NAME
Name of the function exported by a test plug-in.
Definition TestPlugIn.h:109

◆ CPPUNIT_UNIQUE_COUNTER

#define CPPUNIT_UNIQUE_COUNTER   __LINE__

◆ CPPUNIT_VERSION

#define CPPUNIT_VERSION   "1.15.0"

◆ CPPUNIT_WRAP_COLUMN

#define CPPUNIT_WRAP_COLUMN   79

Defines wrap colunm for CppUnit. Used by CompilerOuputter.


Send comments to:
CppUnit Developers