diff options
author | John Wiegley <johnw@newartisans.com> | 2010-06-07 09:49:17 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2010-06-07 09:49:17 -0400 |
commit | be6cef93c479056169ab499d03ea212ff22db435 (patch) | |
tree | fba78156e5187bd690f519846427284cdc0b0193 /test | |
parent | ae8ab8106218167036ef386159450b56c328f1b9 (diff) | |
download | fork-ledger-be6cef93c479056169ab499d03ea212ff22db435.tar.gz fork-ledger-be6cef93c479056169ab499d03ea212ff22db435.tar.bz2 fork-ledger-be6cef93c479056169ab499d03ea212ff22db435.zip |
A further simplification of -V and -X
With -X COMM, all values are computed in terms of COMM, regardless.
With -V, only secondary commodities will ever be computed, never
primaries. Further, if a secondary commodities has an associated price,
the valuation is done in terms of that price's commodity.
Diffstat (limited to 'test')
-rw-r--r-- | test/regress/25A099C9.test | 12 | ||||
-rw-r--r-- | test/unit/t_commodity.cc | 10 |
2 files changed, 11 insertions, 11 deletions
diff --git a/test/regress/25A099C9.test b/test/regress/25A099C9.test index b3e23a6c..345eb45f 100644 --- a/test/regress/25A099C9.test +++ b/test/regress/25A099C9.test @@ -4,16 +4,16 @@ >>>2 While parsing file "$sourcepath/src/amount.h", line 66: Error: No quantity specified for amount -While parsing file "$sourcepath/src/amount.h", line 726: +While parsing file "$sourcepath/src/amount.h", line 725: Error: Invalid date/time: line amount_t amoun -While parsing file "$sourcepath/src/amount.h", line 732: +While parsing file "$sourcepath/src/amount.h", line 731: Error: Invalid date/time: line string amount_ -While parsing file "$sourcepath/src/amount.h", line 738: +While parsing file "$sourcepath/src/amount.h", line 737: Error: Invalid date/time: line string amount_ -While parsing file "$sourcepath/src/amount.h", line 744: +While parsing file "$sourcepath/src/amount.h", line 743: Error: Invalid date/time: line string amount_ -While parsing file "$sourcepath/src/amount.h", line 750: +While parsing file "$sourcepath/src/amount.h", line 749: Error: Invalid date/time: line std::ostream& -While parsing file "$sourcepath/src/amount.h", line 757: +While parsing file "$sourcepath/src/amount.h", line 756: Error: Invalid date/time: line std::istream& === 7 diff --git a/test/unit/t_commodity.cc b/test/unit/t_commodity.cc index 3d84ead6..b8555202 100644 --- a/test/unit/t_commodity.cc +++ b/test/unit/t_commodity.cc @@ -73,11 +73,11 @@ void CommodityTestCase::testPriceHistory() cad.add_price(jan17_06, amount_t("$1.11")); #ifndef NOT_FOR_PYTHON - optional<amount_t> amt = x1.value(false, feb28_07sbm); + optional<amount_t> amt = x1.value(feb28_07sbm); assertTrue(amt); assertEqual(amount_t("$1831.83"), *amt); - amt = x1.value(false, CURRENT_TIME()); + amt = x1.value(CURRENT_TIME()); assertTrue(amt); assertEqual(string("$2124.12"), amt->to_string()); #ifdef INTEGER_MATH @@ -86,18 +86,18 @@ void CommodityTestCase::testPriceHistory() assertEqual(string("$2124.122"), amt->to_fullstring()); #endif - amt = x1.value(false, CURRENT_TIME(), euro); + amt = x1.value(CURRENT_TIME(), euro); assertTrue(amt); assertEqual(string("EUR 1366.87"), amt->rounded().to_string()); // Add a newer Euro pricing aapl.add_price(jan17_07, amount_t("EUR 23.00")); - amt = x1.value(false, CURRENT_TIME(), euro); + amt = x1.value(CURRENT_TIME(), euro); assertTrue(amt); assertEqual(string("EUR 2302.30"), amt->to_string()); - amt = x1.value(false, CURRENT_TIME(), cad); + amt = x1.value(CURRENT_TIME(), cad); assertTrue(amt); assertEqual(string("CAD 3223.22"), amt->to_string()); #endif // NOT_FOR_PYTHON |