src
test
test_time.cpp
Go to the documentation of this file.
1
/*
2
* test_time.cpp
3
*
4
* Created on: July 15, 2014
5
* Author: Markus Bader
6
*/
7
8
#include <gtest/gtest.h>
9
#include <
mrpt_bridge/time.h
>
10
#define __STDC_FORMAT_MACROS
11
#include <inttypes.h>
12
#include <boost/date_time/posix_time/time_formatters.hpp>
13
#include <boost/date_time/posix_time/posix_time.hpp>
14
15
TEST
(Time, basicTest)
16
{
17
mrpt::system::TTimeStamp mtime = mrpt::system::getCurrentTime();
18
ros::Time
rtimeDes;
19
mrpt::system::TTimeStamp mtimeDes;
20
mrpt_bridge::convert
(mtime, rtimeDes);
21
mrpt_bridge::convert
(rtimeDes, mtimeDes);
22
std::cout <<
"TimeNow: "
23
<< boost::posix_time::to_simple_string(rtimeDes.
toBoost
())
24
<< std::endl;
25
EXPECT_EQ(mtime, mtimeDes);
26
}
time.h
TimeBase< Time, Duration >::toBoost
boost::posix_time::ptime toBoost() const
TEST
TEST(Time, basicTest)
Definition:
test_time.cpp:15
mrpt_bridge::convert
bool convert(const mrpt_msgs::ObservationRangeBeacon &_msg, const mrpt::poses::CPose3D &_pose, mrpt::obs::CObservationBeaconRanges &_obj)
ros::Time
mrpt_bridge
Author(s): Markus Bader
, Raphael Zack
autogenerated on Sun Mar 6 2022 03:48:10