From a5f43fb59bcbb67a968fb4b376d5c2fafbd97a20 Mon Sep 17 00:00:00 2001 From: Ed Hennis Date: Sat, 15 Nov 2025 02:57:18 -0500 Subject: [PATCH] Fix some build errors - unused variables, large constants --- src/test/basics/Number_test.cpp | 5 ++--- src/test/protocol/STNumber_test.cpp | 6 +++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/test/basics/Number_test.cpp b/src/test/basics/Number_test.cpp index aa76159787..db5ef69142 100644 --- a/src/test/basics/Number_test.cpp +++ b/src/test/basics/Number_test.cpp @@ -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; auto const cSmall = std::to_array( @@ -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; auto const cSmall = std::to_array( @@ -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})); } } diff --git a/src/test/protocol/STNumber_test.cpp b/src/test/protocol/STNumber_test.cpp index 3a2092d291..f860d0a5ca 100644 --- a/src/test/protocol/STNumber_test.cpp +++ b/src/test/protocol/STNumber_test.cpp @@ -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})); } }