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

◆ TTS_CASE

#define TTS_CASE (   ID)    [[maybe_unused]] static bool const TTS_CAT(case_,TTS_FUNCTION) = ::tts::detail::test_capture{ID} + TTS_PROTOTYPE(()) \

Introduces a new test scenario and registers it into the current test driver.

The code block following TTS_CASE contains user-defined code for a given test case. Test cases performing no actual tests will be reported as invalid.

Parameters
IDA literal string describing the scenario intents.

Example

#define TTS_MAIN
#include <tts/tts.hpp>
TTS_CASE( "Check basic arithmetic" )
{
TTS_EQUAL(2+2, 4);
};
#define TTS_CASE(ID)
Introduces a new test scenario and registers it into the current test driver.
Definition: case.hpp:147
#define TTS_EQUAL(LHS, RHS,...)
Performs equality comparison between two expressions.
Definition: relation.hpp:89