summaryrefslogtreecommitdiff
path: root/tests/corelib/numerics/Commodity.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2007-04-18 23:49:09 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 03:35:37 -0400
commit4c460a1c40cfb1547ce9a4c91b4e8a87d768463d (patch)
treeea0adacb03f779059e36b3af84b3b0311d36de15 /tests/corelib/numerics/Commodity.cc
parent705ce8c6a15a90517aca57bdcd8f3a921179cb11 (diff)
downloadfork-ledger-4c460a1c40cfb1547ce9a4c91b4e8a87d768463d.tar.gz
fork-ledger-4c460a1c40cfb1547ce9a4c91b4e8a87d768463d.tar.bz2
fork-ledger-4c460a1c40cfb1547ce9a4c91b4e8a87d768463d.zip
Added initialize Commodity test file.
Diffstat (limited to 'tests/corelib/numerics/Commodity.cc')
-rw-r--r--tests/corelib/numerics/Commodity.cc40
1 files changed, 40 insertions, 0 deletions
diff --git a/tests/corelib/numerics/Commodity.cc b/tests/corelib/numerics/Commodity.cc
new file mode 100644
index 00000000..77cdd7b9
--- /dev/null
+++ b/tests/corelib/numerics/Commodity.cc
@@ -0,0 +1,40 @@
+#include "Commodity.h"
+#include "ledger.h"
+
+using namespace ledger;
+
+CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(CommodityTestCase, "numerics");
+
+void CommodityTestCase::setUp() {}
+void CommodityTestCase::tearDown() {}
+
+void CommodityTestCase::testConstructors()
+{
+
+}
+
+void CommodityTestCase::testPriceHistory()
+{
+ // jww (2007-04-17): tbd
+ amount_t x1("100.10 AAPL");
+
+ assertEqual(x1, x1.value(datetime_t()));
+
+ assertValid(x1);
+}
+
+void CommodityTestCase::testLots()
+{
+ // jww (2007-04-17): tbd
+}
+
+void CommodityTestCase::testScalingBase()
+{
+ // jww (2007-04-17): tbd
+}
+
+void CommodityTestCase::testReduction()
+{
+ // jww (2007-04-17): tbd
+}
+