Commit 1564c8a 1 parent 8583607 commit 1564c8a Copy full SHA for 1564c8a
File tree 1 file changed +5
-2
lines changed
sensing/pointcloud_preprocessor/test
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -67,16 +67,18 @@ class DistortionCorrectorTest : public ::testing::Test
67
67
68
68
void TearDown () override {}
69
69
70
+ void checkInput (int ms) { ASSERT_LT (ms, 1000 ) << " ms should be less than a second." ; }
71
+
70
72
rclcpp::Time addMilliseconds (rclcpp::Time stamp, int ms)
71
73
{
72
- assert (ms < 1000 && " input ms should be less than a second. " );
74
+ checkInput (ms);
73
75
auto ms_in_ns = rclcpp::Duration (0 , ms * 1000000 );
74
76
return stamp + ms_in_ns;
75
77
}
76
78
77
79
rclcpp::Time subtractMilliseconds (rclcpp::Time stamp, int ms)
78
80
{
79
- assert (ms < 1000 && " input ms should be less than a second. " );
81
+ checkInput (ms);
80
82
auto ms_in_ns = rclcpp::Duration (0 , ms * 1000000 );
81
83
return stamp - ms_in_ns;
82
84
}
@@ -220,6 +222,7 @@ class DistortionCorrectorTest : public ::testing::Test
220
222
pointcloud_msg.width = 0 ;
221
223
pointcloud_msg.row_step = 0 ;
222
224
}
225
+
223
226
return pointcloud_msg;
224
227
}
225
228
You can’t perform that action at this time.
0 commit comments