adapt to action implicit changes (#353)
This commit is contained in:
parent
8d6fb9aab5
commit
66b82291a1
2 changed files with 47 additions and 31 deletions
|
@ -165,7 +165,7 @@ TEST_F(CLASSNAME(TestActionCommunication, RMW_IMPLEMENTATION), test_valid_goal_c
|
|||
test_msgs__action__Fibonacci_Goal_Response__init(&incoming_goal_response);
|
||||
|
||||
// Initialize goal request
|
||||
init_test_uuid0(outgoing_goal_request.uuid);
|
||||
init_test_uuid0(outgoing_goal_request.action_goal_id.uuid);
|
||||
outgoing_goal_request.order = 10;
|
||||
|
||||
// Send goal request with valid arguments
|
||||
|
@ -201,7 +201,9 @@ TEST_F(CLASSNAME(TestActionCommunication, RMW_IMPLEMENTATION), test_valid_goal_c
|
|||
|
||||
// Check that the goal request was received correctly
|
||||
EXPECT_EQ(outgoing_goal_request.order, incoming_goal_request.order);
|
||||
EXPECT_TRUE(uuidcmp(outgoing_goal_request.uuid, incoming_goal_request.uuid));
|
||||
EXPECT_TRUE(uuidcmp(
|
||||
outgoing_goal_request.action_goal_id.uuid,
|
||||
incoming_goal_request.action_goal_id.uuid));
|
||||
|
||||
// Initialize goal response
|
||||
outgoing_goal_response.accepted = true;
|
||||
|
@ -392,7 +394,7 @@ TEST_F(CLASSNAME(TestActionCommunication, RMW_IMPLEMENTATION), test_valid_result
|
|||
test_msgs__action__Fibonacci_Result_Response__init(&incoming_result_response);
|
||||
|
||||
// Initialize result request
|
||||
init_test_uuid0(outgoing_result_request.uuid);
|
||||
init_test_uuid0(outgoing_result_request.action_goal_id.uuid);
|
||||
|
||||
// Send result request with valid arguments
|
||||
int64_t sequence_number;
|
||||
|
@ -427,8 +429,8 @@ TEST_F(CLASSNAME(TestActionCommunication, RMW_IMPLEMENTATION), test_valid_result
|
|||
|
||||
// Check that the result request was received correctly
|
||||
EXPECT_TRUE(uuidcmp(
|
||||
outgoing_result_request.uuid,
|
||||
incoming_result_request.uuid));
|
||||
outgoing_result_request.action_goal_id.uuid,
|
||||
incoming_result_request.action_goal_id.uuid));
|
||||
|
||||
// Initialize result response
|
||||
ASSERT_TRUE(rosidl_generator_c__int32__Sequence__init(
|
||||
|
@ -437,7 +439,7 @@ TEST_F(CLASSNAME(TestActionCommunication, RMW_IMPLEMENTATION), test_valid_result
|
|||
outgoing_result_response.sequence.data[1] = 1;
|
||||
outgoing_result_response.sequence.data[2] = 2;
|
||||
outgoing_result_response.sequence.data[3] = 6;
|
||||
outgoing_result_response.status =
|
||||
outgoing_result_response.action_status =
|
||||
action_msgs__msg__GoalStatus__STATUS_SUCCEEDED;
|
||||
|
||||
// Send result response with valid arguments
|
||||
|
@ -476,7 +478,7 @@ TEST_F(CLASSNAME(TestActionCommunication, RMW_IMPLEMENTATION), test_valid_result
|
|||
EXPECT_EQ(ret, RCL_RET_OK) << rcl_get_error_string().str;
|
||||
|
||||
// Check that the result response was received correctly
|
||||
EXPECT_EQ(outgoing_result_response.status, incoming_result_response.status);
|
||||
EXPECT_EQ(outgoing_result_response.action_status, incoming_result_response.action_status);
|
||||
ASSERT_EQ(outgoing_result_response.sequence.size, incoming_result_response.sequence.size);
|
||||
EXPECT_TRUE(!memcmp(
|
||||
outgoing_result_response.sequence.data,
|
||||
|
@ -577,7 +579,7 @@ TEST_F(CLASSNAME(TestActionCommunication, RMW_IMPLEMENTATION), test_valid_feedba
|
|||
outgoing_feedback.sequence.data[0] = 0;
|
||||
outgoing_feedback.sequence.data[1] = 1;
|
||||
outgoing_feedback.sequence.data[2] = 2;
|
||||
init_test_uuid0(outgoing_feedback.uuid);
|
||||
init_test_uuid0(outgoing_feedback.action_goal_id.uuid);
|
||||
|
||||
// Publish feedback with valid arguments
|
||||
rcl_ret_t ret = rcl_action_publish_feedback(&this->action_server, &outgoing_feedback);
|
||||
|
@ -611,7 +613,9 @@ TEST_F(CLASSNAME(TestActionCommunication, RMW_IMPLEMENTATION), test_valid_feedba
|
|||
EXPECT_EQ(ret, RCL_RET_OK) << rcl_get_error_string().str;
|
||||
|
||||
// Check that feedback was received correctly
|
||||
EXPECT_TRUE(uuidcmp(outgoing_feedback.uuid, incoming_feedback.uuid));
|
||||
EXPECT_TRUE(uuidcmp(
|
||||
outgoing_feedback.action_goal_id.uuid,
|
||||
incoming_feedback.action_goal_id.uuid));
|
||||
ASSERT_EQ(outgoing_feedback.sequence.size, incoming_feedback.sequence.size);
|
||||
EXPECT_TRUE(!memcmp(
|
||||
outgoing_feedback.sequence.data,
|
||||
|
@ -630,7 +634,7 @@ TEST_F(CLASSNAME(TestActionCommunication, RMW_IMPLEMENTATION), test_invalid_goal
|
|||
test_msgs__action__Fibonacci_Goal_Request__init(&incoming_goal_request);
|
||||
|
||||
// Initialize goal request
|
||||
init_test_uuid0(outgoing_goal_request.uuid);
|
||||
init_test_uuid0(outgoing_goal_request.action_goal_id.uuid);
|
||||
outgoing_goal_request.order = 10;
|
||||
int64_t sequence_number = 1234;
|
||||
rcl_ret_t ret = 0;
|
||||
|
@ -869,7 +873,7 @@ TEST_F(CLASSNAME(TestActionCommunication, RMW_IMPLEMENTATION), test_invalid_resu
|
|||
test_msgs__action__Fibonacci_Result_Request__init(&incoming_result_request);
|
||||
|
||||
// Initialize result request
|
||||
init_test_uuid0(outgoing_result_request.uuid);
|
||||
init_test_uuid0(outgoing_result_request.action_goal_id.uuid);
|
||||
|
||||
// Send result request with null action client
|
||||
int64_t sequence_number = 1324;
|
||||
|
@ -931,7 +935,7 @@ TEST_F(CLASSNAME(TestActionCommunication, RMW_IMPLEMENTATION), test_invalid_resu
|
|||
outgoing_result_response.sequence.data[1] = 1;
|
||||
outgoing_result_response.sequence.data[2] = 2;
|
||||
outgoing_result_response.sequence.data[3] = 6;
|
||||
outgoing_result_response.status =
|
||||
outgoing_result_response.action_status =
|
||||
action_msgs__msg__GoalStatus__STATUS_SUCCEEDED;
|
||||
|
||||
// Send result response with null action client
|
||||
|
@ -992,7 +996,7 @@ TEST_F(CLASSNAME(TestActionCommunication, RMW_IMPLEMENTATION), test_invalid_feed
|
|||
outgoing_feedback.sequence.data[0] = 0;
|
||||
outgoing_feedback.sequence.data[1] = 1;
|
||||
outgoing_feedback.sequence.data[2] = 2;
|
||||
init_test_uuid0(outgoing_feedback.uuid);
|
||||
init_test_uuid0(outgoing_feedback.action_goal_id.uuid);
|
||||
|
||||
// Publish feedback with null action server
|
||||
rcl_ret_t ret = rcl_action_publish_feedback(nullptr, &outgoing_feedback);
|
||||
|
|
|
@ -196,7 +196,7 @@ protected:
|
|||
TEST_F(CLASSNAME(TestActionClientServerInteraction, RMW_IMPLEMENTATION), test_interaction)
|
||||
{
|
||||
// Initialize goal request
|
||||
init_test_uuid0(this->outgoing_goal_request.uuid);
|
||||
init_test_uuid0(this->outgoing_goal_request.action_goal_id.uuid);
|
||||
this->outgoing_goal_request.order = 10;
|
||||
|
||||
// Send goal request with valid arguments
|
||||
|
@ -235,7 +235,9 @@ TEST_F(CLASSNAME(TestActionClientServerInteraction, RMW_IMPLEMENTATION), test_in
|
|||
|
||||
// Check that the goal request was received correctly
|
||||
EXPECT_EQ(this->outgoing_goal_request.order, this->incoming_goal_request.order);
|
||||
EXPECT_TRUE(uuidcmp(this->outgoing_goal_request.uuid, this->incoming_goal_request.uuid));
|
||||
EXPECT_TRUE(uuidcmp(
|
||||
this->outgoing_goal_request.action_goal_id.uuid,
|
||||
this->incoming_goal_request.action_goal_id.uuid));
|
||||
|
||||
// Initialize goal response
|
||||
this->outgoing_goal_response.accepted = true;
|
||||
|
@ -285,7 +287,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.uuid);
|
||||
init_test_uuid0(this->outgoing_result_request.action_goal_id.uuid);
|
||||
|
||||
// Send result request with valid arguments
|
||||
ret = rcl_action_send_result_request(
|
||||
|
@ -298,7 +300,7 @@ TEST_F(CLASSNAME(TestActionClientServerInteraction, RMW_IMPLEMENTATION), test_in
|
|||
this->outgoing_feedback.sequence.data[0] = 0;
|
||||
this->outgoing_feedback.sequence.data[1] = 1;
|
||||
this->outgoing_feedback.sequence.data[2] = 2;
|
||||
init_test_uuid0(this->outgoing_feedback.uuid);
|
||||
init_test_uuid0(this->outgoing_feedback.action_goal_id.uuid);
|
||||
|
||||
// Publish feedback with valid arguments
|
||||
ret = rcl_action_publish_feedback(&this->action_server, &this->outgoing_feedback);
|
||||
|
@ -335,7 +337,9 @@ TEST_F(CLASSNAME(TestActionClientServerInteraction, RMW_IMPLEMENTATION), test_in
|
|||
EXPECT_EQ(ret, RCL_RET_OK) << rcl_get_error_string().str;
|
||||
|
||||
// Check that feedback was received correctly
|
||||
EXPECT_TRUE(uuidcmp(this->outgoing_feedback.uuid, this->incoming_feedback.uuid));
|
||||
EXPECT_TRUE(uuidcmp(
|
||||
this->outgoing_feedback.action_goal_id.uuid,
|
||||
this->incoming_feedback.action_goal_id.uuid));
|
||||
ASSERT_EQ(this->outgoing_feedback.sequence.size, this->incoming_feedback.sequence.size);
|
||||
EXPECT_TRUE(!memcmp(
|
||||
this->outgoing_feedback.sequence.data,
|
||||
|
@ -372,8 +376,8 @@ TEST_F(CLASSNAME(TestActionClientServerInteraction, RMW_IMPLEMENTATION), test_in
|
|||
|
||||
// Check that the result request was received correctly
|
||||
EXPECT_TRUE(uuidcmp(
|
||||
this->outgoing_result_request.uuid,
|
||||
this->incoming_result_request.uuid));
|
||||
this->outgoing_result_request.action_goal_id.uuid,
|
||||
this->incoming_result_request.action_goal_id.uuid));
|
||||
|
||||
// Initialize result response
|
||||
ASSERT_TRUE(rosidl_generator_c__int32__Sequence__init(
|
||||
|
@ -382,7 +386,7 @@ TEST_F(CLASSNAME(TestActionClientServerInteraction, RMW_IMPLEMENTATION), test_in
|
|||
this->outgoing_result_response.sequence.data[1] = 1;
|
||||
this->outgoing_result_response.sequence.data[2] = 2;
|
||||
this->outgoing_result_response.sequence.data[3] = 6;
|
||||
this->outgoing_result_response.status =
|
||||
this->outgoing_result_response.action_status =
|
||||
action_msgs__msg__GoalStatus__STATUS_SUCCEEDED;
|
||||
|
||||
// Send result response with valid arguments
|
||||
|
@ -422,7 +426,9 @@ TEST_F(CLASSNAME(TestActionClientServerInteraction, RMW_IMPLEMENTATION), test_in
|
|||
EXPECT_EQ(ret, RCL_RET_OK) << rcl_get_error_string().str;
|
||||
|
||||
// Check that the result response was received correctly
|
||||
EXPECT_EQ(this->outgoing_result_response.status, this->incoming_result_response.status);
|
||||
EXPECT_EQ(
|
||||
this->outgoing_result_response.action_status,
|
||||
this->incoming_result_response.action_status);
|
||||
ASSERT_EQ(
|
||||
this->outgoing_result_response.sequence.size, this->incoming_result_response.sequence.size);
|
||||
EXPECT_TRUE(!memcmp(
|
||||
|
@ -448,7 +454,7 @@ TEST_F(
|
|||
action_msgs__srv__CancelGoal_Response__init(&incoming_cancel_response);
|
||||
|
||||
// Initialize goal request
|
||||
init_test_uuid0(this->outgoing_goal_request.uuid);
|
||||
init_test_uuid0(this->outgoing_goal_request.action_goal_id.uuid);
|
||||
this->outgoing_goal_request.order = 10;
|
||||
|
||||
// Send goal request with valid arguments
|
||||
|
@ -487,7 +493,9 @@ TEST_F(
|
|||
|
||||
// Check that the goal request was received correctly
|
||||
EXPECT_EQ(this->outgoing_goal_request.order, this->incoming_goal_request.order);
|
||||
EXPECT_TRUE(uuidcmp(this->outgoing_goal_request.uuid, this->incoming_goal_request.uuid));
|
||||
EXPECT_TRUE(uuidcmp(
|
||||
this->outgoing_goal_request.action_goal_id.uuid,
|
||||
this->incoming_goal_request.action_goal_id.uuid));
|
||||
|
||||
// Initialize goal response
|
||||
this->outgoing_goal_response.accepted = true;
|
||||
|
@ -537,7 +545,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.uuid);
|
||||
init_test_uuid0(this->outgoing_result_request.action_goal_id.uuid);
|
||||
|
||||
// Send result request with valid arguments
|
||||
ret = rcl_action_send_result_request(
|
||||
|
@ -550,7 +558,7 @@ TEST_F(
|
|||
this->outgoing_feedback.sequence.data[0] = 0;
|
||||
this->outgoing_feedback.sequence.data[1] = 1;
|
||||
this->outgoing_feedback.sequence.data[2] = 2;
|
||||
init_test_uuid0(this->outgoing_feedback.uuid);
|
||||
init_test_uuid0(this->outgoing_feedback.action_goal_id.uuid);
|
||||
|
||||
// Publish feedback with valid arguments
|
||||
ret = rcl_action_publish_feedback(&this->action_server, &this->outgoing_feedback);
|
||||
|
@ -587,7 +595,9 @@ TEST_F(
|
|||
EXPECT_EQ(ret, RCL_RET_OK) << rcl_get_error_string().str;
|
||||
|
||||
// Check that feedback was received correctly
|
||||
EXPECT_TRUE(uuidcmp(this->outgoing_feedback.uuid, this->incoming_feedback.uuid));
|
||||
EXPECT_TRUE(uuidcmp(
|
||||
this->outgoing_feedback.action_goal_id.uuid,
|
||||
this->incoming_feedback.action_goal_id.uuid));
|
||||
ASSERT_EQ(this->outgoing_feedback.sequence.size, this->incoming_feedback.sequence.size);
|
||||
EXPECT_TRUE(!memcmp(
|
||||
this->outgoing_feedback.sequence.data,
|
||||
|
@ -624,8 +634,8 @@ TEST_F(
|
|||
|
||||
// Check that the result request was received correctly
|
||||
EXPECT_TRUE(uuidcmp(
|
||||
this->outgoing_result_request.uuid,
|
||||
this->incoming_result_request.uuid));
|
||||
this->outgoing_result_request.action_goal_id.uuid,
|
||||
this->incoming_result_request.action_goal_id.uuid));
|
||||
|
||||
// Initialize result response
|
||||
ASSERT_TRUE(rosidl_generator_c__int32__Sequence__init(
|
||||
|
@ -634,7 +644,7 @@ TEST_F(
|
|||
this->outgoing_result_response.sequence.data[1] = 1;
|
||||
this->outgoing_result_response.sequence.data[2] = 2;
|
||||
this->outgoing_result_response.sequence.data[3] = 6;
|
||||
this->outgoing_result_response.status =
|
||||
this->outgoing_result_response.action_status =
|
||||
action_msgs__msg__GoalStatus__STATUS_SUCCEEDED;
|
||||
|
||||
// Initialize cancel request
|
||||
|
@ -778,7 +788,9 @@ TEST_F(
|
|||
EXPECT_EQ(ret, RCL_RET_OK) << rcl_get_error_string().str;
|
||||
|
||||
// Check that the result response was received correctly
|
||||
EXPECT_EQ(this->outgoing_result_response.status, this->incoming_result_response.status);
|
||||
EXPECT_EQ(
|
||||
this->outgoing_result_response.action_status,
|
||||
this->incoming_result_response.action_status);
|
||||
ASSERT_EQ(
|
||||
this->outgoing_result_response.sequence.size, this->incoming_result_response.sequence.size);
|
||||
EXPECT_TRUE(!memcmp(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue