Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
perception
imagine-planner
Commits
ddad1751
Commit
ddad1751
authored
Jan 26, 2018
by
Alejandro Suarez Hernandez
Browse files
fixed small issue in one of the tests
parent
18f34216
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/examples/types_test.cpp
View file @
ddad1751
...
...
@@ -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"
)},
{});
...
...
src/types.h
View file @
ddad1751
...
...
@@ -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
();
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment