From abc5f59fed86fd7c7330842e9d785383ce2c23d0 Mon Sep 17 00:00:00 2001 From: Ed Hennis Date: Tue, 12 May 2026 19:16:50 -0400 Subject: [PATCH] Tweak tests after another big merge --- src/test/basics/Number_test.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/test/basics/Number_test.cpp b/src/test/basics/Number_test.cpp index 83ba487eb6..f810fea991 100644 --- a/src/test/basics/Number_test.cpp +++ b/src/test/basics/Number_test.cpp @@ -1069,7 +1069,7 @@ public: } }; - Number const maxInternalMantissa = power(10, Number::mantissaLog()) * 10 - 1; + Number const maxInternalMantissa{getMaxInternalMantissa(), 0, Number::Normalized{}}; auto const cSmall = std::to_array({ Number{2}, @@ -1847,7 +1847,7 @@ public: // full value. testSuite(n, 922, 16, 922'337'203'685'477'600, 1, __LINE__); else - testSuite(n, 922, 16, 922'337'203'685'477'581, 1, __LINE__); + testSuite(n, 922, 16, Number::kLARGEST_MANTISSA / 10 + 1, 1, __LINE__); } { // Biggest valid mantissa + 2 @@ -1860,7 +1860,7 @@ public: // full value. testSuite(n, 922, 16, 922'337'203'685'477'600, 1, __LINE__); else - testSuite(n, 922, 16, 922'337'203'685'477'581, 1, __LINE__); + testSuite(n, 922, 16, Number::kLARGEST_MANTISSA / 10 + 1, 1, __LINE__); } { // Biggest valid mantissa + 3 @@ -1873,7 +1873,7 @@ public: // full value. testSuite(n, 922, 16, 922'337'203'685'477'600, 1, __LINE__); else - testSuite(n, 922, 16, 922'337'203'685'477'581, 1, __LINE__); + testSuite(n, 922, 16, Number::kLARGEST_MANTISSA / 10 + 1, 1, __LINE__); } { // int64 min @@ -1882,7 +1882,7 @@ public: if (scale == MantissaRange::MantissaScale::Small) testSuite(n, -922, 16, -922'337'203'685'477'600, 1, __LINE__); else - testSuite(n, -922, 16, -922'337'203'685'477'581, 1, __LINE__); + testSuite(n, -922, 16, -(Number::kLARGEST_MANTISSA / 10 + 1), 1, __LINE__); } { // int64 min + 1 @@ -1891,7 +1891,7 @@ public: if (scale == MantissaRange::MantissaScale::Small) testSuite(n, -922, 16, -922'337'203'685'477'600, 1, __LINE__); else - testSuite(n, -922, 16, -9'223'372'036'854'775'807, 0, __LINE__); + testSuite(n, -922, 16, -Number::kLARGEST_MANTISSA, 0, __LINE__); } { // int64 min - 1 @@ -1906,7 +1906,7 @@ public: if (scale == MantissaRange::MantissaScale::Small) testSuite(n, -922, 16, -922'337'203'685'477'600, 1, __LINE__); else - testSuite(n, -922, 16, -922'337'203'685'477'581, 1, __LINE__); + testSuite(n, -922, 16, -(Number::kLARGEST_MANTISSA / 10 + 1), 1, __LINE__); } }