tts v2.3.0
The Tiny Test System
 
Loading...
Searching...
No Matches

◆ TTS_FATAL

#define TTS_FATAL (   Message)
Value:
do \
{ \
::tts::global_runtime.fatal(); \
if(!::tts::global_runtime.fail_status) \
{ \
::tts::global_runtime.fail_status = true; \
std::cout << "[@] - " << ::tts::detail::current_test<< "\n"; \
} \
if( !::tts::detail::current_type.empty()) \
{ \
std::cout << " > " << ::tts::detail::current_type << "\n"; \
} \
std::cout << " " << ::tts::source_location::current() << " - @@ FATAL @@" \
<< " : " << Message << std::endl; \
::tts::fatal_error_status = true; \
} while(0)

Force a failing test, display a message and halt the test suite.

Parameters
MessageA literal string to display as additional informations

Example

#define TTS_MAIN
#include <tts/tts.hpp>
TTS_CASE( "Check that forced major failure fails" )
{
TTS_FATAL("Forced major failure!!");
TTS_PASS("This won't pass");
};
#define TTS_CASE(ID)
Introduces a new test scenario and registers it into the current test driver.
Definition: case.hpp:147
#define TTS_PASS(Message)
Force a passing test and display a message.
Definition: info.hpp:34
#define TTS_FATAL(Message)
Force a failing test, display a message and halt the test suite.
Definition: info.hpp:101