-
Notifications
You must be signed in to change notification settings - Fork 181
Save allocator for RCL_CLOCK_UNINITIALIZED clock. #623
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
50ee2ee
e1597c0
69ec749
ea90b90
ce8d867
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -263,11 +263,22 @@ TEST(CLASSNAME(rcl_time, RMW_IMPLEMENTATION), specific_clock_instantiation) { | |
| rcl_allocator_t allocator = rcl_get_default_allocator(); | ||
| { | ||
| rcl_clock_t uninitialized_clock; | ||
| rcl_ret_t ret = rcl_clock_init( | ||
| RCL_CLOCK_UNINITIALIZED, &uninitialized_clock, &allocator); | ||
| rcl_ret_t ret = rcl_clock_init(RCL_CLOCK_UNINITIALIZED, &uninitialized_clock, &allocator); | ||
Blast545 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| EXPECT_EQ(ret, RCL_RET_OK) << rcl_get_error_string().str; | ||
| EXPECT_EQ(uninitialized_clock.type, RCL_CLOCK_UNINITIALIZED) << | ||
| "Expected time source of type RCL_CLOCK_UNINITIALIZED"; | ||
| ret = rcl_clock_fini(&uninitialized_clock); | ||
| EXPECT_EQ(ret, RCL_RET_INVALID_ARGUMENT) << rcl_get_error_string().str; | ||
| rcl_reset_error(); | ||
|
||
| EXPECT_EQ( | ||
| rcl_ros_clock_fini(&uninitialized_clock), RCL_RET_ERROR) << rcl_get_error_string().str; | ||
| rcl_reset_error(); | ||
| EXPECT_EQ( | ||
| rcl_steady_clock_fini(&uninitialized_clock), RCL_RET_ERROR) << rcl_get_error_string().str; | ||
| rcl_reset_error(); | ||
| EXPECT_EQ( | ||
| rcl_system_clock_fini(&uninitialized_clock), RCL_RET_ERROR) << rcl_get_error_string().str; | ||
| rcl_reset_error(); | ||
Blast545 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
| { | ||
| rcl_clock_t ros_clock; | ||
|
|
@@ -296,6 +307,12 @@ TEST(CLASSNAME(rcl_time, RMW_IMPLEMENTATION), specific_clock_instantiation) { | |
| ret = rcl_clock_fini(&steady_clock); | ||
| EXPECT_EQ(ret, RCL_RET_OK) << rcl_get_error_string().str; | ||
| } | ||
| { | ||
| rcl_clock_t fail_clock; | ||
| rcl_clock_type_t undefined_type = (rcl_clock_type_t) 130; | ||
| rcl_ret_t ret = rcl_clock_init(undefined_type, &fail_clock, &allocator); | ||
| EXPECT_EQ(ret, RCL_RET_INVALID_ARGUMENT) << rcl_get_error_string().str; | ||
Blast545 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
| } | ||
|
|
||
| TEST(CLASSNAME(rcl_time, RMW_IMPLEMENTATION), rcl_time_difference) { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.