#include <stdio.h>
#include <iostream.h>
Include dependency graph for GTAssert.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Defines | |
#define | ASSERT(cond) |
ASSERT prints a message if cond is false and NDEBUG is not defined. | |
#define | VERIFY(cond) |
VERIFY prints a message if cond is false and NDEBUG is not defined. | |
#define | PRINT(text) {cout << text << "\n"; cout.flush();} |
PRINT prints a text directly to the output if and NDEBUG is not defined. |
Definition in file GTAssert.h.
|
|
Value: {if(!(cond)) ::printf("VERIFY(" #cond ") failed in line %d of file " \ __FILE__ ".\n",__LINE__);} VERIFY does evaluate cond even if NDEBUG is defined. Note that printf will not work in early stages of the creation of an Aperios process. Therefore, you will not get any feedback in such a case. If you are not sure whether an assertion failure will be reported at a certain position in the code, try ASSERT(false).
Definition at line 50 of file GTAssert.h. Referenced by ProcessCreator< T >::DoInit(), SystemCall::getMacAddress(), SystemCall::getRemainingPower(), SystemCall::getRobotDesign(), TCPEndpoint::listen(), MotorCommandsSender::MotorCommandsSender(), SoundDataSender::preparePackage(), ProcessCreator< T >::ProcessCreator(), ProcessCreator< T >::processNextFrame(), SystemCall::reboot(), SenderBase< MotorCommands >::sendPackage(), SoundDataSender::setPackage(), Sender< MessageQueue >::setPackage(), MotorCommandsSender::setPackage(), SystemCall::shutdown(), SoundDataSender::SoundDataSender(), File::write(), File::~File(), MotorCommandsSender::~MotorCommandsSender(), and SoundDataSender::~SoundDataSender(). |
|
PRINT prints a text directly to the output if and NDEBUG is not defined. PRINT does not evaluate the parameter if NDEBUG is defined.
Definition at line 58 of file GTAssert.h. |