Skip to content

Commit

Permalink
Remove hardcoded size
Browse files Browse the repository at this point in the history
  • Loading branch information
christophfroehlich committed Nov 25, 2023
1 parent 618e41f commit a0f932c
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ TEST_F(ForwardCommandControllerTest, ActivateSuccess)
// check interface configuration
auto cmd_if_conf = controller_->command_interface_configuration();
EXPECT_EQ(cmd_if_conf.type, controller_interface::interface_configuration_type::INDIVIDUAL);
ASSERT_THAT(cmd_if_conf.names, SizeIs(3lu));
ASSERT_THAT(cmd_if_conf.names, SizeIs(joint_names_.size()));
auto state_if_conf = controller_->state_interface_configuration();
ASSERT_THAT(state_if_conf.names, IsEmpty());

Expand All @@ -196,7 +196,7 @@ TEST_F(ForwardCommandControllerTest, ActivateSuccess)

// check interface configuration
cmd_if_conf = controller_->command_interface_configuration();
ASSERT_THAT(cmd_if_conf.names, SizeIs(3lu));
ASSERT_THAT(cmd_if_conf.names, SizeIs(joint_names_.size()));
state_if_conf = controller_->state_interface_configuration();
ASSERT_THAT(state_if_conf.names, IsEmpty());
}
Expand Down Expand Up @@ -348,7 +348,7 @@ TEST_F(ForwardCommandControllerTest, ActivateDeactivateCommandsResetSuccess)

// check interface configuration
auto cmd_if_conf = controller_->command_interface_configuration();
ASSERT_THAT(cmd_if_conf.names, SizeIs(3lu));
ASSERT_THAT(cmd_if_conf.names, SizeIs(joint_names_.size()));
EXPECT_EQ(cmd_if_conf.type, controller_interface::interface_configuration_type::INDIVIDUAL);
auto state_if_conf = controller_->state_interface_configuration();
ASSERT_THAT(state_if_conf.names, IsEmpty());
Expand All @@ -358,7 +358,7 @@ TEST_F(ForwardCommandControllerTest, ActivateDeactivateCommandsResetSuccess)

// check interface configuration
cmd_if_conf = controller_->command_interface_configuration();
ASSERT_THAT(cmd_if_conf.names, SizeIs(3lu));
ASSERT_THAT(cmd_if_conf.names, SizeIs(joint_names_.size()));
state_if_conf = controller_->state_interface_configuration();
ASSERT_THAT(state_if_conf.names, IsEmpty());

Expand All @@ -382,7 +382,7 @@ TEST_F(ForwardCommandControllerTest, ActivateDeactivateCommandsResetSuccess)

// check interface configuration
cmd_if_conf = controller_->command_interface_configuration();
ASSERT_THAT(cmd_if_conf.names, SizeIs(3lu)); // did not change
ASSERT_THAT(cmd_if_conf.names, SizeIs(joint_names_.size())); // did not change
state_if_conf = controller_->state_interface_configuration();
ASSERT_THAT(state_if_conf.names, IsEmpty());

Expand Down

0 comments on commit a0f932c

Please sign in to comment.