Skip to content

Commit

Permalink
Release 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jfalcou committed Jul 1, 2021
2 parents 4a56819 + 3f998d3 commit 12d60d6
Show file tree
Hide file tree
Showing 45 changed files with 57 additions and 59 deletions.
2 changes: 1 addition & 1 deletion docs/reference/tts_absolute_equal.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
{
TTS_ABSOLUTE_EQUAL(-2. , 2.f , 4.);
TTS_ABSOLUTE_EQUAL('A' , 80LL , 15, REQUIRED);
}
};
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/tts_all_absolute_equal.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
TTS_ALL_ABSOLUTE_EQUAL(a , b , .4, REQUIRED);
TTS_ALL_ABSOLUTE_EQUAL(s , 1.f , .15);
TTS_ALL_ABSOLUTE_EQUAL(1.f, s , .15);
}
};
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/tts_all_equal.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

TTS_ALL_EQUAL(vx , vx );
TTS_ALL_EQUAL(vy , 6.f );
}
};
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/tts_all_ieee_equal.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
std::vector<float> vx{x,2.5f,x,1e-7};

TTS_ALL_IEEE_EQUAL(vx,vx);
}
};
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/tts_all_relative_equal.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
TTS_ALL_RELATIVE_EQUAL(a , b , 25);
TTS_ALL_RELATIVE_EQUAL(s , 1.f , 25);
TTS_ALL_RELATIVE_EQUAL(1.f, s , 25, REQUIRED);
}
};
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/tts_all_ulp_equal.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
TTS_ALL_ULP_EQUAL(a , b , 1.5);
TTS_ALL_ULP_EQUAL(s , 1.f , 1.5);
TTS_ALL_ULP_EQUAL(1.f, s , 1.5, REQUIRED);
}
};
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/tts_and_then.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
}
}
}
}
};
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/tts_case.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
TTS_CASE( "Check that forced failure fails" )
{
// Insert your test code here
}
};
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

Expand Down
7 changes: 4 additions & 3 deletions docs/reference/tts_case_tpl.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
Starts a block defining a template test case.

The following block will contains user defined preparation, actual tests, expectations and
clean-up for said test case parametrized by a template type named `T` and instantiated for
each type in the types sequence.
clean-up for said test case parametrized by a template type of your choice passed as a lmabda
function parameters and instantiated for each type in the types sequence.

As for [TTS_CASE](#tts_case), test cases performing no actual tests will be reported as invalid.

Expand All @@ -40,10 +40,11 @@
#include <tts/tts.hpp>

TTS_CASE_TPL( "Make a simple test suite for some types", int, float, double )
<typename T>(::tts::type<T>)
{
// This test will be run for T=int, T=float and T=double
TTS_EXPECT(sizeof(T) >= 4);
}
};
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/tts_constexpr_equal.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
constexpr int b = 45;

TTS_CONSTEXPR_EQUAL(a, b);
}
};
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/tts_constexpr_expect.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
TTS_CONSTEXPR_EXPECT(a <= b);
TTS_CONSTEXPR_EXPECT(b > a);
TTS_CONSTEXPR_EXPECT(b >= a);
}
};
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/tts_constexpr_expect_not.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
TTS_CONSTEXPR_EXPECT_NOT(a >= b);
TTS_CONSTEXPR_EXPECT_NOT(b < a);
TTS_CONSTEXPR_EXPECT_NOT(b <= a);
}
};
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/tts_constexpr_greater.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
TTS_CASE( "Check correctness of greater-than comparison tests" )
{
TTS_CONSTEXPR_GREATER(69LL, 42.f);
}
};
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/tts_constexpr_greater_equal.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
{
TTS_CONSTEXPR_GREATER_EQUAL(69LL, 42.f);
TTS_CONSTEXPR_GREATER_EQUAL(69., 69);
}
};
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/tts_constexpr_less.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
TTS_CASE( "Check correctness of less-than comparison tests" )
{
TTS_CONSTEXPR_LESS(42LL, 69.f);
}
};
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/tts_constexpr_less_equal.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
{
TTS_CONSTEXPR_LESS_EQUAL(42LL, 69.f);
TTS_CONSTEXPR_LESS_EQUAL('A' , 65. );
}
};
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/tts_constexpr_not_equal.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
constexpr int b = 45;

TTS_CONSTEXPR_NOT_EQUAL(a, b);
}
};
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/tts_equal.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

