Skip to content

Commit

Permalink
Update time primatives to int64_t
Browse files Browse the repository at this point in the history
  • Loading branch information
tfoote authored Jan 31, 2018
1 parent 4a90a8a commit 4935c78
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rclcpp/test/test_time.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ TEST(TestTime, conversions) {

rclcpp::Time time = msg;
EXPECT_EQ(
RCL_S_TO_NS(static_cast<uint64_t>(msg.sec)) + static_cast<uint64_t>(msg.nanosec),
RCL_S_TO_NS(static_cast<int64_t>(msg.sec)) + static_cast<int64_t>(msg.nanosec),
time.nanoseconds());
EXPECT_EQ(static_cast<uint64_t>(msg.sec), RCL_NS_TO_S(time.nanoseconds()));
EXPECT_EQ(static_cast<int64_t>(msg.sec), RCL_NS_TO_S(time.nanoseconds()));

builtin_interfaces::msg::Time negative_time_msg;
negative_time_msg.sec = -1;
Expand Down

0 comments on commit 4935c78

Please sign in to comment.