Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
property_assertions.hpp File Reference

Go to the source code of this file.

Macro Definition Documentation

◆ ARENE_PROP_ASSERT

#define ARENE_PROP_ASSERT ( ...)
Value:
do { /* NOLINT(cppcoreguidelines-avoid-do-while) */ \
if (!static_cast<bool>(__VA_ARGS__) && !::arene::base::testing::detail::property_context().has_value()) { \
::arene::base::testing::detail::property_context().emplace(::arene::base::testing::property_error{ \
{__FILE__, __LINE__}, \
{#__VA_ARGS__} \
}); \
return; \
} \
} while (false)
error result of evaluating a property assertion
Definition property_error.hpp:21
@ failure
Definition property_error.hpp:22

Macro to assert that a property is true If the supplied property is false, returns a property_outcome with status == failure.

◆ ARENE_PROP_ASSERT_FALSE

#define ARENE_PROP_ASSERT_FALSE ( ...)
Value:
ARENE_PROP_ASSERT(!(__VA_ARGS__))
#define ARENE_PROP_ASSERT(...)
Macro to assert that a property is true If the supplied property is false, returns a property_outcome...
Definition property_assertions.hpp:16

Macro to assert that a property is false If the supplied property is true, returns a property_outcome with status == failure.

◆ ARENE_PROP_ASSERT_TRUE

#define ARENE_PROP_ASSERT_TRUE ( ...)
Value:
ARENE_PROP_ASSERT(__VA_ARGS__)

Macro to assert that a property is true If the supplied property is false, returns a property_outcome with status == failure.

◆ ARENE_PROP_PRE

#define ARENE_PROP_PRE ( ...)
Value:
do { /* NOLINT(cppcoreguidelines-avoid-do-while) */ \
if (!static_cast<bool>(__VA_ARGS__) && !::arene::base::testing::detail::property_context().has_value()) { \
::arene::base::testing::detail::property_context().emplace(::arene::base::testing::property_error{ \
{__FILE__, __LINE__}, \
{#__VA_ARGS__} \
}); \
return; \
} \
} while (false)
@ discard
Definition property_error.hpp:22

Macro to discard a specific run If the supplied property is false, returns a property_outcome with status == discard.