mirror of
https://github.com/pantor/inja.git
synced 2026-02-17 09:03:58 +00:00
Fix not rendering uint64_t values greater than the int64_t max value (#278)
* Fix not properly rendering uint64_t values greater than the int64_t max value * Move render check to variables subcase
This commit is contained in:
@@ -18,6 +18,7 @@ TEST_CASE("types") {
|
||||
data["relatives"]["brother"] = "Chris";
|
||||
data["relatives"]["sister"] = "Jenny";
|
||||
data["vars"] = {2, 3, 4, 0, -1, -2, -3};
|
||||
data["max_value"] = 18446744073709551615ull;
|
||||
|
||||
SUBCASE("basic") {
|
||||
CHECK(env.render("", data) == "");
|
||||
@@ -38,6 +39,7 @@ TEST_CASE("types") {
|
||||
CHECK(env.render("{{ \"{{ no_value }}\" }}", data) == "{{ no_value }}");
|
||||
CHECK(env.render("{{ @name }}", data) == "@name");
|
||||
CHECK(env.render("{{ $name }}", data) == "$name");
|
||||
CHECK(env.render("{{max_value}}", data) == "18446744073709551615");
|
||||
|
||||
CHECK_THROWS_WITH(env.render("{{unknown}}", data), "[inja.exception.render_error] (at 1:3) variable 'unknown' not found");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user