|
TTS v4.1.0
The Tiny Test System
|
Macros for performing checks on types and their properties. More...
Macros | |
| #define | TTS_EXPECT_COMPILES(Symbols, Expression, ...) |
| Checks that an expression on the given symbols compiles. | |
| #define | TTS_EXPECT_NOT_COMPILES(Symbols..., Expression, ...) |
| Checks that an expression on the given symbols does not compile. | |
| #define | TTS_EXPR_IS(EXPR, TYPE, ...) |
| Checks that an expression has the type TYPE. | |
| #define | TTS_TYPE_IS(TYPE, REF, ...) |
| Checks that two types are the same. | |
| #define TTS_EXPECT_COMPILES | ( | Symbols, | |
| Expression, | |||
| ... ) |
#include <tts/test/types.hpp>
Checks that an expression on the given symbols compiles.
Checks the expression in a requires expression over the symbols, so a failure to compile is reported as a failed check instead of a compiler error.
| Symbols | Names the expression uses. |
| Expression | Expression to check, between braces. |
| #define TTS_EXPECT_NOT_COMPILES | ( | Symbols..., | |
| Expression, | |||
| ... ) |
#include <tts/test/types.hpp>
Checks that an expression on the given symbols does not compile.
Checks the expression in a requires expression over the symbols, so a failure to compile is reported as a failed check instead of a compiler error.
| Symbols | Names the expression uses. |
| Expression | Expression to check, between braces. |
| #define TTS_EXPR_IS | ( | EXPR, | |
| TYPE, | |||
| ... ) |
#include <tts/test/types.hpp>
Checks that an expression has the type TYPE.
Compares decltype(EXPR) to TYPE, so an expression that names a variable gives its declared type.
| EXPR | Expression whose type is checked. |
| TYPE | Type expected. |
| ... | REQUIRED ends the run when the check fails. |
| #define TTS_TYPE_IS | ( | TYPE, | |
| REF, | |||
| ... ) |
#include <tts/test/types.hpp>
Checks that two types are the same.
| TYPE | Type to check. |
| REF | Type expected. |
| ... | REQUIRED ends the run when the check fails. |