9#include "ns3/internet-stack-helper.h" 
   31    void DoRun() 
override;
 
 
   36    : 
TestCase(
"InternetStackHelperTestCase")
 
 
   54    internet.SetIpv4StackInstall(
true);
 
   55    internet.SetIpv6StackInstall(
false);
 
   56    internet.Install(nodeIpv4Only);
 
   58    internet.SetIpv4StackInstall(
false);
 
   59    internet.SetIpv6StackInstall(
true);
 
   60    internet.Install(nodeIpv6Only);
 
   62    internet.SetIpv4StackInstall(
true);
 
   63    internet.SetIpv6StackInstall(
true);
 
   64    internet.Install(nodeIpv46);
 
   69                          "IPv4 not found on IPv4-only node (should have been there)");
 
   72                          "IPv6 found on IPv4-only node (should not have been there)");
 
   76                          "IPv4 found on IPv6-only node (should not have been there)");
 
   79                          "IPv6 not found on IPv6-only node (should have been there)");
 
   83                          "IPv4 not found on dual stack node (should have been there)");
 
   86                          "IPv6 not found on dual stack node (should have been there)");
 
   90    internet.Install(nodeIpv4Only);
 
   93    internet.Install(nodeIpv6Only);
 
   96    internet.Install(nodeIpv46);
 
  100        nodeIpv4Only->GetObject<
Ipv4>(),
 
  102        "IPv4 not found on IPv4-only, now dual stack node (should have been there)");
 
  104        nodeIpv4Only->GetObject<
Ipv6>(),
 
  106        "IPv6 not found on IPv4-only, now dual stack node (should have been there)");
 
  109        nodeIpv6Only->GetObject<
Ipv4>(),
 
  111        "IPv4 not found on IPv6-only, now dual stack node (should have been there)");
 
  113        nodeIpv6Only->GetObject<
Ipv6>(),
 
  115        "IPv6 not found on IPv6-only, now dual stack node (should have been there)");
 
  119                          "IPv4 not found on dual stack node (should have been there)");
 
  122                          "IPv6 not found on dual stack node (should have been there)");
 
 
InternetStackHelper Test.
void DoTeardown() override
Implementation to do any local setup required for this TestCase.
InternetStackHelperTestCase()
void DoRun() override
Implementation to actually run this TestCase.
InternetStackHelper TestSuite.
InternetStackHelperTestSuite()
aggregate IP/TCP/UDP functionality to existing Nodes.
Access to the IPv4 forwarding table, interfaces, and configuration.
Access to the IPv6 forwarding table, interfaces, and configuration.
Smart pointer class similar to boost::intrusive_ptr.
static void Destroy()
Execute the events scheduled with ScheduleDestroy().
void AddTestCase(TestCase *testCase, Duration duration=Duration::QUICK)
Add an individual child TestCase to this test suite.
TestCase(const TestCase &)=delete
@ UNIT
This test suite implements a Unit Test.
TestSuite(std::string name, Type type=Type::UNIT)
Construct a new test suite.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Ptr< T > CreateObject(Args &&... args)
Create an object by type, with varying number of constructor parameters.
#define NS_TEST_EXPECT_MSG_NE(actual, limit, msg)
Test that an actual and expected (limit) value are not equal and report if not.
#define NS_TEST_EXPECT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report if not.
static InternetStackHelperTestSuite g_internetStackHelperTestSuite
Static variable for test initialization.
Every class exported by the ns3 library is enclosed in the ns3 namespace.