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;
};
◆ 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;
};
◆ 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;
};
◆ 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;
};
◆ 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")
{
};
◆ 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")
{
};
◆ 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>
TTS_CASE(
"Check that forced pass passes")
{
};