Skip to content

Commit

Permalink
[tests] Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
arntanguy committed Mar 7, 2024
1 parent c0e5e0d commit 9a7a432
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
2 changes: 1 addition & 1 deletion modules/include/mc_panda_lirmm/config.h.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

namespace mc_robots
namespace mc_panda_lirmm
{
static constexpr auto panda_DESCRIPTION_PATH = "@PANDA_DESCRIPTION_PATH@";
}
4 changes: 2 additions & 2 deletions modules/include/mc_panda_lirmm/panda_lirmm.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include <mc_panda/panda.h>

namespace mc_robots
namespace mc_panda_lirmm
{

static std::string pandaVariant(bool pump, bool foot, bool hand)
Expand Down Expand Up @@ -110,4 +110,4 @@ struct ROBOT_MODULE_API PandaLIRMM : public mc_robots::PandaRobotModule
double box_mass);
};

} // namespace mc_robots
} // namespace mc_panda_lirmm
4 changes: 2 additions & 2 deletions modules/src/module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ extern "C"
{
ROBOT_MODULE_API void MC_RTC_ROBOT_MODULE(std::vector<std::string> & 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)); });
}
Expand All @@ -19,7 +19,7 @@ extern "C"
static auto variant_factory = []()
{
std::map<std::string, std::function<mc_rbdyn::RobotModule *()>> variant_factory;
using namespace mc_robots;
using namespace mc_panda_lirmm;
ForAllVariants(
[&variant_factory](PandaLIRMMRobots robot, bool pump, bool foot, bool hand, bool fixSensorFrame)
{
Expand Down
4 changes: 2 additions & 2 deletions modules/src/panda_lirmm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <boost/filesystem.hpp>
namespace bfs = boost::filesystem;

namespace mc_robots
namespace mc_panda_lirmm
{

// Compute the inertia matrix for a box
Expand Down Expand Up @@ -162,4 +162,4 @@ void PandaLIRMM::create_urdf()
}
}

} // namespace mc_robots
} // namespace mc_panda_lirmm

0 comments on commit 9a7a432

Please sign in to comment.