mirror of
https://github.com/XRPLF/rippled.git
synced 2026-07-27 09:00:32 +00:00
Merge branch 'develop' into ximinez/313-tests
This commit is contained in:
@@ -135,11 +135,29 @@ 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
|
||||
|
||||
static_assert(!std::is_constructible_v<test96, std::complex<double>>);
|
||||
static_assert(!std::is_assignable_v<test96&, std::complex<double>>);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user