From 209f0b2fd9310f503d4599b12483fddc04d1f7dd Mon Sep 17 00:00:00 2001 From: Adrian Kummerländer Date: Thu, 8 May 2014 20:14:35 +0200 Subject: Removed gtest based test cases and added program options * selectively testing document construction in plain C++ code has turned out to be more work than worth it ** i.e. removed test cases and GTest dependency * added boost::program_options based frontent to InputXSLT ** example command: "./test --transformation ../dummy/transform.xsl --target out.xml" ** the plan is to use a simple shell script that generated test transformations and compares the output to reference files --- tests/function_read_file.cc | 43 ------------------------------------------- 1 file changed, 43 deletions(-) delete mode 100644 tests/function_read_file.cc (limited to 'tests/function_read_file.cc') diff --git a/tests/function_read_file.cc b/tests/function_read_file.cc deleted file mode 100644 index e0bb8da..0000000 --- a/tests/function_read_file.cc +++ /dev/null @@ -1,43 +0,0 @@ -#include "gtest/gtest.h" - -#include -#include -#include -#include - -#include - -#include "function/base.h" -#include "function/read_file.h" - -typedef std::basic_string XmlString; - -class FunctionReadFileTest : public ::testing::Test { - friend InputXSLT::FunctionReadFile; -}; - -TEST_F(FunctionReadFileTest, constructDocumentTest) { - const InputXSLT::FilesystemContext fsContext("../tests"); - const boost::filesystem::path filePath( - fsContext.resolve("./function_read_file.cc") - ); - - InputXSLT::FunctionReadFile function; - - xercesc::DOMDocument* const domDocument = function.constructDocument( - fsContext, - filePath - ); - - EXPECT_NE(domDocument, nullptr); - - EXPECT_EQ( - XmlString(domDocument->getDocumentElement()->getNodeName()), - XmlString(reinterpret_cast(u"content")) - ); - - EXPECT_EQ( - XmlString(domDocument->getDocumentElement()->getFirstChild()->getNodeName()), - XmlString(reinterpret_cast(u"result")) - ); -} -- cgit v1.2.3