From f4c20290509d7ed3a8fd5304577e7a4cc0b9d974 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 3 Apr 2007 03:49:53 +0000 Subject: Ok, no code is left in src, it's all in src/old. We'll gradually move code back into src as it's fixed and re-org'd. This includes tests, which, I may write a unit test system into libbu++ just to make my life easier. --- src/unit/xml/xml.cpp | 59 ---------------------------------------------------- 1 file changed, 59 deletions(-) delete mode 100644 src/unit/xml/xml.cpp (limited to 'src/unit/xml') diff --git a/src/unit/xml/xml.cpp b/src/unit/xml/xml.cpp deleted file mode 100644 index e4d779c..0000000 --- a/src/unit/xml/xml.cpp +++ /dev/null @@ -1,59 +0,0 @@ -#include -#include -#include -#include -#include - -#include "xmlstringreader.h" -#include "xmlexception.h" - -class XmlCoreTestSuite : public Test::Suite -{ -public: - XmlCoreTestSuite() - { - TEST_ADD( XmlCoreTestSuite::badXml01 ) - TEST_ADD( XmlCoreTestSuite::badXml02 ) - TEST_ADD( XmlCoreTestSuite::badXml03 ) - - TEST_ADD( XmlCoreTestSuite::entityBuiltin01 ) - - TEST_ADD( XmlCoreTestSuite::entityDoc01 ) - } - -private: - void badXml01() - { - TEST_THROWS( XmlStringReader r(""), XmlException & ); - } - - void badXml02() - { - TEST_THROWS( XmlStringReader r(""), XmlException & ); - } - - void badXml03() - { - TEST_THROWS( XmlStringReader r("><&'""); - TEST_ASSERT( strcmp( r.getRoot()->getContent(), "><&\'\"" ) == 0 ); - } - - void entityDoc01() - { - XmlStringReader r(""&name;""); - TEST_ASSERT( strcmp( r.getRoot()->getContent(), "\"bob the man\"" ) == 0 ); - } -}; - -int main( int argc, char *argv[] ) -{ - Test::TextOutput output( Test::TextOutput::Verbose ); - XmlCoreTestSuite ts; - return ts.run( output ) ? EXIT_SUCCESS : EXIT_FAILURE; -} - -- cgit v1.2.3