clean up new IP address helper tests

This commit is contained in:
Tom Henderson
2012-05-24 20:57:51 -07:00
parent 022b805341
commit c25333c443
2 changed files with 18 additions and 0 deletions

View File

@@ -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
{

View File

@@ -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: