From 659134374d3eeb11bcb7930468052df1275c1507 Mon Sep 17 00:00:00 2001 From: Dirk Thomas Date: Sun, 17 Feb 2019 21:20:52 -0800 Subject: [PATCH] update types using unique_identifier_msgs --- .../rcl_action/test_action_communication.cpp | 24 ++++++------- .../rcl_action/test_action_interaction.cpp | 36 +++++++++---------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/rcl_action/test/rcl_action/test_action_communication.cpp b/rcl_action/test/rcl_action/test_action_communication.cpp index a5ed5a1ca0..07af43f439 100644 --- a/rcl_action/test/rcl_action/test_action_communication.cpp +++ b/rcl_action/test/rcl_action/test_action_communication.cpp @@ -166,7 +166,7 @@ TEST_F(CLASSNAME(TestActionCommunication, RMW_IMPLEMENTATION), test_valid_goal_c test_msgs__action__Fibonacci_SendGoal_Response__init(&incoming_goal_response); // Initialize goal request - init_test_uuid0(outgoing_goal_request.goal_id); + init_test_uuid0(outgoing_goal_request.goal_id.uuid); outgoing_goal_request.goal.order = 10; // Send goal request with valid arguments @@ -203,8 +203,8 @@ TEST_F(CLASSNAME(TestActionCommunication, RMW_IMPLEMENTATION), test_valid_goal_c // Check that the goal request was received correctly EXPECT_EQ(outgoing_goal_request.goal.order, incoming_goal_request.goal.order); EXPECT_TRUE(uuidcmp( - outgoing_goal_request.goal_id, - incoming_goal_request.goal_id)); + outgoing_goal_request.goal_id.uuid, + incoming_goal_request.goal_id.uuid)); // Initialize goal response outgoing_goal_response.accepted = true; @@ -395,7 +395,7 @@ TEST_F(CLASSNAME(TestActionCommunication, RMW_IMPLEMENTATION), test_valid_result test_msgs__action__Fibonacci_GetResult_Response__init(&incoming_result_response); // Initialize result request - init_test_uuid0(outgoing_result_request.goal_id); + init_test_uuid0(outgoing_result_request.goal_id.uuid); // Send result request with valid arguments int64_t sequence_number; @@ -430,8 +430,8 @@ TEST_F(CLASSNAME(TestActionCommunication, RMW_IMPLEMENTATION), test_valid_result // Check that the result request was received correctly EXPECT_TRUE(uuidcmp( - outgoing_result_request.goal_id, - incoming_result_request.goal_id)); + outgoing_result_request.goal_id.uuid, + incoming_result_request.goal_id.uuid)); // Initialize result response ASSERT_TRUE(rosidl_generator_c__int32__Sequence__init( @@ -582,7 +582,7 @@ TEST_F(CLASSNAME(TestActionCommunication, RMW_IMPLEMENTATION), test_valid_feedba outgoing_feedback.feedback.sequence.data[0] = 0; outgoing_feedback.feedback.sequence.data[1] = 1; outgoing_feedback.feedback.sequence.data[2] = 2; - init_test_uuid0(outgoing_feedback.goal_id); + init_test_uuid0(outgoing_feedback.goal_id.uuid); // Publish feedback with valid arguments rcl_ret_t ret = rcl_action_publish_feedback(&this->action_server, &outgoing_feedback); @@ -617,8 +617,8 @@ TEST_F(CLASSNAME(TestActionCommunication, RMW_IMPLEMENTATION), test_valid_feedba // Check that feedback was received correctly EXPECT_TRUE(uuidcmp( - outgoing_feedback.goal_id, - incoming_feedback.goal_id)); + outgoing_feedback.goal_id.uuid, + incoming_feedback.goal_id.uuid)); ASSERT_EQ(outgoing_feedback.feedback.sequence.size, incoming_feedback.feedback.sequence.size); EXPECT_TRUE(!memcmp( outgoing_feedback.feedback.sequence.data, @@ -637,7 +637,7 @@ TEST_F(CLASSNAME(TestActionCommunication, RMW_IMPLEMENTATION), test_invalid_goal test_msgs__action__Fibonacci_SendGoal_Request__init(&incoming_goal_request); // Initialize goal request - init_test_uuid0(outgoing_goal_request.goal_id); + init_test_uuid0(outgoing_goal_request.goal_id.uuid); outgoing_goal_request.goal.order = 10; int64_t sequence_number = 1234; rcl_ret_t ret = 0; @@ -876,7 +876,7 @@ TEST_F(CLASSNAME(TestActionCommunication, RMW_IMPLEMENTATION), test_invalid_resu test_msgs__action__Fibonacci_GetResult_Request__init(&incoming_result_request); // Initialize result request - init_test_uuid0(outgoing_result_request.goal_id); + init_test_uuid0(outgoing_result_request.goal_id.uuid); // Send result request with null action client int64_t sequence_number = 1324; @@ -999,7 +999,7 @@ TEST_F(CLASSNAME(TestActionCommunication, RMW_IMPLEMENTATION), test_invalid_feed outgoing_feedback.feedback.sequence.data[0] = 0; outgoing_feedback.feedback.sequence.data[1] = 1; outgoing_feedback.feedback.sequence.data[2] = 2; - init_test_uuid0(outgoing_feedback.goal_id); + init_test_uuid0(outgoing_feedback.goal_id.uuid); // Publish feedback with null action server rcl_ret_t ret = rcl_action_publish_feedback(nullptr, &outgoing_feedback); diff --git a/rcl_action/test/rcl_action/test_action_interaction.cpp b/rcl_action/test/rcl_action/test_action_interaction.cpp index 214f261f91..60c0d694b4 100644 --- a/rcl_action/test/rcl_action/test_action_interaction.cpp +++ b/rcl_action/test/rcl_action/test_action_interaction.cpp @@ -197,7 +197,7 @@ class CLASSNAME (TestActionClientServerInteraction, RMW_IMPLEMENTATION) : public TEST_F(CLASSNAME(TestActionClientServerInteraction, RMW_IMPLEMENTATION), test_interaction) { // Initialize goal request - init_test_uuid0(this->outgoing_goal_request.goal_id); + init_test_uuid0(this->outgoing_goal_request.goal_id.uuid); this->outgoing_goal_request.goal.order = 10; // Send goal request with valid arguments @@ -237,8 +237,8 @@ TEST_F(CLASSNAME(TestActionClientServerInteraction, RMW_IMPLEMENTATION), test_in // Check that the goal request was received correctly EXPECT_EQ(this->outgoing_goal_request.goal.order, this->incoming_goal_request.goal.order); EXPECT_TRUE(uuidcmp( - this->outgoing_goal_request.goal_id, - this->incoming_goal_request.goal_id)); + this->outgoing_goal_request.goal_id.uuid, + this->incoming_goal_request.goal_id.uuid)); // Initialize goal response this->outgoing_goal_response.accepted = true; @@ -288,7 +288,7 @@ TEST_F(CLASSNAME(TestActionClientServerInteraction, RMW_IMPLEMENTATION), test_in EXPECT_EQ(this->outgoing_goal_response.stamp.nanosec, this->incoming_goal_response.stamp.nanosec); // Initialize result request - init_test_uuid0(this->outgoing_result_request.goal_id); + init_test_uuid0(this->outgoing_result_request.goal_id.uuid); // Send result request with valid arguments ret = rcl_action_send_result_request( @@ -301,7 +301,7 @@ TEST_F(CLASSNAME(TestActionClientServerInteraction, RMW_IMPLEMENTATION), test_in this->outgoing_feedback.feedback.sequence.data[0] = 0; this->outgoing_feedback.feedback.sequence.data[1] = 1; this->outgoing_feedback.feedback.sequence.data[2] = 2; - init_test_uuid0(this->outgoing_feedback.goal_id); + init_test_uuid0(this->outgoing_feedback.goal_id.uuid); // Publish feedback with valid arguments ret = rcl_action_publish_feedback(&this->action_server, &this->outgoing_feedback); @@ -339,8 +339,8 @@ TEST_F(CLASSNAME(TestActionClientServerInteraction, RMW_IMPLEMENTATION), test_in // Check that feedback was received correctly EXPECT_TRUE(uuidcmp( - this->outgoing_feedback.goal_id, - this->incoming_feedback.goal_id)); + this->outgoing_feedback.goal_id.uuid, + this->incoming_feedback.goal_id.uuid)); ASSERT_EQ( this->outgoing_feedback.feedback.sequence.size, this->incoming_feedback.feedback.sequence.size); @@ -379,8 +379,8 @@ TEST_F(CLASSNAME(TestActionClientServerInteraction, RMW_IMPLEMENTATION), test_in // Check that the result request was received correctly EXPECT_TRUE(uuidcmp( - this->outgoing_result_request.goal_id, - this->incoming_result_request.goal_id)); + this->outgoing_result_request.goal_id.uuid, + this->incoming_result_request.goal_id.uuid)); // Initialize result response ASSERT_TRUE(rosidl_generator_c__int32__Sequence__init( @@ -458,7 +458,7 @@ TEST_F( action_msgs__srv__CancelGoal_Response__init(&incoming_cancel_response); // Initialize goal request - init_test_uuid0(this->outgoing_goal_request.goal_id); + init_test_uuid0(this->outgoing_goal_request.goal_id.uuid); this->outgoing_goal_request.goal.order = 10; // Send goal request with valid arguments @@ -498,8 +498,8 @@ TEST_F( // Check that the goal request was received correctly EXPECT_EQ(this->outgoing_goal_request.goal.order, this->incoming_goal_request.goal.order); EXPECT_TRUE(uuidcmp( - this->outgoing_goal_request.goal_id, - this->incoming_goal_request.goal_id)); + this->outgoing_goal_request.goal_id.uuid, + this->incoming_goal_request.goal_id.uuid)); // Initialize goal response this->outgoing_goal_response.accepted = true; @@ -549,7 +549,7 @@ TEST_F( EXPECT_EQ(this->outgoing_goal_response.stamp.nanosec, this->incoming_goal_response.stamp.nanosec); // Initialize result request - init_test_uuid0(this->outgoing_result_request.goal_id); + init_test_uuid0(this->outgoing_result_request.goal_id.uuid); // Send result request with valid arguments ret = rcl_action_send_result_request( @@ -562,7 +562,7 @@ TEST_F( this->outgoing_feedback.feedback.sequence.data[0] = 0; this->outgoing_feedback.feedback.sequence.data[1] = 1; this->outgoing_feedback.feedback.sequence.data[2] = 2; - init_test_uuid0(this->outgoing_feedback.goal_id); + init_test_uuid0(this->outgoing_feedback.goal_id.uuid); // Publish feedback with valid arguments ret = rcl_action_publish_feedback(&this->action_server, &this->outgoing_feedback); @@ -600,8 +600,8 @@ TEST_F( // Check that feedback was received correctly EXPECT_TRUE(uuidcmp( - this->outgoing_feedback.goal_id, - this->incoming_feedback.goal_id)); + this->outgoing_feedback.goal_id.uuid, + this->incoming_feedback.goal_id.uuid)); ASSERT_EQ( this->outgoing_feedback.feedback.sequence.size, this->incoming_feedback.feedback.sequence.size); @@ -640,8 +640,8 @@ TEST_F( // Check that the result request was received correctly EXPECT_TRUE(uuidcmp( - this->outgoing_result_request.goal_id, - this->incoming_result_request.goal_id)); + this->outgoing_result_request.goal_id.uuid, + this->incoming_result_request.goal_id.uuid)); // Initialize result response ASSERT_TRUE(rosidl_generator_c__int32__Sequence__init(