diff options
author | Jeff Garzik <jgarzik@bitpay.com> | 2014-08-20 15:15:16 -0400 |
---|---|---|
committer | Jonas Schnelli <jonas.schnelli@include7.ch> | 2015-06-04 09:16:05 +0200 |
commit | 15982a8b69ec6ab3c3a6bf71fc6a9b681d3ff541 (patch) | |
tree | 854a48a039d4199dbc1acf33ef94d06d007f1348 /src/test/rpc_tests.cpp | |
parent | 5e3060c0d104c734e7e2a200e2d937ea01166c8a (diff) |
Convert tree to using univalue. Eliminate all json_spirit uses.
Diffstat (limited to 'src/test/rpc_tests.cpp')
-rw-r--r-- | src/test/rpc_tests.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/test/rpc_tests.cpp b/src/test/rpc_tests.cpp index 5899671d2f..fea826b65a 100644 --- a/src/test/rpc_tests.cpp +++ b/src/test/rpc_tests.cpp @@ -111,20 +111,20 @@ BOOST_AUTO_TEST_CASE(rpc_rawsign) BOOST_AUTO_TEST_CASE(rpc_format_monetary_values) { - BOOST_CHECK_EQUAL(write_string(ValueFromAmount(0LL), false), "0.00000000"); - BOOST_CHECK_EQUAL(write_string(ValueFromAmount(1LL), false), "0.00000001"); - BOOST_CHECK_EQUAL(write_string(ValueFromAmount(17622195LL), false), "0.17622195"); - BOOST_CHECK_EQUAL(write_string(ValueFromAmount(50000000LL), false), "0.50000000"); - BOOST_CHECK_EQUAL(write_string(ValueFromAmount(89898989LL), false), "0.89898989"); - BOOST_CHECK_EQUAL(write_string(ValueFromAmount(100000000LL), false), "1.00000000"); - BOOST_CHECK_EQUAL(write_string(ValueFromAmount(2099999999999990LL), false), "20999999.99999990"); - BOOST_CHECK_EQUAL(write_string(ValueFromAmount(2099999999999999LL), false), "20999999.99999999"); + BOOST_CHECK(ValueFromAmount(0LL).write() == "0.00000000"); + BOOST_CHECK(ValueFromAmount(1LL).write() == "0.00000001"); + BOOST_CHECK(ValueFromAmount(17622195LL).write() == "0.17622195"); + BOOST_CHECK(ValueFromAmount(50000000LL).write() == "0.50000000"); + BOOST_CHECK(ValueFromAmount(89898989LL).write() == "0.89898989"); + BOOST_CHECK(ValueFromAmount(100000000LL).write() == "1.00000000"); + BOOST_CHECK(ValueFromAmount(2099999999999990LL).write() == "20999999.99999990"); + BOOST_CHECK(ValueFromAmount(2099999999999999LL).write() == "20999999.99999999"); } static Value ValueFromString(const std::string &str) { Value value; - BOOST_CHECK(read_string(str, value)); + BOOST_CHECK(value.read(str)); return value; } |