Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
Arcane::UnitTestServiceAdapter< T > Class Template Reference

Adapts a service that declares tests to the IUnitTest interface. More...

#include <arcane/core/UnitTestServiceAdapter.h>

Public Types

typedef void(T::* FuncPtr) ()
 Type of the pointer to the test methods.

Public Member Functions

 UnitTestServiceAdapter (T *service)
void setClassSetUpFunction (FuncPtr f)
void setTestSetUpFunction (FuncPtr f)
void setClassTearDownFunction (FuncPtr f)
void setTestTearDownFunction (FuncPtr f)
void addTestFunction (FuncPtr f, String name, String method_name)
void initializeTest () override
 Implementation of the IUnitTest interface.
bool executeTest (XmlNode &report) override
 Implementation of the IUnitTest interface.
void finalizeTest () override
 Implementation of the IUnitTest interface.
Public Member Functions inherited from Arcane::IXmlUnitTest
virtual void buildInitializeTest ()
Public Member Functions inherited from Arcane::Assertion
void fail (const TraceInfo &where)
void assertTrue (const TraceInfo &where, bool condition, IParallelMng *pm=nullptr)
 Throws an AssertException if condition is false.
void assertFalse (const TraceInfo &where, bool condition, IParallelMng *pm=nullptr)
 Throws an AssertException if condition is true.
void assertEqual (const TraceInfo &where, const String &expected, const String &actual, IParallelMng *pm=nullptr)
template<typename T>
void assertEqual (const TraceInfo &where, const T &expected, const T &actual, IParallelMng *pm=nullptr)
template<typename T>
void assertNearlyEqual (const TraceInfo &where, const T &expected, const T &actual, IParallelMng *pm=nullptr)
template<typename T>
void assertNearlyZero (const TraceInfo &where, const T &actual, IParallelMng *pm=nullptr)
template<typename T>
void assertNearlyEqualWithEpsilon (const TraceInfo &where, const T &expected, const T &actual, const T &epsilon, IParallelMng *pm=nullptr)
template<typename T>
void assertNearlyZeroWithEpsilon (const TraceInfo &where, const T &actual, const T &epsilon, IParallelMng *pm=nullptr)

Detailed Description

template<typename T>
class Arcane::UnitTestServiceAdapter< T >

Adapts a service that declares tests to the IUnitTest interface.

Definition at line 37 of file UnitTestServiceAdapter.h.

Member Typedef Documentation

◆ FuncPtr

template<typename T>
typedef void(T::* Arcane::UnitTestServiceAdapter< T >::FuncPtr) ()

Type of the pointer to the test methods.

Definition at line 43 of file UnitTestServiceAdapter.h.

Constructor & Destructor Documentation

◆ UnitTestServiceAdapter()

template<typename T>
Arcane::UnitTestServiceAdapter< T >::UnitTestServiceAdapter ( T * service)
inlineexplicit

Definition at line 47 of file UnitTestServiceAdapter.h.

Member Function Documentation

◆ addTestFunction()

template<typename T>
void Arcane::UnitTestServiceAdapter< T >::addTestFunction ( FuncPtr f,
String name,
String method_name )
inline

Definition at line 57 of file UnitTestServiceAdapter.h.

◆ executeTest()

template<typename T>
bool Arcane::UnitTestServiceAdapter< T >::executeTest ( XmlNode & report)
inlineoverridevirtual

◆ finalizeTest()

template<typename T>
void Arcane::UnitTestServiceAdapter< T >::finalizeTest ( )
inlineoverridevirtual

Implementation of the IUnitTest interface.

Implements Arcane::IXmlUnitTest.

Definition at line 106 of file UnitTestServiceAdapter.h.

◆ initializeTest()

template<typename T>
void Arcane::UnitTestServiceAdapter< T >::initializeTest ( )
inlineoverridevirtual

Implementation of the IUnitTest interface.

Implements Arcane::IXmlUnitTest.

Definition at line 66 of file UnitTestServiceAdapter.h.

◆ setClassSetUpFunction()

template<typename T>
void Arcane::UnitTestServiceAdapter< T >::setClassSetUpFunction ( FuncPtr f)
inline

Definition at line 53 of file UnitTestServiceAdapter.h.

◆ setClassTearDownFunction()

template<typename T>
void Arcane::UnitTestServiceAdapter< T >::setClassTearDownFunction ( FuncPtr f)
inline

Definition at line 55 of file UnitTestServiceAdapter.h.

◆ setTestSetUpFunction()

template<typename T>
void Arcane::UnitTestServiceAdapter< T >::setTestSetUpFunction ( FuncPtr f)
inline

Definition at line 54 of file UnitTestServiceAdapter.h.

◆ setTestTearDownFunction()

template<typename T>
void Arcane::UnitTestServiceAdapter< T >::setTestTearDownFunction ( FuncPtr f)
inline

Definition at line 56 of file UnitTestServiceAdapter.h.


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