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

@ -8,4 +8,5 @@ set(CMAKE_CXX_STANDARD_REQUIRED True)
link_libraries(stdc++fs)
add_subdirectory(src)
add_subdirectory(apps)
add_subdirectory(apps)
add_subdirectory(test)

View file

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

View file

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

View file

@ -1,8 +1,9 @@
#pragma once
#include <memory>
#include <string>
#include "XmlElement.h"
#include "XmlProlog.h"
#include "xml-elements/XmlElement.h"
#include "xml-elements/XmlProlog.h"
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 <vector>
#include <string>
#include "XmlAttribute.h"
#include "xml-elements/XmlAttribute.h"
class XmlElement
{

View file

@ -1,7 +1,8 @@
#pragma once
#include <memory>
#include <vector>
#include "XmlElement.h"
#include "xml-elements/XmlElement.h"
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;
}