10
10
11
11
namespace test_sot_loader {
12
12
int l_argc;
13
- char ** l_argv;
14
- }
13
+ char ** l_argv;
14
+ } // namespace test_sot_loader
15
15
16
16
namespace dg = dynamicgraph;
17
17
@@ -20,18 +20,21 @@ class MockSotLoaderTest : public ::testing::Test {
20
20
class MockSotLoader : public SotLoader {
21
21
public:
22
22
rclcpp::Subscription<dynamic_graph_bridge_msgs::msg::Vector>::SharedPtr
23
- subscription_;
23
+ subscription_;
24
24
25
25
~MockSotLoader () {}
26
26
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 ();
29
30
}
30
31
31
32
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));
35
38
}
36
39
37
40
void generateEvents () {
@@ -85,7 +88,7 @@ class MockSotLoaderTest : public ::testing::Test {
85
88
std::string result = " " ;
86
89
std::string standard_output = " " ;
87
90
std::string standard_error = " " ;
88
- // start_run_python_script_ros_service(file_name, result);
91
+ // start_run_python_script_ros_service(file_name, result);
89
92
90
93
// Wait for each threads.
91
94
SotLoader::lthread_join (); // Wait 100 ms
@@ -98,15 +101,11 @@ class MockSotLoaderTest : public ::testing::Test {
98
101
99
102
// For the set of tests coded in this file.
100
103
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);
104
105
}
105
106
106
107
// For each test specified in this file
107
- static void TearDownTestCase () {
108
- rclcpp::shutdown ();
109
- }
108
+ static void TearDownTestCase () { rclcpp::shutdown (); }
110
109
111
110
void SetUp () {
112
111
mockSotLoader_ptr_ = new MockSotLoader ();
@@ -129,7 +128,6 @@ int main(int argc, char **argv) {
129
128
test_sot_loader::l_argc = argc;
130
129
test_sot_loader::l_argv = argv;
131
130
132
-
133
131
int r = RUN_ALL_TESTS ();
134
132
135
133
return r;
0 commit comments