diff options
author | John Wiegley <johnw@newartisans.com> | 2009-02-22 04:43:34 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-02-22 04:51:11 -0400 |
commit | e124811d8a31292c06430815683b2e0fe87f7ceb (patch) | |
tree | e165b781aa87402980c3a47a5617794387e81494 /test/unit/t_commodity.cc | |
parent | 04fd1ae24c3be6f9d3400c55bce90c3fd743e96b (diff) | |
download | fork-ledger-e124811d8a31292c06430815683b2e0fe87f7ceb.tar.gz fork-ledger-e124811d8a31292c06430815683b2e0fe87f7ceb.tar.bz2 fork-ledger-e124811d8a31292c06430815683b2e0fe87f7ceb.zip |
Added --exchange (-x) option
This is like -V, except it lets you specify the goal commodity to report
in terms of, for example:
reg -x CAD
Diffstat (limited to 'test/unit/t_commodity.cc')
-rw-r--r-- | test/unit/t_commodity.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/unit/t_commodity.cc b/test/unit/t_commodity.cc index 80e51bcd..9e38c823 100644 --- a/test/unit/t_commodity.cc +++ b/test/unit/t_commodity.cc @@ -68,11 +68,11 @@ void CommodityTestCase::testPriceHistory() cad.add_price(jan17_06, amount_t("$1.11")); #ifndef NOT_FOR_PYTHON - optional<amount_t> amt = x1.value(feb28_07sbm); + optional<amount_t> amt = x1.value(false, feb28_07sbm); assertTrue(amt); assertEqual(amount_t("$1831.83"), *amt); - amt = x1.value(CURRENT_TIME()); + amt = x1.value(false, CURRENT_TIME()); assertTrue(amt); assertEqual(string("$2124.12"), amt->to_string()); #ifdef INTEGER_MATH @@ -81,18 +81,18 @@ void CommodityTestCase::testPriceHistory() assertEqual(string("$2124.1220"), amt->to_fullstring()); #endif - amt = x1.value(CURRENT_TIME(), euro); + amt = x1.value(false, 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(CURRENT_TIME(), euro); + amt = x1.value(false, CURRENT_TIME(), euro); assertTrue(amt); assertEqual(string("EUR 2302.30"), amt->to_string()); - amt = x1.value(CURRENT_TIME(), cad); + amt = x1.value(false, CURRENT_TIME(), cad); assertTrue(amt); assertEqual(string("CAD 3223.22"), amt->to_string()); #endif // NOT_FOR_PYTHON |