Public Member Functions | |
ThreadedSimulatorEventsTestCase (ObjectFactory schedulerFactory, const std::string &simulatorType, unsigned int threads) | |
void | A (int a) |
void | B (int b) |
void | C (int c) |
void | D (int d) |
void | DoNothing (unsigned int threadno) |
void | End (void) |
![]() | |
virtual | ~TestCase () |
Destructor. More... | |
Static Public Member Functions | |
static void | SchedulingThread (std::pair< ThreadedSimulatorEventsTestCase *, unsigned int > context) |
Public Attributes | |
uint64_t | m_a |
uint64_t | m_b |
uint64_t | m_c |
uint64_t | m_d |
std::string | m_error |
ObjectFactory | m_schedulerFactory |
std::string | m_simulatorType |
bool | m_stop |
std::list< Ptr< SystemThread > > | m_threadlist |
unsigned int | m_threads |
bool | m_threadWaiting [MAXTHREADS] |
Private Member Functions | |
virtual void | DoRun (void) |
Implementation to actually run this TestCase. More... | |
virtual void | DoSetup (void) |
Implementation to do any local setup required for this TestCase. More... | |
virtual void | DoTeardown (void) |
Implementation to do any local setup required for this TestCase. More... | |
Additional Inherited Members | |
![]() | |
enum | TestDuration { QUICK = 1, EXTENSIVE = 2, TAKES_FOREVER = 3 } |
How long the test takes to execute. More... | |
![]() | |
TestCase (std::string name) | |
void | AddTestCase (TestCase *testCase) NS_DEPRECATED |
Add an individual child TestCase case to this TestCase. More... | |
void | AddTestCase (TestCase *testCase, enum TestDuration duration) |
Add an individual child TestCase to this test suite. More... | |
std::string | CreateDataDirFilename (std::string filename) |
std::string | CreateTempDirFilename (std::string filename) |
bool | GetErrorStatus (void) const NS_DEPRECATED |
std::string | GetName (void) const |
bool | IsStatusFailure (void) const |
bool | IsStatusSuccess (void) const |
bool | MustAssertOnFailure (void) const |
bool | MustContinueOnFailure (void) const |
void | ReportTestFailure (std::string cond, std::string actual, std::string limit, std::string message, std::string file, int32_t line) |
void | SetDataDir (std::string directory) |
Definition at line 38 of file threaded-test-suite.cc.
ThreadedSimulatorEventsTestCase::ThreadedSimulatorEventsTestCase | ( | ObjectFactory | schedulerFactory, |
const std::string & | simulatorType, | ||
unsigned int | threads | ||
) |
Definition at line 67 of file threaded-test-suite.cc.
void ThreadedSimulatorEventsTestCase::A | ( | int | a | ) |
void ThreadedSimulatorEventsTestCase::B | ( | int | b | ) |
void ThreadedSimulatorEventsTestCase::C | ( | int | c | ) |
void ThreadedSimulatorEventsTestCase::D | ( | int | d | ) |
void ThreadedSimulatorEventsTestCase::DoNothing | ( | unsigned int | threadno | ) |
Definition at line 107 of file threaded-test-suite.cc.
References m_error, and m_threadWaiting.
Referenced by SchedulingThread().
|
privatevirtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Definition at line 205 of file threaded-test-suite.cc.
References A(), End(), list, m_a, m_b, m_c, m_d, m_error, m_schedulerFactory, m_stop, m_threadlist, and NS_TEST_EXPECT_MSG_EQ.
|
privatevirtual |
Implementation to do any local setup required for this TestCase.
Subclasses should override this method to perform any costly per-test setup before DoRun is invoked.
Reimplemented from ns3::TestCase.
Definition at line 175 of file threaded-test-suite.cc.
References m_a, m_b, m_c, m_d, m_error, m_simulatorType, m_threadlist, m_threads, ns3::MakeBoundCallback(), SchedulingThread(), and ns3::Config::SetGlobal().
|
privatevirtual |
Implementation to do any local setup required for this TestCase.
Subclasses should override this method to perform any costly per-test teardown
Reimplemented from ns3::TestCase.
Definition at line 198 of file threaded-test-suite.cc.
References m_threadlist, and ns3::Config::SetGlobal().
void ThreadedSimulatorEventsTestCase::End | ( | void | ) |
Definition at line 77 of file threaded-test-suite.cc.
References list, m_stop, and m_threadlist.
Referenced by DoRun().
|
static |
Definition at line 86 of file threaded-test-suite.cc.
References DoNothing(), m_stop, and m_threadWaiting.
Referenced by DoSetup().
uint64_t ThreadedSimulatorEventsTestCase::m_a |
uint64_t ThreadedSimulatorEventsTestCase::m_b |
uint64_t ThreadedSimulatorEventsTestCase::m_c |
uint64_t ThreadedSimulatorEventsTestCase::m_d |
std::string ThreadedSimulatorEventsTestCase::m_error |
Definition at line 58 of file threaded-test-suite.cc.
Referenced by A(), B(), C(), D(), DoNothing(), DoRun(), and DoSetup().
ObjectFactory ThreadedSimulatorEventsTestCase::m_schedulerFactory |
Definition at line 56 of file threaded-test-suite.cc.
Referenced by DoRun().
std::string ThreadedSimulatorEventsTestCase::m_simulatorType |
Definition at line 57 of file threaded-test-suite.cc.
Referenced by DoSetup().
bool ThreadedSimulatorEventsTestCase::m_stop |
Definition at line 55 of file threaded-test-suite.cc.
Referenced by D(), DoRun(), End(), and SchedulingThread().
std::list<Ptr<SystemThread> > ThreadedSimulatorEventsTestCase::m_threadlist |
Definition at line 59 of file threaded-test-suite.cc.
Referenced by DoRun(), DoSetup(), DoTeardown(), and End().
unsigned int ThreadedSimulatorEventsTestCase::m_threads |
Definition at line 53 of file threaded-test-suite.cc.
Referenced by DoSetup().
bool ThreadedSimulatorEventsTestCase::m_threadWaiting[MAXTHREADS] |
Definition at line 54 of file threaded-test-suite.cc.
Referenced by DoNothing(), and SchedulingThread().