diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-06-09 18:26:56 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-06-09 18:38:33 +0200 |
commit | 643114f53995c9a662466784953999f073c878ad (patch) | |
tree | 8a404dbcf8fa6199b810079be9c9463ca1055b81 /src/test/rpc_tests.cpp | |
parent | 3a2ca9bbdec7e52d950806e1efce7175abeb88ab (diff) | |
parent | 7d8ffac18612fe9a5faea3f8fb41442f9e7a3c1d (diff) |
Merge pull request #6239
7d8ffac Changes necessary now that zero values accepted in AmountFromValue (Wladimir J. van der Laan)
a04bdef Get rid of fPlus argument to FormatMoney (Wladimir J. van der Laan)
4b4b9a8 Don't go through double in AmountFromValue and ValueFromAmount (Wladimir J. van der Laan)
Diffstat (limited to 'src/test/rpc_tests.cpp')
-rw-r--r-- | src/test/rpc_tests.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/test/rpc_tests.cpp b/src/test/rpc_tests.cpp index 0b33ddb086..08f988fdbf 100644 --- a/src/test/rpc_tests.cpp +++ b/src/test/rpc_tests.cpp @@ -131,6 +131,9 @@ static UniValue ValueFromString(const std::string &str) BOOST_AUTO_TEST_CASE(rpc_parse_monetary_values) { + BOOST_CHECK_THROW(AmountFromValue(ValueFromString("-0.00000001")), UniValue); + BOOST_CHECK_EQUAL(AmountFromValue(ValueFromString("0")), 0LL); + BOOST_CHECK_EQUAL(AmountFromValue(ValueFromString("0.00000000")), 0LL); BOOST_CHECK_EQUAL(AmountFromValue(ValueFromString("0.00000001")), 1LL); BOOST_CHECK_EQUAL(AmountFromValue(ValueFromString("0.17622195")), 17622195LL); BOOST_CHECK_EQUAL(AmountFromValue(ValueFromString("0.5")), 50000000LL); |