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

◆ TTS_TYPE_IS

#define TTS_TYPE_IS (   TYPE,
  REF,
  ... 
)    TTS_TYPE_IS_ ## __VA_ARGS__ (TYPE, REF)

Checks if two types satisfy std::is_same_v<Type,Target> == true.

TTS - Tiny Test System Copyright : TTS Contributors & Maintainers SPDX-License-Identifier: BSL-1.0

Parameters
TYPEType to compare.
REFExpected type.
...Optional tag. If equals to REQUIRED, this test will stop the program if it fails.

Example

#define TTS_MAIN
#include <tts/tts.hpp>
#include <type_traits>
TTS_CASE( "Check that types can be tested for equivalence" )
{
TTS_TYPE_IS( std::add_pointer<float const>::type, float const* );
};
#define TTS_CASE(ID)
Introduces a new test scenario and registers it into the current test driver.
Definition: case.hpp:147
#define TTS_TYPE_IS(TYPE, REF,...)
Checks if two types satisfy std::is_same_v<Type,Target> == true.
Definition: types.hpp:39