Functions | Variables
test/time.cpp File Reference
#include <vector>
#include <gtest/gtest.h>
#include <ros/rate.h>
#include <ros/time.h>
#include <sys/time.h>
#include <boost/date_time/posix_time/ptime.hpp>
Include dependency graph for test/time.cpp:

Go to the source code of this file.

Functions

void alarmHandler (int sig)
 
void generate_rand_durations (uint32_t range, uint64_t runs, std::vector< ros::Duration > &values1, std::vector< ros::Duration > &values2)
 
void generate_rand_times (uint32_t range, uint64_t runs, std::vector< ros::Time > &values1, std::vector< ros::Time > &values2)
 
int main (int argc, char **argv)
 
void seed_rand ()
 
 TEST (Time, size)
 
 TEST (Time, Comparitors)
 
 TEST (Time, ToFromDouble)
 
 TEST (Time, RoundingError)
 
 TEST (Time, OperatorPlus)
 
 TEST (Time, OperatorMinus)
 
 TEST (Time, OperatorPlusEquals)
 
 TEST (Time, OperatorMinusEquals)
 
 TEST (Time, SecNSecConstructor)
 
 TEST (Time, DontMungeStreamState)
 
 TEST (Time, ToFromBoost)
 
 TEST (Time, CastFromDoubleExceptions)
 
 TEST (Time, OperatorMinusExceptions)
 
 TEST (Time, OperatorPlusExceptions)
 
 TEST (Duration, Comparitors)
 
 TEST (Duration, ToFromSec)
 
 TEST (Duration, FromNSec)
 
 TEST (Duration, OperatorPlus)
 
 TEST (Duration, OperatorMinus)
 
 TEST (Duration, OperatorTimes)
 
 TEST (Duration, OperatorPlusEquals)
 
 TEST (Duration, OperatorMinusEquals)
 
 TEST (Duration, sleepWithSignal)
 
 TEST (Rate, constructFromDuration)
 
 TEST (Rate, sleep_return_value_true)
 
 TEST (Rate, sleep_return_value_false)
 
 TEST (WallRate, constructFromDuration)
 
 TEST (SteadyTime, sleep)
 
 TEST (SteadyTime, sleepUntil)
 

Variables

double epsilon = 1e-9
 

Function Documentation

◆ alarmHandler()

void alarmHandler ( int  sig)

Definition at line 533 of file test/time.cpp.

◆ generate_rand_durations()

void generate_rand_durations ( uint32_t  range,
uint64_t  runs,
std::vector< ros::Duration > &  values1,
std::vector< ros::Duration > &  values2 
)

Definition at line 74 of file test/time.cpp.

◆ generate_rand_times()

void generate_rand_times ( uint32_t  range,
uint64_t  runs,
std::vector< ros::Time > &  values1,
std::vector< ros::Time > &  values2 
)

Definition at line 60 of file test/time.cpp.

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 607 of file test/time.cpp.

◆ seed_rand()

void seed_rand ( )

Definition at line 48 of file test/time.cpp.

◆ TEST() [1/29]

TEST ( Time  ,
size   
)

Definition at line 109 of file test/time.cpp.

◆ TEST() [2/29]

TEST ( Time  ,
Comparitors   
)

Definition at line 115 of file test/time.cpp.

◆ TEST() [3/29]

TEST ( Time  ,
ToFromDouble   
)

Definition at line 148 of file test/time.cpp.

◆ TEST() [4/29]

TEST ( Time  ,
RoundingError   
)

Definition at line 162 of file test/time.cpp.

◆ TEST() [5/29]

TEST ( Time  ,
OperatorPlus   
)

Definition at line 177 of file test/time.cpp.

◆ TEST() [6/29]

TEST ( Time  ,
OperatorMinus   
)

Definition at line 198 of file test/time.cpp.

◆ TEST() [7/29]

TEST ( Time  ,
OperatorPlusEquals   
)

Definition at line 219 of file test/time.cpp.

◆ TEST() [8/29]

TEST ( Time  ,
OperatorMinusEquals   
)

Definition at line 240 of file test/time.cpp.

◆ TEST() [9/29]

TEST ( Time  ,
SecNSecConstructor   
)

Definition at line 261 of file test/time.cpp.

◆ TEST() [10/29]

TEST ( Time  ,
DontMungeStreamState   
)

Definition at line 268 of file test/time.cpp.

◆ TEST() [11/29]

TEST ( Time  ,
ToFromBoost   
)

Definition at line 280 of file test/time.cpp.

◆ TEST() [12/29]

TEST ( Time  ,
CastFromDoubleExceptions   
)

Definition at line 297 of file test/time.cpp.

◆ TEST() [13/29]

TEST ( Time  ,
OperatorMinusExceptions   
)

Definition at line 313 of file test/time.cpp.

◆ TEST() [14/29]

TEST ( Time  ,
OperatorPlusExceptions   
)

Definition at line 344 of file test/time.cpp.

◆ TEST() [15/29]

TEST ( Duration  ,
Comparitors   
)

Definition at line 368 of file test/time.cpp.

◆ TEST() [16/29]

TEST ( Duration  ,
ToFromSec   
)

Definition at line 402 of file test/time.cpp.

◆ TEST() [17/29]

TEST ( Duration  ,
FromNSec   
)

Definition at line 418 of file test/time.cpp.

◆ TEST() [18/29]

TEST ( Duration  ,
OperatorPlus   
)

Definition at line 434 of file test/time.cpp.

◆ TEST() [19/29]

TEST ( Duration  ,
OperatorMinus   
)

Definition at line 450 of file test/time.cpp.

◆ TEST() [20/29]

TEST ( Duration  ,
OperatorTimes   
)

Definition at line 475 of file test/time.cpp.

◆ TEST() [21/29]

TEST ( Duration  ,
OperatorPlusEquals   
)

Definition at line 491 of file test/time.cpp.

◆ TEST() [22/29]

TEST ( Duration  ,
OperatorMinusEquals   
)

Definition at line 512 of file test/time.cpp.

◆ TEST() [23/29]

TEST ( Duration  ,
sleepWithSignal   
)

Definition at line 538 of file test/time.cpp.

◆ TEST() [24/29]

TEST ( Rate  ,
constructFromDuration   
)

Definition at line 554 of file test/time.cpp.

◆ TEST() [25/29]

TEST ( Rate  ,
sleep_return_value_true   
)

Definition at line 560 of file test/time.cpp.

◆ TEST() [26/29]

TEST ( Rate  ,
sleep_return_value_false   
)

Definition at line 566 of file test/time.cpp.

◆ TEST() [27/29]

TEST ( WallRate  ,
constructFromDuration   
)

Definition at line 572 of file test/time.cpp.

◆ TEST() [28/29]

TEST ( SteadyTime  ,
sleep   
)

Definition at line 587 of file test/time.cpp.

◆ TEST() [29/29]

TEST ( SteadyTime  ,
sleepUntil   
)

Definition at line 597 of file test/time.cpp.

Variable Documentation

◆ epsilon

double epsilon = 1e-9
Todo:
All the tests in here that use randomized values are not unit tests, replace them

Definition at line 46 of file test/time.cpp.



rostime
Author(s): Josh Faust
autogenerated on Mon Jul 27 2020 03:43:45