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 ();
virtual void DoRun(void)
Implementation to actually run this TestCase.
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)
void baz3i(int, int, int)
void baz4i(int, int, int, int)
void baz5i(int, int, int, int, int)
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 bar4i(int, int, int, int)
void bar5i(int, int, int, int, int)
void bar3i(int, int, int)
Every class exported by the ns3 library is enclosed in the ns3 namespace.
TimerTestSuite g_timerTestSuite