Make sure to check the return value of rcl APIs. (#838)
This is just a further check to ensure the test is correct, and also gets rid of a slew of dead store warnings from clang static analysis. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
This commit is contained in:
parent
0d353dde87
commit
885fa21a89
14 changed files with 50 additions and 3 deletions
|
@ -69,6 +69,7 @@ TEST(TestRclLifecycle, lifecycle_state) {
|
|||
rcutils_reset_error();
|
||||
|
||||
ret = rcl_lifecycle_state_init(&state, expected_id, &expected_label[0], &allocator);
|
||||
ASSERT_EQ(RCL_RET_OK, ret) << rcl_get_error_string().str;
|
||||
EXPECT_EQ(expected_id, state.id);
|
||||
EXPECT_STREQ(&expected_label[0], state.label);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue