|
TTS v4.1.0
The Tiny Test System
|
Generators of the values of the test cases and the range checks. More...
Classes | |
| struct | tts::as_integer< G > |
| Adapts a generator to produce unsigned integer values. More... | |
| struct | tts::as_signed_integer< G > |
| Adapts a generator to produce signed integer values. More... | |
| struct | tts::between< T, U > |
| Generates values linearly spaced between two bounds. More... | |
| struct | tts::is_randoms< G > |
| Detects tts::randoms and the classes derived from it. More... | |
| struct | tts::limits_set< T > |
| Holds the limits and special values of a type T. More... | |
| struct | tts::logicals< T, U > |
| Generates boolean values in a regular pattern. More... | |
| struct | tts::ramp< T, U > |
| Generates a ramp of values. More... | |
| struct | tts::random_bits |
| Generates random bit patterns. More... | |
| struct | tts::random_shift |
| Produces valid shift amounts for the target type. More... | |
| struct | tts::randoms< Mx, Mn > |
| Generates random values between two bounds. More... | |
| struct | tts::reverse_ramp< T, U > |
| Generates a ramp of values read backward. More... | |
| struct | tts::value< T > |
| Generates the same value at every call. More... | |
Functions | |
| template<typename T> | |
| auto | limits (tts::type< T >) |
| Returns the limits and special values of a type T. | |
| constexpr tts_implementation_defined | tts::sample (std::uint64_t n) |
| Generates a given number of values spread over a type or a range. | |
| template<typename T> | |
| constexpr tts_implementation_defined | tts::sample (T lo, T hi, std::uint64_t n) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
Variables | |
| template<typename G> | |
| constexpr bool | tts::is_randoms_v = is_randoms<std::remove_cvref_t<G>>::value |
| Value alias for tts::is_randoms, indifferent to references and cv-qualifiers. | |
| constexpr tts_implementation_defined | tts::sweep = {} |
| Generates every value of a type, or of a range. | |
|
Returns the limits and special values of a type T.
| T | Type for which to provide limits |
|
constexpr |
#include <tts/engine/generator.hpp>
Generates a given number of values spread over a type or a range.
Produces n values of an argument of a TTS_ULP_RANGE_CHECK, and never NaN.
The values are the two bounds and one value per slice of equal width in the ranks of tts::enumeration. The sample thus holds about the same number of values in each binade of a floating-point type, the subnormals of each sign counting as one binade. A range over many binades of small magnitude, such as [-700, 700] in double, has most of its values below 1 in magnitude. If n is 1, the sample holds the lower bound alone. A sample of at least as many values as its range holds gives each value once, as tts::sweep does.
The position of a value within its slice comes from its index and from a value drawn from the generator of the run when the check starts, so each run checks other values, and --seed repeats those of a run.
If n is 0, the check makes no call and records no check, so a case without another check is reported as invalid.
|
inlineconstexpr |
#include <tts/engine/generator.hpp>
Generates every value of a type, or of a range.
Produces every value of an argument of a TTS_ULP_RANGE_CHECK, NaN excluded since it has no rank in tts::enumeration.
A sweep makes 65536 calls over two std::uint8_t and 4278190082 over a float. If the number of calls exceeds the largest std::size_t, as over two double, the check fails without running, and tts::sample can run such a check on n values per argument.