From 8d4374b38528c74bd7b6a4af4a3fcfa38469ac7e Mon Sep 17 00:00:00 2001 From: Roelof Oomen Date: Wed, 4 Dec 2024 11:13:11 +0100 Subject: [PATCH] Refactor tests to match profile names --- .../simple/test/CMakeLists.txt | 76 +++++++++---------- ...ner_fixed_size_assign_no_ik_plan_unit.cpp} | 10 +-- ...> simple_planner_fixed_size_plan_unit.cpp} | 12 +-- ...n.cpp => simple_planner_lvs_plan_unit.cpp} | 20 ++--- 4 files changed, 58 insertions(+), 60 deletions(-) rename tesseract_motion_planners/simple/test/{simple_planner_fixed_size_assign_no_ik_position.cpp => simple_planner_fixed_size_assign_no_ik_plan_unit.cpp} (93%) rename tesseract_motion_planners/simple/test/{simple_planner_fixed_size_interpolation.cpp => simple_planner_fixed_size_plan_unit.cpp} (94%) rename tesseract_motion_planners/simple/test/{simple_planner_lvs_interpolation.cpp => simple_planner_lvs_plan_unit.cpp} (96%) diff --git a/tesseract_motion_planners/simple/test/CMakeLists.txt b/tesseract_motion_planners/simple/test/CMakeLists.txt index da08e3a787..f94c1e5ea6 100644 --- a/tesseract_motion_planners/simple/test/CMakeLists.txt +++ b/tesseract_motion_planners/simple/test/CMakeLists.txt @@ -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) diff --git a/tesseract_motion_planners/simple/test/simple_planner_fixed_size_assign_no_ik_position.cpp b/tesseract_motion_planners/simple/test/simple_planner_fixed_size_assign_no_ik_plan_unit.cpp similarity index 93% rename from tesseract_motion_planners/simple/test/simple_planner_fixed_size_assign_no_ik_position.cpp rename to tesseract_motion_planners/simple/test/simple_planner_fixed_size_assign_no_ik_plan_unit.cpp index 9fb06f7353..a150dddf92 100644 --- a/tesseract_motion_planners/simple/test/simple_planner_fixed_size_assign_no_ik_position.cpp +++ b/tesseract_motion_planners/simple/test/simple_planner_fixed_size_assign_no_ik_plan_unit.cpp @@ -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 @@ -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_; @@ -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_; @@ -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_; @@ -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_; diff --git a/tesseract_motion_planners/simple/test/simple_planner_fixed_size_interpolation.cpp b/tesseract_motion_planners/simple/test/simple_planner_fixed_size_plan_unit.cpp similarity index 94% rename from tesseract_motion_planners/simple/test/simple_planner_fixed_size_interpolation.cpp rename to tesseract_motion_planners/simple/test/simple_planner_fixed_size_plan_unit.cpp index 2ff99cffb9..77ea5ed48b 100644 --- a/tesseract_motion_planners/simple/test/simple_planner_fixed_size_interpolation.cpp +++ b/tesseract_motion_planners/simple/test/simple_planner_fixed_size_plan_unit.cpp @@ -1,5 +1,5 @@ /** - * @file simple_planner_fixed_size_interpolation.cpp + * @file simple_planner_fixed_size_plan_unit.cpp * @brief * * @author Matthew Powelson @@ -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_; @@ -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_; @@ -110,7 +110,7 @@ TEST_F(TesseractPlanningSimplePlannerFixedSizeInterpolationUnit, JointJoint_Join EXPECT_TRUE(wp2.getPosition().isApprox(mi.getWaypoint().as().getPosition(), 1e-5)); } -TEST_F(TesseractPlanningSimplePlannerFixedSizeInterpolationUnit, JointCart_JointInterpolation) // NOLINT +TEST_F(TesseractPlanningSimplePlannerFixedSizePlanProfileUnit, JointCart_JointInterpolation) // NOLINT { PlannerRequest request; request.env = env_; @@ -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_; @@ -199,7 +199,7 @@ TEST_F(TesseractPlanningSimplePlannerFixedSizeInterpolationUnit, CartJoint_Joint EXPECT_TRUE(wp2.getPosition().isApprox(mi.getWaypoint().as().getPosition(), 1e-5)); } -TEST_F(TesseractPlanningSimplePlannerFixedSizeInterpolationUnit, CartCart_JointInterpolation) // NOLINT +TEST_F(TesseractPlanningSimplePlannerFixedSizePlanProfileUnit, CartCart_JointInterpolation) // NOLINT { PlannerRequest request; request.env = env_; diff --git a/tesseract_motion_planners/simple/test/simple_planner_lvs_interpolation.cpp b/tesseract_motion_planners/simple/test/simple_planner_lvs_plan_unit.cpp similarity index 96% rename from tesseract_motion_planners/simple/test/simple_planner_lvs_interpolation.cpp rename to tesseract_motion_planners/simple/test/simple_planner_lvs_plan_unit.cpp index 49b834f42f..205bf094bd 100644 --- a/tesseract_motion_planners/simple/test/simple_planner_lvs_interpolation.cpp +++ b/tesseract_motion_planners/simple/test/simple_planner_lvs_plan_unit.cpp @@ -1,5 +1,5 @@ /** - * @file simple_planner_fixed_size_interpolation.cpp + * @file simple_planner_lvs_plan_unit.cpp * @brief * * @author Matthew Powelson @@ -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_; @@ -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_; @@ -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_; @@ -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_; @@ -251,7 +251,7 @@ TEST_F(TesseractPlanningSimplePlannerLVSInterpolationUnit, InterpolateStateWaypo EXPECT_TRUE(static_cast(cl.size()) > min_steps); } -TEST_F(TesseractPlanningSimplePlannerLVSInterpolationUnit, InterpolateStateWaypoint_JointCart_Linear) // NOLINT +TEST_F(TesseractPlanningSimplePlannerLVSPlanProfileUnit, InterpolateStateWaypoint_JointCart_Linear) // NOLINT { PlannerRequest request; request.env = env_; @@ -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_; @@ -377,7 +377,7 @@ TEST_F(TesseractPlanningSimplePlannerLVSInterpolationUnit, InterpolateStateWaypo EXPECT_TRUE(static_cast(cl.size()) > min_steps); } -TEST_F(TesseractPlanningSimplePlannerLVSInterpolationUnit, InterpolateStateWaypoint_CartJoint_Linear) // NOLINT +TEST_F(TesseractPlanningSimplePlannerLVSPlanProfileUnit, InterpolateStateWaypoint_CartJoint_Linear) // NOLINT { PlannerRequest request; request.env = env_; @@ -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_; @@ -505,7 +505,7 @@ TEST_F(TesseractPlanningSimplePlannerLVSInterpolationUnit, InterpolateStateWaypo EXPECT_TRUE(static_cast(cl.size()) > min_steps); } -TEST_F(TesseractPlanningSimplePlannerLVSInterpolationUnit, InterpolateStateWaypoint_CartCart_Linear) // NOLINT +TEST_F(TesseractPlanningSimplePlannerLVSPlanProfileUnit, InterpolateStateWaypoint_CartCart_Linear) // NOLINT { PlannerRequest request; request.env = env_;