summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2006-08-22 09:20:55 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 02:41:33 -0400
commit4691e7ac8e7cdf7e7823327f3caf52829e383cb7 (patch)
tree6eff63c7237699ecd883c73c829cf55bd5fe69c3 /tests
parent04dfda2282bfb3686336600cfafd1d9653369445 (diff)
downloadfork-ledger-4691e7ac8e7cdf7e7823327f3caf52829e383cb7.tar.gz
fork-ledger-4691e7ac8e7cdf7e7823327f3caf52829e383cb7.tar.bz2
fork-ledger-4691e7ac8e7cdf7e7823327f3caf52829e383cb7.zip
*** empty log message ***
Diffstat (limited to 'tests')
-rw-r--r--tests/parser.h20
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());
}