20 #include "ns3/timer.h"
22 #include "ns3/simulator.h"
23 #include "ns3/nstime.h"
46 void bar4i (
int,
int,
int,
int) {}
48 void bar5i (
int,
int,
int,
int,
int) {}
68 virtual void DoRun (
void);
72 :
TestCase (
"Check correct state transitions")
77 Timer timer =
Timer (Timer::CANCEL_ON_DESTROY);
117 virtual void DoRun (
void);
130 void baz5i (
int,
int,
int,
int,
int) {}
132 void baz6i (
int,
int,
int,
int,
int,
int) {}
145 :
TestCase (
"Check that template magic is working")
151 Timer timer =
Timer (Timer::CANCEL_ON_DESTROY);
210 Simulator::Destroy ();
217 Simulator::Destroy ();
Check correct state transitions.
virtual void DoRun(void)
Implementation to actually run this TestCase.
Check that Timer template magic is working.
void bazi(int)
Member function with one int parameter.
void bazcir(const int &)
Member function with one const int reference parameter.
void bazip(int *)
Member function with one int pointer parameter.
virtual void DoRun(void)
Implementation to actually run this TestCase.
virtual void DoTeardown(void)
Implementation to do any local setup required for this TestCase.
void baz6i(int, int, int, int, int, int)
Member function with six int parameters.
void bazir(int &)
Member function with one int reference parameter.
void baz3i(int, int, int)
Member function with three int parameters.
void bazcip(const int *)
Member function with one const int pointer parameter.
void baz4i(int, int, int, int)
Member function with four int parameters.
void baz2i(int, int)
Member function with two int parameters.
void baz5i(int, int, int, int, int)
Member function with five int parameters.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
@ UNIT
This test suite implements a Unit Test.
A simple virtual Timer class.
void SetDelay(const Time &delay)
void Suspend(void)
Pause the timer and save the amount of time left until it was set to expire.
bool IsExpired(void) const
bool IsRunning(void) const
void SetArguments(Ts... args)
enum Timer::State GetState(void) const
void Resume(void)
Restart the timer to expire within the amount of time left saved during Suspend.
void Schedule(void)
Schedule a new event using the currently-configured delay, function, and arguments.
void Cancel(void)
Cancel the currently-running event if there is one.
bool IsSuspended(void) const
#define NS_TEST_ASSERT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report and abort if not.
Time Seconds(double value)
Construct a Time in the indicated unit.
void bar2i(int, int)
Function with two int parameters.
void bar4i(int, int, int, int)
Function with four int parameters.
void bar5i(int, int, int, int, int)
Function with five int parameters.
void barir(int &)
Function with one int reference parameter.
void bar3i(int, int, int)
Function with three int parameters.
void bari(int)
Function with one int parameter.
void barcir(const int &)
Function with one const int reference parameter.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
static TimerTestSuite g_timerTestSuite
Static variable for test initialization.