diff options
author | John Wiegley <johnw@newartisans.com> | 2008-04-12 01:37:50 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-05-08 02:50:18 -0400 |
commit | 289cc97d45bbd3a8cdfcc3371ade71715b75b000 (patch) | |
tree | 2b1ab8575232260c4eb779282e03f64783ccb756 /tests/parser.h | |
parent | 627769ccc88ae15c92c5c2e5896bb1d96f52e385 (diff) | |
download | fork-ledger-289cc97d45bbd3a8cdfcc3371ade71715b75b000.tar.gz fork-ledger-289cc97d45bbd3a8cdfcc3371ade71715b75b000.tar.bz2 fork-ledger-289cc97d45bbd3a8cdfcc3371ade71715b75b000.zip |
Exchanged old test files for the new testing code in was-v3.0.
Diffstat (limited to 'tests/parser.h')
-rw-r--r-- | tests/parser.h | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/tests/parser.h b/tests/parser.h deleted file mode 100644 index aa1a3a74..00000000 --- a/tests/parser.h +++ /dev/null @@ -1,65 +0,0 @@ -#ifndef __TESTFILEFORMAT_H -#define __TESTFILEFORMAT_H - -#include <cxxtest/TestSuite.h> - -#include <ledger.h> - -using namespace std; -using namespace ledger; - -class TestFileFormat : public CxxTest::TestSuite -{ -public: - void testEmptyFileIsTextualFile() - { - stringstream emptyStream(stringstream::in); - textual_parser_t textualParser; - TS_ASSERT(textualParser.test(emptyStream)); - TS_ASSERT(emptyStream.good()); - TS_ASSERT_EQUALS(0, emptyStream.tellg()); - } - - void testEmptyFileIsNotXMLFile() - { -#if defined(HAVE_EXPAT) || defined(HAVE_XMLPARSE) - stringstream emptyStream(stringstream::in); - xml_parser_t xmlParser; - TS_ASSERT(!xmlParser.test(emptyStream)); - TS_ASSERT(emptyStream.good()); - TS_ASSERT_EQUALS(0, emptyStream.tellg()); -#endif - } - - void testEmptyFileIsNotGnuCashFile() - { -#if defined(HAVE_EXPAT) || defined(HAVE_XMLPARSE) - stringstream emptyStream(stringstream::in); - gnucash_parser_t gnucashParser; - TS_ASSERT(!gnucashParser.test(emptyStream)); - TS_ASSERT(emptyStream.good()); - TS_ASSERT_EQUALS(0, emptyStream.tellg()); -#endif - } - - void testEmptyFileIsNotBinaryFile() - { - stringstream emptyStream(stringstream::in); - binary_parser_t binaryParser; - TS_ASSERT(!binaryParser.test(emptyStream)); - TS_ASSERT(emptyStream.good()); - TS_ASSERT_EQUALS(0, emptyStream.tellg()); - } - - void testEmptyFileIsNotQIFFile() - { - stringstream emptyStream(stringstream::in); - qif_parser_t qifParser; - TS_ASSERT(!qifParser.test(emptyStream)); - TS_ASSERT(emptyStream.good()); - TS_ASSERT_EQUALS(0, emptyStream.tellg()); - } - -}; - -#endif // __TESTFILEFORMAT_H |