#define TTS_MAIN
#include <tts/tts.hpp>
#include <stdexcept>
{
};
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:79
#define TTS_EXPECT(EXPR,...)
Check if a given expression evaluates to true.
Definition basic.hpp:43
#define TTS_THROW(EXPR, EXCEPTION,...)
Checks if a given expression throws an exception of a given type.
Definition exceptions.hpp:73
#define TTS_NO_THROW(EXPR,...)
Checks if a given expression throws no exception.
Definition exceptions.hpp:123
#define TTS_ULP_EQUAL(L, R, N,...)
Checks if two values are within a given ULP distance.
Definition precision.hpp:123
#define TTS_RELATIVE_EQUAL(L, R, N,...)
Checks if values are within a given relative distance expressed as a percentage.
Definition precision.hpp:101
#define TTS_IEEE_EQUAL(L, R,...)
Checks if two values are exactly within 0 ULP.
Definition precision.hpp:168
#define TTS_ABSOLUTE_EQUAL(L, R, N,...)
Checks if the absolute distance between values is less or equal to a threshold.
Definition precision.hpp:79
#define TTS_LESS_EQUAL(LHS, RHS,...)
Performs less-or-equal-than comparison between two expressions.
Definition relation.hpp:218
#define TTS_LESS(LHS, RHS,...)
Performs less-than comparison between two expressions.
Definition relation.hpp:176
#define TTS_NOT_EQUAL(LHS, RHS,...)
Performs inequality comparison between two expressions.
Definition relation.hpp:155
#define TTS_GREATER_EQUAL(LHS, RHS,...)
Performs greater-or-equal-than comparison between two expressions.
Definition relation.hpp:239
#define TTS_EQUAL(LHS, RHS,...)
Performs equality comparison between two expressions.
Definition relation.hpp:134
#define TTS_GREATER(LHS, RHS,...)
Performs greater-than comparison between two expressions.
Definition relation.hpp:197
#define TTS_CASE(ID)
Introduces a new test scenario and registers it into the current test driver.
Definition case.hpp:139
#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:187
#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:149
#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:84