use central throw function

This commit is contained in:
pantor
2018-02-24 14:50:38 +01:00
parent 86f310038d
commit 7e32e8bcfe
3 changed files with 60 additions and 48 deletions
+2 -5
View File
@@ -5,8 +5,8 @@
TEST_CASE("dot to pointer") {
CHECK( inja::dot_to_json_pointer_notation("person.names.surname") == "/person/names/surname" );
CHECK( inja::dot_to_json_pointer_notation("guests.2") == "/guests/2" );
CHECK( inja::Parser::dot_to_json_pointer_notation("person.names.surname") == "/person/names/surname" );
CHECK( inja::Parser::dot_to_json_pointer_notation("guests.2") == "/guests/2" );
}
TEST_CASE("basic-search") {
@@ -155,9 +155,6 @@ TEST_CASE("match-functions") {
CHECK( inja::match(" upper(lower()) ", map_regex).type() == inja::Parsed::Function::Upper );
CHECK( inja::match("lower(upper(test))", map_regex).type() == inja::Parsed::Function::Lower );
CHECK( inja::match("round(2, 3)", map_regex).type() == inja::Parsed::Function::Round );
// CHECK_THROWS_WITH( inja::match("test(var)", map_regex), "Could not match input: test(var)" );
// CHECK_THROWS_WITH( inja::match("round(var)", map_regex), "Could not match input: round(var)" );
}
TEST_CASE("create-regex-functions") {