Base class for assertions in unit tests.
More...
#include <arcane/core/Assertion.h>
|
| 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) |
Base class for assertions in unit tests.
Definition at line 44 of file Assertion.h.
◆ _checkAssertion()
◆ assertEqual() [1/2]
Overload for character strings. This allows comparing String with 'const char*' for example.
Definition at line 76 of file Assertion.h.
◆ assertEqual() [2/2]
template<typename T>
| void Arcane::Assertion::assertEqual |
( |
const TraceInfo & | where, |
|
|
const T & | expected, |
|
|
const T & | actual, |
|
|
IParallelMng * | pm = nullptr ) |
|
inline |
◆ assertFalse()
| void Arcane::Assertion::assertFalse |
( |
const TraceInfo & | where, |
|
|
bool | condition, |
|
|
IParallelMng * | pm = nullptr ) |
|
inline |
Throws an AssertException if condition is true.
Definition at line 66 of file Assertion.h.
◆ assertNearlyEqual()
template<typename T>
| void Arcane::Assertion::assertNearlyEqual |
( |
const TraceInfo & | where, |
|
|
const T & | expected, |
|
|
const T & | actual, |
|
|
IParallelMng * | pm = nullptr ) |
|
inline |
◆ assertNearlyEqualWithEpsilon()
template<typename T>
| void Arcane::Assertion::assertNearlyEqualWithEpsilon |
( |
const TraceInfo & | where, |
|
|
const T & | expected, |
|
|
const T & | actual, |
|
|
const T & | epsilon, |
|
|
IParallelMng * | pm = nullptr ) |
|
inline |
◆ assertNearlyZero()
template<typename T>
| void Arcane::Assertion::assertNearlyZero |
( |
const TraceInfo & | where, |
|
|
const T & | actual, |
|
|
IParallelMng * | pm = nullptr ) |
|
inline |
◆ assertNearlyZeroWithEpsilon()
template<typename T>
| void Arcane::Assertion::assertNearlyZeroWithEpsilon |
( |
const TraceInfo & | where, |
|
|
const T & | actual, |
|
|
const T & | epsilon, |
|
|
IParallelMng * | pm = nullptr ) |
|
inline |
◆ assertTrue()
| void Arcane::Assertion::assertTrue |
( |
const TraceInfo & | where, |
|
|
bool | condition, |
|
|
IParallelMng * | pm = nullptr ) |
|
inline |
Throws an AssertException if condition is false.
Definition at line 59 of file Assertion.h.
◆ fail()
| void Arcane::Assertion::fail |
( |
const TraceInfo & | where | ) |
|
|
inline |
The documentation for this class was generated from the following files: