Skip to content

Commit

Permalink
Unit test for #485
Browse files Browse the repository at this point in the history
  • Loading branch information
rhaschke committed Oct 13, 2023
1 parent 5f9d0ac commit 212cb6d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions core/test/test_serial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,15 @@ TEST_F(ConnectConnect, FailSucc) {

EXPECT_FALSE(t.plan());
}

// https://github.com/ros-planning/moveit_task_constructor/issues/485
TEST_F(ConnectConnect, NoFailuresLeakingIntoFinalSolution) {
add(t, new GeneratorMockup({ 1.0, 2.0, 3.0 }));
add(t, new Connect());
add(t, new GeneratorMockup({ 10.0, 20.0 }));
add(t, new Connect({ INF, 0.0, 0.0, 0.0 }));
add(t, new GeneratorMockup({ 100.0, 200.0 }));

EXPECT_TRUE(t.plan());
EXPECT_COSTS(t.solutions(), ::testing::ElementsAre(121, 122, 123, 211, 212, 213, 221, 222, 223));
}

0 comments on commit 212cb6d

Please sign in to comment.