Introduces a template test case and registers it into the current test driver.
The code block following TTS_CASE contains user-defined code for a given test case. Those tests are parametrized by a template type of your choice passed as lambda function parameters of the template type tts::type
and instantiated for each type in the types list.
Test cases performing no actual tests will be reported as invalid.
#define TTS_MAIN
#include <tts/tts.hpp>
#include <array>
TTS_CASE_TPL(
"Check types using variadic list",
char,
short,
int,
double,
void* )
{
};
{
};
template<int N, typename Indexes = std::make_index_sequence<N>> struct sizes;
template<int N, std::size_t... I> struct sizes<N, std::index_sequence<I...>>
{
};
TTS_CASE_TPL(
"Check types using a types list generator", sizes<5> )
{
T x;
};
#define TTS_CASE_TPL(ID,...)
Introduces a template test case and registers it into the current test driver.
Definition: case.hpp:210
#define TTS_GREATER_EQUAL(LHS, RHS,...)
Performs greater-or-equal-than comparison between two expressions.
Definition: relation.hpp:260
#define TTS_EQUAL(LHS, RHS,...)
Performs equality comparison between two expressions.
Definition: relation.hpp:90
Type wrapper.
Definition: types.hpp:37
Type list structure.
Definition: types.hpp:22