summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/baseline/opt-csv-format.test4
-rw-r--r--test/baseline/opt-prices-format.test10
-rw-r--r--test/baseline/opt-pricesdb-format.test10
-rw-r--r--test/regress/BBFA1759.test4
-rw-r--r--test/unit/t_amount.cc2
-rw-r--r--test/unit/t_balance.cc2
-rw-r--r--test/unit/t_commodity.cc2
-rw-r--r--test/unit/t_expr.cc2
-rw-r--r--test/unit/t_times.cc10
-rw-r--r--test/unit/t_times.h4
10 files changed, 34 insertions, 16 deletions
diff --git a/test/baseline/opt-csv-format.test b/test/baseline/opt-csv-format.test
index 7efefc0d..d4975f93 100644
--- a/test/baseline/opt-csv-format.test
+++ b/test/baseline/opt-csv-format.test
@@ -4,7 +4,7 @@ csv --csv-format='"%(date)"\n'
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
Income:Dividends:Vanguard:VMMXX $-0.35
>>>1
-"07-Feb-02"
-"07-Feb-02"
+"2007/02/02"
+"2007/02/02"
>>>2
=== 0
diff --git a/test/baseline/opt-prices-format.test b/test/baseline/opt-prices-format.test
index ec93d9cd..f8033c59 100644
--- a/test/baseline/opt-prices-format.test
+++ b/test/baseline/opt-prices-format.test
@@ -10,10 +10,10 @@ P 2009/02/01 17:30:00 AAPL $50.00
Assets:Brokerage 100 AAPL
Income
>>>1
-09-Jan-01 13:30:00 $10.00
-09-Jan-01 14:30:00 $20.00
-09-Jan-01 15:30:00 $30.00
-09-Jan-01 16:30:00 $40.00
-09-Feb-01 17:30:00 $50.00
+2009/01/01 13:30:00 $10.00
+2009/01/01 14:30:00 $20.00
+2009/01/01 15:30:00 $30.00
+2009/01/01 16:30:00 $40.00
+2009/02/01 17:30:00 $50.00
>>>2
=== 0
diff --git a/test/baseline/opt-pricesdb-format.test b/test/baseline/opt-pricesdb-format.test
index 28998903..b90371cd 100644
--- a/test/baseline/opt-pricesdb-format.test
+++ b/test/baseline/opt-pricesdb-format.test
@@ -10,10 +10,10 @@ P 2009/02/01 17:30:00 AAPL $50.00
Assets:Brokerage 100 AAPL
Income
>>>1
-P 09-Jan-01 $10.00
-P 09-Jan-01 $20.00
-P 09-Jan-01 $30.00
-P 09-Jan-01 $40.00
-P 09-Feb-01 $50.00
+P 2009/01/01 $10.00
+P 2009/01/01 $20.00
+P 2009/01/01 $30.00
+P 2009/01/01 $40.00
+P 2009/02/01 $50.00
>>>2
=== 0
diff --git a/test/regress/BBFA1759.test b/test/regress/BBFA1759.test
index ca6842dc..26862703 100644
--- a/test/regress/BBFA1759.test
+++ b/test/regress/BBFA1759.test
@@ -3,8 +3,8 @@ period june 2008
>>>1
global details =>
- start: 2008-06-01
- end: 2008-07-01
+ start: 08-Jun-01
+ end: 08-Jul-01
factor: 1
>>>2
=== 0
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();