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

◆ TTS_ALL_IEEE_EQUAL

#define TTS_ALL_IEEE_EQUAL (   L,
  R,
  ... 
)    TTS_ALL_ULP_EQUAL(L,R,0, __VA_ARGS__)

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

This also allow for infinites and NaNs to be compared equal if both values are the same infinites or are both $NaN$. This comparison is performed by using the proper tts::ulp_distance overload.

Parameters
L,RSequences to compare.
...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( "IEEE distance over sequences")
{
float x = std::numeric_limits<float>::quiet_NaN();
std::vector v{1.f, 2.f, 3.f, x};
std::list w{1.f, 2.f, 3.f, x};
};
#define TTS_CASE(ID)
Introduces a new test scenario and registers it into the current test driver.
Definition: case.hpp:147
#define TTS_ALL_IEEE_EQUAL(L, R,...)
Checks if all elements of two sequences are within 0 ULP and that their sizes are equal.
Definition: sequence.hpp:203