std::vector<float> a{1,2,3}, b{1,2,3};
TTS_EQUAL(a,b);
}
};
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/tts_expect.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
TTS_EXPECT(a <= b);
TTS_EXPECT(b > a);
TTS_EXPECT(b >= a);
}
};
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/tts_expect_not.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
TTS_EXPECT_NOT(a >= b);
TTS_EXPECT_NOT(b < a);
TTS_EXPECT_NOT(b <= a);
}
};
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/tts_expr_is.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
TTS_EXPR_IS( &d + 5 , double* );
TTS_EXPR_IS( std::move(d) , double&& );
TTS_EXPR_IS( std::swap(d,d), void );
}
};
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/tts_fail.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
TTS_CASE( "Check that forced pass passes" )
{
TTS_FAIL("Forced fail");
}
};
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/tts_greater.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

std::vector<float> a{13,5}, b{2,4,6};
TTS_GREATER(a,b);
}
};
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/tts_greater_equal.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
std::vector<float> a{12,3}, b{7,9,11};
TTS_GREATER_EQUAL(a,b);
TTS_GREATER_EQUAL(a,a);
}
};
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/tts_ieee_equal.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
TTS_IEEE_EQUAL(1.f, 1.f);
TTS_IEEE_EQUAL(2. , 2. );
TTS_IEEE_EQUAL(65 , 'A');
}
};
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/tts_invalid.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
TTS_CASE( "Check that forced pass passes" )
{
TTS_INVALID("Forced invalid test");
}
};
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/tts_less.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

std::vector<float> a{1,2,3}, b{12,3};
TTS_LESS(a,b);
}
};
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/tts_less_equal.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
std::vector<float> a{1,2,3}, b{7,9};
TTS_LESS_EQUAL(a,b);
TTS_LESS_EQUAL(a,a);
}
};
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/tts_no_throw.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
TTS_CASE( "Check that nothrow function are detected as such" )
{
TTS_NO_THROW( bar() );
}
};
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/tts_not_equal.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

std::vector<float> a{1,2,3}, b{7,9};
TTS_NOT_EQUAL(a,b);
}
};
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/tts_pass.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
TTS_CASE( "Check that forced pass passes" )
{
TTS_PASS("Forced pass");
}
};
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/tts_prng_generator.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
, float, float , ok_x, bad_x
, 2.
);
}
};
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/tts_relative_equal.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
TTS_RELATIVE_EQUAL('A' , 80LL , 18.75 );
TTS_RELATIVE_EQUAL(1. , 2.f , 100. );
TTS_RELATIVE_EQUAL(1 , 10 , 900., REQUIRED );
}
};
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/tts_throw.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
TTS_CASE( "Check that we can capture thrown exceptions" )
{
TTS_THROW( foo(), some_exception_type );
}
};
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/tts_type_is.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
TTS_CASE( "Check that types can be tested for equality" )
{
TTS_TYPE_IS( std::add_pointer<float const>::type, float const* );
}
};
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/tts_ulp_equal.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
TTS_ULP_EQUAL(a, a-eps , 1 );
TTS_ULP_EQUAL(a, a+eps , 0.5 );
TTS_ULP_EQUAL(a, a+3*eps , 1.5, REQUIRED );
}
};
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/tts_ulp_range_check.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
, float, float , ok_x, bad_x
, 2.
);
}
};
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

Expand Down
4 changes: 2 additions & 2 deletions docs/reference/tts_uniform_prng.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
, std::uniform_int_distribution<T>
>
>;
}
};
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

Expand Down Expand Up @@ -50,7 +50,7 @@
, float, float , ok_x, bad_x
, 2.
);
}
};
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/tts_when.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
TTS_EXPECT( v.capacity() >= 5u );
}
}
}
};
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>

Expand Down
4 changes: 2 additions & 2 deletions include/tts/tts.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ namespace tts::detail
TestBed base_test;
};
}
#define TTS_CASE_TPL(DESCRIPTION,TYPES) \
#define TTS_CASE_TPL(DESCRIPTION,...) \
inline bool const TTS_CAT(register_,TTS_FUNCTION) = ::tts::detail::lambda_test{ \
[](auto tests) \
{ \
Expand All @@ -406,7 +406,7 @@ inline bool const TTS_CAT(register_,TTS_FUNCTION) = ::tts::detail::lambda_test{
[&]<template<class...> class L,typename... Ts>(L<Ts...>) \
{ \
(single_test( ::tts::type<Ts>() ),...); \
}( TYPES ); \
}( ::tts::types<__VA_ARGS__>{} ); \
\
return true; \
}} + [] \
Expand Down
Loading

0 comments on commit 12d60d6

Please sign in to comment.