mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 04:22:55 +01:00
Merge #21491: test: remove duplicate assertions in util_tests
7e3444805ed747db819d7bf630feafc31783e5de test: remove duplicate assertions in util_tests (Jon Atack) Pull request description: as noticed by Kiminuo in https://github.com/bitcoin/bitcoin/pull/21488#discussion_r598247676 ACKs for top commit: practicalswift: cr ACK 7e3444805ed747db819d7bf630feafc31783e5de: patch looks correct vasild: ACK 7e3444805ed747db819d7bf630feafc31783e5de Tree-SHA512: ad3d5983ad3a665155d766843dfda7178ced47e82154838331e428ed0828a467c1cf4bf99270aaf191e94156d485fafd0a7d5bc68248c4c1304a00ca5a2a9d2e
This commit is contained in:
parent
518582f375
commit
3ef6d5e835
@ -1306,7 +1306,6 @@ BOOST_AUTO_TEST_CASE(test_ParseInt32)
|
|||||||
BOOST_CHECK(!ParseInt32("1a", &n));
|
BOOST_CHECK(!ParseInt32("1a", &n));
|
||||||
BOOST_CHECK(!ParseInt32("aap", &n));
|
BOOST_CHECK(!ParseInt32("aap", &n));
|
||||||
BOOST_CHECK(!ParseInt32("0x1", &n)); // no hex
|
BOOST_CHECK(!ParseInt32("0x1", &n)); // no hex
|
||||||
BOOST_CHECK(!ParseInt32("0x1", &n)); // no hex
|
|
||||||
BOOST_CHECK(!ParseInt32(STRING_WITH_EMBEDDED_NULL_CHAR, &n));
|
BOOST_CHECK(!ParseInt32(STRING_WITH_EMBEDDED_NULL_CHAR, &n));
|
||||||
// Overflow and underflow
|
// Overflow and underflow
|
||||||
BOOST_CHECK(!ParseInt32("-2147483649", nullptr));
|
BOOST_CHECK(!ParseInt32("-2147483649", nullptr));
|
||||||
@ -1515,7 +1514,6 @@ BOOST_AUTO_TEST_CASE(test_ParseUInt8)
|
|||||||
BOOST_CHECK(!ParseUInt8("1a", &n));
|
BOOST_CHECK(!ParseUInt8("1a", &n));
|
||||||
BOOST_CHECK(!ParseUInt8("aap", &n));
|
BOOST_CHECK(!ParseUInt8("aap", &n));
|
||||||
BOOST_CHECK(!ParseUInt8("0x1", &n)); // no hex
|
BOOST_CHECK(!ParseUInt8("0x1", &n)); // no hex
|
||||||
BOOST_CHECK(!ParseUInt8("0x1", &n)); // no hex
|
|
||||||
BOOST_CHECK(!ParseUInt8(STRING_WITH_EMBEDDED_NULL_CHAR, &n));
|
BOOST_CHECK(!ParseUInt8(STRING_WITH_EMBEDDED_NULL_CHAR, &n));
|
||||||
// Overflow and underflow
|
// Overflow and underflow
|
||||||
BOOST_CHECK(!ParseUInt8("-255", &n));
|
BOOST_CHECK(!ParseUInt8("-255", &n));
|
||||||
@ -1551,7 +1549,6 @@ BOOST_AUTO_TEST_CASE(test_ParseUInt16)
|
|||||||
BOOST_CHECK(!ParseUInt16("1a", &n));
|
BOOST_CHECK(!ParseUInt16("1a", &n));
|
||||||
BOOST_CHECK(!ParseUInt16("aap", &n));
|
BOOST_CHECK(!ParseUInt16("aap", &n));
|
||||||
BOOST_CHECK(!ParseUInt16("0x1", &n)); // no hex
|
BOOST_CHECK(!ParseUInt16("0x1", &n)); // no hex
|
||||||
BOOST_CHECK(!ParseUInt16("0x1", &n)); // no hex
|
|
||||||
BOOST_CHECK(!ParseUInt16(STRING_WITH_EMBEDDED_NULL_CHAR, &n));
|
BOOST_CHECK(!ParseUInt16(STRING_WITH_EMBEDDED_NULL_CHAR, &n));
|
||||||
// Overflow and underflow
|
// Overflow and underflow
|
||||||
BOOST_CHECK(!ParseUInt16("-65535", &n));
|
BOOST_CHECK(!ParseUInt16("-65535", &n));
|
||||||
@ -1589,7 +1586,6 @@ BOOST_AUTO_TEST_CASE(test_ParseUInt32)
|
|||||||
BOOST_CHECK(!ParseUInt32("1a", &n));
|
BOOST_CHECK(!ParseUInt32("1a", &n));
|
||||||
BOOST_CHECK(!ParseUInt32("aap", &n));
|
BOOST_CHECK(!ParseUInt32("aap", &n));
|
||||||
BOOST_CHECK(!ParseUInt32("0x1", &n)); // no hex
|
BOOST_CHECK(!ParseUInt32("0x1", &n)); // no hex
|
||||||
BOOST_CHECK(!ParseUInt32("0x1", &n)); // no hex
|
|
||||||
BOOST_CHECK(!ParseUInt32(STRING_WITH_EMBEDDED_NULL_CHAR, &n));
|
BOOST_CHECK(!ParseUInt32(STRING_WITH_EMBEDDED_NULL_CHAR, &n));
|
||||||
// Overflow and underflow
|
// Overflow and underflow
|
||||||
BOOST_CHECK(!ParseUInt32("-2147483648", &n));
|
BOOST_CHECK(!ParseUInt32("-2147483648", &n));
|
||||||
|
Loading…
Reference in New Issue
Block a user