From 9a7a432f397071b04f3de7d01391d3d4da2eab11 Mon Sep 17 00:00:00 2001 From: Arnaud TANGUY Date: Thu, 7 Mar 2024 11:50:21 +0100 Subject: [PATCH] [tests] Add tests --- CMakeLists.txt | 2 ++ modules/include/mc_panda_lirmm/config.h.in | 2 +- modules/include/mc_panda_lirmm/panda_lirmm.h | 4 ++-- modules/src/module.cpp | 4 ++-- modules/src/panda_lirmm.cpp | 4 ++-- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 55d7575..af42c27 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,6 +14,8 @@ find_package(mc_panda REQUIRED) add_subdirectory(modules) add_subdirectory(cmake) +include(CTest) +enable_testing() if(BUILD_TESTING) add_subdirectory(tests) endif() diff --git a/modules/include/mc_panda_lirmm/config.h.in b/modules/include/mc_panda_lirmm/config.h.in index c6b891b..6b13552 100644 --- a/modules/include/mc_panda_lirmm/config.h.in +++ b/modules/include/mc_panda_lirmm/config.h.in @@ -1,6 +1,6 @@ #pragma once -namespace mc_robots +namespace mc_panda_lirmm { static constexpr auto panda_DESCRIPTION_PATH = "@PANDA_DESCRIPTION_PATH@"; } diff --git a/modules/include/mc_panda_lirmm/panda_lirmm.h b/modules/include/mc_panda_lirmm/panda_lirmm.h index 8e1f9ba..7d7deb8 100644 --- a/modules/include/mc_panda_lirmm/panda_lirmm.h +++ b/modules/include/mc_panda_lirmm/panda_lirmm.h @@ -5,7 +5,7 @@ #include -namespace mc_robots +namespace mc_panda_lirmm { static std::string pandaVariant(bool pump, bool foot, bool hand) @@ -110,4 +110,4 @@ struct ROBOT_MODULE_API PandaLIRMM : public mc_robots::PandaRobotModule double box_mass); }; -} // namespace mc_robots +} // namespace mc_panda_lirmm diff --git a/modules/src/module.cpp b/modules/src/module.cpp index 65d7fe3..079f1c3 100644 --- a/modules/src/module.cpp +++ b/modules/src/module.cpp @@ -4,7 +4,7 @@ extern "C" { ROBOT_MODULE_API void MC_RTC_ROBOT_MODULE(std::vector & names) { - using namespace mc_robots; + using namespace mc_panda_lirmm; ForAllVariants([&names](PandaLIRMMRobots robot, bool pump, bool foot, bool hand, bool fixSensorFrame) { names.push_back(NameFromParams(robot, pump, foot, hand, fixSensorFrame)); }); } @@ -19,7 +19,7 @@ extern "C" static auto variant_factory = []() { std::map> variant_factory; - using namespace mc_robots; + using namespace mc_panda_lirmm; ForAllVariants( [&variant_factory](PandaLIRMMRobots robot, bool pump, bool foot, bool hand, bool fixSensorFrame) { diff --git a/modules/src/panda_lirmm.cpp b/modules/src/panda_lirmm.cpp index db06ec2..2b31d32 100644 --- a/modules/src/panda_lirmm.cpp +++ b/modules/src/panda_lirmm.cpp @@ -7,7 +7,7 @@ #include namespace bfs = boost::filesystem; -namespace mc_robots +namespace mc_panda_lirmm { // Compute the inertia matrix for a box @@ -162,4 +162,4 @@ void PandaLIRMM::create_urdf() } } -} // namespace mc_robots +} // namespace mc_panda_lirmm