|
|
@ -1450,7 +1450,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));
|
|
|
@ -1513,7 +1512,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));
|
|
|
@ -1549,7 +1547,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));
|
|
|
@ -1587,7 +1584,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));
|
|
|
|