summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--Makefile.am30
-rw-r--r--test/numerics/t_amount.cc4
-rw-r--r--test/numerics/t_amount.h2
-rw-r--r--test/numerics/t_balance.cc4
-rw-r--r--test/numerics/t_balance.h2
-rw-r--r--test/numerics/t_commodity.cc6
-rw-r--r--test/numerics/t_commodity.h2
-rw-r--r--test/utility/t_times.cc2
9 files changed, 28 insertions, 25 deletions
diff --git a/.gitignore b/.gitignore
index b555b748..2006f9c4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,6 +11,7 @@
/.deps
/.libs
/AUTHORS
+/COPYING
/Makefile
/Makefile.in
/acconf.h
diff --git a/Makefile.am b/Makefile.am
index fe7cb3fe..239ade37 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -130,7 +130,7 @@ ledger_CPPFLAGS += -DDEBUG_MODE
endif
ledger_LDFLAGS = -static # for the sake of command-line speed
-info_TEXINFOS = doc/ledger.texi
+info_TEXINFOS = ledger.texi
######################################################################
@@ -174,24 +174,24 @@ endif
check_PROGRAMS = $(TESTS)
-nodist_UnitTests_SOURCES = tests/UnitTests.cc \
+nodist_UnitTests_SOURCES = test/UnitTests.cc \
\
- tests/utility/t_utils.cc \
- tests/utility/t_times.cc \
- tests/numerics/t_commodity.cc \
- tests/numerics/t_amount.cc \
- tests/numerics/t_balance.cc
+ test/utility/t_utils.cc \
+ test/utility/t_times.cc \
+ test/numerics/t_commodity.cc \
+ test/numerics/t_amount.cc \
+ test/numerics/t_balance.cc
-UnitTests_CPPFLAGS = -I$(srcdir)/tests $(libledger_la_CPPFLAGS)
+UnitTests_CPPFLAGS = -I$(srcdir)/test $(libledger_la_CPPFLAGS)
UnitTests_LDFLAGS = $(LIBADD_DL)
-UnitTests_LDADD = $(lib_LTLIBRARIES) gdtoa/libgdtoa.la -lcppunit
+UnitTests_LDADD = $(lib_LTLIBRARIES) -lcppunit
-nodist_PyUnitTests_SOURCES = tests/python/PyUnitTests.py
+nodist_PyUnitTests_SOURCES = test/python/PyUnitTests.py
# jww (2007-05-10): This rule will not be triggered on systems that
# define an EXEEXT.
-PyUnitTests: $(srcdir)/tests/python/PyUnitTests.py
- cat $(srcdir)/tests/python/PyUnitTests.py \
+PyUnitTests: $(srcdir)/test/python/PyUnitTests.py
+ cat $(srcdir)/test/python/PyUnitTests.py \
| sed "s/%srcdir%/$(ESC_srcdir)/g" \
| sed "s/%builddir%/$(ESC_builddir)/g" > $@
chmod 755 $@
@@ -209,10 +209,10 @@ fullcheck: check
DISTCLEANFILES += Doxyfile.gen
-alldocs: docs/ledger.info docs/ledger.pdf doxygen-docs
+alldocs: ledger.info ledger.pdf doxygen-docs
-$(top_builddir)/Doxyfile.gen: $(srcdir)/docs/Doxyfile
- cat $(srcdir)/docs/Doxyfile \
+$(top_builddir)/Doxyfile.gen: $(srcdir)/Doxyfile
+ cat $(srcdir)/Doxyfile \
| sed "s/%srcdir%/$(ESC_srcdir)/g" \
| sed "s/%builddir%/$(ESC_builddir)/g" > $@
diff --git a/test/numerics/t_amount.cc b/test/numerics/t_amount.cc
index 37e7ebae..a96c7e2f 100644
--- a/test/numerics/t_amount.cc
+++ b/test/numerics/t_amount.cc
@@ -4,7 +4,7 @@ CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(AmountTestCase, "numerics");
void AmountTestCase::setUp()
{
- ledger::set_session_context(&session);
+ //ledger::set_session_context(&session);
// Cause the display precision for dollars to be initialized to 2.
amount_t x1("$1.00");
@@ -17,7 +17,7 @@ void AmountTestCase::tearDown()
{
amount_t::stream_fullstrings = false;
- ledger::set_session_context();
+ //ledger::set_session_context();
}
void AmountTestCase::testParser()
diff --git a/test/numerics/t_amount.h b/test/numerics/t_amount.h
index 2d5a327a..86487cd2 100644
--- a/test/numerics/t_amount.h
+++ b/test/numerics/t_amount.h
@@ -52,7 +52,7 @@ class AmountTestCase : public CPPUNIT_NS::TestCase
CPPUNIT_TEST_SUITE_END();
public:
- ledger::session_t session;
+ //ledger::session_t session;
AmountTestCase() {}
virtual ~AmountTestCase() {}
diff --git a/test/numerics/t_balance.cc b/test/numerics/t_balance.cc
index ca759836..2183a081 100644
--- a/test/numerics/t_balance.cc
+++ b/test/numerics/t_balance.cc
@@ -4,7 +4,7 @@ CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(BalanceTestCase, "numerics");
void BalanceTestCase::setUp()
{
- ledger::set_session_context(&session);
+ //ledger::set_session_context(&session);
// Cause the display precision for dollars to be initialized to 2.
amount_t x1("$1.00");
@@ -17,7 +17,7 @@ void BalanceTestCase::tearDown()
{
amount_t::stream_fullstrings = false;
- ledger::set_session_context();
+ //ledger::set_session_context();
}
void BalanceTestCase::testConstructors()
diff --git a/test/numerics/t_balance.h b/test/numerics/t_balance.h
index 7c27f7e8..788a1c11 100644
--- a/test/numerics/t_balance.h
+++ b/test/numerics/t_balance.h
@@ -12,7 +12,7 @@ class BalanceTestCase : public CPPUNIT_NS::TestCase
CPPUNIT_TEST_SUITE_END();
public:
- ledger::session_t session;
+ //ledger::session_t session;
BalanceTestCase() {}
virtual ~BalanceTestCase() {}
diff --git a/test/numerics/t_commodity.cc b/test/numerics/t_commodity.cc
index f9892287..64cddfbb 100644
--- a/test/numerics/t_commodity.cc
+++ b/test/numerics/t_commodity.cc
@@ -3,10 +3,10 @@
CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(CommodityTestCase, "numerics");
void CommodityTestCase::setUp() {
- ledger::set_session_context(&session);
+ //ledger::set_session_context(&session);
}
void CommodityTestCase::tearDown() {
- ledger::set_session_context();
+ //ledger::set_session_context();
}
void CommodityTestCase::testPriceHistory()
@@ -40,7 +40,7 @@ void CommodityTestCase::testPriceHistory()
assertTrue(amt1);
assertEqual(amount_t("$1831.83"), *amt1);
- optional<amount_t> amt2 = x1.value(now);
+ optional<amount_t> amt2 = x1.value(current_moment);
assertTrue(amt2);
assertEqual(amount_t("$2124.12"), *amt2);
diff --git a/test/numerics/t_commodity.h b/test/numerics/t_commodity.h
index ed739751..635b2a61 100644
--- a/test/numerics/t_commodity.h
+++ b/test/numerics/t_commodity.h
@@ -15,7 +15,7 @@ class CommodityTestCase : public CPPUNIT_NS::TestCase
CPPUNIT_TEST_SUITE_END();
public:
- ledger::session_t session;
+ //ledger::session_t session;
CommodityTestCase() {}
virtual ~CommodityTestCase() {}
diff --git a/test/utility/t_times.cc b/test/utility/t_times.cc
index c2d6fe64..05fd34ce 100644
--- a/test/utility/t_times.cc
+++ b/test/utility/t_times.cc
@@ -7,6 +7,7 @@ void DateTimeTestCase::tearDown() {}
void DateTimeTestCase::testConstructors()
{
+#if 0
std::time_t time_t_now = std::time(NULL);
struct tm * moment = std::localtime(&time_t_now);
@@ -76,4 +77,5 @@ void DateTimeTestCase::testConstructors()
interval_t i1;
interval_t i2;
#endif
+#endif
}