Skip to content

Commit

Permalink
add test for negated comp expression
Browse files Browse the repository at this point in the history
  • Loading branch information
Rezenders committed Sep 12, 2024
1 parent 565886d commit 2b6f143
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions plansys2_problem_expert/test/unit/utils_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,22 @@ TEST(utils, evaluate_not)
ASSERT_EQ(
plansys2::evaluate(test_tree, problem_client, predicates, functions, false, true),
std::make_tuple(true, false, 0));

plansys2_msgs::msg::Tree test_tree2;
parser::pddl::fromString(
test_tree2, "(not (= wp1 wp2))");

ASSERT_EQ(
plansys2::evaluate(test_tree2, problem_client, predicates, functions, false, true),
std::make_tuple(true, true, 0));

plansys2_msgs::msg::Tree test_tree3;
parser::pddl::fromString(
test_tree3, "(not (= wp1 wp1))");

ASSERT_EQ(
plansys2::evaluate(test_tree3, problem_client, predicates, functions, false, true),
std::make_tuple(true, false, 0));
}

TEST(utils, evaluate_predicate_use_state)
Expand Down

0 comments on commit 2b6f143

Please sign in to comment.