Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
loco-3d
Multicontact-api
Commits
c82cf22d
Commit
c82cf22d
authored
Dec 09, 2019
by
Pierre Fernbach
Browse files
[Tests] adapt to changes in contactPhase (set -> vector)
parent
9c2b6983
Changes
1
Hide whitespace changes
Inline
Side-by-side
unittest/scenario.cpp
View file @
c82cf22d
...
...
@@ -233,7 +233,8 @@ void explicitContactPhaseAssertEqual(ContactPhase& cp1, ContactPhase& cp2){
BOOST_CHECK
(
cp1
.
effectorTrajectories
()
==
cp2
.
effectorTrajectories
());
BOOST_CHECK
(
cp1
.
effectorsInContact
()
==
cp2
.
effectorsInContact
());
BOOST_CHECK
(
cp1
.
contactPatches
()
==
cp2
.
contactPatches
());
for
(
std
::
set
<
std
::
string
>::
const_iterator
ee
=
cp1
.
effectorsInContact
().
begin
()
;
ee
!=
cp1
.
effectorsInContact
().
end
()
;
++
ee
){
const
ContactPhase
::
t_strings
eeNames
=
cp2
.
effectorsInContact
();
for
(
ContactPhase
::
t_strings
::
const_iterator
ee
=
eeNames
.
begin
()
;
ee
!=
eeNames
.
end
()
;
++
ee
){
std
::
cout
<<
"## For effector "
<<*
ee
<<
std
::
endl
;
BOOST_CHECK
(
cp2
.
isEffectorInContact
(
*
ee
));
BOOST_CHECK
(
cp1
.
contactPatch
(
*
ee
)
==
cp2
.
contactPatch
(
*
ee
));
...
...
@@ -665,8 +666,6 @@ BOOST_AUTO_TEST_CASE(contact_phase)
}
BOOST_CHECK
(
num_eff_traj
==
2
);
BOOST_CHECK
(
cp2
.
effectorsWithTrajectory
().
size
()
==
2
);
BOOST_CHECK
(
cp2
.
effectorsWithTrajectory
().
count
(
"right_leg"
));
BOOST_CHECK
(
cp2
.
effectorsWithTrajectory
().
count
(
"knee"
));
BOOST_CHECK
(
cp2
.
effectorHaveAtrajectory
(
"knee"
));
BOOST_CHECK
(
cp2
.
effectorHaveAtrajectory
(
"right_leg"
));
BOOST_CHECK
(
!
cp2
.
effectorHaveAtrajectory
(
"left_leg"
));
...
...
Write
Preview
Markdown
is supported
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