test_time.cpp
Go to the documentation of this file.
00001 /*
00002  * test_time.cpp
00003  *
00004  *  Created on: July 15, 2014
00005  *      Author: Markus Bader
00006  */
00007 
00008 #include <gtest/gtest.h>
00009 #include <mrpt_bridge/time.h>
00010 #define __STDC_FORMAT_MACROS
00011 #include <inttypes.h>
00012 #include <boost/date_time/posix_time/time_formatters.hpp>
00013 #include <boost/date_time/posix_time/posix_time.hpp>
00014 
00015 TEST(Time, basicTest)
00016 {
00017         mrpt::system::TTimeStamp mtime = mrpt::system::getCurrentLocalTime();
00018         ros::Time rtimeDes;
00019         mrpt::system::TTimeStamp mtimeDes;
00020         mrpt_bridge::convert(mtime, rtimeDes);
00021         mrpt_bridge::convert(rtimeDes, mtimeDes);
00022         std::cout << "TimeNow: "
00023                           << boost::posix_time::to_simple_string(rtimeDes.toBoost())
00024                           << std::endl;
00025         EXPECT_EQ(mtime, mtimeDes);
00026 }


mrpt_bridge
Author(s): Markus Bader , Raphael Zack
autogenerated on Fri Apr 27 2018 05:10:54