A Discrete-Event Network Simulator
API
Public Member Functions | Public Attributes | List of all members
SimulatorEventsTestCase Class Reference
+ Inheritance diagram for SimulatorEventsTestCase:

Public Member Functions

 SimulatorEventsTestCase (ObjectFactory schedulerFactory)
 
void destroy (void)
 
virtual void DoRun (void)
 Implementation to actually run this TestCase. More...
 
void EventA (int a)
 
void EventB (int b)
 
void EventC (int c)
 
void EventD (int d)
 
void Eventfoo0 (void)
 
uint64_t NowUs (void)
 
- Public Member Functions inherited from ns3::TestCase
virtual ~TestCase ()
 Destructor. More...
 
std::string GetName (void) const
 

Public Attributes

bool m_a
 
bool m_b
 
bool m_c
 
bool m_d
 
bool m_destroy
 
EventId m_destroyId
 
EventId m_idC
 
ObjectFactory m_schedulerFactory
 

Additional Inherited Members

- Public Types inherited from ns3::TestCase
enum  TestDuration { QUICK = 1, EXTENSIVE = 2, TAKES_FOREVER = 3 }
 How long the test takes to execute. More...
 
- Protected Member Functions inherited from ns3::TestCase
 TestCase (std::string name)
 Constructor. More...
 
void AddTestCase (TestCase *testCase, TestDuration duration=QUICK)
 Add an individual child TestCase to this test suite. More...
 
TestCaseGetParent () const
 Get the parent of this TestCsse. More...
 
bool IsStatusFailure (void) const
 Check if any tests failed. More...
 
bool IsStatusSuccess (void) const
 Check if all tests passed. More...
 
void SetDataDir (std::string directory)
 Set the data directory where reference trace files can be found. More...
 
void ReportTestFailure (std::string cond, std::string actual, std::string limit, std::string message, std::string file, int32_t line)
 Log the failure of this TestCase. More...
 
bool MustAssertOnFailure (void) const
 Check if this run should assert on failure. More...
 
bool MustContinueOnFailure (void) const
 Check if this run should continue on failure. More...
 
std::string CreateDataDirFilename (std::string filename)
 Construct the full path to a file in the data directory. More...
 
std::string CreateTempDirFilename (std::string filename)
 Construct the full path to a file in a temporary directory. More...
 

Detailed Description

Definition at line 29 of file simulator-test-suite.cc.

Constructor & Destructor Documentation

◆ SimulatorEventsTestCase()

SimulatorEventsTestCase::SimulatorEventsTestCase ( ObjectFactory  schedulerFactory)

Definition at line 51 of file simulator-test-suite.cc.

Member Function Documentation

◆ destroy()

void SimulatorEventsTestCase::destroy ( void  )

Definition at line 111 of file simulator-test-suite.cc.

References ns3::EventId::IsExpired(), m_destroy, and m_destroyId.

Referenced by DoRun().

◆ DoRun()

void SimulatorEventsTestCase::DoRun ( void  )
virtual

Implementation to actually run this TestCase.

Subclasses should override this method to conduct their tests.

Implements ns3::TestCase.

Definition at line 119 of file simulator-test-suite.cc.

References ns3::EventId::Cancel(), destroy(), EventA(), EventB(), EventC(), Eventfoo0(), ns3::EventId::IsExpired(), m_a, m_b, m_c, m_d, m_destroy, m_destroyId, m_idC, m_schedulerFactory, ns3::MicroSeconds(), and NS_TEST_EXPECT_MSG_EQ.

◆ EventA()

void SimulatorEventsTestCase::EventA ( int  a)

Definition at line 65 of file simulator-test-suite.cc.

References m_a, and NS_UNUSED.

Referenced by DoRun().

◆ EventB()

void SimulatorEventsTestCase::EventB ( int  b)

Definition at line 72 of file simulator-test-suite.cc.

References EventD(), m_b, m_idC, ns3::MicroSeconds(), and NowUs().

Referenced by DoRun().

◆ EventC()

void SimulatorEventsTestCase::EventC ( int  c)

Definition at line 87 of file simulator-test-suite.cc.

References m_c, and NS_UNUSED.

Referenced by DoRun().

◆ EventD()

void SimulatorEventsTestCase::EventD ( int  d)

Definition at line 94 of file simulator-test-suite.cc.

References m_d, and NowUs().

Referenced by EventB().

◆ Eventfoo0()

void SimulatorEventsTestCase::Eventfoo0 ( void  )

Definition at line 107 of file simulator-test-suite.cc.

Referenced by DoRun().

◆ NowUs()

uint64_t SimulatorEventsTestCase::NowUs ( void  )

Definition at line 58 of file simulator-test-suite.cc.

References ns3::Time::GetNanoSeconds(), and ns3::Now().

Referenced by EventB(), and EventD().

Member Data Documentation

◆ m_a

bool SimulatorEventsTestCase::m_a

Definition at line 42 of file simulator-test-suite.cc.

Referenced by DoRun(), and EventA().

◆ m_b

bool SimulatorEventsTestCase::m_b

Definition at line 41 of file simulator-test-suite.cc.

Referenced by DoRun(), and EventB().

◆ m_c

bool SimulatorEventsTestCase::m_c

Definition at line 43 of file simulator-test-suite.cc.

Referenced by DoRun(), and EventC().

◆ m_d

bool SimulatorEventsTestCase::m_d

Definition at line 44 of file simulator-test-suite.cc.

Referenced by DoRun(), and EventD().

◆ m_destroy

bool SimulatorEventsTestCase::m_destroy

Definition at line 46 of file simulator-test-suite.cc.

Referenced by destroy(), and DoRun().

◆ m_destroyId

EventId SimulatorEventsTestCase::m_destroyId

Definition at line 47 of file simulator-test-suite.cc.

Referenced by destroy(), and DoRun().

◆ m_idC

EventId SimulatorEventsTestCase::m_idC

Definition at line 45 of file simulator-test-suite.cc.

Referenced by DoRun(), and EventB().

◆ m_schedulerFactory

ObjectFactory SimulatorEventsTestCase::m_schedulerFactory

Definition at line 48 of file simulator-test-suite.cc.

Referenced by DoRun().


The documentation for this class was generated from the following file: