#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,...)
Checks that an expression is false.
Definition basic.hpp:97
#define TTS_EXPECT(EXPR,...)
Checks that an expression is true.
Definition basic.hpp:69
#define TTS_THROW(EXPR, EXCEPTION,...)
Checks that an expression throws an exception of type EXCEPTION.
Definition exceptions.hpp:85
#define TTS_NO_THROW(EXPR,...)
Checks that an expression throws no exception.
Definition exceptions.hpp:123
#define TTS_ULP_EQUAL(L, R, N,...)
Checks that two values are at most N ULP apart.
Definition precision.hpp:215
#define TTS_RELATIVE_EQUAL(L, R, N,...)
Checks that two values are within a combined relative and absolute tolerance N.
Definition precision.hpp:179
#define TTS_IEEE_EQUAL(L, R,...)
Checks that two values are 0 ULP apart, that is equal or both NaN.
Definition precision.hpp:244
#define TTS_ABSOLUTE_EQUAL(L, R, N,...)
Checks that two values are at most N apart.
Definition precision.hpp:148
#define TTS_LESS_EQUAL(LHS, RHS,...)
Checks that LHS is less than or equal to RHS.
Definition relation.hpp:270
#define TTS_LESS(LHS, RHS,...)
Checks that LHS is less than RHS.
Definition relation.hpp:228
#define TTS_NOT_EQUAL(LHS, RHS,...)
Checks that two expressions are not equal.
Definition relation.hpp:207
#define TTS_GREATER_EQUAL(LHS, RHS,...)
Checks that LHS is greater than or equal to RHS.
Definition relation.hpp:291
#define TTS_EQUAL(LHS, RHS,...)
Checks that two expressions are equal.
Definition relation.hpp:186
#define TTS_GREATER(LHS, RHS,...)
Checks that LHS is greater than RHS.
Definition relation.hpp:249
#define TTS_CASE(ID)
Defines a test case and registers it with the test driver.
Definition case.hpp:304
#define TTS_EXPECT_NOT_COMPILES(Symbols..., Expression,...)
Checks that an expression on the given symbols does not compile.
Definition types.hpp:205
#define TTS_EXPECT_COMPILES(Symbols, Expression,...)
Checks that an expression on the given symbols compiles.
Definition types.hpp:171
#define TTS_TYPE_IS(TYPE, REF,...)
Checks that two types are the same.
Definition types.hpp:95
#define TTS_EXPR_IS(EXPR, TYPE,...)
Checks that an expression has the type TYPE.
Definition types.hpp:127