MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / unary_assert

Function unary_assert

Tests/Doctest/Include/doctest.h:1779–1793  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1777
1778 template <typename L>
1779 DOCTEST_NOINLINE bool unary_assert(assertType::Enum at, const char* file, int line,
1780 const char* expr, const DOCTEST_REF_WRAP(L) val) {
1781 bool failed = !val;
1782
1783 if(at & assertType::is_false) //!OCLINT bitwise operator in conditional
1784 failed = !failed;
1785
1786 // ###################################################################################
1787 // IF THE DEBUGGER BREAKS HERE - GO 1 LEVEL UP IN THE CALLSTACK FOR THE FAILING ASSERT
1788 // THIS IS THE EFFECT OF HAVING 'DOCTEST_CONFIG_SUPER_FAST_ASSERTS' DEFINED
1789 // ###################################################################################
1790 DOCTEST_ASSERT_OUT_OF_TESTS((DOCTEST_STRINGIFY(val)));
1791 DOCTEST_ASSERT_IN_TESTS((DOCTEST_STRINGIFY(val)));
1792 return !failed;
1793 }
1794
1795 struct DOCTEST_INTERFACE IExceptionTranslator
1796 {

Callers 1

DOCTEST_DEFINE_DECORATORFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected