Public Member Functions | |
TimeTests () | |
virtual | ~TimeTests () |
virtual bool | RunTests (void) |
void | CheckTimeSec (std::string test_id, double actual, double expected, bool *flag, double precMultFactor=1, bool verbose=false) |
void | CheckTime (std::string test_id, int64_t actual, int64_t expected, bool *flag, double precMultFactor=1, bool verbose=false) |
void | CheckOperations (Time t0, Time t1, bool *ok, bool verbose=false) |
void | CheckPrecision (TimeStepPrecision::precision_t prec, uint64_t val, bool *ok, bool verbose=false) |
void | CheckConversions (uint64_t tval, bool *ok, bool verbose=false) |
void | CheckOld (bool *ok) |
Definition at line 372 of file time.cc.
void ns3::TimeTests::CheckConversions | ( | uint64_t | tval, | |
bool * | ok, | |||
bool | verbose = false | |||
) |
Definition at line 701 of file time.cc.
References CheckTime(), CheckTimeSec(), ns3::FemtoSeconds(), ns3::TimeUnit< 1 >::GetFemtoSeconds(), ns3::TimeUnit< 1 >::GetMicroSeconds(), ns3::TimeUnit< 1 >::GetMilliSeconds(), ns3::TimeUnit< 1 >::GetNanoSeconds(), ns3::TimeUnit< 1 >::GetPicoSeconds(), ns3::TimeUnit< 1 >::GetSeconds(), ns3::MicroSeconds(), ns3::MilliSeconds(), ns3::NanoSeconds(), ns3::PicoSeconds(), and ns3::Seconds().
Referenced by RunTests().
void ns3::TimeTests::CheckOld | ( | bool * | ok | ) |
Definition at line 507 of file time.cc.
References CheckTime(), CheckTimeSec(), ns3::TimeUnit< N >::GetHighPrecision(), ns3::HighPrecision::GetInteger(), ns3::TimeUnit< 1 >::GetSeconds(), ns3::TimeUnit< 1 >::IsStrictlyNegative(), ns3::TimeUnit< 1 >::IsStrictlyPositive(), ns3::TimeUnit< 1 >::IsZero(), ns3::MilliSeconds(), ns3::NanoSeconds(), and ns3::Seconds().
Referenced by RunTests().
Definition at line 601 of file time.cc.
References CheckTimeSec(), ns3::TimeUnit< 0 >::GetDouble(), ns3::TimeUnit< N >::GetHighPrecision(), ns3::HighPrecision::GetInteger(), and ns3::TimeUnit< 1 >::GetSeconds().
Referenced by RunTests().
void ns3::TimeTests::CheckPrecision | ( | TimeStepPrecision::precision_t | prec, | |
uint64_t | val, | |||
bool * | ok, | |||
bool | verbose = false | |||
) |
Definition at line 769 of file time.cc.
References ns3::TimeStepPrecision::Get(), and ns3::Config::Set().
Referenced by RunTests().
void ns3::TimeTests::CheckTime | ( | std::string | test_id, | |
int64_t | actual, | |||
int64_t | expected, | |||
bool * | flag, | |||
double | precMultFactor = 1 , |
|||
bool | verbose = false | |||
) |
Definition at line 831 of file time.cc.
References ns3::TimeStepPrecision::Get().
Referenced by CheckConversions(), and CheckOld().
void ns3::TimeTests::CheckTimeSec | ( | std::string | test_id, | |
double | actual, | |||
double | expected, | |||
bool * | flag, | |||
double | precMultFactor = 1 , |
|||
bool | verbose = false | |||
) |
Definition at line 806 of file time.cc.
References ns3::TimeStepPrecision::Get().
Referenced by CheckConversions(), CheckOld(), and CheckOperations().
bool ns3::TimeTests::RunTests | ( | void | ) | [virtual] |
Implements ns3::Test.
Definition at line 426 of file time.cc.
References CheckConversions(), CheckOld(), CheckOperations(), CheckPrecision(), ns3::TimeStepPrecision::FS, ns3::TimeStepPrecision::Get(), ns3::TimeUnit< 1 >::IsNegative(), ns3::MilliSeconds(), ns3::TimeStepPrecision::MS, ns3::TimeStepPrecision::NS, NS_TEST_ASSERT, ns3::TimeStepPrecision::PS, ns3::TimeStepPrecision::S, ns3::Config::Set(), ns3::Config::SetGlobal(), ns3::TimeStep(), and ns3::TimeStepPrecision::US.