OTest2
A C++ testing framework
Macros
dsl.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define OT2_START_UP()
 
#define OT2_TEAR_DOWN()
 
#define OT2_SUITE(name_)   namespace name_ { using namespace ::OTest2::Assertions; using namespace ::OTest2::Controls; } namespace name_
 
#define OT2_CASE(name_)   namespace name_ { using namespace ::OTest2::Assertions; using namespace ::OTest2::Controls; } namespace name_
 
#define OT2_SCENARIO()
 
#define OT2_STATE()
 
#define OT2_SIMPLE()   void AnonymousState() OT2_SCENARIO()
 
#define testTry   try
 
#define testCatch(exc_type_, name_)   catch(typename ::OTest2::TypePack<exc_type_>::Type name_)
 
#define OT2_USER_DATA()
 
#define OT2_USER_DATA_KEY(key_)
 
#define OT2_TAGS(tags_)
 
#define OT2_SECTION(name_)   if(::OTest2::Controls::Private::sectionName(#name_))
 
#define TEST_START_UP()   void startUp() OT2_START_UP()
 
#define TEST_TEAR_DOWN()   void tearDown() OT2_TEAR_DOWN()
 
#define TEST_SUITE(name_)   OT2_SUITE(name_)
 
#define TEST_CASE(name_)   OT2_CASE(name_)
 
#define TEST_SCENARIO(name_)   void name_() OT2_SCENARIO()
 
#define TEST_STATE(name_)   void name_() OT2_STATE()
 
#define TEST_SIMPLE()   OT2_SIMPLE()
 
#define TEST_SECTION(name_)   OT2_SECTION(name_)
 

Macro Definition Documentation

◆ OT2_CASE

#define OT2_CASE (   name_)    namespace name_ { using namespace ::OTest2::Assertions; using namespace ::OTest2::Controls; } namespace name_

Definition at line 29 of file dsl.h.

◆ OT2_SCENARIO

#define OT2_SCENARIO ( )

Definition at line 30 of file dsl.h.

◆ OT2_SECTION

#define OT2_SECTION (   name_)    if(::OTest2::Controls::Private::sectionName(#name_))

Definition at line 65 of file dsl.h.

◆ OT2_SIMPLE

#define OT2_SIMPLE ( )    void AnonymousState() OT2_SCENARIO()

Definition at line 32 of file dsl.h.

◆ OT2_START_UP

#define OT2_START_UP ( )

Definition at line 26 of file dsl.h.

◆ OT2_STATE

#define OT2_STATE ( )

Definition at line 31 of file dsl.h.

◆ OT2_SUITE

#define OT2_SUITE (   name_)    namespace name_ { using namespace ::OTest2::Assertions; using namespace ::OTest2::Controls; } namespace name_

Definition at line 28 of file dsl.h.

◆ OT2_TAGS

#define OT2_TAGS (   tags_)

Definition at line 43 of file dsl.h.

◆ OT2_TEAR_DOWN

#define OT2_TEAR_DOWN ( )

Definition at line 27 of file dsl.h.

◆ OT2_USER_DATA

#define OT2_USER_DATA ( )

Definition at line 39 of file dsl.h.

◆ OT2_USER_DATA_KEY

#define OT2_USER_DATA_KEY (   key_)

Definition at line 40 of file dsl.h.

◆ TEST_CASE

#define TEST_CASE (   name_)    OT2_CASE(name_)

Definition at line 71 of file dsl.h.

◆ TEST_SCENARIO

#define TEST_SCENARIO (   name_)    void name_() OT2_SCENARIO()

Definition at line 72 of file dsl.h.

◆ TEST_SECTION

#define TEST_SECTION (   name_)    OT2_SECTION(name_)

Definition at line 75 of file dsl.h.

◆ TEST_SIMPLE

#define TEST_SIMPLE ( )    OT2_SIMPLE()

Definition at line 74 of file dsl.h.

◆ TEST_START_UP

#define TEST_START_UP ( )    void startUp() OT2_START_UP()

Definition at line 68 of file dsl.h.

◆ TEST_STATE

#define TEST_STATE (   name_)    void name_() OT2_STATE()

Definition at line 73 of file dsl.h.

◆ TEST_SUITE

#define TEST_SUITE (   name_)    OT2_SUITE(name_)

Definition at line 70 of file dsl.h.

◆ TEST_TEAR_DOWN

#define TEST_TEAR_DOWN ( )    void tearDown() OT2_TEAR_DOWN()

Definition at line 69 of file dsl.h.

◆ testCatch

#define testCatch (   exc_type_,
  name_ 
)    catch(typename ::OTest2::TypePack<exc_type_>::Type name_)

Definition at line 36 of file dsl.h.

◆ testTry

#define testTry   try

Definition at line 35 of file dsl.h.