Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@ TTS is thus suitable for numerical-heavy testing.

# A Short Example

[See it live on Compiler Explorer](https://godbolt.org/z/cM5sxMxjo)
[See it live on Compiler Explorer](https://godbolt.org/z/5s3P1r4sr)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ c++
#define TTS_MAIN
#include <tts/tts.hpp>
#include <stdexcept>

TTS_CASE( "Check expectations" )
{
Expand All @@ -51,7 +52,7 @@ TTS_CASE( "Check relationship between values" )
TTS_GREATER_EQUAL(x,3.5f);
};

void foo(bool x) { if(x) throw std::runtime_error{"THIS IS AN ERROR"}; }
void foo(bool x) { if(x) throw std::runtime_error{"THIS IS AN ERROR"}; };

TTS_CASE( "Check runtime exceptions" )
{
Expand Down
8 changes: 5 additions & 3 deletions doc/index.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,18 @@
Those features make **TTS** suitable for numerical-heavy testing.

# Supported Compilers
+ g++ 10.3 and superior
+ clang 12 and superior
+ g++ 11.1 and superior
+ clang 13 and superior
+ Visual Studio 17 2022 v19.30.30709.0
+ clang-CL 15.0.1 or superior
+ emscripten 3.1.14

# A Short Example

@code
#define TTS_MAIN // No need for main()
#include <tts/tts.hpp>
#include <stdexcept>

TTS_CASE( "Check expectations" )
{
Expand All @@ -46,7 +48,7 @@
TTS_GREATER_EQUAL(x,3.5f);
};

void foo(bool x) { if(x) throw std::runtime_error{"THIS IS AN ERROR"}; }
void foo(bool x) { if(x) throw std::runtime_error{"THIS IS AN ERROR"}; };
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the extra ; ??

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was a typo and simply got copy-pasted everywhere. Fixed


TTS_CASE( "Check runtime exceptions" )
{
Expand Down
8 changes: 4 additions & 4 deletions include/tts/tools/types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ namespace tts
/** @brief Generate the Cartesian product of two type lists

Given two types lists L1 and L2, generate a new types list containing all possible
combinations of types from L1 and L2 as a types<T1,T2> where T1 is from L1 and T2 is from L2.
combinations of types from L1 and L2 as a types<T1,T2> where T1 is from L1 and T2 is from L2.

@tparam L1 First types list
@tparam L2 Second types list
Expand All @@ -80,15 +80,15 @@ namespace tts
/** @brief Filter a types list by a predicate

Using an unary predicate template, filter a types list to only keep the types for which the
predicate evaluates to true.
predicate evaluates to true.

@tparam Pred Predicate template taking a single type parameter and exposing a static boolean
member `value`
member `value`
@tparam Type Types list to filter

@groupheader{Example}
@snippet doc/filter.cpp snippet
**/
**/
//====================================================================================================================
template<template<typename> typename Pred, typename Type> struct filter
{
Expand Down