Skip to content

Commit

Permalink
adapt tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mamueluth committed Aug 20, 2024
1 parent 4ce39d7 commit 75bb5ca
Showing 1 changed file with 28 additions and 28 deletions.
56 changes: 28 additions & 28 deletions hardware_interface/test/test_component_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1415,12 +1415,12 @@ TEST_F(TestComponentParser, parse_joint_state_interface_descriptions_from_hardwa

const auto joint_state_descriptions =
parse_state_interface_descriptions(control_hardware[0].joints);
EXPECT_EQ(joint_state_descriptions[0].prefix_name, "joint1");
EXPECT_EQ(joint_state_descriptions[0].get_name(), "position");
EXPECT_EQ(joint_state_descriptions[0].get_prefix_name(), "joint1");
EXPECT_EQ(joint_state_descriptions[0].get_interface_name(), "position");
EXPECT_EQ(joint_state_descriptions[0].get_name(), "joint1/position");

EXPECT_EQ(joint_state_descriptions[1].prefix_name, "joint2");
EXPECT_EQ(joint_state_descriptions[1].get_name(), "position");
EXPECT_EQ(joint_state_descriptions[1].get_prefix_name(), "joint2");
EXPECT_EQ(joint_state_descriptions[1].get_interface_name(), "position");
EXPECT_EQ(joint_state_descriptions[1].get_name(), "joint2/position");
}

