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

◆ TTS_FAIL

#define TTS_FAIL (   Message)
Value:
do \
{ \
::tts::global_runtime.fail(); \
if(!::tts::global_runtime.fail_status) \
{ \
::tts::global_runtime.fail_status = true; \
std::cout << "[X] - " << ::tts::detail::current_test << "\n"; \
} \
if( !::tts::detail::current_type.empty()) \
{ \
std::cout << " > " << ::tts::detail::current_type << "\n"; \
} \
std::cout << " " << ::tts::source_location::current() << " - ** FAILURE **" \
<< " : " << Message << std::endl; \
} while(0)

Force a failing test and display a message.

Parameters
MessageA literal string to display as additional informations

Example

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