diff options
author | John Wiegley <johnw@newartisans.com> | 2009-10-25 05:40:26 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-10-25 05:40:26 -0400 |
commit | 05529b2c6817f899ff8d97685ffed82e52e0ec6b (patch) | |
tree | c8cdb06b6dd325bb0f98109d0d0a79b5a3bf9a13 /test/unit | |
parent | f25a32c92c90a65b4ec341ad703c8e61f615d48e (diff) | |
download | fork-ledger-05529b2c6817f899ff8d97685ffed82e52e0ec6b.tar.gz fork-ledger-05529b2c6817f899ff8d97685ffed82e52e0ec6b.tar.bz2 fork-ledger-05529b2c6817f899ff8d97685ffed82e52e0ec6b.zip |
Call times_initialize/shutdown in the unit tests
Diffstat (limited to 'test/unit')
-rw-r--r-- | test/unit/t_amount.cc | 2 | ||||
-rw-r--r-- | test/unit/t_balance.cc | 2 | ||||
-rw-r--r-- | test/unit/t_commodity.cc | 2 | ||||
-rw-r--r-- | test/unit/t_expr.cc | 2 | ||||
-rw-r--r-- | test/unit/t_times.cc | 10 | ||||
-rw-r--r-- | test/unit/t_times.h | 4 |
6 files changed, 20 insertions, 2 deletions
diff --git a/test/unit/t_amount.cc b/test/unit/t_amount.cc index ba863ca7..c2a6b8c9 100644 --- a/test/unit/t_amount.cc +++ b/test/unit/t_amount.cc @@ -11,6 +11,7 @@ CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(AmountTestCase, "math"); void AmountTestCase::setUp() { + times_initialize(); amount_t::initialize(); // Cause the display precision for dollars to be initialized to 2. @@ -24,6 +25,7 @@ void AmountTestCase::tearDown() { amount_t::stream_fullstrings = false; amount_t::shutdown(); + times_shutdown(); } void AmountTestCase::testParser() diff --git a/test/unit/t_balance.cc b/test/unit/t_balance.cc index 335d1a52..c7d633b8 100644 --- a/test/unit/t_balance.cc +++ b/test/unit/t_balance.cc @@ -11,6 +11,7 @@ CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(BalanceTestCase, "math"); void BalanceTestCase::setUp() { + times_initialize(); amount_t::initialize(); // Cause the display precision for dollars to be initialized to 2. @@ -24,4 +25,5 @@ void BalanceTestCase::tearDown() { amount_t::stream_fullstrings = false; amount_t::shutdown(); + times_shutdown(); } diff --git a/test/unit/t_commodity.cc b/test/unit/t_commodity.cc index de46211c..3d84ead6 100644 --- a/test/unit/t_commodity.cc +++ b/test/unit/t_commodity.cc @@ -10,12 +10,14 @@ using namespace ledger; CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(CommodityTestCase, "math"); void CommodityTestCase::setUp() { + times_initialize(); amount_t::initialize(); amount_t::stream_fullstrings = true; } void CommodityTestCase::tearDown() { amount_t::shutdown(); + times_shutdown(); } void CommodityTestCase::testPriceHistory() diff --git a/test/unit/t_expr.cc b/test/unit/t_expr.cc index 49d7dd23..6c88a08a 100644 --- a/test/unit/t_expr.cc +++ b/test/unit/t_expr.cc @@ -10,10 +10,12 @@ CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(ValueExprTestCase, "expr"); void ValueExprTestCase::setUp() { + times_initialize(); amount_t::initialize(); } void ValueExprTestCase::tearDown() { amount_t::shutdown(); + times_shutdown(); } diff --git a/test/unit/t_times.cc b/test/unit/t_times.cc index 8485a2c9..d8a67b43 100644 --- a/test/unit/t_times.cc +++ b/test/unit/t_times.cc @@ -9,6 +9,16 @@ using namespace ledger; CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(DateTimeTestCase, "util"); +void DateTimeTestCase::setUp() +{ + times_initialize(); +} + +void DateTimeTestCase::tearDown() +{ + times_shutdown(); +} + void DateTimeTestCase::testConstructors() { #ifndef NOT_FOR_PYTHON diff --git a/test/unit/t_times.h b/test/unit/t_times.h index 28784113..5bbadf21 100644 --- a/test/unit/t_times.h +++ b/test/unit/t_times.h @@ -15,8 +15,8 @@ public: DateTimeTestCase() {} virtual ~DateTimeTestCase() {} - //virtual void setUp(); - //virtual void tearDown(); + virtual void setUp(); + virtual void tearDown(); void testConstructors(); |