tts v2.3.0
The Tiny Test System
 
Loading...
Searching...
No Matches
tts::value< T > Struct Template Reference

Defines a data generator that always return the same value. More...

#include <tts/test/generator.hpp>

Detailed Description

template<typename T>
struct tts::value< T >

Defines a data generator that always return the same value.

Example

#define TTS_MAIN
#include <tts/tts.hpp>
TTS_CASE_WITH ( "Check behavior for value generator"
)
(auto value)
{
TTS_EQUAL(value , 42 );
};
#define TTS_CASE_WITH(ID, TYPES, GENERATOR)
Introduces a template test case providing dynamically generated data to the test code.
Definition: case.hpp:258
auto generate(G... g)
Build a data generator.
Definition: generator.hpp:76
concatenate_t< real_types, int_types, uint_types > arithmetic_types
List of all standard arithmetic types.
Definition: types.hpp:52
#define TTS_EQUAL(LHS, RHS,...)
Performs equality comparison between two expressions.
Definition: relation.hpp:90
Defines a data generator that always return the same value.
Definition: generator.hpp:105

Public Member Functions

 value (T v)
 Set the value to be generated.