diff --git a/src/contrib/event-garbage-collector.cc b/src/contrib/event-garbage-collector.cc index f3280fff1..8a8dc154e 100644 --- a/src/contrib/event-garbage-collector.cc +++ b/src/contrib/event-garbage-collector.cc @@ -138,7 +138,7 @@ bool EventGarbageCollectorTestCase::DoRun (void) Simulator::Run (); NS_TEST_EXPECT_MSG_EQ (m_events, 0, ""); NS_TEST_EXPECT_MSG_EQ (m_counter, 50, ""); - + Simulator::Destroy (); return false; } diff --git a/src/devices/wifi/wifi-test.cc b/src/devices/wifi/wifi-test.cc index f03ade983..df619e5cf 100644 --- a/src/devices/wifi/wifi-test.cc +++ b/src/devices/wifi/wifi-test.cc @@ -143,7 +143,7 @@ WifiTest::DoRun (void) m_propDelay.SetTypeId ("ns3::RandomPropagationDelayModel"); m_mac.SetTypeId ("ns3::AdhocWifiMac"); RunOne (); - + Simulator::Destroy (); return false; } diff --git a/src/helper/ipv4-address-helper.cc b/src/helper/ipv4-address-helper.cc index 597157247..d61891271 100644 --- a/src/helper/ipv4-address-helper.cc +++ b/src/helper/ipv4-address-helper.cc @@ -23,6 +23,7 @@ #include "ns3/net-device.h" #include "ns3/ipv4.h" #include "ns3/ipv4-address-generator.h" +#include "ns3/simulator.h" #include "ipv4-address-helper.h" NS_LOG_COMPONENT_DEFINE("Ipv4AddressHelper"); @@ -200,6 +201,7 @@ void NetworkAllocatorHelperTestCase::DoTeardown (void) { Ipv4AddressGenerator::Reset (); + Simulator::Destroy (); } bool NetworkAllocatorHelperTestCase::DoRun (void) @@ -246,6 +248,7 @@ void AddressAllocatorHelperTestCase::DoTeardown (void) { Ipv4AddressGenerator::Reset (); + Simulator::Destroy (); } bool @@ -337,6 +340,7 @@ void ResetAllocatorHelperTestCase::DoTeardown (void) { Ipv4AddressGenerator::Reset (); + Simulator::Destroy (); } static class Ipv4AddressHelperTestSuite : public TestSuite diff --git a/src/internet-stack/ipv4-test.cc b/src/internet-stack/ipv4-test.cc index 9f38b5b7e..d23ef9ac7 100644 --- a/src/internet-stack/ipv4-test.cc +++ b/src/internet-stack/ipv4-test.cc @@ -94,7 +94,7 @@ Ipv4L3ProtocolTestCase::DoRun (void) Ipv4InterfaceAddress output = interface->GetAddress (2); NS_TEST_ASSERT_MSG_EQ (ifaceAddr4, output, "The addresses should be identical"); - + Simulator::Destroy (); return false; } diff --git a/src/internet-stack/ipv6-test.cc b/src/internet-stack/ipv6-test.cc index 35863b0ad..832728d09 100644 --- a/src/internet-stack/ipv6-test.cc +++ b/src/internet-stack/ipv6-test.cc @@ -135,7 +135,7 @@ Ipv6L3ProtocolTestCase::DoRun () index = ipv6->GetInterfaceForAddress ("2001:ffff:5678:9000::1"); /* address we just remove */ NS_TEST_ASSERT_MSG_EQ (index, (uint32_t) -1, "Address should not be found??"); - + Simulator::Destroy (); return false; }//end DoRun static class IPv6L3ProtocolTestSuite : public TestSuite diff --git a/src/node/ipv4-address-generator.cc b/src/node/ipv4-address-generator.cc index 7caeaaf23..3d908309e 100644 --- a/src/node/ipv4-address-generator.cc +++ b/src/node/ipv4-address-generator.cc @@ -560,6 +560,7 @@ void AddressAllocatorTestCase::DoTeardown (void) { Ipv4AddressGenerator::Reset (); + Simulator::Destroy (); } @@ -579,6 +580,7 @@ void NetworkAndAddressTestCase::DoTeardown (void) { Ipv4AddressGenerator::Reset (); + Simulator::Destroy (); } bool @@ -695,6 +697,7 @@ void AddressCollisionTestCase::DoTeardown (void) { Ipv4AddressGenerator::Reset (); + Simulator::Destroy (); } bool AddressCollisionTestCase::DoRun (void) diff --git a/src/routing/aodv/aodv-test-suite.cc b/src/routing/aodv/aodv-test-suite.cc index f86cb6c57..2737262a3 100644 --- a/src/routing/aodv/aodv-test-suite.cc +++ b/src/routing/aodv/aodv-test-suite.cc @@ -474,7 +474,7 @@ struct AodvRtableEntryTest : public TestCase NS_TEST_EXPECT_MSG_EQ (rt.IsPrecursorListEmpty (), true, "trivial"); rt.GetPrecursors (prec); NS_TEST_EXPECT_MSG_EQ (prec.size (), 2, "trivial"); - + Simulator::Destroy (); return GetErrorStatus (); } }; @@ -528,7 +528,7 @@ struct AodvRtableTest : public TestCase NS_TEST_EXPECT_MSG_EQ (rt.GetFlag (), INVALID, "trivial"); NS_TEST_EXPECT_MSG_EQ (rtable.DeleteRoute (Ipv4Address ("1.2.3.4")), true, "trivial"); NS_TEST_EXPECT_MSG_EQ (rtable.DeleteRoute (Ipv4Address ("1.2.3.4")), false, "trivial"); - + Simulator::Destroy (); return GetErrorStatus (); } };