Antithesis instrumentation improvements (#5213)

* Rename ASSERT to XRPL_ASSERT
* Upgrade to Anthithesis SDK 0.4.4, and use new 0.4.4 features
  * automatic cast to bool, like assert
* Add instrumentation workflow to verify build with instrumentation enabled
This commit is contained in:
Bronek Kozicki
2024-12-16 22:48:33 +00:00
committed by GitHub
parent ea1fffeebf
commit eabca8439f
223 changed files with 1452 additions and 1344 deletions

View File

@@ -235,7 +235,7 @@ Number::operator+=(Number const& y)
*this = Number{};
return *this;
}
ASSERT(
XRPL_ASSERT(
isnormal() && y.isnormal(),
"ripple::Number::operator+=(Number) : is normal");
auto xm = mantissa();
@@ -376,7 +376,7 @@ Number::operator*=(Number const& y)
*this = y;
return *this;
}
ASSERT(
XRPL_ASSERT(
isnormal() && y.isnormal(),
"ripple::Number::operator*=(Number) : is normal");
auto xm = mantissa();
@@ -432,7 +432,7 @@ Number::operator*=(Number const& y)
std::to_string(xe));
mantissa_ = xm * zn;
exponent_ = xe;
ASSERT(
XRPL_ASSERT(
isnormal() || *this == Number{},
"ripple::Number::operator*=(Number) : result is normal");
return *this;
@@ -532,7 +532,8 @@ to_string(Number const& amount)
negative = true;
}
ASSERT(exponent + 43 > 0, "ripple::to_string(Number) : minimum exponent");
XRPL_ASSERT(
exponent + 43 > 0, "ripple::to_string(Number) : minimum exponent");
ptrdiff_t const pad_prefix = 27;
ptrdiff_t const pad_suffix = 23;
@@ -558,7 +559,7 @@ to_string(Number const& amount)
if (std::distance(pre_from, pre_to) > pad_prefix)
pre_from += pad_prefix;
ASSERT(
XRPL_ASSERT(
post_to >= post_from,
"ripple::to_string(Number) : first distance check");
@@ -569,7 +570,7 @@ to_string(Number const& amount)
if (std::distance(post_from, post_to) > pad_suffix)
post_to -= pad_suffix;
ASSERT(
XRPL_ASSERT(
post_to >= post_from,
"ripple::to_string(Number) : second distance check");