Fix some build errors - unused variables, large constants

This commit is contained in:
Ed Hennis
2025-11-15 02:57:18 -05:00
parent 3451d15e12
commit a5f43fb59b
2 changed files with 7 additions and 4 deletions

View File

@@ -170,7 +170,6 @@ public:
{
auto const scale = Number::getMantissaScale();
testcase << "test_add " << to_string(scale);
auto const minMantissa = Number::minMantissa();
using Case = std::tuple<Number, Number, Number>;
auto const cSmall = std::to_array<Case>(
@@ -292,7 +291,6 @@ public:
{
auto const scale = Number::getMantissaScale();
testcase << "test_sub " << to_string(scale);
auto const minMantissa = Number::minMantissa();
using Case = std::tuple<Number, Number, Number>;
auto const cSmall = std::to_array<Case>(
@@ -1354,7 +1352,8 @@ public:
BEAST_EXPECT(max.exponent() <= 0);
// 99999999999999999980000000000000000001 - also 38 digits
BEAST_EXPECT(
(power(max, 2) == Number{99'999'999'999'999'999'98, 19}));
(power(max, 2) ==
Number{numberint128(9'999'999'999'999'999) * 1000 + 998, 19}));
}
}

View File

@@ -151,7 +151,11 @@ struct STNumber_test : public beast::unit_test::suite
BEAST_EXPECT(
numberFromJson(sfNumber, minInt) ==
STNumber(
sfNumber, -Number{9'223'372'036'854'775'808, 0}));
sfNumber,
-Number{
numberint128(9'223'372'036'854'775) * 1000 +
808,
0}));
}
}