20 #include "ns3/timer.h" 22 #include "ns3/simulator.h" 23 #include "ns3/nstime.h" 31 void bar4i (
int,
int,
int,
int) {}
32 void bar5i (
int,
int,
int,
int,
int) {}
45 virtual void DoRun (
void);
49 :
TestCase (
"Check correct state transitions")
54 Timer timer =
Timer (Timer::CANCEL_ON_DESTROY);
89 virtual void DoRun (
void);
96 void baz4i (
int,
int,
int,
int) {}
97 void baz5i (
int,
int,
int,
int,
int) {}
98 void baz6i (
int,
int,
int,
int,
int,
int) {}
107 :
TestCase (
"Check that template magic is working")
113 Timer timer =
Timer (Timer::CANCEL_ON_DESTROY);
172 Simulator::Destroy ();
179 Simulator::Destroy ();
void bar4i(int, int, int, int)
void bar3i(int, int, int)
A simple virtual Timer class.
void baz4i(int, int, int, int)
bool IsSuspended(void) const
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 Schedule(void)
Schedule a new event using the currently-configured delay, function, and arguments.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
#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.
void SetArguments(Ts... args)
void bar5i(int, int, int, int, int)
void SetDelay(const Time &delay)
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual void DoRun(void)
Implementation to actually run this TestCase.
void Resume(void)
Restart the timer to expire within the amount of time left saved during Suspend.
bool IsRunning(void) const
void baz5i(int, int, int, int, int)
enum Timer::State GetState(void) const
void baz6i(int, int, int, int, int, int)
Time Seconds(double value)
Construct a Time in the indicated unit.
void Cancel(void)
Cancel the currently-running event if there is one.
void Suspend(void)
Pause the timer and save the amount of time left until it was set to expire.
TimerTestSuite g_timerTestSuite
This test suite implements a Unit Test.
void baz3i(int, int, int)
bool IsExpired(void) const