From 0c16272231bb0ee1e7f4140358129e1105ef8bed Mon Sep 17 00:00:00 2001 From: Arjo Chakravarty Date: Thu, 11 Jan 2024 09:39:45 +0800 Subject: [PATCH] Update tests Signed-off-by: Arjo Chakravarty --- rclrs/src/time.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rclrs/src/time.rs b/rclrs/src/time.rs index b51e92a0b..53eb45efd 100644 --- a/rclrs/src/time.rs +++ b/rclrs/src/time.rs @@ -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); }