time.cpp File Reference
#include <vector>
#include <gtest/gtest.h>
#include <ros/time.h>
#include <iostream>
#include <cmath>
#include <stdexcept>
#include "duration.h"
#include <sys/time.h>
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, sleepWithSignal) |
| TEST (Duration, OperatorMinusEquals) |
| TEST (Duration, OperatorPlusEquals) |
| TEST (Duration, OperatorTimes) |
| TEST (Duration, OperatorMinus) |
| TEST (Duration, OperatorPlus) |
| TEST (Duration, ToFromSec) |
| TEST (Duration, Comparitors) |
| TEST (Time, SecNSecConstructor) |
| TEST (Time, OperatorMinusEquals) |
| TEST (Time, OperatorPlusEquals) |
| TEST (Time, OperatorMinus) |
| TEST (Time, OperatorPlus) |
| TEST (Time, ToFromDouble) |
| TEST (Time, Comparitors) |
| TEST (Time, size) |
Variables |
double | epsilon = 1e-9 |
Function Documentation
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 | |
|
) |
| | |
TEST |
( |
Duration |
, |
|
|
sleepWithSignal |
| |
|
) |
| | |
TEST |
( |
Duration |
, |
|
|
OperatorMinusEquals |
| |
|
) |
| | |
TEST |
( |
Duration |
, |
|
|
OperatorPlusEquals |
| |
|
) |
| | |
TEST |
( |
Duration |
, |
|
|
OperatorTimes |
| |
|
) |
| | |
TEST |
( |
Duration |
, |
|
|
OperatorMinus |
| |
|
) |
| | |
TEST |
( |
Duration |
, |
|
|
OperatorPlus |
| |
|
) |
| | |
TEST |
( |
Duration |
, |
|
|
ToFromSec |
| |
|
) |
| | |
TEST |
( |
Duration |
, |
|
|
Comparitors |
| |
|
) |
| | |
TEST |
( |
Time |
, |
|
|
SecNSecConstructor |
| |
|
) |
| | |
TEST |
( |
Time |
, |
|
|
OperatorMinusEquals |
| |
|
) |
| | |
TEST |
( |
Time |
, |
|
|
OperatorPlusEquals |
| |
|
) |
| | |
TEST |
( |
Time |
, |
|
|
OperatorMinus |
| |
|
) |
| | |
TEST |
( |
Time |
, |
|
|
OperatorPlus |
| |
|
) |
| | |
TEST |
( |
Time |
, |
|
|
ToFromDouble |
| |
|
) |
| | |
TEST |
( |
Time |
, |
|
|
Comparitors |
| |
|
) |
| | |
Variable Documentation
- Todo:
- All the tests in here that use randomized values are not unit tests, replace them
Definition at line 40 of file time.cpp.