diff --git a/src/test/basics/base_uint_test.cpp b/src/test/basics/base_uint_test.cpp index f1b1ec916a..69d267b7b5 100644 --- a/src/test/basics/base_uint_test.cpp +++ b/src/test/basics/base_uint_test.cpp @@ -130,7 +130,7 @@ struct base_uint_test : beast::unit_test::Suite Blob const tooSmall{1, 2, 3, 4, 5, 6, 7, 8}; test96 const result = test96::fromRaw(tooSmall); auto const resultText = to_string(result); - BEAST_EXPECTS(resultText.substr(0, 16) == "0102030405060708", resultText); + BEAST_EXPECTS(resultText == "010203040506070800000000", resultText); } // Container larger than the base_uint (16 bytes vs 12 bytes for @@ -145,36 +145,18 @@ struct base_uint_test : beast::unit_test::Suite } #endif - void - testFromRawSizeMismatch() - { - testcase("base_uint: fromRaw size mismatch"); - - // Container larger than the base_uint (16 bytes vs 12 bytes for test96). - // Only the first 12 bytes are copied; the extra bytes are ignored. - { - Blob const tooBig{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - test96 const result = test96::fromRaw(tooBig); - BEAST_EXPECT(to_string(result) == "0102030405060708090A0B0C"); - } - } - void run() override { - testcase("base_uint: general purpose tests"); - #ifdef NDEBUG testFromRawSizeMismatch(); #endif + testcase("base_uint: general purpose tests"); + static_assert(!std::is_constructible_v>); static_assert(!std::is_assignable_v>); -#ifdef NDEBUG - testFromRawSizeMismatch(); -#endif - testComparisons(); // used to verify set insertion (hashing required)