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

◆ TTS_PRECISION_IMPL

#define TTS_PRECISION_IMPL (   LHS,
  RHS,
  N,
  UNIT,
  FUNC,
  PREC,
  FAILURE 
)
Value:
[&](auto local_tts_lhs, auto local_tts_rhs) \
{ \
auto r = FUNC (local_tts_lhs,local_tts_rhs); \
\
if(r <= N) \
{ \
::tts::global_runtime.pass(); return ::tts::detail::logger{false}; \
} \
else \
{ \
FAILURE ( "Expected: " << TTS_STRING(LHS) << " == " << TTS_STRING(RHS) \
<< " but " \
<< ::tts::as_string(local_tts_lhs) \
<< " == " << ::tts::as_string(local_tts_rhs) \
<< " within " << std::setprecision(PREC) << std::fixed \
<< r << std::defaultfloat \
<< " " << UNIT << " when " \
<< std::setprecision(PREC) << std::fixed \
<< N << std::defaultfloat \
<< " " << UNIT << " was expected." \
); \
return ::tts::detail::logger{}; \
} \
}(LHS,RHS) \
std::string as_string(T const &e)
Value-to-string conversion.
Definition: as_string.hpp:61

TTS - Tiny Test System Copyright : TTS Contributors & Maintainers SPDX-License-Identifier: BSL-1.0