Functions | Variables
test/time.cpp File Reference
#include <limits>
#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 (Duration, Comparitors)
 
 TEST (Duration, Constants)
 
 TEST (Duration, FromNSec)
 
 TEST (Duration, OperatorMinus)
 
 TEST (Duration, OperatorMinusEquals)
 
 TEST (Duration, OperatorPlus)
 
 TEST (Duration, OperatorPlusEquals)
 
 TEST (Duration, OperatorTimes)
 
 TEST (Duration, sleepWithSignal)
 
 TEST (Duration, ToFromSec)
 
 TEST (Rate, constructFromDouble)
 
 TEST (Rate, constructFromDuration)
 
 TEST (Rate, sleep_return_value_false)
 
 TEST (Rate, sleep_return_value_true)
 
 TEST (SteadyTime, sleep)
 
 TEST (SteadyTime, sleepUntil)
 
 TEST (Time, CastFromDoubleExceptions)
 
 TEST (Time, Comparitors)
 
 TEST (Time, Constants)
 
 TEST (Time, DontMungeStreamState)
 
 TEST (Time, OperatorMinus)
 
 TEST (Time, OperatorMinusEquals)
 
 TEST (Time, OperatorMinusExceptions)
 
 TEST (Time, OperatorPlus)
 
 TEST (Time, OperatorPlusEquals)
 
 TEST (Time, OperatorPlusExceptions)
 
 TEST (Time, RoundingError)
 
 TEST (Time, SecNSecConstructor)
 
 TEST (Time, size)
 
 TEST (Time, ToFromBoost)
 
 TEST (Time, ToFromDouble)
 
 TEST (WallRate, constructFromDouble)
 
 TEST (WallRate, constructFromDuration)
 

Variables

double epsilon = 1e-9
 

Function Documentation

◆ alarmHandler()

void alarmHandler ( int  sig)

Definition at line 570 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 75 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 61 of file test/time.cpp.

◆ main()

int main ( int  argc,
char **  argv 
)

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

◆ seed_rand()

void seed_rand ( )

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

◆ TEST() [1/33]

TEST ( Duration  ,
Comparitors   
)

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

◆ TEST() [2/33]

TEST ( Duration  ,
Constants   
)

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

◆ TEST() [3/33]

TEST ( Duration  ,
FromNSec   
)

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

◆ TEST() [4/33]

TEST ( Duration  ,
OperatorMinus   
)

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

◆ TEST() [5/33]

TEST ( Duration  ,
OperatorMinusEquals   
)

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

◆ TEST() [6/33]

TEST ( Duration  ,
OperatorPlus   
)

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

◆ TEST() [7/33]

TEST ( Duration  ,
OperatorPlusEquals   
)

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

◆ TEST() [8/33]

TEST ( Duration  ,
OperatorTimes   
)

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

◆ TEST() [9/33]

TEST ( Duration  ,
sleepWithSignal   
)

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

◆ TEST() [10/33]

TEST ( Duration  ,
ToFromSec   
)

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

◆ TEST() [11/33]

TEST ( Rate  ,
constructFromDouble   
)

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

◆ TEST() [12/33]

TEST ( Rate  ,
constructFromDuration   
)

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

◆ TEST() [13/33]

TEST ( Rate  ,
sleep_return_value_false   
)

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

◆ TEST() [14/33]

TEST ( Rate  ,
sleep_return_value_true   
)

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

◆ TEST() [15/33]

TEST ( SteadyTime  ,
sleep   
)

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

◆ TEST() [16/33]

TEST ( SteadyTime  ,
sleepUntil   
)

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

◆ TEST() [17/33]

TEST ( Time  ,
CastFromDoubleExceptions   
)

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

◆ TEST() [18/33]

TEST ( Time  ,
Comparitors   
)

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

◆ TEST() [19/33]

TEST ( Time  ,
Constants   
)

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

◆ TEST() [20/33]

TEST ( Time  ,
DontMungeStreamState   
)

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

◆ TEST() [21/33]

TEST ( Time  ,
OperatorMinus   
)

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

◆ TEST() [22/33]

TEST ( Time  ,
OperatorMinusEquals   
)

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

◆ TEST() [23/33]

TEST ( Time  ,
OperatorMinusExceptions   
)

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

◆ TEST() [24/33]

TEST ( Time  ,
OperatorPlus   
)

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

◆ TEST() [25/33]

TEST ( Time  ,
OperatorPlusEquals   
)

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

◆ TEST() [26/33]

TEST ( Time  ,
OperatorPlusExceptions   
)

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

◆ TEST() [27/33]

TEST ( Time  ,
RoundingError   
)

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

◆ TEST() [28/33]

TEST ( Time  ,
SecNSecConstructor   
)

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

◆ TEST() [29/33]

TEST ( Time  ,
size   
)

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

◆ TEST() [30/33]

TEST ( Time  ,
ToFromBoost   
)

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

◆ TEST() [31/33]

TEST ( Time  ,
ToFromDouble   
)

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

◆ TEST() [32/33]

TEST ( WallRate  ,
constructFromDouble   
)

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

◆ TEST() [33/33]

TEST ( WallRate  ,
constructFromDuration   
)

Definition at line 667 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 47 of file test/time.cpp.



rostime
Author(s): Josh Faust, Dirk Thomas
autogenerated on Sat Jun 17 2023 02:32:37