All Classes Namespaces Files Functions Variables Enumerator Friends Macros Pages
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.


#define VERIFY_ASSERTION(expr)
 Macro to evaluate an expression.


void AssertionFailedMsg (const char *expr, const char *file, int line)
 It prints the failed message and aborts the execution.

Macro Definition Documentation

#define VERIFY_ASSERTION (   expr)
(expr ? static_cast<void>(0) : AssertionFailedMsg(#expr, __FILE__,\

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 

It prints the failed message and aborts the execution.

This function is not meant to be used directly. Use VERIFY_ASSERTION.

exprThe expression that has been evaluated.
fileThe file containing the evaluated expression.
lineThe line that contains the evaluated expression.

Definition at line 35 of file Assert.hpp.

std::cerr << "Assertion \"" << expr << "\" failed [" << file << ":"
<< line << "]" << std::endl;