mirror of
https://github.com/pantor/inja.git
synced 2026-04-05 23:58:53 +00:00
code cleaning, add condition operators
This commit is contained in:
@@ -169,7 +169,14 @@ TEST_CASE("Parse conditions") {
|
||||
SECTION("Elements") {
|
||||
CHECK( env.parse_condition("age", data) );
|
||||
CHECK_FALSE( env.parse_condition("size", data) );
|
||||
}
|
||||
|
||||
SECTION("Operators") {
|
||||
CHECK( env.parse_condition("not size", data) );
|
||||
CHECK_FALSE( env.parse_condition("not true", data) );
|
||||
CHECK( env.parse_condition("true and true", data) );
|
||||
CHECK( env.parse_condition("true or false", data) );
|
||||
CHECK_FALSE( env.parse_condition("true and not true", data) );
|
||||
}
|
||||
|
||||
SECTION("Numbers") {
|
||||
|
||||
Reference in New Issue
Block a user