mirror of
https://github.com/pantor/inja.git
synced 2026-06-03 09:29:45 +00:00
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:
+9
-1
@@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user