Assert.hpp File Reference
#include <iostream>
#include <cstdlib>
Include dependency graph for Assert.hpp:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Macros
Macro to evaluate an expression.
Functions
It prints the failed message and aborts the execution.
Macro Definition Documentation
#define VERIFY_ASSERTION
(
expr )
Value:
Macro to evaluate an expression.
If the expression evaluates to false then the AssertionFailedMsg function is called.
Definition at line 47 of file Assert.hpp.
Function Documentation
void AssertionFailedMsg
(
const char *
expr,
const char *
file,
int
line
)
inline
It prints the failed message and aborts the execution.
This function is not meant to be used directly. Use VERIFY_ASSERTION.
- Parameters
-
expr The expression that has been evaluated.
file The file containing the evaluated expression.
line The line that contains the evaluated expression.
Definition at line 35 of file Assert.hpp.
{
std::cerr << "Assertion \"" << expr << "\" failed [" << file << ":"
<< line << "]" << std::endl;
std::abort();
}