Skip to content

Commit d31f042

Browse files
committed
rename unclear variables
1 parent b2d0e62 commit d31f042

File tree

2 files changed

+10
-15
lines changed

2 files changed

+10
-15
lines changed

hardware_interface/test/test_component_interfaces_custom_export.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -244,10 +244,10 @@ TEST(TestComponentInterfaces, dummy_sensor_default_custom_export)
244244
EXPECT_EQ(hardware_interface::lifecycle_state_names::UNCONFIGURED, state.label());
245245

246246
const auto listed_interface_size = 1u;
247-
const auto interfaces_sizeze = listed_interface_size + error_signals_size + warnig_signals_size;
247+
const auto interfaces_sizes = listed_interface_size + error_signals_size + warnig_signals_size;
248248
auto state_interfaces = sensor_hw.export_state_interfaces();
249249
// interfaces size + the one unlisted interface "joint1/some_unlisted_interface"
250-
ASSERT_EQ(interfaces_sizeze + 1u, state_interfaces.size());
250+
ASSERT_EQ(interfaces_sizes + 1u, state_interfaces.size());
251251
{
252252
auto [contains, position] =
253253
test_components::vector_contains(state_interfaces, "joint1/voltage");
@@ -283,10 +283,10 @@ TEST(TestComponentInterfaces, dummy_system_default_custom_export)
283283
EXPECT_EQ(hardware_interface::lifecycle_state_names::UNCONFIGURED, state.label());
284284

285285
const auto listed_interface_size = 6u;
286-
const auto interfaces_sizeze = listed_interface_size + report_signals_size;
286+
const auto interfaces_sizes = listed_interface_size + report_signals_size;
287287
auto state_interfaces = system_hw.export_state_interfaces();
288288
// interfaces size + the one unlisted interface "joint1/some_unlisted_interface"
289-
ASSERT_EQ(interfaces_sizeze + 1u, state_interfaces.size());
289+
ASSERT_EQ(interfaces_sizes + 1u, state_interfaces.size());
290290
{
291291
auto [contains, position] =
292292
test_components::vector_contains(state_interfaces, "joint1/position");

hardware_interface/test/test_error_warning_codes.cpp

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -383,9 +383,9 @@ TEST(TestComponentInterfaces, dummy_actuator_default)
383383
EXPECT_EQ(lifecycle_msgs::msg::State::PRIMARY_STATE_UNCONFIGURED, state.id());
384384
EXPECT_EQ(hardware_interface::lifecycle_state_names::UNCONFIGURED, state.label());
385385

386-
const auto state_interface_offset = 2;
386+
const auto listed_interface_size = 2;
387387
auto state_interfaces = actuator_hw.export_state_interfaces();
388-
ASSERT_EQ(state_interface_offset + report_signals_size, state_interfaces.size());
388+
ASSERT_EQ(listed_interface_size + report_signals_size, state_interfaces.size());
389389
{
390390
auto [contains, position] =
391391
test_components::vector_contains(state_interfaces, "joint1/position");
@@ -500,10 +500,10 @@ TEST(TestComponentInterfaces, dummy_sensor_default)
500500
EXPECT_EQ(lifecycle_msgs::msg::State::PRIMARY_STATE_UNCONFIGURED, state.id());
501501
EXPECT_EQ(hardware_interface::lifecycle_state_names::UNCONFIGURED, state.label());
502502

503-
const auto state_interface_offset = 1;
503+
const auto listed_interface_size = 1;
504504
auto state_interfaces = sensor_hw.export_state_interfaces();
505505
ASSERT_EQ(
506-
state_interface_offset + warnig_signals_size + error_signals_size, state_interfaces.size());
506+
listed_interface_size + warnig_signals_size + error_signals_size, state_interfaces.size());
507507
// check that the normal interfaces get exported as expected
508508
{
509509
auto [contains, position] =
@@ -586,9 +586,9 @@ TEST(TestComponentInterfaces, dummy_system_default)
586586
EXPECT_EQ(lifecycle_msgs::msg::State::PRIMARY_STATE_UNCONFIGURED, state.id());
587587
EXPECT_EQ(hardware_interface::lifecycle_state_names::UNCONFIGURED, state.label());
588588

589-
const auto state_interface_offset = 6;
589+
const auto listed_interface_size = 6;
590590
auto state_interfaces = system_hw.export_state_interfaces();
591-
ASSERT_EQ(state_interface_offset + report_signals_size, state_interfaces.size());
591+
ASSERT_EQ(listed_interface_size + report_signals_size, state_interfaces.size());
592592
{
593593
auto [contains, position] =
594594
test_components::vector_contains(state_interfaces, "joint1/position");
@@ -754,7 +754,6 @@ TEST(TestComponentInterfaces, dummy_actuator_default_read_error_behavior)
754754
EXPECT_EQ(lifecycle_msgs::msg::State::PRIMARY_STATE_UNCONFIGURED, state.id());
755755
EXPECT_EQ(hardware_interface::lifecycle_state_names::UNCONFIGURED, state.label());
756756

757-
const auto state_interface_offset = 2;
758757
auto state_interfaces = actuator_hw.export_state_interfaces();
759758
auto command_interfaces = actuator_hw.export_command_interfaces();
760759
state = actuator_hw.configure();
@@ -885,7 +884,6 @@ TEST(TestComponentInterfaces, dummy_actuator_default_write_error_behavior)
885884
EXPECT_EQ(lifecycle_msgs::msg::State::PRIMARY_STATE_UNCONFIGURED, state.id());
886885
EXPECT_EQ(hardware_interface::lifecycle_state_names::UNCONFIGURED, state.label());
887886

888-
const auto state_interface_offset = 2;
889887
auto state_interfaces = actuator_hw.export_state_interfaces();
890888
auto command_interfaces = actuator_hw.export_command_interfaces();
891889
state = actuator_hw.configure();
@@ -992,7 +990,6 @@ TEST(TestComponentInterfaces, dummy_sensor_default_read_error_behavior)
992990
const hardware_interface::HardwareInfo voltage_sensor_res = control_resources[0];
993991
auto state = sensor_hw.initialize(voltage_sensor_res);
994992

995-
const auto state_interface_offset = 1;
996993
auto state_interfaces = sensor_hw.export_state_interfaces();
997994
// Updated because is is INACTIVE
998995
state = sensor_hw.configure();
@@ -1089,7 +1086,6 @@ TEST(TestComponentInterfaces, dummy_system_default_read_error_behavior)
10891086
EXPECT_EQ(lifecycle_msgs::msg::State::PRIMARY_STATE_UNCONFIGURED, state.id());
10901087
EXPECT_EQ(hardware_interface::lifecycle_state_names::UNCONFIGURED, state.label());
10911088

1092-
const auto state_interface_offset = 6;
10931089
auto state_interfaces = system_hw.export_state_interfaces();
10941090
auto command_interfaces = system_hw.export_command_interfaces();
10951091
state = system_hw.configure();
@@ -1221,7 +1217,6 @@ TEST(TestComponentInterfaces, dummy_system_default_write_error_behavior)
12211217
EXPECT_EQ(lifecycle_msgs::msg::State::PRIMARY_STATE_UNCONFIGURED, state.id());
12221218
EXPECT_EQ(hardware_interface::lifecycle_state_names::UNCONFIGURED, state.label());
12231219

1224-
const auto state_interface_offset = 6;
12251220
auto state_interfaces = system_hw.export_state_interfaces();
12261221
auto command_interfaces = system_hw.export_command_interfaces();
12271222
state = system_hw.configure();

0 commit comments

Comments
 (0)