Skip to content

Commit 2c4f3af

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent f60963f commit 2c4f3af

File tree

4 files changed

+17
-20
lines changed

4 files changed

+17
-20
lines changed

include/dynamic_graph_bridge/sot_loader.hh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class SotLoader : public SotLoaderBasic {
8080
geometry_msgs::msg::TransformStamped freeFlyerPose_;
8181

8282
public:
83-
SotLoader(const std::string &aNodeName=std::string("SotLoader"));
83+
SotLoader(const std::string &aNodeName = std::string("SotLoader"));
8484
virtual ~SotLoader();
8585

8686
// \brief Create a thread for ROS and start the control loop.

tests/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ if(BUILD_TESTING)
6767
PUBLIC include "${GMOCK_INCLUDE_DIRS}"
6868
PRIVATE ${PROJECT_SOURCE_DIR}/include)
6969
target_compile_definitions(
70-
test_sot_loader
71-
PUBLIC TEST_CONFIG_PATH="${CMAKE_CURRENT_LIST_DIR}/python_scripts/")
70+
test_sot_loader
71+
PUBLIC TEST_CONFIG_PATH="${CMAKE_CURRENT_LIST_DIR}/python_scripts/")
7272
target_link_libraries(test_sot_loader sot_loader "${GMOCK_LIBRARIES}")
7373

7474
add_launch_test(launch/launching_test_sot_loader.py)

tests/test_ros_interpreter.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,5 +286,4 @@ TEST_F(TestRosInterpreter, test_call_run_script_ros_publish) {
286286

287287
/* Tests the result. */
288288
ASSERT_EQ(result, "");
289-
290289
}

tests/test_sot_loader.cpp

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010

1111
namespace test_sot_loader {
1212
int l_argc;
13-
char** l_argv;
14-
}
13+
char **l_argv;
14+
} // namespace test_sot_loader
1515

1616
namespace dg = dynamicgraph;
1717

@@ -20,18 +20,21 @@ class MockSotLoaderTest : public ::testing::Test {
2020
class MockSotLoader : public SotLoader {
2121
public:
2222
rclcpp::Subscription<dynamic_graph_bridge_msgs::msg::Vector>::SharedPtr
23-
subscription_;
23+
subscription_;
2424

2525
~MockSotLoader() {}
2626

27-
void topic_callback(const dynamic_graph_bridge_msgs::msg::Vector::SharedPtr msg) const {
28-
auto lsize=msg->data.size();
27+
void topic_callback(
28+
const dynamic_graph_bridge_msgs::msg::Vector::SharedPtr msg) const {
29+
auto lsize = msg->data.size();
2930
}
3031

3132
void subscribe_to_a_topic() {
32-
subscription_ = create_subscription<dynamic_graph_bridge_msgs::msg::Vector>(
33-
"control_ros", 1, std::bind(&MockSotLoader::topic_callback, this,
34-
std::placeholders::_1));
33+
subscription_ =
34+
create_subscription<dynamic_graph_bridge_msgs::msg::Vector>(
35+
"control_ros", 1,
36+
std::bind(&MockSotLoader::topic_callback, this,
37+
std::placeholders::_1));
3538
}
3639

3740
void generateEvents() {
@@ -85,7 +88,7 @@ class MockSotLoaderTest : public ::testing::Test {
8588
std::string result = "";
8689
std::string standard_output = "";
8790
std::string standard_error = "";
88-
//start_run_python_script_ros_service(file_name, result);
91+
// start_run_python_script_ros_service(file_name, result);
8992

9093
// Wait for each threads.
9194
SotLoader::lthread_join(); // Wait 100 ms
@@ -98,15 +101,11 @@ class MockSotLoaderTest : public ::testing::Test {
98101

99102
// For the set of tests coded in this file.
100103
static void SetUpTestCase() {
101-
102-
rclcpp::init(test_sot_loader::l_argc,
103-
test_sot_loader::l_argv);
104+
rclcpp::init(test_sot_loader::l_argc, test_sot_loader::l_argv);
104105
}
105106

106107
// For each test specified in this file
107-
static void TearDownTestCase() {
108-
rclcpp::shutdown();
109-
}
108+
static void TearDownTestCase() { rclcpp::shutdown(); }
110109

111110
void SetUp() {
112111
mockSotLoader_ptr_ = new MockSotLoader();
@@ -129,7 +128,6 @@ int main(int argc, char **argv) {
129128
test_sot_loader::l_argc = argc;
130129
test_sot_loader::l_argv = argv;
131130

132-
133131
int r = RUN_ALL_TESTS();
134132

135133
return r;

0 commit comments

Comments
 (0)