aboutsummaryrefslogtreecommitdiff
path: root/src/test/util_tests.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2016-03-16 17:32:02 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2016-03-16 17:32:05 +0100
commit3d0dfdbf9f26dcda6bc8a397752bdcc59ee474f4 (patch)
tree08fae04473f6760c6ac9cd84a61abf24d0bd6fed /src/test/util_tests.cpp
parenta6a860796a44a2805a58391a009ba22752f64e32 (diff)
parentfad8cfb893ac0ba83c6fc2367ade55bfe4fa75f6 (diff)
Merge #7684: [qa] Extend tests
fad8cfb [qa] mininode: Add and use CONSTs (MarcoFalke) fa8cd46 [qa] Move create_tx() to util.py (MarcoFalke) fad7dc8 [qa] wallet: speed up tests (MarcoFalke) fa3a81a [tests] Extend util_ParseMoney test case (MarcoFalke)
Diffstat (limited to 'src/test/util_tests.cpp')
-rw-r--r--src/test/util_tests.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp
index 43e8ae9b36..b99f952a0d 100644
--- a/src/test/util_tests.cpp
+++ b/src/test/util_tests.cpp
@@ -200,6 +200,8 @@ BOOST_AUTO_TEST_CASE(util_ParseMoney)
BOOST_CHECK_EQUAL(ret, COIN*10);
BOOST_CHECK(ParseMoney("1.00", ret));
BOOST_CHECK_EQUAL(ret, COIN);
+ BOOST_CHECK(ParseMoney("1", ret));
+ BOOST_CHECK_EQUAL(ret, COIN);
BOOST_CHECK(ParseMoney("0.1", ret));
BOOST_CHECK_EQUAL(ret, COIN/10);
BOOST_CHECK(ParseMoney("0.01", ret));
@@ -219,6 +221,9 @@ BOOST_AUTO_TEST_CASE(util_ParseMoney)
// Attempted 63 bit overflow should fail
BOOST_CHECK(!ParseMoney("92233720368.54775808", ret));
+
+ // Parsing negative amounts must fail
+ BOOST_CHECK(!ParseMoney("-1", ret));
}
BOOST_AUTO_TEST_CASE(util_IsHex)