File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -291,6 +291,7 @@ BOOST_AUTO_TEST_CASE(rpc_parse_monetary_values)
291
291
BOOST_CHECK_EQUAL (AmountFromValue (ValueFromString (" 1e-8" )), COIN/100000000 );
292
292
BOOST_CHECK_EQUAL (AmountFromValue (ValueFromString (" 0.1e-7" )), COIN/100000000 );
293
293
BOOST_CHECK_EQUAL (AmountFromValue (ValueFromString (" 0.01e-6" )), COIN/100000000 );
294
+ BOOST_CHECK_EQUAL (AmountFromValue (ValueFromString (" 0.00000000000000000000000000000000000001e+30" )), 1 );
294
295
BOOST_CHECK_EQUAL (AmountFromValue (ValueFromString (" 0.0000000000000000000000000000000000000000000000000000000000000000000000000001e+68" )), COIN/100000000 );
295
296
BOOST_CHECK_EQUAL (AmountFromValue (ValueFromString (" 10000000000000000000000000000000000000000000000000000000000000000e-64" )), COIN);
296
297
BOOST_CHECK_EQUAL (AmountFromValue (ValueFromString (" 0.000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000e64" )), COIN);
Original file line number Diff line number Diff line change @@ -421,7 +421,7 @@ void univalue_readwrite()
421
421
// Valid, with leading or trailing whitespace
422
422
BOOST_CHECK (v.read (" 1.0" ) && (v.get_real () == 1.0 ));
423
423
BOOST_CHECK (v.read (" 1.0 " ) && (v.get_real () == 1.0 ));
424
- BOOST_CHECK (v.read (" 0.00000000000000000000000000000000000001e+30 " ) && v. get_real () == 1e-8 );
424
+ BOOST_CHECK (v.read (" 0.00000000000000000000000000000000000001e+30 " ));
425
425
426
426
BOOST_CHECK (!v.read (" .19e-6" )); // should fail, missing leading 0, therefore invalid JSON
427
427
// Invalid, initial garbage
You can’t perform that action at this time.
0 commit comments