A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
Network module unit tests
Collaboration diagram for Network module unit tests:

Files

file  network-traced-callback-typedef-test-suite.cc
 Verify that the TracedCallback typedefs declared by the network module are invoked with the right type and number of arguments.
file  traced-value-callback-typedef-test-suite.cc
 TracedValueCallback tests to verify that they work with different types of classes - it tests bool, double, various types of integers types, Time, and SequenceNumber32.

Classes

class  AddressTest
 Address classes Test. More...
class  AddressTestSuite
 Address TestSuite. More...
class  anonymous_namespace{packet-test-suite.cc}::ALargeTestTag
 Template class for Large Test tags. More...
class  anonymous_namespace{packet-test-suite.cc}::ATestHeader< N >
 Template class for Test headers. More...
class  anonymous_namespace{packet-test-suite.cc}::ATestHeaderBase
 Base class for Test headers. More...
class  anonymous_namespace{packet-test-suite.cc}::ATestTag< N >
 Template class for Test tags. More...
class  anonymous_namespace{packet-test-suite.cc}::ATestTagBase
 Base class for Test tags. More...
class  anonymous_namespace{packet-test-suite.cc}::ATestTrailer< N >
 Template class for Test trailers. More...
class  anonymous_namespace{packet-test-suite.cc}::ATestTrailerBase
 Base class for Test trailers. More...
class  BitDeserializerTest
 Bit deserialization test. More...
class  BitSerializerTest
 Bit serialization test. More...
class  BitSerializerTestSuite
 Packet Metadata TestSuite. More...
class  BufferTest
 Buffer unit tests. More...
class  BufferTestSuite
 Buffer TestSuite. More...
class  BurstErrorModelSimple
 BurstErrorModel unit tests. More...
class  DataRateBitsPerTimeTestCase
 Test the DataRate(bits, span) constructor (Issue 413). More...
class  DataRateTestCase
 Test Data rate. More...
class  DataRateTestCase1
 Test Data rate. More...
class  DataRateTestCase2
 Test Data rate. More...
class  DataRateTestSuite
 DataRate TestSuite. More...
class  DataRateTupleObject
 Object with an attribute that is a tuple of data rates and a string. More...
class  DataRateTupleSetGetTestCase
 Attribute set and get TestCase. More...
class  DiffTestCase
 Test case to make sure that the Pcap::Diff method works as expected. More...
class  DropTailQueueTestCase
 DropTailQueue unit tests. More...
class  DropTailQueueTestSuite
 DropTail Queue TestSuite. More...
class  ErrorModelSimple
 ErrorModel unit tests. More...
class  ErrorModelTestSuite
 ErrorModel TestSuite. More...
struct  anonymous_namespace{packet-test-suite.cc}::Expected
 Struct to hold the expected data in the packet. More...
class  FileHeaderTestCase
 Test case to make sure that the Pcap File Object can write out correct pcap file headers in both endian cases, and then read them in correctly. More...
 Template header-type class to check the proper header concatenation. More...
 Base header-type class to check the proper header concatenation. More...
 Template trailer-type class to check the proper trailer concatenation. More...
 Base trailer-type class to check the proper trailer concatenation. More...
class  Ipv6AddressTestCase
 Ipv6Address unit tests. More...
class  Ipv6AddressTestSuite
 Ipv6Address TestSuite. More...
class  LollipopCounterTest
 Lollipop Counter Test. More...
class  LollipopCounterTestSuite
 Lollipop Counter TestSuite. More...
class  ns3::NetworkTracedCallbackTypedefTestCase
 TracedCallback typedef Testcase for the network module. More...
class  ns3::NetworkTracedCallbackTypedefTestSuite
 network TracedCallback typedef TestSuite More...
class  PacketMetadataTest
 Packet Metadata unit tests. More...
class  PacketMetadataTestSuite
 Packet Metadata TestSuite. More...
class  PacketSocketAppsTest
 PacketSocket apps Unit Test. More...
class  PacketSocketAppsTestSuite
 PacketSocket apps TestSuite. More...
class  PacketTagListTest
 Packet Tag list unit tests. More...
class  PacketTest
 Packet unit tests. More...
class  PacketTestSuite
 Packet TestSuite. More...
class  PbbAddressBlockIpv6RoundtripTestCase
 Round-trip test for PbbAddressBlockIpv6 head/tail compression. More...
class  PbbTestCase
 PacketBb TestCase. More...
class  PbbTestSuite
 PacketBb TestSuite. More...
class  PcapExplicitFilenameTestCase
 Regression test for Issue 1150. More...
class  PcapExplicitFilenameTestSuite
 Test suite for the Issue 1150 explicit-pcap-filename regression test. More...
class  PcapFileTestSuite
 PCAP file utils TestSuite. More...
