Defines a data generator that produce values between two bounds.
This generator produces values linearly spaced between two bounds (inclusive). For a size N, the produced values are: first, first+step, first+2*step, ..., last, where step = (last-first)/(N-1).
When generated values exceed the last bound due to rounding, the last bound is returned instead.
- Template Parameters
-
| T | Type of the first bound |
| U | Type of the last bound |
#define TTS_MAIN
#include <tts/tts.hpp>
#include <array>
(std::array<float, 10>, int, double),
{
if constexpr(std::is_arithmetic_v<T>) {
TTS_EQUAL(
args,
static_cast<T>(-4)); }
else
{
for(std::size_t
i = 0;
i <
args.size(); ++
i)
{
4);
}
}
};
#define TTS_ULP_EQUAL(L, R, N,...)
Checks if two values are within a given ULP distance.
Definition precision.hpp:123
#define TTS_EQUAL(LHS, RHS,...)
Performs equality comparison between two expressions.
Definition relation.hpp:134
#define TTS_CASE_WITH(ID, TYPES,...)
Introduces a template test case providing dynamically generated data to the test code.
Definition case.hpp:201
Defines a data generator that produce values between two bounds.
Definition generator.hpp:244