#include <boost/exception/info.hpp>
#include <iostream>
Go to the source code of this file.
|
| #define | ETH_FUNC __func__ |
| |
| #define | asserts(A) ::dev::assertAux(A, #A, __LINE__, __FILE__, ETH_FUNC) |
| |
| #define | assertsEqual(A, B) ::dev::assertEqualAux(A, B, #A, #B, __LINE__, __FILE__, ETH_FUNC) |
| |
| #define | assertThrow(_condition, _ExceptionType, _description) ::dev::assertThrowAux<_ExceptionType>(_condition, _description, __LINE__, __FILE__, ETH_FUNC) |
| |
|
| bool | dev::assertAux (bool _a, char const *_aStr, unsigned _line, char const *_file, char const *_func) |
| |
| template<class A , class B > |
| bool | dev::assertEqualAux (A const &_a, B const &_b, char const *_aStr, char const *_bStr, unsigned _line, char const *_file, char const *_func) |
| |
| template<class _ExceptionType > |
| void | dev::assertThrowAux (bool _condition, ::std::string const &_errorDescription, unsigned _line, char const *_file, char const *_function) |
| |
| template<class _ExceptionType > |
| void | dev::assertThrowAux (void const *_pointer, ::std::string const &_errorDescription, unsigned _line, char const *_file, char const *_function) |
| |
- Author
- Christian c@eth.nosp@m.dev..nosp@m.com
- Date
- 2015
Assertion handling.
Definition in file Assertions.h.
◆ asserts
◆ assertsEqual
◆ assertThrow
| #define assertThrow |
( |
|
_condition, |
|
|
|
_ExceptionType, |
|
|
|
_description |
|
) |
| ::dev::assertThrowAux<_ExceptionType>(_condition, _description, __LINE__, __FILE__, ETH_FUNC) |
Assertion that throws an exception containing the given description if it is not met. Use it as assertThrow(1 == 1, ExceptionType, "Mathematics is wrong."); Do NOT supply an exception object as the second parameter.
Definition at line 67 of file Assertions.h.
◆ ETH_FUNC
| #define ETH_FUNC __func__ |