class  ReadFileTestCase
 Test case to make sure that the Pcap File Object can read out the contents of a known good pcap file. More...
class  ReadModeCreateTestCase
 Test case to make sure that the Pcap File Object can open an existing pcap file. More...
class  RecordHeaderTestCase
 Test case to make sure that the Pcap File Object can write pcap packet records in both endian cases, and then read them in correctly. More...
class  SequenceNumberTestCase
 Sequence Number Unit Test. More...
class  anonymous_namespace{sequence-number-test-suite.cc}::SequenceNumberTestObj
 Test object using sequence numbers. More...
class  SequenceNumberTestSuite
 Sequence Number TestSuite. More...
class  SimpleNetDeviceDataRateTestCase
 Tests that the DataRate attribute governs the transmission time. More...
class  SimpleNetDeviceErrorModelTestCase
 Tests that a ReceiveErrorModel discards the packet and fires PhyRxDrop. More...
class  SimpleNetDeviceNoHandlerDropTestCase
 Regression test for Issue 370: a received packet with no matching protocol handler must be traced, not dropped. More...
class  SimpleNetDeviceTestSuite
 Test suite exercising SimpleNetDevice reception behavior. More...
class  TracedValueCallbackTestCase
 TracedValueCallback Test Case. More...
class  TracedValueCallbackTestSuite
 TracedValueCallback TestSuite. More...
class  WriteModeCreateTestCase
 Test case to make sure that the Pcap File Object can do its most basic job and create an empty pcap file. More...

Functions

template<typename T>
void anonymous_namespace{traced-value-callback-typedef-test-suite.cc}::TracedValueCbSink (T oldValue, T newValue)
 Template for TracedValue sink functions.
template<>
void anonymous_namespace{traced-value-callback-typedef-test-suite.cc}::TracedValueCbSink< SequenceNumber32 > (SequenceNumber32 oldValue, SequenceNumber32 newValue)
 TracedValueCbSink specialization for SequenceNumber32.
template<>
void anonymous_namespace{traced-value-callback-typedef-test-suite.cc}::TracedValueCbSink< Time > (Time oldValue, Time newValue)
 TracedValueCbSink specialization for Time.

Variables

std::string anonymous_namespace{traced-value-callback-typedef-test-suite.cc}::g_Result = ""
 Result of callback test.

Detailed Description

Function Documentation

◆ TracedValueCbSink()

template<typename T>
void anonymous_namespace{traced-value-callback-typedef-test-suite.cc}::TracedValueCbSink ( T oldValue,
T newValue )

Template for TracedValue sink functions.

This generates a sink function for any underlying type.

Template Parameters
T[explicit] The type of the value being traced. Since the point of this template is to create a sink function, the template type must be given explicitly.
Parameters
[in]oldValueThe original value
[in]newValueThe new value

Definition at line 61 of file traced-value-callback-typedef-test-suite.cc.

References g_Result.

Referenced by TracedValueCallbackTestCase::CheckType(), TracedValueCbSink< SequenceNumber32 >(), and TracedValueCbSink< Time >().

Here is the caller graph for this function:

◆ TracedValueCbSink< SequenceNumber32 >()

template<>
void anonymous_namespace{traced-value-callback-typedef-test-suite.cc}::TracedValueCbSink< SequenceNumber32 > ( SequenceNumber32 oldValue,
SequenceNumber32 newValue )

TracedValueCbSink specialization for SequenceNumber32.

Parameters
oldValueThe old value
newValueThe new value

Definition at line 99 of file traced-value-callback-typedef-test-suite.cc.

References ns3::SequenceNumber< NUMERIC_TYPE, NUM_BITS >::GetValue(), and TracedValueCbSink().

Here is the call graph for this function:

◆ TracedValueCbSink< Time >()

template<>
void anonymous_namespace{traced-value-callback-typedef-test-suite.cc}::TracedValueCbSink< Time > ( Time oldValue,
Time newValue )

TracedValueCbSink specialization for Time.

Parameters
oldValueThe old value
newValueThe new value

Definition at line 85 of file traced-value-callback-typedef-test-suite.cc.

References ns3::Time::GetInteger(), and TracedValueCbSink().

Here is the call graph for this function:

Variable Documentation

◆ g_Result

std::string anonymous_namespace{traced-value-callback-typedef-test-suite.cc}::g_Result = ""

Result of callback test.

Since the sink function is outside the invoking class, which in this case is TracedValueCallbackTestCase, we can't use the test macros directly. Instead, we cache the result in the g_Result global value, then inspect it in the TracedValueCallbackTestCase::CheckType method.

Definition at line 44 of file traced-value-callback-typedef-test-suite.cc.

Referenced by TracedValueCallbackTestCase::CheckType(), TracedValueCallbackTestCase::CheckTvCb< T >::Invoke(), and TracedValueCbSink().