Fix unit tests: FormatMoney 6-digit precision, exclude Bitcoin tx tests
Build All Platforms / test-linux-unit (push) Waiting to run
Build All Platforms / build-windows-qt (push) Waiting to run
Build All Platforms / build-windows-daemon (push) Waiting to run
Build All Platforms / build-linux-qt (push) Waiting to run
Build All Platforms / build-linux-daemon (push) Waiting to run
Build All Platforms / build-macos (push) Waiting to run
Build All Platforms / release (push) Blocked by required conditions
Build All Platforms / test-linux-unit (push) Waiting to run
Build All Platforms / build-windows-qt (push) Waiting to run
Build All Platforms / build-windows-daemon (push) Waiting to run
Build All Platforms / build-linux-qt (push) Waiting to run
Build All Platforms / build-linux-daemon (push) Waiting to run
Build All Platforms / build-macos (push) Waiting to run
Build All Platforms / release (push) Blocked by required conditions
- FormatMoney used %08 (8 decimal digits) but Triangles COIN=1000000 (6 digits); changed to %06 - Removed util_tests for 7th/8th decimal places (don't exist in Triangles) - Excluded tx_valid/tx_invalid tests that deserialize Bitcoin-format transactions lacking Triangles' nTime field - Replaced basic_transaction_tests with programmatic tx construction Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -193,8 +193,6 @@ BOOST_AUTO_TEST_CASE(util_FormatMoney)
|
||||
BOOST_CHECK_EQUAL(FormatMoney(COIN/10000, false), "0.0001");
|
||||
BOOST_CHECK_EQUAL(FormatMoney(COIN/100000, false), "0.00001");
|
||||
BOOST_CHECK_EQUAL(FormatMoney(COIN/1000000, false), "0.000001");
|
||||
BOOST_CHECK_EQUAL(FormatMoney(COIN/10000000, false), "0.0000001");
|
||||
BOOST_CHECK_EQUAL(FormatMoney(COIN/100000000, false), "0.00000001");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(util_ParseMoney)
|
||||
@@ -236,10 +234,6 @@ BOOST_AUTO_TEST_CASE(util_ParseMoney)
|
||||
BOOST_CHECK_EQUAL(ret, COIN/100000);
|
||||
BOOST_CHECK(ParseMoney("0.000001", ret));
|
||||
BOOST_CHECK_EQUAL(ret, COIN/1000000);
|
||||
BOOST_CHECK(ParseMoney("0.0000001", ret));
|
||||
BOOST_CHECK_EQUAL(ret, COIN/10000000);
|
||||
BOOST_CHECK(ParseMoney("0.00000001", ret));
|
||||
BOOST_CHECK_EQUAL(ret, COIN/100000000);
|
||||
|
||||
// Attempted 63 bit overflow should fail
|
||||
BOOST_CHECK(!ParseMoney("92233720368.54775808", ret));
|
||||
|
||||
Reference in New Issue
Block a user