Direct-BT  2.3.1
Direct-BT - Direct Bluetooth Programming.
Macros
catch2_ext.hpp File Reference
#include <catch2/catch_amalgamated.hpp>
#include <jau/float_math.hpp>
#include <jau/test/catch2_my_main.cpp>
Include dependency graph for catch2_ext.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define INTERNAL_CATCH_TEST_M(msg, macroName, resultDisposition, ...)
 
#define REQUIRE_MSG(MSG, ...)   INTERNAL_CATCH_TEST_M( MSG, "REQUIRE: ", Catch::ResultDisposition::Normal, __VA_ARGS__ )
 
#define INFO_STR(msg)   INTERNAL_CATCH_INFO( "INFO", static_cast<std::string>(msg) )
 
#define REQUIRE_EPSI(a, b)   INTERNAL_CATCH_TEST( "REQUIRE: ", Catch::ResultDisposition::Normal, jau::machine_equal(a, b))
 
#define REQUIRE_EPSI_MSG(m, a, b)   INTERNAL_CATCH_TEST_M( m, "REQUIRE: ", Catch::ResultDisposition::Normal, jau::machine_equal(a, b))
 
#define REQUIRE_DIFF(a, b, d)   INTERNAL_CATCH_TEST( "REQUIRE: ", Catch::ResultDisposition::Normal, jau::machine_equal(a, b, 1, d))
 
#define REQUIRE_DIFF_MSG(m, a, b, d)   INTERNAL_CATCH_TEST_M( m, "REQUIRE: ", Catch::ResultDisposition::Normal, jau::machine_equal(a, b, 1, d))
 

Macro Definition Documentation

◆ INFO_STR

#define INFO_STR (   msg)    INTERNAL_CATCH_INFO( "INFO", static_cast<std::string>(msg) )

◆ INTERNAL_CATCH_TEST_M

#define INTERNAL_CATCH_TEST_M (   msg,
  macroName,
  resultDisposition,
  ... 
)
Value:
do { \
/* The expression should not be evaluated, but warnings should hopefully be checked */ \
CATCH_INTERNAL_IGNORE_BUT_WARN(__VA_ARGS__); \
std::string s1( macroName##_catch_sr ); \
s1.append(msg); \
s1.append(": "); \
Catch::AssertionHandler catchAssertionHandler( s1, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(__VA_ARGS__), resultDisposition ); \
INTERNAL_CATCH_TRY { \
CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \
CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS \
catchAssertionHandler.handleExpr( Catch::Decomposer() <= __VA_ARGS__ ); \
CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \
} INTERNAL_CATCH_CATCH( catchAssertionHandler ) \
INTERNAL_CATCH_REACT( catchAssertionHandler ) \
} while( (void)0, (false) && static_cast<bool>( !!(__VA_ARGS__) ) )

Definition at line 42 of file catch2_ext.hpp.

◆ REQUIRE_DIFF

#define REQUIRE_DIFF (   a,
  b,
 
)    INTERNAL_CATCH_TEST( "REQUIRE: ", Catch::ResultDisposition::Normal, jau::machine_equal(a, b, 1, d))

Definition at line 65 of file catch2_ext.hpp.

◆ REQUIRE_DIFF_MSG

#define REQUIRE_DIFF_MSG (   m,
  a,
  b,
 
)    INTERNAL_CATCH_TEST_M( m, "REQUIRE: ", Catch::ResultDisposition::Normal, jau::machine_equal(a, b, 1, d))

Definition at line 66 of file catch2_ext.hpp.

◆ REQUIRE_EPSI

#define REQUIRE_EPSI (   a,
 
)    INTERNAL_CATCH_TEST( "REQUIRE: ", Catch::ResultDisposition::Normal, jau::machine_equal(a, b))

Definition at line 62 of file catch2_ext.hpp.

◆ REQUIRE_EPSI_MSG

#define REQUIRE_EPSI_MSG (   m,
  a,
 
)    INTERNAL_CATCH_TEST_M( m, "REQUIRE: ", Catch::ResultDisposition::Normal, jau::machine_equal(a, b))

Definition at line 63 of file catch2_ext.hpp.

◆ REQUIRE_MSG

#define REQUIRE_MSG (   MSG,
  ... 
)    INTERNAL_CATCH_TEST_M( MSG, "REQUIRE: ", Catch::ResultDisposition::Normal, __VA_ARGS__ )