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

@@ -199,14 +199,14 @@ Json::Value
STUInt64::getJson(JsonOptions) const
{
auto convertToString = [](uint64_t const value, int const base) {
ASSERT(
XRPL_ASSERT(
base == 10 || base == 16,
"ripple::STUInt64::getJson : base 10 or 16");
std::string str(
base == 10 ? 20 : 16, 0); // Allocate space depending on base
auto ret =
std::to_chars(str.data(), str.data() + str.size(), value, base);
ASSERT(
XRPL_ASSERT(
ret.ec == std::errc(),
"ripple::STUInt64::getJson : to_chars succeeded");
str.resize(std::distance(str.data(), ret.ptr));