Address AI review feedback: mantissa assertion, test resiliency

- Move code around and add comments in `bringIntoRange` to make it
  clearer that mantissas should not be 0, but fall back gracefully in
  non-debug builds if they are.
- Make a test that checks for Large330 future-proof if more scales are
  added later.
This commit is contained in:
Ed Hennis
2026-06-25 14:26:59 -04:00
parent 6906f47349
commit cc4c06cf86
2 changed files with 8 additions and 5 deletions

View File

@@ -1452,7 +1452,7 @@ class LoanBroker_test : public beast::unit_test::Suite
env(tx2, Ter(temINVALID));
}
if (Number::getMantissaScale() == MantissaRange::MantissaScale::Large330)
if (Number::getMantissaScale() >= MantissaRange::MantissaScale::Large330)
{
// For the Large330 scale, 2^63 rounds _down_ to Number::kMaxRep
{