Skip to content

Commit

Permalink
Refactor tests to match profile names
Browse files Browse the repository at this point in the history
  • Loading branch information
rjoomen committed Dec 4, 2024
1 parent 984189a commit 8d4374b
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 60 deletions.
76 changes: 37 additions & 39 deletions tesseract_motion_planners/simple/test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,62 +1,60 @@
find_package(tesseract_command_language REQUIRED)

# SimplePlanner Tests
add_executable(${PROJECT_NAME}_simple_planner_fixed_size_interpolation_unit simple_planner_fixed_size_interpolation.cpp)
target_link_libraries(${PROJECT_NAME}_simple_planner_fixed_size_interpolation_unit PRIVATE GTest::GTest GTest::Main
${PROJECT_NAME}_simple)
target_compile_options(${PROJECT_NAME}_simple_planner_fixed_size_interpolation_unit
add_executable(${PROJECT_NAME}_simple_planner_fixed_size_assign_no_ik_plan_unit
simple_planner_fixed_size_assign_no_ik_plan_unit.cpp)
target_link_libraries(${PROJECT_NAME}_simple_planner_fixed_size_assign_no_ik_plan_unit PRIVATE GTest::GTest GTest::Main
${PROJECT_NAME}_simple)
target_compile_options(${PROJECT_NAME}_simple_planner_fixed_size_assign_no_ik_plan_unit
PRIVATE ${TESSERACT_COMPILE_OPTIONS_PRIVATE} ${TESSERACT_COMPILE_OPTIONS_PUBLIC})
target_compile_definitions(${PROJECT_NAME}_simple_planner_fixed_size_interpolation_unit
target_compile_definitions(${PROJECT_NAME}_simple_planner_fixed_size_assign_no_ik_plan_unit
PRIVATE ${TESSERACT_COMPILE_DEFINITIONS})
target_clang_tidy(${PROJECT_NAME}_simple_planner_fixed_size_interpolation_unit ENABLE ${TESSERACT_ENABLE_CLANG_TIDY})
target_cxx_version(${PROJECT_NAME}_simple_planner_fixed_size_interpolation_unit PRIVATE
target_clang_tidy(${PROJECT_NAME}_simple_planner_fixed_size_assign_no_ik_plan_unit
ENABLE ${TESSERACT_ENABLE_CLANG_TIDY})
target_cxx_version(${PROJECT_NAME}_simple_planner_fixed_size_assign_no_ik_plan_unit PRIVATE
VERSION ${TESSERACT_CXX_VERSION})
target_code_coverage(
${PROJECT_NAME}_simple_planner_fixed_size_interpolation_unit
${PROJECT_NAME}_simple_planner_fixed_size_assign_no_ik_plan_unit
PRIVATE
ALL
EXCLUDE ${COVERAGE_EXCLUDE}
ENABLE ${TESSERACT_ENABLE_CODE_COVERAGE})
add_gtest_discover_tests(${PROJECT_NAME}_simple_planner_fixed_size_interpolation_unit)
add_dependencies(${PROJECT_NAME}_simple_planner_fixed_size_interpolation_unit ${PROJECT_NAME}_simple)
add_dependencies(run_tests ${PROJECT_NAME}_simple_planner_fixed_size_interpolation_unit)
add_gtest_discover_tests(${PROJECT_NAME}_simple_planner_fixed_size_assign_no_ik_plan_unit)
add_dependencies(${PROJECT_NAME}_simple_planner_fixed_size_assign_no_ik_plan_unit ${PROJECT_NAME}_simple)
add_dependencies(run_tests ${PROJECT_NAME}_simple_planner_fixed_size_assign_no_ik_plan_unit)

add_executable(${PROJECT_NAME}_simple_planner_fixed_size_assign_no_ik_position_unit
simple_planner_fixed_size_assign_no_ik_position.cpp)
target_link_libraries(${PROJECT_NAME}_simple_planner_fixed_size_assign_no_ik_position_unit PRIVATE GTest::GTest GTest::Main
${PROJECT_NAME}_simple)
target_compile_options(${PROJECT_NAME}_simple_planner_fixed_size_assign_no_ik_position_unit
PRIVATE ${TESSERACT_COMPILE_OPTIONS_PRIVATE} ${TESSERACT_COMPILE_OPTIONS_PUBLIC})
target_compile_definitions(${PROJECT_NAME}_simple_planner_fixed_size_assign_no_ik_position_unit
PRIVATE ${TESSERACT_COMPILE_DEFINITIONS})
target_clang_tidy(${PROJECT_NAME}_simple_planner_fixed_size_assign_no_ik_position_unit ENABLE ${TESSERACT_ENABLE_CLANG_TIDY})
target_cxx_version(${PROJECT_NAME}_simple_planner_fixed_size_assign_no_ik_position_unit PRIVATE
VERSION ${TESSERACT_CXX_VERSION})
add_executable(${PROJECT_NAME}_simple_planner_fixed_size_plan_unit simple_planner_fixed_size_plan_unit.cpp)
target_link_libraries(${PROJECT_NAME}_simple_planner_fixed_size_plan_unit PRIVATE GTest::GTest GTest::Main
${PROJECT_NAME}_simple)
target_compile_options(${PROJECT_NAME}_simple_planner_fixed_size_plan_unit PRIVATE ${TESSERACT_COMPILE_OPTIONS_PRIVATE}
${TESSERACT_COMPILE_OPTIONS_PUBLIC})
target_compile_definitions(${PROJECT_NAME}_simple_planner_fixed_size_plan_unit PRIVATE ${TESSERACT_COMPILE_DEFINITIONS})
target_clang_tidy(${PROJECT_NAME}_simple_planner_fixed_size_plan_unit ENABLE ${TESSERACT_ENABLE_CLANG_TIDY})
target_cxx_version(${PROJECT_NAME}_simple_planner_fixed_size_plan_unit PRIVATE VERSION ${TESSERACT_CXX_VERSION})
target_code_coverage(
${PROJECT_NAME}_simple_planner_fixed_size_assign_no_ik_position_unit
${PROJECT_NAME}_simple_planner_fixed_size_plan_unit
PRIVATE
ALL
EXCLUDE ${COVERAGE_EXCLUDE}
ENABLE ${TESSERACT_ENABLE_CODE_COVERAGE})
add_gtest_discover_tests(${PROJECT_NAME}_simple_planner_fixed_size_assign_no_ik_position_unit)
add_dependencies(${PROJECT_NAME}_simple_planner_fixed_size_assign_no_ik_position_unit ${PROJECT_NAME}_simple)
add_dependencies(run_tests ${PROJECT_NAME}_simple_planner_fixed_size_assign_no_ik_position_unit)
add_gtest_discover_tests(${PROJECT_NAME}_simple_planner_fixed_size_plan_unit)
add_dependencies(${PROJECT_NAME}_simple_planner_fixed_size_plan_unit ${PROJECT_NAME}_simple)
add_dependencies(run_tests ${PROJECT_NAME}_simple_planner_fixed_size_plan_unit)

add_executable(${PROJECT_NAME}_simple_planner_lvs_interpolation_unit simple_planner_lvs_interpolation.cpp)
target_link_libraries(${PROJECT_NAME}_simple_planner_lvs_interpolation_unit PRIVATE GTest::GTest GTest::Main
${PROJECT_NAME}_simple)
target_compile_options(${PROJECT_NAME}_simple_planner_lvs_interpolation_unit
PRIVATE ${TESSERACT_COMPILE_OPTIONS_PRIVATE} ${TESSERACT_COMPILE_OPTIONS_PUBLIC})
target_compile_definitions(${PROJECT_NAME}_simple_planner_lvs_interpolation_unit
PRIVATE ${TESSERACT_COMPILE_DEFINITIONS})
target_clang_tidy(${PROJECT_NAME}_simple_planner_lvs_interpolation_unit ENABLE ${TESSERACT_ENABLE_CLANG_TIDY})
target_cxx_version(${PROJECT_NAME}_simple_planner_lvs_interpolation_unit PRIVATE VERSION ${TESSERACT_CXX_VERSION})
add_executable(${PROJECT_NAME}_simple_planner_lvs_plan_unit simple_planner_lvs_plan_unit.cpp)
target_link_libraries(${PROJECT_NAME}_simple_planner_lvs_plan_unit PRIVATE GTest::GTest GTest::Main
${PROJECT_NAME}_simple)
target_compile_options(${PROJECT_NAME}_simple_planner_lvs_plan_unit PRIVATE ${TESSERACT_COMPILE_OPTIONS_PRIVATE}
${TESSERACT_COMPILE_OPTIONS_PUBLIC})
target_compile_definitions(${PROJECT_NAME}_simple_planner_lvs_plan_unit PRIVATE ${TESSERACT_COMPILE_DEFINITIONS})
target_clang_tidy(${PROJECT_NAME}_simple_planner_lvs_plan_unit ENABLE ${TESSERACT_ENABLE_CLANG_TIDY})
target_cxx_version(${PROJECT_NAME}_simple_planner_lvs_plan_unit PRIVATE VERSION ${TESSERACT_CXX_VERSION})
target_code_coverage(
${PROJECT_NAME}_simple_planner_lvs_interpolation_unit
${PROJECT_NAME}_simple_planner_lvs_plan_unit
PRIVATE
ALL
EXCLUDE ${COVERAGE_EXCLUDE}
ENABLE ${TESSERACT_ENABLE_CODE_COVERAGE})
add_gtest_discover_tests(${PROJECT_NAME}_simple_planner_lvs_interpolation_unit)
add_dependencies(${PROJECT_NAME}_simple_planner_lvs_interpolation_unit ${PROJECT_NAME}_simple)
add_dependencies(run_tests ${PROJECT_NAME}_simple_planner_lvs_interpolation_unit)
add_gtest_discover_tests(${PROJECT_NAME}_simple_planner_lvs_plan_unit)
add_dependencies(${PROJECT_NAME}_simple_planner_lvs_plan_unit ${PROJECT_NAME}_simple)
add_dependencies(run_tests ${PROJECT_NAME}_simple_planner_lvs_plan_unit)
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @file simple_planner_fixed_size_assign_position.cpp
* @file simple_planner_fixed_size_assign_no_ik_plan_unit.cpp
* @brief
*
* @author Levi Armstrong
Expand Down Expand Up @@ -43,7 +43,7 @@ TESSERACT_COMMON_IGNORE_WARNINGS_POP
using namespace tesseract_environment;
using namespace tesseract_planning;

class TesseractPlanningSimplePlannerFixedSizeAssignNoIKPositionUnit : public ::testing::Test
class TesseractPlanningSimplePlannerFixedSizeAssignNoIKPlanProfileUnit : public ::testing::Test
{
protected:
Environment::Ptr env_;
Expand All @@ -68,7 +68,7 @@ class TesseractPlanningSimplePlannerFixedSizeAssignNoIKPositionUnit : public ::t
}
};

TEST_F(TesseractPlanningSimplePlannerFixedSizeAssignNoIKPositionUnit, JointCartesian_AssignJointPosition) // NOLINT
TEST_F(TesseractPlanningSimplePlannerFixedSizeAssignNoIKPlanProfileUnit, JointCartesian_AssignJointPosition) // NOLINT
{
PlannerRequest request;
request.env = env_;
Expand Down Expand Up @@ -110,7 +110,7 @@ TEST_F(TesseractPlanningSimplePlannerFixedSizeAssignNoIKPositionUnit, JointCarte
EXPECT_EQ(mi.getPathProfile(), instr2.getPathProfile());
}

TEST_F(TesseractPlanningSimplePlannerFixedSizeAssignNoIKPositionUnit, CartesianJoint_AssignJointPosition) // NOLINT
TEST_F(TesseractPlanningSimplePlannerFixedSizeAssignNoIKPlanProfileUnit, CartesianJoint_AssignJointPosition) // NOLINT
{
PlannerRequest request;
request.env = env_;
Expand Down Expand Up @@ -151,7 +151,7 @@ TEST_F(TesseractPlanningSimplePlannerFixedSizeAssignNoIKPositionUnit, CartesianJ
EXPECT_EQ(mi.getPathProfile(), instr2.getPathProfile());
}

TEST_F(TesseractPlanningSimplePlannerFixedSizeAssignNoIKPositionUnit, CartesianCartesian_AssignJointPosition) // NOLINT
TEST_F(TesseractPlanningSimplePlannerFixedSizeAssignNoIKPlanProfileUnit, CartesianCartesian_AssignJointPosition) // NOLINT
{
PlannerRequest request;
request.env = env_;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @file simple_planner_fixed_size_interpolation.cpp
* @file simple_planner_fixed_size_plan_unit.cpp
* @brief
*
* @author Matthew Powelson
Expand Down Expand Up @@ -43,7 +43,7 @@ TESSERACT_COMMON_IGNORE_WARNINGS_POP
using namespace tesseract_environment;
using namespace tesseract_planning;

class TesseractPlanningSimplePlannerFixedSizeInterpolationUnit : public ::testing::Test
class TesseractPlanningSimplePlannerFixedSizePlanProfileUnit : public ::testing::Test
{
protected:
Environment::Ptr env_;
Expand All @@ -68,7 +68,7 @@ class TesseractPlanningSimplePlannerFixedSizeInterpolationUnit : public ::testin
}
};

TEST_F(TesseractPlanningSimplePlannerFixedSizeInterpolationUnit, JointJoint_JointInterpolation) // NOLINT
TEST_F(TesseractPlanningSimplePlannerFixedSizePlanProfileUnit, JointJoint_JointInterpolation) // NOLINT
{
PlannerRequest request;
request.env = env_;
Expand Down Expand Up @@ -110,7 +110,7 @@ TEST_F(TesseractPlanningSimplePlannerFixedSizeInterpolationUnit, JointJoint_Join
EXPECT_TRUE(wp2.getPosition().isApprox(mi.getWaypoint().as<JointWaypointPoly>().getPosition(), 1e-5));
}

TEST_F(TesseractPlanningSimplePlannerFixedSizeInterpolationUnit, JointCart_JointInterpolation) // NOLINT
TEST_F(TesseractPlanningSimplePlannerFixedSizePlanProfileUnit, JointCart_JointInterpolation) // NOLINT
{
PlannerRequest request;
request.env = env_;
Expand Down Expand Up @@ -156,7 +156,7 @@ TEST_F(TesseractPlanningSimplePlannerFixedSizeInterpolationUnit, JointCart_Joint
EXPECT_TRUE(wp2.getTransform().isApprox(final_pose, 1e-3));
}

TEST_F(TesseractPlanningSimplePlannerFixedSizeInterpolationUnit, CartJoint_JointInterpolation) // NOLINT
TEST_F(TesseractPlanningSimplePlannerFixedSizePlanProfileUnit, CartJoint_JointInterpolation) // NOLINT
{
PlannerRequest request;
request.env = env_;
Expand Down Expand Up @@ -199,7 +199,7 @@ TEST_F(TesseractPlanningSimplePlannerFixedSizeInterpolationUnit, CartJoint_Joint
EXPECT_TRUE(wp2.getPosition().isApprox(mi.getWaypoint().as<JointWaypointPoly>().getPosition(), 1e-5));
}

TEST_F(TesseractPlanningSimplePlannerFixedSizeInterpolationUnit, CartCart_JointInterpolation) // NOLINT
TEST_F(TesseractPlanningSimplePlannerFixedSizePlanProfileUnit, CartCart_JointInterpolation) // NOLINT
{
PlannerRequest request;
request.env = env_;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @file simple_planner_fixed_size_interpolation.cpp
* @file simple_planner_lvs_plan_unit.cpp
* @brief
*
* @author Matthew Powelson
Expand Down Expand Up @@ -43,7 +43,7 @@ TESSERACT_COMMON_IGNORE_WARNINGS_POP
using namespace tesseract_environment;
using namespace tesseract_planning;

class TesseractPlanningSimplePlannerLVSInterpolationUnit : public ::testing::Test
class TesseractPlanningSimplePlannerLVSPlanProfileUnit : public ::testing::Test
{
protected:
Environment::Ptr env_;
Expand All @@ -68,7 +68,7 @@ class TesseractPlanningSimplePlannerLVSInterpolationUnit : public ::testing::Tes
}
};

TEST_F(TesseractPlanningSimplePlannerLVSInterpolationUnit, InterpolateStateWaypoint_JointJoint_Freespace) // NOLINT
TEST_F(TesseractPlanningSimplePlannerLVSPlanProfileUnit, InterpolateStateWaypoint_JointJoint_Freespace) // NOLINT
{
PlannerRequest request;
request.env = env_;
Expand Down Expand Up @@ -125,7 +125,7 @@ TEST_F(TesseractPlanningSimplePlannerLVSInterpolationUnit, InterpolateStateWaypo
EXPECT_EQ(cl.size(), steps);
}

TEST_F(TesseractPlanningSimplePlannerLVSInterpolationUnit, InterpolateStateWaypoint_JointJoint_Linear) // NOLINT
TEST_F(TesseractPlanningSimplePlannerLVSPlanProfileUnit, InterpolateStateWaypoint_JointJoint_Linear) // NOLINT
{
PlannerRequest request;
request.env = env_;
Expand Down Expand Up @@ -193,7 +193,7 @@ TEST_F(TesseractPlanningSimplePlannerLVSInterpolationUnit, InterpolateStateWaypo
EXPECT_EQ(crl.size(), rot_steps);
}

TEST_F(TesseractPlanningSimplePlannerLVSInterpolationUnit, InterpolateStateWaypoint_JointCart_Freespace) // NOLINT
TEST_F(TesseractPlanningSimplePlannerLVSPlanProfileUnit, InterpolateStateWaypoint_JointCart_Freespace) // NOLINT
{
PlannerRequest request;
request.env = env_;
Expand Down Expand Up @@ -251,7 +251,7 @@ TEST_F(TesseractPlanningSimplePlannerLVSInterpolationUnit, InterpolateStateWaypo
EXPECT_TRUE(static_cast<int>(cl.size()) > min_steps);
}

TEST_F(TesseractPlanningSimplePlannerLVSInterpolationUnit, InterpolateStateWaypoint_JointCart_Linear) // NOLINT
TEST_F(TesseractPlanningSimplePlannerLVSPlanProfileUnit, InterpolateStateWaypoint_JointCart_Linear) // NOLINT
{
PlannerRequest request;
request.env = env_;
Expand Down Expand Up @@ -320,7 +320,7 @@ TEST_F(TesseractPlanningSimplePlannerLVSInterpolationUnit, InterpolateStateWaypo
EXPECT_EQ(crl.size(), rot_steps);
}

TEST_F(TesseractPlanningSimplePlannerLVSInterpolationUnit, InterpolateStateWaypoint_CartJoint_Freespace) // NOLINT
TEST_F(TesseractPlanningSimplePlannerLVSPlanProfileUnit, InterpolateStateWaypoint_CartJoint_Freespace) // NOLINT
{
PlannerRequest request;
request.env = env_;
Expand Down Expand Up @@ -377,7 +377,7 @@ TEST_F(TesseractPlanningSimplePlannerLVSInterpolationUnit, InterpolateStateWaypo
EXPECT_TRUE(static_cast<int>(cl.size()) > min_steps);
}

TEST_F(TesseractPlanningSimplePlannerLVSInterpolationUnit, InterpolateStateWaypoint_CartJoint_Linear) // NOLINT
TEST_F(TesseractPlanningSimplePlannerLVSPlanProfileUnit, InterpolateStateWaypoint_CartJoint_Linear) // NOLINT
{
PlannerRequest request;
request.env = env_;
Expand Down Expand Up @@ -446,7 +446,7 @@ TEST_F(TesseractPlanningSimplePlannerLVSInterpolationUnit, InterpolateStateWaypo
EXPECT_EQ(crl.size(), rot_steps);
}

TEST_F(TesseractPlanningSimplePlannerLVSInterpolationUnit, InterpolateStateWaypoint_CartCart_Freespace) // NOLINT
TEST_F(TesseractPlanningSimplePlannerLVSPlanProfileUnit, InterpolateStateWaypoint_CartCart_Freespace) // NOLINT
{
PlannerRequest request;
request.env = env_;
Expand Down Expand Up @@ -505,7 +505,7 @@ TEST_F(TesseractPlanningSimplePlannerLVSInterpolationUnit, InterpolateStateWaypo
EXPECT_TRUE(static_cast<int>(cl.size()) > min_steps);
}

TEST_F(TesseractPlanningSimplePlannerLVSInterpolationUnit, InterpolateStateWaypoint_CartCart_Linear) // NOLINT
TEST_F(TesseractPlanningSimplePlannerLVSPlanProfileUnit, InterpolateStateWaypoint_CartCart_Linear) // NOLINT
{
PlannerRequest request;
request.env = env_;
Expand Down

0 comments on commit 8d4374b

Please sign in to comment.