clang-tidy applied and CMake installation of the single header added (#287)

* Fixed headers and linter marks applied

Headers were wrong.
Applied some linter suggestions. There are still many left.

* CMake adjusted for single header

CMake can now install the single header.
Removed an unneeded header.

---------

Co-authored-by: Berscheid <1885260+pantor@users.noreply.github.com>
This commit is contained in:
Matheus Werny
2024-10-05 09:36:11 +02:00
committed by GitHub
parent 1281271fda
commit 92994bec0a
17 changed files with 163 additions and 71 deletions
+9 -1
View File
@@ -1,5 +1,13 @@
// Copyright (c) 2020 Pantor. All rights reserved.
#include <doctest/doctest.h>
#include <string>
#include "inja/environment.hpp"
#include "inja/function_storage.hpp"
#include "inja/inja.hpp"
#include "inja/utils.hpp"
TEST_CASE("source location") {
std::string content = R""""(Lorem Ipsum
Dolor
@@ -42,7 +50,7 @@ TEST_CASE("copy environment") {
CHECK(copy.render(test_tpl, inja::json()) == "4");
// overwrite template in source env
inja::Template t2 = env.parse("{{ double(4) }}");
const inja::Template t2 = env.parse("{{ double(4) }}");
env.include_template("tpl", t2);
REQUIRE(env.render(test_tpl, inja::json()) == "8");