improve array handling

This commit is contained in:
pantor
2017-11-18 21:05:47 +01:00
parent 09238ec1d7
commit 06d1f700c1
2 changed files with 4 additions and 8 deletions

View File

@@ -248,7 +248,7 @@ TEST_CASE("Parse functions") {
SECTION("Length") {
CHECK( env.eval_variable("length(names)", data) == 4 );
CHECK_THROWS_WITH( env.eval_variable("length(5)", data), "[inja.exception.type_error.302] type must be array" );
CHECK_THROWS_WITH( env.eval_variable("length(5)", data), "[json.exception.type_error.302] type must be array, but is number" );
}
SECTION("Round") {