OTest2
A C++ testing framework
Classes | Public Member Functions | Protected Member Functions | List of all members
OTest2::SuiteGenerated Class Reference

Helper class for suites generated by the otest2 preprocessor. More...

#include <suitegenerated.h>

Inheritance diagram for OTest2::SuiteGenerated:
Inheritance graph
[legend]
Collaboration diagram for OTest2::SuiteGenerated:
Collaboration graph
[legend]

Classes

struct  Impl
 

Public Member Functions

 SuiteGenerated (const SuiteGenerated &)=delete
 
SuiteGeneratedoperator= (const SuiteGenerated &)=delete
 
 SuiteGenerated (const Context &context_, const std::string &name_)
 Ctor. More...
 
virtual ~SuiteGenerated ()
 Dtor. More...
 
virtual std::string getName () const
 Get object's name. More...
 
virtual bool startUpObject (const Context &context_, int index_) override
 Execute start-up function at specified index. More...
 
virtual void scheduleBody (const Context &context_, ScenarioPtr scenario_, ObjectPtr parent_) override
 Schedule body of the testing object. More...
 
virtual void tearDownObject (const Context &context_, int index_) override
 Execute tear-down function at specified index. More...
 
virtual const Contextotest2Context () const
 Get the OTest2 context. More...
 
- Public Member Functions inherited from OTest2::Suite
 Suite ()
 Ctor. More...
 
virtual ~Suite ()
 Dtor. More...
 
 Suite (const Suite &)=delete
 
Suiteoperator= (const Suite &)=delete
 
- Public Member Functions inherited from OTest2::ObjectScenario
 ObjectScenario ()
 Dtor. More...
 
virtual ~ObjectScenario ()
 Dtor. More...
 
 ObjectScenario (const ObjectScenario &)=delete
 
ObjectScenariooperator= (const ObjectScenario &)=delete
 
- Public Member Functions inherited from OTest2::Object
 Object (const Object &)=delete
 
Objectoperator= (const Object &)=delete
 
 Object ()
 Ctor. More...
 
virtual ~Object ()
 Dtor. More...
 
- Public Member Functions inherited from OTest2::ContextObject
 ContextObject (const ContextObject &)=delete
 
ContextObjectoperator= (const ContextObject &)=delete
 
 ContextObject ()
 Ctor. More...
 
virtual ~ContextObject ()
 Dtor. More...
 

Protected Member Functions

void registerFixture (FceMarshalerPtr start_up_, FceMarshalerPtr tear_down_)
 Register a fixture (a pair of a start-up and a tear-down functions) More...
 

Detailed Description

Helper class for suites generated by the otest2 preprocessor.

Definition at line 36 of file suitegenerated.h.

Constructor & Destructor Documentation

◆ SuiteGenerated() [1/2]

OTest2::SuiteGenerated::SuiteGenerated ( const SuiteGenerated )
delete

◆ SuiteGenerated() [2/2]

OTest2::SuiteGenerated::SuiteGenerated ( const Context context_,
const std::string &  name_ 
)
explicit

Ctor.

Parameters
context_OTest2 context
name_Name of the suite

Definition at line 76 of file suitegenerated.cpp.

◆ ~SuiteGenerated()

OTest2::SuiteGenerated::~SuiteGenerated ( )
virtual

Dtor.

Definition at line 84 of file suitegenerated.cpp.

Member Function Documentation

◆ getName()

std::string OTest2::SuiteGenerated::getName ( ) const
virtual

Get object's name.

Implements OTest2::Object.

Definition at line 88 of file suitegenerated.cpp.

◆ operator=()

SuiteGenerated& OTest2::SuiteGenerated::operator= ( const SuiteGenerated )
delete

◆ otest2Context()

const Context & OTest2::SuiteGenerated::otest2Context ( ) const
virtual

Get the OTest2 context.

Implements OTest2::ContextObject.

Definition at line 122 of file suitegenerated.cpp.

◆ registerFixture()

void OTest2::SuiteGenerated::registerFixture ( FceMarshalerPtr  start_up_,
FceMarshalerPtr  tear_down_ 
)
protected

Register a fixture (a pair of a start-up and a tear-down functions)

Parameters
start_up_A start-up fuction of the fixture
tear_down_A tear-down function of the fixture

Definition at line 126 of file suitegenerated.cpp.

◆ scheduleBody()

void OTest2::SuiteGenerated::scheduleBody ( const Context context_,
ScenarioPtr  scenario_,
ObjectPtr  me_ 
)
overridevirtual

Schedule body of the testing object.

Parameters
context_The OTest2 context
scenario_The scenario representing this object
me_A shared pointer pointing this instance

Implements OTest2::ObjectScenario.

Definition at line 105 of file suitegenerated.cpp.

◆ startUpObject()

bool OTest2::SuiteGenerated::startUpObject ( const Context context_,
int  index_ 
)
overridevirtual

Execute start-up function at specified index.

Parameters
context_The OTest2 context
index_The zero based index of the start-up function
Returns
True if the start-up function exists and has been run

Implements OTest2::ObjectScenario.

Definition at line 92 of file suitegenerated.cpp.

◆ tearDownObject()

void OTest2::SuiteGenerated::tearDownObject ( const Context context_,
int  index_ 
)
overridevirtual

Execute tear-down function at specified index.

Parameters
context_The OTest2 context
index_The zero based index of the tear-down function

Implements OTest2::ObjectScenario.

Definition at line 113 of file suitegenerated.cpp.


The documentation for this class was generated from the following files: