rebuild project for use with md4c library
This commit is contained in:
parent
18fbad5c7d
commit
6d98202f38
135 changed files with 19527 additions and 0 deletions
14
Tests/BlogParserTest.cpp
Normal file
14
Tests/BlogParserTest.cpp
Normal 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
7
Tests/CMakeLists.txt
Normal 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
2
Tests/test.cpp
Normal file
|
@ -0,0 +1,2 @@
|
|||
#include <catch2/catch_test_macros.hpp>
|
||||
#include "BlogParserTest.cpp"
|
Loading…
Add table
Add a link
Reference in a new issue