Skip to content

Commit

Permalink
update tests to use IsEmpty from gmock
Browse files Browse the repository at this point in the history
  • Loading branch information
saikishor committed Mar 26, 2024
1 parent 8807748 commit 22bcdd3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions hardware_interface/test/test_component_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ TEST_F(TestComponentParser, successfully_parse_valid_urdf_system_one_interface)

EXPECT_EQ(hardware_info.name, "RRBotSystemPositionOnly");
EXPECT_EQ(hardware_info.type, "system");
EXPECT_TRUE(hardware_info.group.empty());
ASSERT_THAT(hardware_info.group, IsEmpty());
EXPECT_EQ(
hardware_info.hardware_plugin_name,
"ros2_control_demo_hardware/RRBotSystemPositionOnlyHardware");
Expand Down Expand Up @@ -152,7 +152,7 @@ TEST_F(TestComponentParser, successfully_parse_valid_urdf_system_multi_interface

EXPECT_EQ(hardware_info.name, "RRBotSystemMultiInterface");
EXPECT_EQ(hardware_info.type, "system");
EXPECT_TRUE(hardware_info.group.empty());
ASSERT_THAT(hardware_info.group, IsEmpty());
EXPECT_EQ(
hardware_info.hardware_plugin_name,
"ros2_control_demo_hardware/RRBotSystemMultiInterfaceHardware");
Expand Down Expand Up @@ -190,7 +190,7 @@ TEST_F(TestComponentParser, successfully_parse_valid_urdf_system_robot_with_sens

EXPECT_EQ(hardware_info.name, "RRBotSystemWithSensor");
EXPECT_EQ(hardware_info.type, "system");
EXPECT_TRUE(hardware_info.group.empty());
ASSERT_THAT(hardware_info.group, IsEmpty());
EXPECT_EQ(
hardware_info.hardware_plugin_name, "ros2_control_demo_hardware/RRBotSystemWithSensorHardware");
ASSERT_THAT(hardware_info.hardware_parameters, SizeIs(2));
Expand Down Expand Up @@ -235,7 +235,7 @@ TEST_F(TestComponentParser, successfully_parse_valid_urdf_system_robot_with_exte

EXPECT_EQ(hardware_info.name, "RRBotSystemPositionOnlyWithExternalSensor");
EXPECT_EQ(hardware_info.type, "system");
EXPECT_TRUE(hardware_info.group.empty());
ASSERT_THAT(hardware_info.group, IsEmpty());
EXPECT_EQ(
hardware_info.hardware_plugin_name,
"ros2_control_demo_hardware/RRBotSystemPositionOnlyHardware");
Expand Down Expand Up @@ -403,7 +403,7 @@ TEST_F(TestComponentParser, successfully_parse_valid_urdf_system_multi_joints_tr

EXPECT_EQ(hardware_info.name, "RRBotModularWrist");
EXPECT_EQ(hardware_info.type, "system");
EXPECT_TRUE(hardware_info.group.empty());
ASSERT_THAT(hardware_info.group, IsEmpty());
EXPECT_EQ(
hardware_info.hardware_plugin_name, "ros2_control_demo_hardware/ActuatorHardwareMultiDOF");
ASSERT_THAT(hardware_info.hardware_parameters, SizeIs(2));
Expand Down Expand Up @@ -446,7 +446,7 @@ TEST_F(TestComponentParser, successfully_parse_valid_urdf_sensor_only)

EXPECT_EQ(hardware_info.name, "CameraWithIMU");
EXPECT_EQ(hardware_info.type, "sensor");
EXPECT_TRUE(hardware_info.group.empty());
ASSERT_THAT(hardware_info.group, IsEmpty());
EXPECT_EQ(hardware_info.hardware_plugin_name, "ros2_control_demo_hardware/CameraWithIMUSensor");
ASSERT_THAT(hardware_info.hardware_parameters, SizeIs(1));
EXPECT_EQ(hardware_info.hardware_parameters.at("example_param_read_for_sec"), "2");
Expand Down

0 comments on commit 22bcdd3

Please sign in to comment.