20 #include "ns3/ipv4-address-generator.h"
21 #include "ns3/ipv4-address-helper.h"
22 #include "ns3/simulator.h"
31 virtual void DoRun (
void);
32 virtual void DoTeardown (
void);
36 :
TestCase (
"Make sure the network allocator part is working on some common network prefixes.")
44 Simulator::Destroy ();
53 h.
SetBase (
"1.0.0.0",
"255.0.0.0");
59 h.
SetBase (
"0.1.0.0",
"255.255.0.0");
65 h.
SetBase (
"0.0.1.0",
"255.255.255.0");
77 virtual void DoRun (
void);
82 :
TestCase (
"Make sure the address allocator part is working")
90 Simulator::Destroy ();
100 h.
SetBase (
"1.0.0.0",
"255.0.0.0",
"0.0.0.3");
106 h.
SetBase (
"0.1.0.0",
"255.255.0.0",
"0.0.0.3");
112 h.
SetBase (
"0.0.1.0",
"255.255.255.0",
"0.0.0.3");
123 virtual void DoRun (
void);
128 :
TestCase (
"Make sure the reset to base behavior is working")
144 h.
SetBase (
"1.0.0.0",
"255.0.0.0",
"0.0.0.3");
154 h.
SetBase (
"0.1.0.0",
"255.255.0.0",
"0.0.0.3");
164 h.
SetBase (
"0.0.1.0",
"255.255.255.0",
"0.0.0.3");
179 Simulator::Destroy ();
189 virtual void DoRun (
void);
194 :
TestCase (
"IpAddressHelper Ipv4 test case (similar to IPv6)")
211 ip1.
SetBase (
"192.168.0.0",
"255.255.255.0");
228 ip1.
SetBase (
"192.168.0.0",
"255.255.255.0",
"0.0.0.100");
233 ip1.
SetBase (
"192.168.0.0",
"255.255.255.0",
"0.0.0.254");
254 Simulator::Destroy ();
void Reset(void)
Reset the initial value of every attribute as well as the value of every global to what they were bef...
virtual void DoRun(void)
Implementation to actually run this TestCase.
IpAddressHelperTestCasev4()
ResetAllocatorHelperTestCase()
Ipv4Address NewAddress(void)
Increment the IP address counter used to allocate IP addresses.
virtual void DoTeardown(void)
Implementation to do any local setup required for this TestCase.
virtual void DoTeardown(void)
Implementation to do any local setup required for this TestCase.
#define NS_TEST_EXPECT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report if not.
virtual void DoTeardown(void)
Implementation to do any local setup required for this TestCase.
virtual void DoRun(void)
Implementation to actually run this TestCase.
AddressAllocatorHelperTestCase()
Ipv4AddressHelperTestSuite g_ipv4AddressHelperTestSuite
NetworkAllocatorHelperTestCase()
void AddTestCase(TestCase *testCase) NS_DEPRECATED
Add an individual child TestCase case to this TestCase.
Ipv4AddressHelperTestSuite()
Ipv4 addresses are stored in host order in this class.
Ipv4Address NewNetwork(void)
Increment the network number and reset the IP address counter to the base value provided in the SetBa...
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
virtual void DoTeardown(void)
Implementation to do any local setup required for this TestCase.
This test suite implements a Unit Test.
virtual void DoRun(void)
Implementation to actually run this TestCase.
void SetBase(Ipv4Address network, Ipv4Mask mask, Ipv4Address base="0.0.0.1")
Set the base network number, network mask and base address.
#define NS_TEST_ASSERT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report and abort if not.
virtual void DoRun(void)
Implementation to actually run this TestCase.
virtual ~IpAddressHelperTestCasev4()