Move xml tools to uptr, start adding test setup.

This commit is contained in:
jmsgrogan 2020-06-07 18:11:36 +01:00
parent 8771b721d1
commit e0eccba62f
14 changed files with 44 additions and 9 deletions

View file

@ -9,3 +9,4 @@ link_libraries(stdc++fs)
add_subdirectory(src) add_subdirectory(src)
add_subdirectory(apps) add_subdirectory(apps)
add_subdirectory(test)

View file

@ -1,9 +1,10 @@
list(APPEND web_LIB_INCLUDES list(APPEND web_LIB_INCLUDES
xml/XmlParser.cpp xml/XmlParser.cpp
xml/XmlDocument.cpp xml/XmlDocument.cpp
xml/XmlElement.cpp xml/XmlWriter.cpp
xml/XmlAttribute.cpp xml/xml-elements/XmlElement.cpp
xml/XmlProlog.cpp xml/xml-elements/XmlAttribute.cpp
xml/xml-elements/XmlProlog.cpp
markdown/MarkdownParser.cpp markdown/MarkdownParser.cpp
html/HtmlWriter.cpp html/HtmlWriter.cpp
html/HtmlDocument.cpp html/HtmlDocument.cpp
@ -18,6 +19,7 @@ target_include_directories(web PUBLIC
"${PROJECT_SOURCE_DIR}/src/core/file_utilities" "${PROJECT_SOURCE_DIR}/src/core/file_utilities"
"${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}"
"${CMAKE_CURRENT_SOURCE_DIR}/xml" "${CMAKE_CURRENT_SOURCE_DIR}/xml"
"${CMAKE_CURRENT_SOURCE_DIR}/xml/xml-elements"
"${CMAKE_CURRENT_SOURCE_DIR}/html" "${CMAKE_CURRENT_SOURCE_DIR}/html"
"${CMAKE_CURRENT_SOURCE_DIR}/markdown" "${CMAKE_CURRENT_SOURCE_DIR}/markdown"
) )

View file

@ -1,6 +1,7 @@
#pragma once #pragma once
#include <memory> #include <memory>
#include "XmlElement.h"
#include "../xml/xml-elements/XmlElement.h"
class HtmlElement : public XmlElement class HtmlElement : public XmlElement
{ {

View file

@ -1,8 +1,9 @@
#pragma once #pragma once
#include <memory> #include <memory>
#include <string> #include <string>
#include "XmlElement.h"
#include "XmlProlog.h" #include "xml-elements/XmlElement.h"
#include "xml-elements/XmlProlog.h"
class XmlDocument class XmlDocument
{ {

View file

@ -0,0 +1,6 @@
#include "XmlWriter.h"
void XmlWriter::Write(File* file, XmlDocument* document)
{
}

12
src/web/xml/XmlWriter.h Normal file
View file

@ -0,0 +1,12 @@
#pragma once
#include "File.h"
#include "XmlDocument.h"
class XmlWriter
{
public:
XmlWriter() = default;
void Write(File* file, XmlDocument* document);
};

View file

@ -2,7 +2,8 @@
#include <memory> #include <memory>
#include <vector> #include <vector>
#include <string> #include <string>
#include "XmlAttribute.h"
#include "xml-elements/XmlAttribute.h"
class XmlElement class XmlElement
{ {

View file

@ -1,7 +1,8 @@
#pragma once #pragma once
#include <memory> #include <memory>
#include <vector> #include <vector>
#include "XmlElement.h"
#include "xml-elements/XmlElement.h"
class XmlProlog : public XmlElement class XmlProlog : public XmlElement
{ {

6
test/CMakeLists.txt Normal file
View file

@ -0,0 +1,6 @@
add_executable(test_runner test_runner.cpp)
target_include_directories(test_runner PUBLIC
"${PROJECT_SOURCE_DIR}/test/"
)
target_link_libraries(test_runner PUBLIC core
network database geometry audio graphics web)

4
test/test_runner.cpp Normal file
View file

@ -0,0 +1,4 @@
int main()
{
return 0;
}