diff options
author | John Wiegley <johnw@newartisans.com> | 2009-01-25 01:10:05 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-01-25 01:10:05 -0400 |
commit | 79a79766000a6440f651af50cfac3646171e8f0a (patch) | |
tree | 1b5a9a419ffd65770fd36ec55f9c0a608e5b1045 /test/unit/t_expr.cc | |
parent | 1ae1033090faf566f8577cc63ac10a2d4e0e1f7f (diff) | |
download | fork-ledger-79a79766000a6440f651af50cfac3646171e8f0a.tar.gz fork-ledger-79a79766000a6440f651af50cfac3646171e8f0a.tar.bz2 fork-ledger-79a79766000a6440f651af50cfac3646171e8f0a.zip |
Reorganized Ledger so that it builds as 7 separate libraries. This is mainly
to prove to myself that it has proper decoupling between prior code areas.
Diffstat (limited to 'test/unit/t_expr.cc')
-rw-r--r-- | test/unit/t_expr.cc | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/test/unit/t_expr.cc b/test/unit/t_expr.cc index 58a60e23..a6655f6a 100644 --- a/test/unit/t_expr.cc +++ b/test/unit/t_expr.cc @@ -1,23 +1,21 @@ #include "t_expr.h" -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(ValueExprTestCase, "numerics"); +#include "expr.h" -void ValueExprTestCase::setUp() -{ - ledger::set_session_context(&session); +using namespace ledger; - // Cause the display precision for dollars to be initialized to 2. - amount_t x1("$1.00"); - assertTrue(x1); +CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(ValueExprTestCase, "expr"); - amount_t::stream_fullstrings = true; // make reports from UnitTests accurate +void ValueExprTestCase::setUp() +{ + amount_t::initialize(); + expr_t::initialize(); } void ValueExprTestCase::tearDown() { - amount_t::stream_fullstrings = false; - - ledger::set_session_context(); + expr_t::shutdown(); + amount_t::shutdown(); } void ValueExprTestCase::testConstructors() |