@@ -180,8 +180,10 @@ TEST_F(JointStateBroadcasterTest, ActivateEmptyTest)
180180 // check interface configuration
181181 auto cmd_if_conf = state_broadcaster_->command_interface_configuration ();
182182 ASSERT_THAT (cmd_if_conf.names , IsEmpty ());
183+ EXPECT_EQ (cmd_if_conf.type , controller_interface::interface_configuration_type::NONE);
183184 auto state_if_conf = state_broadcaster_->state_interface_configuration ();
184185 ASSERT_THAT (state_if_conf.names , IsEmpty ());
186+ EXPECT_EQ (state_if_conf.type , controller_interface::interface_configuration_type::ALL);
185187
186188 // publishers initialized
187189 ASSERT_TRUE (state_broadcaster_->realtime_joint_state_publisher_ );
@@ -227,8 +229,10 @@ TEST_F(JointStateBroadcasterTest, ActivateTestWithoutJointsParameter)
227229 // check interface configuration
228230 auto cmd_if_conf = state_broadcaster_->command_interface_configuration ();
229231 ASSERT_THAT (cmd_if_conf.names , IsEmpty ());
232+ EXPECT_EQ (cmd_if_conf.type , controller_interface::interface_configuration_type::NONE);
230233 auto state_if_conf = state_broadcaster_->state_interface_configuration ();
231234 ASSERT_THAT (state_if_conf.names , IsEmpty ());
235+ EXPECT_EQ (state_if_conf.type , controller_interface::interface_configuration_type::ALL);
232236
233237 // publishers initialized
234238 ASSERT_TRUE (state_broadcaster_->realtime_joint_state_publisher_ );
@@ -274,8 +278,10 @@ TEST_F(JointStateBroadcasterTest, ActivateTestWithoutInterfacesParameter)
274278 // check interface configuration
275279 auto cmd_if_conf = state_broadcaster_->command_interface_configuration ();
276280 ASSERT_THAT (cmd_if_conf.names , IsEmpty ());
281+ EXPECT_EQ (cmd_if_conf.type , controller_interface::interface_configuration_type::NONE);
277282 auto state_if_conf = state_broadcaster_->state_interface_configuration ();
278283 ASSERT_THAT (state_if_conf.names , IsEmpty ());
284+ EXPECT_EQ (state_if_conf.type , controller_interface::interface_configuration_type::ALL);
279285
280286 // publishers initialized
281287 ASSERT_TRUE (state_broadcaster_->realtime_joint_state_publisher_ );
@@ -321,8 +327,10 @@ TEST_F(JointStateBroadcasterTest, ActivateDeactivateTestTwoJointsOneInterface)
321327 // check interface configuration
322328 auto cmd_if_conf = state_broadcaster_->command_interface_configuration ();
323329 ASSERT_THAT (cmd_if_conf.names , IsEmpty ());
330+ EXPECT_EQ (cmd_if_conf.type , controller_interface::interface_configuration_type::NONE);
324331 auto state_if_conf = state_broadcaster_->state_interface_configuration ();
325332 ASSERT_THAT (state_if_conf.names , SizeIs (JOINT_NAMES.size () * IF_NAMES.size ()));
333+ EXPECT_EQ (state_if_conf.type , controller_interface::interface_configuration_type::INDIVIDUAL);
326334
327335 // publishers initialized
328336 ASSERT_TRUE (state_broadcaster_->realtime_joint_state_publisher_ );
@@ -360,9 +368,11 @@ TEST_F(JointStateBroadcasterTest, ActivateDeactivateTestTwoJointsOneInterface)
360368 // check interface configuration
361369 cmd_if_conf = state_broadcaster_->command_interface_configuration ();
362370 ASSERT_THAT (cmd_if_conf.names , IsEmpty ());
371+ EXPECT_EQ (cmd_if_conf.type , controller_interface::interface_configuration_type::NONE);
363372 state_if_conf = state_broadcaster_->state_interface_configuration ();
364373 ASSERT_THAT (
365374 state_if_conf.names , SizeIs (JOINT_NAMES.size () * IF_NAMES.size ())); // does not change
375+ EXPECT_EQ (state_if_conf.type , controller_interface::interface_configuration_type::INDIVIDUAL);
366376}
367377
368378TEST_F (JointStateBroadcasterTest, ActivateTestOneJointTwoInterfaces)
@@ -381,8 +391,10 @@ TEST_F(JointStateBroadcasterTest, ActivateTestOneJointTwoInterfaces)
381391 // check interface configuration
382392 auto cmd_if_conf = state_broadcaster_->command_interface_configuration ();
383393 ASSERT_THAT (cmd_if_conf.names , IsEmpty ());
394+ EXPECT_EQ (cmd_if_conf.type , controller_interface::interface_configuration_type::NONE);
384395 auto state_if_conf = state_broadcaster_->state_interface_configuration ();
385396 ASSERT_THAT (state_if_conf.names , SizeIs (JOINT_NAMES.size () * IF_NAMES.size ()));
397+ EXPECT_EQ (state_if_conf.type , controller_interface::interface_configuration_type::INDIVIDUAL);
386398
387399 // publishers initialized
388400 ASSERT_TRUE (state_broadcaster_->realtime_joint_state_publisher_ );
@@ -455,8 +467,10 @@ TEST_F(JointStateBroadcasterTest, ActivateTestTwoJointTwoInterfacesOneMissing)
455467 // check interface configuration
456468 auto cmd_if_conf = state_broadcaster_->command_interface_configuration ();
457469 ASSERT_THAT (cmd_if_conf.names , IsEmpty ());
470+ EXPECT_EQ (cmd_if_conf.type , controller_interface::interface_configuration_type::NONE);
458471 auto state_if_conf = state_broadcaster_->state_interface_configuration ();
459472 ASSERT_THAT (state_if_conf.names , SizeIs (JOINT_NAMES.size () * IF_NAMES.size ()));
473+ EXPECT_EQ (state_if_conf.type , controller_interface::interface_configuration_type::INDIVIDUAL);
460474
461475 // publishers initialized
462476 ASSERT_TRUE (state_broadcaster_->realtime_joint_state_publisher_ );
@@ -504,8 +518,10 @@ TEST_F(JointStateBroadcasterTest, TestCustomInterfaceWithoutMapping)
504518 // check interface configuration
505519 auto cmd_if_conf = state_broadcaster_->command_interface_configuration ();
506520 ASSERT_THAT (cmd_if_conf.names , IsEmpty ());
521+ EXPECT_EQ (cmd_if_conf.type , controller_interface::interface_configuration_type::NONE);
507522 auto state_if_conf = state_broadcaster_->state_interface_configuration ();
508523 ASSERT_THAT (state_if_conf.names , SizeIs (JOINT_NAMES.size () * IF_NAMES.size ()));
524+ EXPECT_EQ (state_if_conf.type , controller_interface::interface_configuration_type::INDIVIDUAL);
509525
510526 // joint state initialized
511527 const auto & joint_state_msg = state_broadcaster_->realtime_joint_state_publisher_ ->msg_ ;
@@ -547,8 +563,10 @@ TEST_F(JointStateBroadcasterTest, TestCustomInterfaceMapping)
547563 // check interface configuration
548564 auto cmd_if_conf = state_broadcaster_->command_interface_configuration ();
549565 ASSERT_THAT (cmd_if_conf.names , IsEmpty ());
566+ EXPECT_EQ (cmd_if_conf.type , controller_interface::interface_configuration_type::NONE);
550567 auto state_if_conf = state_broadcaster_->state_interface_configuration ();
551568 ASSERT_THAT (state_if_conf.names , SizeIs (JOINT_NAMES.size () * IF_NAMES.size ()));
569+ EXPECT_EQ (state_if_conf.type , controller_interface::interface_configuration_type::INDIVIDUAL);
552570
553571 // joint state initialized
554572 const auto & joint_state_msg = state_broadcaster_->realtime_joint_state_publisher_ ->msg_ ;
0 commit comments