aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAdrian Kummerländer2014-05-08 20:14:35 +0200
committerAdrian Kummerländer2014-05-08 20:14:35 +0200
commit209f0b2fd9310f503d4599b12483fddc04d1f7dd (patch)
tree6ef70e3d00871ecd122db6e3bce7db6e5477f1f9 /tests
parent168537848c7317f81ba44d0986e6cd7da2afb976 (diff)
downloadInputXSLT-209f0b2fd9310f503d4599b12483fddc04d1f7dd.tar
InputXSLT-209f0b2fd9310f503d4599b12483fddc04d1f7dd.tar.gz
InputXSLT-209f0b2fd9310f503d4599b12483fddc04d1f7dd.tar.bz2
InputXSLT-209f0b2fd9310f503d4599b12483fddc04d1f7dd.tar.lz
InputXSLT-209f0b2fd9310f503d4599b12483fddc04d1f7dd.tar.xz
InputXSLT-209f0b2fd9310f503d4599b12483fddc04d1f7dd.tar.zst
InputXSLT-209f0b2fd9310f503d4599b12483fddc04d1f7dd.zip
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
Diffstat (limited to 'tests')
-rw-r--r--tests/function_read_file.cc43
1 files changed, 0 insertions, 43 deletions
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 <xercesc/dom/DOMDocument.hpp>
-#include <xercesc/dom/DOMImplementation.hpp>
-#include <xercesc/dom/DOMElement.hpp>
-#include <xercesc/dom/DOMText.hpp>
-
-#include <string>
-
-#include "function/base.h"
-#include "function/read_file.h"
-
-typedef std::basic_string<XMLCh> 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<const XMLCh*>(u"content"))
- );
-
- EXPECT_EQ(
- XmlString(domDocument->getDocumentElement()->getFirstChild()->getNodeName()),
- XmlString(reinterpret_cast<const XMLCh*>(u"result"))
- );
-}