aboutsummaryrefslogtreecommitdiff
path: root/tests/function_read_file.cc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/function_read_file.cc')
-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"))
- );
-}