Expand All @@ -1434,14 +1434,14 @@ TEST_F(TestComponentParser, parse_joint_command_interface_descriptions_from_hard

const auto joint_command_descriptions =
parse_command_interface_descriptions(control_hardware[0].joints);
EXPECT_EQ(joint_command_descriptions[0].prefix_name, "joint1");
EXPECT_EQ(joint_command_descriptions[0].get_name(), "position");
EXPECT_EQ(joint_command_descriptions[0].get_prefix_name(), "joint1");
EXPECT_EQ(joint_command_descriptions[0].get_interface_name(), "position");
EXPECT_EQ(joint_command_descriptions[0].get_name(), "joint1/position");
EXPECT_EQ(joint_command_descriptions[0].interface_info.min, "-1");
EXPECT_EQ(joint_command_descriptions[0].interface_info.max, "1");

EXPECT_EQ(joint_command_descriptions[1].prefix_name, "joint2");
EXPECT_EQ(joint_command_descriptions[1].get_name(), "position");
EXPECT_EQ(joint_command_descriptions[1].get_prefix_name(), "joint2");
EXPECT_EQ(joint_command_descriptions[1].get_interface_name(), "position");
EXPECT_EQ(joint_command_descriptions[1].get_name(), "joint2/position");
EXPECT_EQ(joint_command_descriptions[1].interface_info.min, "-1");
EXPECT_EQ(joint_command_descriptions[1].interface_info.max, "1");
Expand All @@ -1456,18 +1456,18 @@ TEST_F(TestComponentParser, parse_sensor_state_interface_descriptions_from_hardw

const auto sensor_state_descriptions =
parse_state_interface_descriptions(control_hardware[0].sensors);
EXPECT_EQ(sensor_state_descriptions[0].prefix_name, "sensor1");
EXPECT_EQ(sensor_state_descriptions[0].get_name(), "roll");
EXPECT_EQ(sensor_state_descriptions[0].get_prefix_name(), "sensor1");
EXPECT_EQ(sensor_state_descriptions[0].get_interface_name(), "roll");
EXPECT_EQ(sensor_state_descriptions[0].get_name(), "sensor1/roll");
EXPECT_EQ(sensor_state_descriptions[1].prefix_name, "sensor1");
EXPECT_EQ(sensor_state_descriptions[1].get_name(), "pitch");
EXPECT_EQ(sensor_state_descriptions[1].get_prefix_name(), "sensor1");
EXPECT_EQ(sensor_state_descriptions[1].get_interface_name(), "pitch");
EXPECT_EQ(sensor_state_descriptions[1].get_name(), "sensor1/pitch");
EXPECT_EQ(sensor_state_descriptions[2].prefix_name, "sensor1");
EXPECT_EQ(sensor_state_descriptions[2].get_name(), "yaw");
EXPECT_EQ(sensor_state_descriptions[2].get_prefix_name(), "sensor1");
EXPECT_EQ(sensor_state_descriptions[2].get_interface_name(), "yaw");
EXPECT_EQ(sensor_state_descriptions[2].get_name(), "sensor1/yaw");

EXPECT_EQ(sensor_state_descriptions[3].prefix_name, "sensor2");
EXPECT_EQ(sensor_state_descriptions[3].get_name(), "image");
EXPECT_EQ(sensor_state_descriptions[3].get_prefix_name(), "sensor2");
EXPECT_EQ(sensor_state_descriptions[3].get_interface_name(), "image");
EXPECT_EQ(sensor_state_descriptions[3].get_name(), "sensor2/image");
}

Expand All @@ -1481,18 +1481,18 @@ TEST_F(TestComponentParser, parse_gpio_state_interface_descriptions_from_hardwar

const auto gpio_state_descriptions =
parse_state_interface_descriptions(control_hardware[0].gpios);
EXPECT_EQ(gpio_state_descriptions[0].prefix_name, "flange_analog_IOs");
EXPECT_EQ(gpio_state_descriptions[0].get_name(), "analog_output1");
EXPECT_EQ(gpio_state_descriptions[0].get_prefix_name(), "flange_analog_IOs");
EXPECT_EQ(gpio_state_descriptions[0].get_interface_name(), "analog_output1");
EXPECT_EQ(gpio_state_descriptions[0].get_name(), "flange_analog_IOs/analog_output1");
EXPECT_EQ(gpio_state_descriptions[1].prefix_name, "flange_analog_IOs");
EXPECT_EQ(gpio_state_descriptions[1].get_name(), "analog_input1");
EXPECT_EQ(gpio_state_descriptions[1].get_prefix_name(), "flange_analog_IOs");
EXPECT_EQ(gpio_state_descriptions[1].get_interface_name(), "analog_input1");
EXPECT_EQ(gpio_state_descriptions[1].get_name(), "flange_analog_IOs/analog_input1");
EXPECT_EQ(gpio_state_descriptions[2].prefix_name, "flange_analog_IOs");
EXPECT_EQ(gpio_state_descriptions[2].get_name(), "analog_input2");
EXPECT_EQ(gpio_state_descriptions[2].get_prefix_name(), "flange_analog_IOs");
EXPECT_EQ(gpio_state_descriptions[2].get_interface_name(), "analog_input2");
EXPECT_EQ(gpio_state_descriptions[2].get_name(), "flange_analog_IOs/analog_input2");

EXPECT_EQ(gpio_state_descriptions[3].prefix_name, "flange_vacuum");
EXPECT_EQ(gpio_state_descriptions[3].get_name(), "vacuum");
EXPECT_EQ(gpio_state_descriptions[3].get_prefix_name(), "flange_vacuum");
EXPECT_EQ(gpio_state_descriptions[3].get_interface_name(), "vacuum");
EXPECT_EQ(gpio_state_descriptions[3].get_name(), "flange_vacuum/vacuum");
}

Expand All @@ -1506,11 +1506,11 @@ TEST_F(TestComponentParser, parse_gpio_command_interface_descriptions_from_hardw

const auto gpio_state_descriptions =
parse_command_interface_descriptions(control_hardware[0].gpios);
EXPECT_EQ(gpio_state_descriptions[0].prefix_name, "flange_analog_IOs");
EXPECT_EQ(gpio_state_descriptions[0].get_name(), "analog_output1");
EXPECT_EQ(gpio_state_descriptions[0].get_prefix_name(), "flange_analog_IOs");
EXPECT_EQ(gpio_state_descriptions[0].get_interface_name(), "analog_output1");
EXPECT_EQ(gpio_state_descriptions[0].get_name(), "flange_analog_IOs/analog_output1");

EXPECT_EQ(gpio_state_descriptions[1].prefix_name, "flange_vacuum");
EXPECT_EQ(gpio_state_descriptions[1].get_name(), "vacuum");
EXPECT_EQ(gpio_state_descriptions[1].get_prefix_name(), "flange_vacuum");
EXPECT_EQ(gpio_state_descriptions[1].get_interface_name(), "vacuum");
EXPECT_EQ(gpio_state_descriptions[1].get_name(), "flange_vacuum/vacuum");
}

0 comments on commit 75bb5ca

Please sign in to comment.