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

◆ TTS_THROW_IMPL

#define TTS_THROW_IMPL (   EXPR,
  EXCEPTION,
  FAILURE 
)
Value:
[&]() \
{ \
bool tts_caught = false; \
\
try { EXPR; } \
catch(EXCEPTION& ) { tts_caught = true; } \
catch(...) { } \
\
if(tts_caught) \
{ \
::tts::global_runtime.pass(); return ::tts::detail::logger{false}; \
} \
else \
{ \
FAILURE ( "Expected: " << TTS_STRING(EXPR) << " failed to throw " << TTS_STRING(EXCEPTION) ); \
return ::tts::detail::logger{}; \
} \
}()

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