Skip to content

Commit 0c16272

Browse files
committed
Update tests
Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org>
1 parent 9c1beaa commit 0c16272

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

rclrs/src/time.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,13 @@ mod tests {
9999

100100
#[test]
101101
fn test_conversion() {
102+
let clock = Clock::system();
103+
let t1 = clock.now();
102104
let time = Time {
103105
nsec: 1_000_000_100,
106+
clock: t1.clock.clone(),
104107
};
105-
let msg = time.to_msg().unwrap();
108+
let msg = time.to_ros_msg().unwrap();
106109
assert_eq!(msg.nanosec, 100);
107110
assert_eq!(msg.sec, 1);
108111
}

0 commit comments

Comments
 (0)