Commit ddad1751 authored by Alejandro Suarez Hernandez's avatar Alejandro Suarez Hernandez
Browse files

fixed small issue in one of the tests

parent 18f34216
......@@ -260,7 +260,7 @@ BOOST_AUTO_TEST_CASE(substitution_test)
BOOST_AUTO_TEST_CASE(planstate_test)
{
PlanState state{Predicate("p", "x", "y"), Predicate("q", "y"), Predicate("r")};
PlanState state({Predicate("p", "x", "y"), Predicate("q", "y"), Predicate("r")});
PlanState state_(state), state__(state);
PlanState state2(state);
state__.remove(Predicate("p", "x", "y"));
......@@ -280,7 +280,7 @@ BOOST_AUTO_TEST_CASE(planstate_test)
BOOST_AUTO_TEST_CASE(goal_condition)
{
PlanState state{Predicate("p", "x", "y"), Predicate("q", "y"), Predicate("r")};
PlanState state({Predicate("p", "x", "y"), Predicate("q", "y"), Predicate("r")});
GoalCondition goal_condition1({Predicate("q", "y")}, {Predicate("p", "x", "y")});
GoalCondition goal_condition2({Predicate("q", "y")}, {Predicate("q", "x")});
GoalCondition goal_condition3({Predicate("r")}, {});
......
......@@ -348,11 +348,12 @@ class PlanState : public Stringifiable,
return std::make_shared<PlanState>(predicates);
}
PlanState(std::initializer_list<Predicate> il={})
: predicates_(il), hash_cached_(false) {}
PlanState(const Container& predicates)
: predicates_(predicates), hash_cached_(false) {}
template <typename InputIterator>
PlanState(InputIterator begin, InputIterator end) :
predicates_(begin, end) {}
virtual std::string to_str() const override;
......@@ -385,10 +386,6 @@ class PlanState : public Stringifiable,
predicates_.erase(predicate);
}
template <typename InputIterator>
PlanState(InputIterator begin, InputIterator end) :
predicates_(begin, end) {}
CIter begin() const { return predicates_.begin(); }
CIter end() const { return predicates_.end(); }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment