diff --git a/src/internet/test/ipv4-address-helper-test-suite.cc b/src/internet/test/ipv4-address-helper-test-suite.cc index 670498213..eed4a908d 100644 --- a/src/internet/test/ipv4-address-helper-test-suite.cc +++ b/src/internet/test/ipv4-address-helper-test-suite.cc @@ -187,6 +187,7 @@ public: private: virtual void DoRun (void); + virtual void DoTeardown (void); }; IpAddressHelperTestCasev4::IpAddressHelperTestCasev4 () @@ -246,6 +247,13 @@ IpAddressHelperTestCasev4::DoRun (void) } +void +IpAddressHelperTestCasev4::DoTeardown (void) +{ + Ipv4AddressGenerator::Reset (); + Simulator::Destroy (); +} + static class Ipv4AddressHelperTestSuite : public TestSuite { diff --git a/src/internet/test/ipv6-address-helper-test-suite.cc b/src/internet/test/ipv6-address-helper-test-suite.cc index e2941b35d..a51b169f0 100644 --- a/src/internet/test/ipv6-address-helper-test-suite.cc +++ b/src/internet/test/ipv6-address-helper-test-suite.cc @@ -17,6 +17,7 @@ */ #include "ns3/ipv6-address-helper.h" +#include "ns3/ipv6-address-generator.h" #include "ns3/ipv4-address-helper.h" #include "ns3/simple-net-device.h" #include "ns3/net-device-container.h" @@ -35,6 +36,7 @@ public: private: virtual void DoRun (void); + virtual void DoTeardown (void); }; IpAddressHelperTestCasev6::IpAddressHelperTestCasev6 () @@ -129,6 +131,14 @@ IpAddressHelperTestCasev6::DoRun (void) NS_TEST_ASSERT_MSG_EQ (ic.GetAddress (1,1), Ipv6Address ("2001:00aa:0000:0000:0200:00ff:fe00:0002"), "Ipv6AddressHelper failure"); } +void +IpAddressHelperTestCasev6::DoTeardown (void) +{ + Ipv6AddressGenerator::Reset (); + Simulator::Destroy (); +} + + class Ipv6AddressHelperTestSuite : public TestSuite { public: