tfel
Loading...
Searching...
No Matches
TestProxy.hxx File Reference

Classes

struct  tfel::tests::TestProxy< TestType >
 proxy class for automatic registration of tests More...

Namespaces

namespace  tfel
 the namespace tfel encloses all the TFEL project. This namespace is empty.

Macros

#define TFEL_PP_JOIN(X, Y)
 this macro joins joins its two arguments together.
#define TFEL_PP_DO_JOIN(X, Y)
 An helper macro for TFEL_PP_JOIN.
#define TFEL_PP_DO_JOIN2(X, Y)
#define TFEL_TESTS_GENERATE_PROXY2(X, X2, Y)
 generate a proxy for class X
#define TFEL_TESTS_GENERATE_PROXY3(X, X2, Y, Y2)
 generate a proxy for class X
#define TFEL_TESTS_GENERATE_PROXY(X, Y)
 generate a proxy for class X
#define TFEL_TESTS_FUNCTION(X, G, Y)
 generate a proxy for function X

Detailed Description

Author
Thomas Helfer
Date
10/04/2010

Macro Definition Documentation

◆ TFEL_PP_DO_JOIN

#define TFEL_PP_DO_JOIN ( X,
Y )
Value:
#define TFEL_PP_DO_JOIN2(X, Y)
An helper macro for TFEL_PP_JOIN.
Definition Macros.hxx:51

An helper macro for TFEL_PP_JOIN.

See also
TFEL_PP_JOIN
Author
Thomas Helfer
Date
28/08/2006

◆ TFEL_PP_DO_JOIN2

#define TFEL_PP_DO_JOIN2 ( X,
Y )
Value:
X##Y
See also
TFEL_PP_JOIN
Author
Thomas Helfer
Date
28/08/2006

◆ TFEL_PP_JOIN

#define TFEL_PP_JOIN ( X,
Y )
Value:
#define TFEL_PP_DO_JOIN(X, Y)
An helper macro for TFEL_PP_JOIN.
Definition Macros.hxx:42

this macro joins joins its two arguments together.

This macro was taken from the boost library:

The following piece of macro magic joins the two arguments together, even when one of the arguments is itself a macro (see 16.3.1 in C++ standard). The key is that macro expansion of macro arguments does not occur in TFEL_PP_DO_JOIN2 but does in TFEL_PP_DO_JOIN.

Author
Thomas Helfer
Date
28/08/2006

◆ TFEL_TESTS_FUNCTION

#define TFEL_TESTS_FUNCTION ( X,
G,
Y )
Value:
TFEL_PP_JOIN(testproxy, TFEL_PP_JOIN(X, FunctionWrapper)); \
testproxy, TFEL_PP_JOIN(X, FunctionWrapper))(Y, G, #X); \
bool X()
#define TFEL_VISIBILITY_LOCAL
Definition TFELConfig.hxx:131
#define TFEL_PP_JOIN(X, Y)
this macro joins joins its two arguments together.
Definition TestProxy.hxx:38
proxy class for automatic registration of tests
Definition TestProxy.hxx:119

generate a proxy for function X

Parameters
X: test function to be generated
G: test group
Y: test suite to which the test is associated
Author
Thomas Helfer
Date
11/04/2010

◆ TFEL_TESTS_GENERATE_PROXY

#define TFEL_TESTS_GENERATE_PROXY ( X,
Y )
Value:
#define TFEL_TESTS_GENERATE_PROXY2(X, X2, Y)
generate a proxy for class X
Definition TestProxy.hxx:67

generate a proxy for class X

Parameters
X: class for which the proxy is generated
Y: test suite to which the test is associated
Author
Thomas Helfer
Date
11/04/2010

◆ TFEL_TESTS_GENERATE_PROXY2

#define TFEL_TESTS_GENERATE_PROXY2 ( X,
X2,
Y )
Value:

generate a proxy for class X

Parameters
X: class for which the proxy is generated
X2: stripped class name
Y: test suite to which the test is associated
Author
Thomas Helfer
Date
11/04/2010

◆ TFEL_TESTS_GENERATE_PROXY3

#define TFEL_TESTS_GENERATE_PROXY3 ( X,
X2,
Y,
Y2 )
Value:
extern tfel::tests::TestProxy<X> TFEL_PP_JOIN(testproxy, X2); \

generate a proxy for class X

Parameters
X: class for which the proxy is generated
X2: stripped class name
Y: test suite to which the test is associated
Y2: parameter passed to the class constructor
Author
Thomas Helfer
Date
11/04/2010