Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org>
  • Loading branch information
arjo129 committed Jan 11, 2024
1 parent 9c1beaa commit 0c16272
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rclrs/src/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,13 @@ mod tests {

#[test]
fn test_conversion() {
let clock = Clock::system();
let t1 = clock.now();
let time = Time {
nsec: 1_000_000_100,
clock: t1.clock.clone(),
};
let msg = time.to_msg().unwrap();
let msg = time.to_ros_msg().unwrap();
assert_eq!(msg.nanosec, 100);
assert_eq!(msg.sec, 1);
}
Expand Down

0 comments on commit 0c16272

Please sign in to comment.