#define TTS_MAIN
#include <tts/tts.hpp>
{
};
TTS_CASE(
"Check relationship between values" )
{
double x = 12.34;
};
void foo(bool x) { if(x) throw std::runtime_error{"THIS IS AN ERROR"}; }
{
};
{
double x = 1.;
};
TTS_CASE(
"Check types and expressions" )
{
double d , e;
TTS_TYPE_IS( std::add_pointer<float const>::type,
float const* );
};
#define TTS_EXPECT_NOT(EXPR,...)
Check if a given expression evaluates to false.
Definition: basic.hpp:95
#define TTS_EXPECT(EXPR,...)
Check if a given expression evaluates to true.
Definition: basic.hpp:46
#define TTS_CASE(ID)
Introduces a new test scenario and registers it into the current test driver.
Definition: case.hpp:147
#define TTS_THROW(EXPR, EXCEPTION,...)
Checks if a given expression throws an exception of a given type.
Definition: exceptions.hpp:62
#define TTS_NO_THROW(EXPR,...)
Checks if a given expression throws no exception.
Definition: exceptions.hpp:109
#define TTS_LESS_EQUAL(LHS, RHS,...)
Performs less-or-equal-than comparison between two expressions.
Definition: relation.hpp:224
#define TTS_LESS(LHS, RHS,...)
Performs less-than comparison between two expressions.
Definition: relation.hpp:156
#define TTS_NOT_EQUAL(LHS, RHS,...)
Performs inequality comparison between two expressions.
Definition: relation.hpp:123
#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
#define TTS_GREATER(LHS, RHS,...)
Performs greater-than comparison between two expressions.
Definition: relation.hpp:189
#define TTS_ULP_EQUAL(L, R, N,...)
Checks if two values are within a given ULP distance.
Definition: precision.hpp:144
#define TTS_RELATIVE_EQUAL(L, R, N,...)
Checks if values are within a given relative distance expressed as a percentage.
Definition: precision.hpp:102
#define TTS_IEEE_EQUAL(L, R,...)
Checks if two values are exactly within a 0 ULP.
Definition: precision.hpp:198
#define TTS_ABSOLUTE_EQUAL(L, R, N,...)
Checks if the absolute distance between values is less or equal to a threshold.
Definition: precision.hpp:72
#define TTS_EXPECT_NOT_COMPILES(Symbols..., Expression,...)
Checks if an Expression based on a list of Symbols will not compile properly in a SFINAE context.
Definition: types.hpp:202
#define TTS_EXPECT_COMPILES(Symbols..., Expression,...)
Checks if an Expression based on a list of Symbols will compile properly in a SFINAE context.
Definition: types.hpp:154
#define TTS_TYPE_IS(TYPE, REF,...)
Checks if two types satisfy std::is_same_v<Type,Target> == true.
Definition: types.hpp:39
#define TTS_EXPR_IS(EXPR, TYPE,...)
Checks if an Expression evaluates to a value of a given Type.
Definition: types.hpp:87