diff options
author | John Wiegley <johnw@newartisans.com> | 2007-04-19 00:00:49 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-04-13 03:38:17 -0400 |
commit | 086ea40d9993f2ac86941a0462dabbd7f18d58f3 (patch) | |
tree | 9b905b976c620382f9cc048655254dc23588e365 /tests/corelib/numerics/Commodity.cc | |
parent | ba2a54f3d22dacd69d8202fc9a7d32a2b40b1d1e (diff) | |
download | ledger-086ea40d9993f2ac86941a0462dabbd7f18d58f3.tar.gz ledger-086ea40d9993f2ac86941a0462dabbd7f18d58f3.tar.bz2 ledger-086ea40d9993f2ac86941a0462dabbd7f18d58f3.zip |
We now compile with boost_date_time (although parts of the code have
been stubbed out as a result).
Diffstat (limited to 'tests/corelib/numerics/Commodity.cc')
-rw-r--r-- | tests/corelib/numerics/Commodity.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/corelib/numerics/Commodity.cc b/tests/corelib/numerics/Commodity.cc index b15211f6..9a3ec4c1 100644 --- a/tests/corelib/numerics/Commodity.cc +++ b/tests/corelib/numerics/Commodity.cc @@ -15,12 +15,12 @@ void CommodityTestCase::testConstructors() void CommodityTestCase::testPriceHistory() { - datetime_t jan17_07("2007/01/17 00:00:00"); - datetime_t feb27_07("2007/02/27 18:00:00"); - datetime_t feb28_07("2007/02/28 06:00:00"); - datetime_t feb28_07sbm("2007/02/28 11:59:59"); - datetime_t mar01_07("2007/03/01 00:00:00"); - datetime_t apr15_07("2007/04/15 13:00:00"); + ptime jan17_07 = boost::posix_time::time_from_string("2007/01/17 00:00:00"); + ptime feb27_07 = boost::posix_time::time_from_string("2007/02/27 18:00:00"); + ptime feb28_07 = boost::posix_time::time_from_string("2007/02/28 06:00:00"); + ptime feb28_07sbm = boost::posix_time::time_from_string("2007/02/28 11:59:59"); + ptime mar01_07 = boost::posix_time::time_from_string("2007/03/01 00:00:00"); + ptime apr15_07 = boost::posix_time::time_from_string("2007/04/15 13:00:00"); // jww (2007-04-17): tbd amount_t x1("100.10 AAPL"); @@ -29,9 +29,9 @@ void CommodityTestCase::testPriceHistory() // deal of their state depends on how they were seen to be used. commodity_t& aapl(x1.commodity()); - aapl.add_price(datetime_t(), amount_t("$10.20")); + aapl.add_price(now, amount_t("$10.20")); - assertEqual(amount_t("$1021.02"), x1.value(datetime_t())); + assertEqual(amount_t("$1021.02"), x1.value(now)); assertValid(x1); } |