summaryrefslogtreecommitdiff
path: root/tests/numerics/t_balance.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2007-05-07 11:37:15 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 03:38:40 -0400
commit30978b7fe5ee93413b2e05b54942f6550832b222 (patch)
treecede95552b56e9f17b24b6daa1037e7b87f11aed /tests/numerics/t_balance.cc
parenta99695f69b395c9664447b5af82893fb755bd4c0 (diff)
downloadfork-ledger-30978b7fe5ee93413b2e05b54942f6550832b222.tar.gz
fork-ledger-30978b7fe5ee93413b2e05b54942f6550832b222.tar.bz2
fork-ledger-30978b7fe5ee93413b2e05b54942f6550832b222.zip
Added new test files.
Diffstat (limited to 'tests/numerics/t_balance.cc')
-rw-r--r--tests/numerics/t_balance.cc25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/numerics/t_balance.cc b/tests/numerics/t_balance.cc
new file mode 100644
index 00000000..ca759836
--- /dev/null
+++ b/tests/numerics/t_balance.cc
@@ -0,0 +1,25 @@
+#include "t_balance.h"
+
+CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(BalanceTestCase, "numerics");
+
+void BalanceTestCase::setUp()
+{
+ ledger::set_session_context(&session);
+
+ // Cause the display precision for dollars to be initialized to 2.
+ amount_t x1("$1.00");
+ assertTrue(x1);
+
+ amount_t::stream_fullstrings = true; // make reports from UnitTests accurate
+}
+
+void BalanceTestCase::tearDown()
+{
+ amount_t::stream_fullstrings = false;
+
+ ledger::set_session_context();
+}
+
+void BalanceTestCase::testConstructors()
+{
+}