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

◆ TTS_ALL_ULP_EQUAL

#define TTS_ALL_ULP_EQUAL (   L,
  R,
  N,
  ... 
)    TTS_ALL(L,R, ::tts::ulp_distance ,N,"ULP" , __VA_ARGS__ )

Checks if all elements of two sequences are within a given ULP distance and that their sizes are equal.

This comparison is performed by using the proper tts::ulp_distance overload.

Parameters
L,RSequences to compare.
NMaximum ULPs accepted between L and R.
...Optional tag. If equals to REQUIRED, this test will stop the program if it fails.

Example

#define TTS_MAIN
#include <tts/tts.hpp>
#include <vector>
#include <list>
TTS_CASE( "ULP distance over sequences")
{
std::vector v{1.f , 2.f, 3.f, -5.f};
std::list w{1.f+1e-7f , 2.f, 3.f, -5.f};
};
#define TTS_CASE(ID)
Introduces a new test scenario and registers it into the current test driver.
Definition: case.hpp:147
#define TTS_ALL_ULP_EQUAL(L, R, N,...)
Checks if all elements of two sequences are within a given ULP distance and that their sizes are equa...
Definition: sequence.hpp:171