Macros for performing direct true/false checks over predicate-like expressions.
More...
|
| #define | TTS_PASS(...) |
| | Force a passing test and display a message.
|
| |
| #define | TTS_FAIL(...) |
| | Force a failing test and display a message.
|
| |
| #define | TTS_FATAL(...) |
| | Force a failing test, display a message and halt the test suite.
|
| |
|
| #define | TTS_EXPECT(EXPR, ...) |
| | Check if a given expression evaluates to true.
|
| |
| #define | TTS_EXPECT_NOT(EXPR, ...) |
| | Check if a given expression evaluates to false.
|
| |
| #define | TTS_CONSTEXPR_EXPECT(EXPR, ...) |
| | Check if a given expression evaluates to true at compile-time.
|
| |
| #define | TTS_CONSTEXPR_EXPECT_NOT(EXPR, ...) |
| | Check if a given expression evaluates to false at compile-time.
|
| |
◆ TTS_CONSTEXPR_EXPECT
| #define TTS_CONSTEXPR_EXPECT |
( |
|
EXPR, |
|
|
|
... |
|
) |
| |
#include <tts/test/basic.hpp>
Check if a given expression evaluates to true at compile-time.
- Parameters
-
| EXPR | Expression to evaluate and compare to true. |
| ... | Optional tag. If equals to REQUIRED, this test will stop the program if it fails. |
#define TTS_MAIN
#include <tts/tts.hpp>
TTS_CASE(
"Check that expectation can be met")
{
constexpr int a = 42, b = 69;
};
#define TTS_CONSTEXPR_EXPECT(EXPR,...)
Check if a given expression evaluates to true at compile-time.
Definition basic.hpp:115
#define TTS_CASE(ID)
Introduces a new test scenario and registers it into the current test driver.
Definition case.hpp:139
◆ TTS_CONSTEXPR_EXPECT_NOT
| #define TTS_CONSTEXPR_EXPECT_NOT |
( |
|
EXPR, |
|
|
|
... |
|
) |
| |
#include <tts/test/basic.hpp>
Check if a given expression evaluates to false at compile-time.
- Parameters
-
| EXPR | Expression to evaluate and compare to false. |
| ... | Optional tag. If equals to REQUIRED, this test will stop the program if it fails. |
#define TTS_MAIN
#include <tts/tts.hpp>
TTS_CASE(
"Check that counter-expectation can be met")
{
constexpr int a = 42, b = 69;
};
#define TTS_CONSTEXPR_EXPECT_NOT(EXPR,...)
Check if a given expression evaluates to false at compile-time.
Definition basic.hpp:151
◆ TTS_EXPECT
| #define TTS_EXPECT |
( |
|
EXPR, |
|
|
|
... |
|
) |
| |
#include <tts/test/basic.hpp>
Check if a given expression evaluates to true.
- Parameters
-
| EXPR | Expression to evaluate and compare to true. |
| ... | Optional tag. If equals to REQUIRED, this test will stop the program if it fails. |
#define TTS_MAIN
#include <tts/tts.hpp>
TTS_CASE(
"Check that expectation can be met")
{
int a = 42, b = 69;
};
#define TTS_EXPECT(EXPR,...)
Check if a given expression evaluates to true.
Definition basic.hpp:43
◆ TTS_EXPECT_NOT
| #define TTS_EXPECT_NOT |
( |
|
EXPR, |
|
|
|
... |
|
) |
| |
#include <tts/test/basic.hpp>
Check if a given expression evaluates to false.
- Parameters
-
| EXPR | Expression to evaluate and compare to false. |
| ... | Optional tag. If equals to REQUIRED, this test will stop the program if it fails. |
#define TTS_MAIN
#include <tts/tts.hpp>
TTS_CASE(
"Check that expectation can't be met")
{
int a = 42, b = 69;
};
#define TTS_EXPECT_NOT(EXPR,...)
Check if a given expression evaluates to false.
Definition basic.hpp:79
◆ TTS_FAIL
#include <tts/engine/info.hpp>
Force a failing test and display a message.
- Parameters
-
| ... | A format string and potential arguments to display as additional informations |
#define TTS_MAIN
#include <tts/tts.hpp>
TTS_CASE(
"Check that forced failure fails")
{
};
#define TTS_PASS(...)
Force a passing test and display a message.
Definition info.hpp:44
#define TTS_FAIL(...)
Force a failing test and display a message.
Definition info.hpp:68
◆ TTS_FATAL
#include <tts/engine/info.hpp>
Force a failing test, display a message and halt the test suite.
- Parameters
-
| ... | A format string and potential arguments to display as additional informations |
#define TTS_MAIN
#include <tts/tts.hpp>
TTS_CASE(
"Check that forced major failure fails")
{
};
#define TTS_FATAL(...)
Force a failing test, display a message and halt the test suite.
Definition info.hpp:93
◆ TTS_PASS
#include <tts/engine/info.hpp>
Force a passing test and display a message.
- Parameters
-
| ... | A format string and potential arguments to display as additional informations |
#define TTS_MAIN
#include <tts/tts.hpp>