32#ifndef _SIR_TESTSXX_HH_INCLUDED
33# define _SIR_TESTSXX_HH_INCLUDED
36# include "tests_shared.h"
38# if defined(_MSC_VER) && !defined(__PRETTY_FUNCTION__)
39# define __PRETTY_FUNCTION__ __FUNCSIG__
121# define _SIR_TEST_COMMENCE \
126# define _SIR_TEST_ON_EXCEPTION(what) \
127 ERROR_MSG("unexpected exception in %s: '%s'", __PRETTY_FUNCTION__, what); \
129 if (sir_isinitialized()) \
130 [[maybe_unused]] bool unused = sir_cleanup()
133# define _SIR_TEST_ON_EXPECTED_EXCEPTION(what) \
134 TEST_MSG(SIR_GREEN("expected exception in %s: '%s'"), __PRETTY_FUNCTION__, what)
137# define _SIR_TEST_COMPLETE \
138 } catch (const std::exception& ex) { \
139 _SIR_TEST_ON_EXCEPTION(ex.what()); \
141 _SIR_TEST_ON_EXCEPTION(SIR_UNKNOWN); \
143 return PRINT_RESULT_RETURN(pass);
libsir C++ wrapper tests.
Definition tests++.hh:49
bool manual_init_cleanup()
Ensure that manual initialization and cleanup is working properly.
Definition tests++.cc:167
bool error_handling()
Ensure that the C++ wrapper properly handles errors from libsir.
Definition tests++.cc:197
bool boost_format()
If boost::format support is enabled, ensure that it is working properly.
Definition tests++.cc:321
bool fmt_format()
If fmt::format support is enabled, ensure that it is working properly.
Definition tests++.cc:343
bool raii_init_cleanup()
Ensure that RAII loggers are functioning properly.
Definition tests++.cc:125
bool std_format()
If std::format support is enabled, ensure that it is working properly.
Definition tests++.cc:300
bool std_iostream_format()
If std::iostream support is enabled, ensure that it is working properly.
Definition tests++.cc:364
bool exception_handling()
Ensure that exceptions are properly constructed in various ways.
Definition tests++.cc:250