rebuild project for use with md4c library

This commit is contained in:
Rosia E Evans 2023-09-15 13:00:49 +01:00
parent 18fbad5c7d
commit 6d98202f38
135 changed files with 19527 additions and 0 deletions

14
Tests/BlogParserTest.cpp Normal file
View file

@ -0,0 +1,14 @@
#include <catch2/catch_test_macros.hpp>
#include "../Src/BlogParser.cpp"
TEST_CASE("Basic Test")
{
BlogParser* parser = new BlogParser();
REQUIRE(parser->ParseText("hello") == "hello");
}
TEST_CASE("Parser returns valid HTML with basic component")
{
BlogParser* parser = new BlogParser();
REQUIRE(parser->ParseText("#header \n no header") == "<h1>header</h1>no header");
}

7
Tests/CMakeLists.txt Normal file
View file

@ -0,0 +1,7 @@
find_package(Catch2 3 REQUIRED)
add_executable(tests test.cpp)
target_include_directories(tests PRIVATE ../Src)
target_link_libraries(tests PRIVATE Catch2::Catch2WithMain)

2
Tests/test.cpp Normal file
View file

@ -0,0 +1,2 @@
#include <catch2/catch_test_macros.hpp>
#include "BlogParserTest.cpp"