Adds documentation for Ensure macros
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
e8f4ab27b5
commit
8667c8f8ff
|
@ -13,6 +13,8 @@
|
|||
throw ArbUt::__ErrorHelpers::CreateEnsureError(#expr, std::source_location::current()); \
|
||||
}
|
||||
|
||||
/// @brief Ensures two expressions are equal. Throws an exception if the assertion fails.
|
||||
/// @ingroup Ensure
|
||||
#define EnsureEquals(a, b) \
|
||||
if ((a) != (b)) { \
|
||||
std::stringstream error_ss; \
|
||||
|
@ -20,6 +22,8 @@
|
|||
throw ArbUt::__ErrorHelpers::CreateEnsureError(error_ss.str().c_str(), std::source_location::current()); \
|
||||
}
|
||||
|
||||
/// @brief Ensures a is greater than b. Throws an exception if the assertion fails.
|
||||
/// @ingroup Ensure
|
||||
#define EnsureGreater(a, b) \
|
||||
if ((a) <= (b)) { \
|
||||
std::stringstream error_ss; \
|
||||
|
@ -27,6 +31,8 @@
|
|||
throw ArbUt::__ErrorHelpers::CreateEnsureError(error_ss.str().c_str(), std::source_location::current()); \
|
||||
}
|
||||
|
||||
/// @brief Ensures a is greater or equals to b. Throws an exception if the assertion fails.
|
||||
/// @ingroup Ensure
|
||||
#define EnsureGreaterOrEquals(a, b) \
|
||||
if ((a) < (b)) { \
|
||||
std::stringstream error_ss; \
|
||||
|
@ -34,6 +40,8 @@
|
|||
throw ArbUt::__ErrorHelpers::CreateEnsureError(error_ss.str().c_str(), std::source_location::current()); \
|
||||
}
|
||||
|
||||
/// @brief Ensures a is less than b. Throws an exception if the assertion fails.
|
||||
/// @ingroup Ensure
|
||||
#define EnsureLess(a, b) \
|
||||
if ((a) >= (b)) { \
|
||||
std::stringstream error_ss; \
|
||||
|
@ -41,6 +49,8 @@
|
|||
throw ArbUt::__ErrorHelpers::CreateEnsureError(error_ss.str().c_str(), std::source_location::current()); \
|
||||
}
|
||||
|
||||
/// @brief Ensures a is less than or equals to b. Throws an exception if the assertion fails.
|
||||
/// @ingroup Ensure
|
||||
#define EnsureLessOrEquals(a, b) \
|
||||
if ((a) > (b)) { \
|
||||
std::stringstream error_ss; \
|
||||
|
|
Loading…
Reference in New Issue