From f23f57c3df85a3c705e61d77eb9fddda5493577d Mon Sep 17 00:00:00 2001 From: Tom Henderson Date: Tue, 20 Sep 2016 13:41:07 -0700 Subject: [PATCH] wifi: Remove Simulator::Run () calls in the PARF unit tests The problem that may arise is that the unit test performs a number of operations on Wifi objects before Simulator::Run() is entered. There are no events generated by these tests, so Simulator::Run () will not do anything for the test. What it may do, however, is call some Object::DoInitialize() code that may assert if it finds the Wifi object in an unexpected state. --- src/wifi/test/power-rate-adaptation-test.cc | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/wifi/test/power-rate-adaptation-test.cc b/src/wifi/test/power-rate-adaptation-test.cc index f34569355..8b533f436 100644 --- a/src/wifi/test/power-rate-adaptation-test.cc +++ b/src/wifi/test/power-rate-adaptation-test.cc @@ -330,11 +330,6 @@ PowerRateAdaptationTest::TestParf () NS_TEST_ASSERT_MSG_EQ (mode.GetDataRate (txVector.GetChannelWidth (), txVector.IsShortGuardInterval (), 1), 54000000, "PARF: Incorrect vale of data rate"); NS_TEST_ASSERT_MSG_EQ (power, 17, "PARF: Incorrect value of power level"); - Simulator::Stop (Seconds (10.0)); - - Simulator::Run (); - Simulator::Destroy (); - } void @@ -570,11 +565,6 @@ PowerRateAdaptationTest::TestAparf () NS_TEST_ASSERT_MSG_EQ (mode.GetDataRate (txVector.GetChannelWidth (), txVector.IsShortGuardInterval (), 1), 54000000, "APARF: Incorrect vale of data rate"); NS_TEST_ASSERT_MSG_EQ (power, 17, "APARF: Incorrect value of power level"); - Simulator::Stop (Seconds (10.0)); - - Simulator::Run (); - Simulator::Destroy (); - } void