tts v2.3.0
The Tiny Test System
 
Loading...
Searching...
No Matches

◆ TTS_EXPECT_COMPILES

#define TTS_EXPECT_COMPILES (   Symbols...,
  Expression,
  ... 
)

Checks if an Expression based on a list of Symbols will compile properly in a SFINAE context.

Parameters
SymbolsVariadic lists of symbols used in the tests
ExpressionBrace-enclosed expression to validate.
...Optional tag. If equals to REQUIRED, this test will stop the program if it fails.

Example

#define TTS_MAIN
#include <tts/tts.hpp>
TTS_CASE( "Check that expression can compile properly" )
{
double d, e;
TTS_EXPECT_COMPILES(d, e, { d += 4. * e; } );
};
#define TTS_CASE(ID)
Introduces a new test scenario and registers it into the current test driver.
Definition: case.hpp:147
#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