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

◆ TTS_EXPECT_NOT

#define TTS_EXPECT_NOT (   EXPR,
  ... 
)    TTS_EXPECT_NOT_ ## __VA_ARGS__ ( EXPR )

Check if a given expression evaluates to false.

Parameters
EXPRExpression to evaluate and compare to false.
...Optional tag. If equals to REQUIRED, this test will stop the program if it fails.

Example

#define TTS_MAIN
#include <tts/tts.hpp>
TTS_CASE( "Check that expectation can be met" )
{
int a = 42, b = 69;
TTS_EXPECT_NOT(a == b);
// This test would cause the program to stop and not run the remaining tests
// TTS_EXPECT_NOT(a != b, REQUIRED);
TTS_EXPECT_NOT(a >= b);
TTS_EXPECT_NOT(a <= b);
};
#define TTS_EXPECT_NOT(EXPR,...)
Check if a given expression evaluates to false.
Definition: basic.hpp:95
#define TTS_CASE(ID)
Introduces a new test scenario and registers it into the current test driver.
Definition: case.hpp:147