Clean up some test files.

This commit is contained in:
James Grogan 2022-11-30 18:28:50 +00:00
parent 1adc9272f8
commit b45385e8c7
51 changed files with 485 additions and 281 deletions

View file

@ -0,0 +1,9 @@
set(COMPILER_UNIT_TEST_FILES
compiler/TestTemplatingEngine.cpp
PARENT_SCOPE
)
set(COMPILER_UNIT_TEST_DEPENDENCIES
compiler
PARENT_SCOPE
)

View file

@ -1,6 +1,6 @@
#include "TemplatingEngine.h"
#include <File.h>
#include "File.h"
#include "TestFramework.h"
#include <filesystem>
@ -8,12 +8,12 @@
TEST_CASE(TestTemplatingEngine, "compiler")
{
const auto data_loc = std::filesystem::path(__FILE__) / "../../data";
const auto data_loc = std::filesystem::path(__FILE__) / "../../data";
auto engine = TemplatingEngine(data_loc);
engine.loadTemplateFiles();
const auto content = engine.processTemplate("index");
auto engine = TemplatingEngine(data_loc);
engine.loadTemplateFiles();
const auto content = engine.processTemplate("index");
File outfile("index.html");
outfile.WriteText(content);
File outfile("index.html");
outfile.WriteText(content);
}