-
Notifications
You must be signed in to change notification settings - Fork 412
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
Add time API coverage tests #1347
Changes from all commits
e3c6677
fc172ff
107ea49
5273325
699197e
7ba92dd
095bd0f
5d54798
b29c102
049ba01
a546ce5
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 |
---|---|---|
|
@@ -209,6 +209,9 @@ TEST_F(TestTimeSource, ROS_time_valid_attach_detach) { | |
|
||
ts.attachNode(node); | ||
EXPECT_FALSE(ros_clock->ros_time_is_active()); | ||
|
||
ts.detachClock(ros_clock); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there anything you can check to make sure detachClock worked as expected? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I added a check similar to the rest of the test scenario here: 5d54798 I didn't see any straightforward way to test it out, the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
We could consider making those protected and deriving the test class from it, but it's not required. |
||
EXPECT_FALSE(ros_clock->ros_time_is_active()); | ||
} | ||
|
||
TEST_F(TestTimeSource, ROS_time_valid_wall_time) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to add coverage for the exceptions thrown during the operators
-
(which callsbounds_check_duration_difference
) and*
(which just needs a check that multiplying byinf
catches the appropriate exception)?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add them before merging! checking Windows CI first
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, see 049ba01