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

◆ TTS_ALL_ABSOLUTE_EQUAL

#define TTS_ALL_ABSOLUTE_EQUAL (   L,
  R,
  N,
  ... 
)    TTS_ALL(L,R, ::tts::absolute_distance,N,"unit", __VA_ARGS__ )

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

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

Parameters
L,RSequences to compare.
NMaximum absolute distance 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("Absolute distance over sequences")
{
std::vector v{1.f,2.f,3.f,-1.f};
std::list w{1.f,7.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_ABSOLUTE_EQUAL(L, R, N,...)
Checks if all elements of two sequences are within a given absolute distance and that their sizes are...
Definition: sequence.hpp:109