diff options
Diffstat (limited to 'tests/parser.h')
-rw-r--r-- | tests/parser.h | 20 |
1 files changed, 9 insertions, 11 deletions
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 <cxxtest/TestSuite.h> -#include <textual.h> -#include <xml.h> -#include <binary.h> -#include <gnucash.h> -#include <qif.h> +#include <ledger.h> 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()); } |