From 289cc97d45bbd3a8cdfcc3371ade71715b75b000 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sat, 12 Apr 2008 01:37:50 -0400 Subject: Exchanged old test files for the new testing code in was-v3.0. --- tests/parser.h | 65 ---------------------------------------------------------- 1 file changed, 65 deletions(-) delete mode 100644 tests/parser.h (limited to 'tests/parser.h') 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 - -#include - -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 -- cgit v1.2.3