|
|
| 196 |
m_threadlist.push_back( |
196 |
m_threadlist.push_back( |
| 197 |
Create<SystemThread> (MakeBoundCallback ( |
197 |
Create<SystemThread> (MakeBoundCallback ( |
| 198 |
&ThreadedSimulatorEventsTestCase::SchedulingThread, |
198 |
&ThreadedSimulatorEventsTestCase::SchedulingThread, |
| 199 |
std::pair<ThreadedSimulatorEventsTestCase *, unsigned int>(this,1) )) ); |
199 |
std::pair<ThreadedSimulatorEventsTestCase *, unsigned int>(this,i) )) ); |
| 200 |
} |
200 |
} |
| 201 |
} |
201 |
} |
| 202 |
void |
202 |
void |
|
|
| 209 |
void |
209 |
void |
| 210 |
ThreadedSimulatorEventsTestCase::DoRun (void) |
210 |
ThreadedSimulatorEventsTestCase::DoRun (void) |
| 211 |
{ |
211 |
{ |
|
|
212 |
m_stop = false; |
| 212 |
Simulator::SetScheduler (m_schedulerFactory); |
213 |
Simulator::SetScheduler (m_schedulerFactory); |
| 213 |
|
214 |
|
| 214 |
Simulator::Schedule (MicroSeconds (10), &ThreadedSimulatorEventsTestCase::A, this, 1); |
215 |
Simulator::Schedule (MicroSeconds (10), &ThreadedSimulatorEventsTestCase::A, this, 1); |
|
|
| 219 |
{ |
220 |
{ |
| 220 |
(*it)->Start(); |
221 |
(*it)->Start(); |
| 221 |
} |
222 |
} |
| 222 |
|
|
|
| 223 |
Simulator::Run (); |
223 |
Simulator::Run (); |
| 224 |
Simulator::Destroy (); |
224 |
Simulator::Destroy (); |
| 225 |
|
225 |
|
| 226 |
m_stop = true; |
|
|
| 227 |
|
| 228 |
NS_TEST_EXPECT_MSG_EQ (m_error.empty(), true, m_error.c_str()); |
226 |
NS_TEST_EXPECT_MSG_EQ (m_error.empty(), true, m_error.c_str()); |
| 229 |
NS_TEST_EXPECT_MSG_EQ (m_a, m_b, "Bad scheduling"); |
227 |
NS_TEST_EXPECT_MSG_EQ (m_a, m_b, "Bad scheduling"); |
| 230 |
NS_TEST_EXPECT_MSG_EQ (m_a, m_c, "Bad scheduling"); |
228 |
NS_TEST_EXPECT_MSG_EQ (m_a, m_c, "Bad scheduling"); |