Skip to content

Commit

Permalink
update types using unique_identifier_msgs
Browse files Browse the repository at this point in the history
  • Loading branch information
dirk-thomas committed Mar 10, 2019
1 parent cc4822b commit 73f2a5b
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 30 deletions.
24 changes: 12 additions & 12 deletions rcl_action/test/rcl_action/test_action_communication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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,
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
36 changes: 18 additions & 18 deletions rcl_action/test/rcl_action/test_action_interaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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(
Expand All @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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(
Expand All @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 73f2a5b

Please sign in to comment.