Remove duplicate

This commit is contained in:
Ed Hennis
2026-07-01 13:57:54 -04:00
parent 4bb15b91c2
commit 241ba86467

View File

@@ -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<test96, std::complex<double>>);
static_assert(!std::is_assignable_v<test96&, std::complex<double>>);
#ifdef NDEBUG
testFromRawSizeMismatch();
#endif
testComparisons();
// used to verify set insertion (hashing required)