From 4691e7ac8e7cdf7e7823327f3caf52829e383cb7 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Tue, 22 Aug 2006 09:20:55 +0000 Subject: *** empty log message *** --- Makefile.am | 2 +- tests/parser.h | 20 +++++++++----------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/Makefile.am b/Makefile.am index 8a50450c..1d81d92f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -158,7 +158,7 @@ alltests: alltests.cc ledger alltests.cc -L. -L.libs -lamounts -lledger runtests: alltests - ./alltests && tests/regress && tests/regtest + LD_LIBRARY_PATH=.libs ./alltests && tests/regress && tests/regtest verify: runtests python tests/runtests.py diff --git a/tests/parser.h b/tests/parser.h index 65acadb5..439d478f 100644 --- a/tests/parser.h +++ b/tests/parser.h @@ -3,11 +3,7 @@ #include -#include -#include -#include -#include -#include +#include using namespace std; using namespace ledger; @@ -24,6 +20,7 @@ public: TS_ASSERT_EQUALS(0, emptyStream.tellg()); } +#if defined(HAVE_EXPAT) || defined(HAVE_XMLPARSE) void testEmptyFileIsNotXMLFile() { stringstream emptyStream(stringstream::in); @@ -33,20 +30,21 @@ public: TS_ASSERT_EQUALS(0, emptyStream.tellg()); } - void testEmptyFileIsNotBinaryFile() + void testEmptyFileIsNotGnuCashFile() { stringstream emptyStream(stringstream::in); - binary_parser_t binaryParser; - TS_ASSERT(!binaryParser.test(emptyStream)); + gnucash_parser_t gnucashParser; + TS_ASSERT(!gnucashParser.test(emptyStream)); TS_ASSERT(emptyStream.good()); TS_ASSERT_EQUALS(0, emptyStream.tellg()); } +#endif - void testEmptyFileIsNotGnuCashFile() + void testEmptyFileIsNotBinaryFile() { stringstream emptyStream(stringstream::in); - gnucash_parser_t gnucashParser; - TS_ASSERT(!gnucashParser.test(emptyStream)); + binary_parser_t binaryParser; + TS_ASSERT(!binaryParser.test(emptyStream)); TS_ASSERT(emptyStream.good()); TS_ASSERT_EQUALS(0, emptyStream.tellg()); } -- cgit v1.2.3