summaryrefslogtreecommitdiff
path: root/test/unit/t_commodity.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-04 19:55:27 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-04 19:55:27 -0400
commit2d941730b1c60342be5b108d2d654723b3b7c2cb (patch)
tree6a3f4b7305857e85d2684670492007bafc3668d0 /test/unit/t_commodity.cc
parent73cf3b01fbd50c3a8a4fd96ff69643c28394d8fe (diff)
downloadfork-ledger-2d941730b1c60342be5b108d2d654723b3b7c2cb.tar.gz
fork-ledger-2d941730b1c60342be5b108d2d654723b3b7c2cb.tar.bz2
fork-ledger-2d941730b1c60342be5b108d2d654723b3b7c2cb.zip
Largely removed all of Ledger's use of global variables, for the REPL's sake.
Diffstat (limited to 'test/unit/t_commodity.cc')
-rw-r--r--test/unit/t_commodity.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/unit/t_commodity.cc b/test/unit/t_commodity.cc
index 9818c863..5f72c195 100644
--- a/test/unit/t_commodity.cc
+++ b/test/unit/t_commodity.cc
@@ -73,7 +73,7 @@ void CommodityTestCase::testPriceHistory()
assertTrue(amt);
assertEqual(amount_t("$1831.83"), *amt);
- amt = x1.value(current_time);
+ amt = x1.value(CURRENT_TIME());
assertTrue(amt);
assertEqual(string("$2124.12"), amt->to_string());
#ifdef INTEGER_MATH
@@ -82,18 +82,18 @@ void CommodityTestCase::testPriceHistory()
assertEqual(string("$2124.1220"), amt->to_fullstring());
#endif
- amt = x1.value(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(current_time, euro);
+ amt = x1.value(CURRENT_TIME(), euro);
assertTrue(amt);
assertEqual(string("EUR 2302.30"), amt->to_string());
- amt = x1.value(current_time, cad);
+ amt = x1.value(CURRENT_TIME(), cad);
assertTrue(amt);
assertEqual(string("CAD 3223.22"), amt->to_string());
#endif // NOT_FOR_PYTHON