Merge remote-tracking branch 'XRPLF/develop' into ximinez/number-maxint-range

* XRPLF/develop: (81 commits)
  ci: Only publish docs in public repos (6687)
  chore: Enable remaining clang-tidy `performance` checks (6648)
  refactor: Address PR comments after the modularisation PRs (6389)
  chore: Fix clang-tidy header filter (6686)
  ci: [DEPENDABOT] bump actions/deploy-pages from 4.0.5 to 5.0.0 (6684)
  ci: [DEPENDABOT] bump codecov/codecov-action from 5.5.3 to 6.0.0 (6685)
  fix: Guard Coro::resume() against completed coroutines (6608)
  refactor: Split LoanInvariant into LoanBrokerInvariant and LoanInvariant (6674)
  ci: Don't publish docs on release branches (6673)
  refactor: Make function naming in ServiceRegistry consistent (6390)
  chore: Shorten job names to stay within Linux 15-char thread limit (6669)
  fix: Improve loan invariant message (6668)
  ci: Upload artifacts only in public repositories (6670)
  ci: Add conflicting-pr workflow (6656)
  chore: Add more AI tools to .gitignore (6658)
  chore: Show warning message if user may need to connect to VPN (6619)
  feat: Add placeholder amendment for assorted bug fixes (6652)
  chore: Update sqlite3->3.51.0, protobuf->6.33.5, openssl->3.6.1, grpc->1.78.1 (6653)
  refactor: Modularise ledger (6536)
  chore: Use unpatched version of soci (6649)
  ...
This commit is contained in:
Ed Hennis
2026-03-30 22:01:54 -04:00
928 changed files with 73824 additions and 9651 deletions

View File

@@ -212,9 +212,13 @@ public:
}
};
if (scale == MantissaRange::small)
{
test(cSmall);
}
else
{
test(cLarge);
}
{
bool caught = false;
try
@@ -290,7 +294,7 @@ public:
Number{Number::largestMantissa - 1}},
{Number{false, Number::largestMantissa + 1, 0, Number::normalized{}},
Number{1, 0},
Number{Number::largestMantissa / 10 + 1, 1}},
Number{(Number::largestMantissa / 10) + 1, 1}},
{Number{false, Number::largestMantissa + 1, 0, Number::normalized{}},
Number{3, 0},
Number{Number::largestMantissa}},
@@ -306,9 +310,13 @@ public:
}
};
if (scale == MantissaRange::small)
{
test(cSmall);
}
else
{
test(cLarge);
}
}
static std::uint64_t
@@ -339,9 +347,13 @@ public:
};
auto tests = [&](auto const& cSmall, auto const& cLarge) {
if (scale == MantissaRange::small)
{
test(cSmall);
}
else
{
test(cLarge);
}
};
auto const maxMantissa = Number::maxMantissa();
auto const maxInternalMantissa = getMaxInternalMantissa();
@@ -745,9 +757,13 @@ public:
auto const maxMantissa = Number::maxMantissa();
auto tests = [&](auto const& cSmall, auto const& cLarge) {
if (scale == MantissaRange::small)
{
test(cSmall);
}
else
{
test(cLarge);
}
};
saveNumberRoundMode save{Number::setround(Number::to_nearest)};
{
@@ -1352,10 +1368,10 @@ public:
auto const maxMantissa = Number::maxMantissa();
BEAST_EXPECT(maxMantissa == 9'999'999'999'999'999);
test(
Number{false, maxMantissa * 1000 + 999, -3, Number::normalized()},
Number{false, (maxMantissa * 1000) + 999, -3, Number::normalized()},
"9999999999999999");
test(
Number{true, maxMantissa * 1000 + 999, -3, Number::normalized()},
Number{true, (maxMantissa * 1000) + 999, -3, Number::normalized()},
"-9999999999999999");
test(Number{std::numeric_limits<std::int64_t>::max(), -3}, "9223372036854775");