mirror of
https://github.com/moveit/moveit_task_constructor.git
synced 2025-11-04 14:49:57 +08:00
add (failing) simple pruning test
to validate propagators do not compute disabled solutions. It's also good to have a simpler test around than 2 connects.
This commit is contained in:
parent
9cf3c01b9a
commit
3e5e1da429
@ -182,6 +182,22 @@ TEST(ConnectConnect, FailSucc) {
|
|||||||
EXPECT_FALSE(t.plan());
|
EXPECT_FALSE(t.plan());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST(Pruning, PropagatorFailure) {
|
||||||
|
resetIds();
|
||||||
|
Task t;
|
||||||
|
t.setRobotModel(getModel());
|
||||||
|
BackwardMockup* b;
|
||||||
|
t.add(Stage::pointer(b = new BackwardMockup()));
|
||||||
|
t.add(Stage::pointer(new GeneratorMockup({ 0 })));
|
||||||
|
t.add(Stage::pointer(new ForwardMockup({ inf })));
|
||||||
|
|
||||||
|
t.plan();
|
||||||
|
|
||||||
|
ASSERT_EQ(t.solutions().size(), 0);
|
||||||
|
// ForwardMockup fails, so the backward stage should never compute
|
||||||
|
EXPECT_EQ(b->calls_, 0);
|
||||||
|
}
|
||||||
|
|
||||||
TEST(Pruning, PruningMultiForward) {
|
TEST(Pruning, PruningMultiForward) {
|
||||||
resetIds();
|
resetIds();
|
||||||
Task t;
|
Task t;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user