A Discrete-Event Network Simulator
API
ns3::TestCase Class Referenceabstract

encapsulates test code More...

#include "test.h"

Inherited by AbstractAnimationInterfaceTestCase, AcousticModemEnergyDepletionTestCase, AcousticModemEnergyTestCase, AddressAllocator6TestCase, AddressAllocatorHelperTestCase, AddressAllocatorTestCase, AddressCollision6TestCase, AddressCollisionTestCase, AmpduAggregationTest, AredQueueDiscTestCase, ArrayResponseTest, AttributeContainerSerializationTestCase, AttributeContainerSetGetTestCase, AttributeContainerTestCase, AttributeTestCase< T >, BasicCallbackTestCase, BasicEnergyHarvesterTestCase, BasicTracedCallbackTestCase, BitDeserializerTest, BitSerializerTest, BlockAckAggregationDisabledTest, BlockAckRecipientBufferTest, BoxLineIntersectionTestCase, BridgeTest, BriteTopologyFunctionTestCase, BriteTopologyStructureTestCase, BufferTest, Bug2222TestCase, Bug2470TestCase, Bug2831TestCase, Bug2843TestCase, Bug730TestCase, Bug772ChainTest, BuildingsChannelConditionModelTestCase, BuildingsHelperOneTestCase, BuildingsPathlossTestCase, BuildingsPenetrationLossesTestCase, BuildingsShadowingTestCase, BulkSendBasicTestCase, BulkSendSeqTsSizeTestCase, BurstErrorModelSimple, CallbackEqualityTestCase, CallbackValueTestCase, CarrierAggregationConfigTestCase, CarrierAggregationTestCase, CartesianToGeoTestCase, ChainRegressionTest, ChannelAccessManagerTest< TxopType >, ChannelTest, ClassicRecoveryTest, ClickIfidFromNameTest, ClickIpMacAddressFromNameTest, ClickTrivialTest, CoDelQueueDiscBasicDrop, CoDelQueueDiscBasicEnqueueDequeue, CoDelQueueDiscBasicMark, CoDelQueueDiscBasicOverflow, CoDelQueueDiscControlLawTest, CoDelQueueDiscNewtonStepTest, CobaltQueueDiscBasicEnqueueDequeue, CobaltQueueDiscCeThresholdTest, CobaltQueueDiscDropTest, CobaltQueueDiscEnhancedBlueTest, CobaltQueueDiscMarkTest, CollisionTestCase, CosineAntennaModelTestCase, CsmaBridgeTestCase, CsmaBroadcastTestCase, CsmaMulticastTestCase, CsmaOneSubnetTestCase, CsmaPacketSocketTestCase, CsmaPingTestCase, CsmaRawIpSocketTestCase, CsmaStarTestCase, CtrlBAckResponseHeaderTest, DataRateTestCase, DcfImmediateAccessBroadcastTestCase, DegreesToRadiansTestCase, DeprecatedAttributeTestCase, DhcpTestCase, DiffTestCase, DropTailQueueTestCase, DsaRequestTestCase, DsdvHeaderTestCase, DsdvTableTestCase, DsrAckHeaderTest, DsrAckReqHeaderTest, DsrCacheEntryTest, DsrFsHeaderTest, DsrRerrHeaderTest, DsrRrepHeaderTest, DsrRreqHeaderTest, DsrRreqTableTest, DsrSRHeaderTest, DsrSendBuffTest, DualStackTestCase, DuplicateTest, DynamicNeighborCacheTest, DynamicPartialTest, EmlsrOperationsTestBase, EpcS1uDlTestCase, EpcS1uUlTestCase, EpcTftClassifierTestCase, EpsGtpuHeaderTestCase, ErrorModelSimple, ExampleAddress6GeneratorTestCase, ExampleAddressGeneratorTestCase, FifoQueueDiscTestCase, FileHeaderTestCase, FiveDoublesAverageTestCase, FiveDoublesTestCase, FiveIntegersAverageTestCase, FiveIntegersTestCase, FlameHeaderTest, FlameRegressionTest, FlameRtableTest, FlushTest, FqCoDelQueueDiscDeficit, FqCoDelQueueDiscECNMarking, FqCoDelQueueDiscIPFlowsSeparationAndPacketLimit, FqCoDelQueueDiscL4sMode, FqCoDelQueueDiscNoSuitableFilter, FqCoDelQueueDiscSetLinearProbing, FqCoDelQueueDiscTCPFlowsSeparation, FqCoDelQueueDiscUDPFlowsSeparation, FqCobaltQueueDiscDeficit, FqCobaltQueueDiscEcnMarking, FqCobaltQueueDiscIPFlowsSeparationAndPacketLimit, FqCobaltQueueDiscL4sMode, FqCobaltQueueDiscNoSuitableFilter, FqCobaltQueueDiscSetLinearProbing, FqCobaltQueueDiscTCPFlowsSeparation, FqCobaltQueueDiscUDPFlowsSeparation, FqPieQueueDiscDeficit, FqPieQueueDiscIPFlowsSeparationAndPacketLimit, FqPieQueueDiscL4sMode, FqPieQueueDiscNoSuitableFilter, FqPieQueueDiscSetLinearProbing, FqPieQueueDiscTCPFlowsSeparation, FqPieQueueDiscUDPFlowsSeparation, FriisPropagationLossModelTestCase, FtrFadingModelAverageTest, GeoToCartesianTestCase, GetRnrLinkInfoTest, GlobalRouteManagerImplTestCase, HeRuMcsDataRateTestCase, HeSigBDurationTest, HistogramTestCase, HwmpDoRfRegressionTest, HwmpProactiveRegressionTest, HwmpReactiveRegressionTest, HwmpRtableTest, HwmpSimplestRegressionTest, IcmpEchoReplyTestCase, IcmpTimeExceedTestCase, IcmpV6EchoReplyTestCase, IcmpV6TimeExceedTestCase, IdealRateManagerChannelWidthTest, IdealRateManagerMimoTest, IntegerTraceSourceAttributeTestCase, IntegerTraceSourceTestCase, InterfaceContainerTest, InterferenceHelperSequenceTest, InternetStackHelperTestCase, IpAddressHelperTestCasev4, IpAddressHelperTestCasev6, Ipv4DeduplicationPerformanceTest, Ipv4DeduplicationTest, Ipv4DynamicGlobalRoutingTestCase, Ipv4ForwardingTest, Ipv4FragmentationTest, Ipv4GlobalRoutingSlash32TestCase, Ipv4HeaderTest, Ipv4L3ProtocolTestCase, Ipv4PacketInfoTagTest, Ipv4RawSocketImplTest, Ipv4RipCountToInfinityTest, Ipv4RipSplitHorizonStrategyTest, Ipv4RipTest, Ipv4StaticRoutingSlash32TestCase, Ipv6AddressTestCase, Ipv6DadTest, Ipv6ForwardingTest, Ipv6FragmentationTest, Ipv6L3ProtocolTestCase, Ipv6PacketInfoTagTest, Ipv6RawSocketImplTest, Ipv6RipngCountToInfinityTest, Ipv6RipngSplitHorizonStrategyTest, Ipv6RipngTest, IsotropicAntennaModelTestCase, Issue169TestCase, Issue211Test, Issue40TestCase, ItuR1411LosPropagationLossModelTestCase, ItuR1411NlosOverRooftopPropagationLossModelTestCase, Kun2600MhzPropagationLossModelTestCase, LanTest, LargestIdlePrimaryChannelTest, LenaCqaFfMacSchedulerTestCase1, LenaCqaFfMacSchedulerTestCase2, LenaDataPhyErrorModelTestCase, LenaDlCtrlPhyErrorModelTestCase, LenaFdBetFfMacSchedulerTestCase1, LenaFdBetFfMacSchedulerTestCase2, LenaFdMtFfMacSchedulerTestCase, LenaFdTbfqFfMacSchedulerTestCase1, LenaFdTbfqFfMacSchedulerTestCase2, LenaHarqTestCase, LenaMimoTestCase, LenaPfFfMacSchedulerTestCase1, LenaPfFfMacSchedulerTestCase2, LenaPssFfMacSchedulerTestCase1, LenaPssFfMacSchedulerTestCase2, LenaRrFfMacSchedulerTestCase, LenaTdBetFfMacSchedulerTestCase1, LenaTdBetFfMacSchedulerTestCase2, LenaTdMtFfMacSchedulerTestCase, LenaTdTbfqFfMacSchedulerTestCase1, LenaTdTbfqFfMacSchedulerTestCase2, LenaTtaFfMacSchedulerTestCase, LengthTestCase, LengthValueTestCase, LiIonEnergyTestCase, LinkTest, LogDistancePropagationLossModelTestCase, LollipopCounterTest, LookupTimeTestCase, LrWpanAckTestCase, LrWpanCcaTestCase, LrWpanCollisionTestCase, LrWpanDataIfsTestCase, LrWpanEdTestCase, LrWpanErrorDistanceTestCase, LrWpanErrorModelTestCase, LrWpanPacketTestCase, LrWpanPlmeAndPdInterfaceTestCase, LrWpanSlottedCsmacaTestCase, LrWpanSpectrumValueHelperTestCase, LteAggregationThroughputScaleTestCase, LteCellSelectionTestCase, LteCqiGenerationDlPowerControlTestCase, LteCqiGenerationTestCase, LteDownlinkCtrlSinrTestCase, LteDownlinkDataSinrTestCase, LteDownlinkPowerControlRrcConnectionReconfigurationTestCase, LteDownlinkPowerControlSpectrumValueTestCase, LteDownlinkPowerControlTestCase, LteEarfcnTestCase, LteEnbAntennaTestCase, LteEpcE2eDataTestCase, LteFrAreaTestCase, LteFrTestCase, LteHandoverDelayTestCase, LteHandoverFailureTestCase, LteHandoverTargetTestCase, LteInterferenceHardFrTestCase, LteInterferenceStrictFrTestCase, LteInterferenceTestCase, LteIpv6RoutingTestCase, LteLinkAdaptationTestCase, LteNoisePsdTestCase, LtePathlossModelSystemTestCase, LtePrimaryCellChangeTestCase, LteRadioLinkFailureTestCase, LteRlcAmE2eTestCase, LteRlcAmTransmitterTestCase, LteRlcUmE2eTestCase, LteRlcUmTransmitterTestCase, LteRrcConnectionEstablishmentTestCase, LteSecondaryCellHandoverTestCase, LteSecondaryCellSelectionTestCase, LteSpectrumModelTestCase, LteTxPsdTestCase, LteUeMeasurementsHandoverTestCase, LteUeMeasurementsPiecewiseTestCase1, LteUeMeasurementsPiecewiseTestCase2, LteUeMeasurementsPiecewiseTestCase3, LteUeMeasurementsTestCase, LteUplinkDataSinrTestCase, LteUplinkPowerControlTestCase, LteUplinkSrsSinrTestCase, LteX2HandoverMeasuresTestCase, LteX2HandoverTestCase, MakeBoundCallbackTestCase, MakeCallbackTemplatesTestCase, MakeCallbackTestCase, MatrixPropagationLossModelTestCase, MeshHeaderTest, MeshInformationElementVectorBist, MldSwapLinksTest, MobilityTraceTestCase, MultiLinkOperationsTestBase, MultiStaCtrlBAckResponseHeaderTest, NetDeviceContainerTest, NetworkAllocatorHelperTestCase, NetworkAndAddress6TestCase, NetworkAndAddressTestCase, NetworkNumber6AllocatorTestCase, NetworkNumberAllocatorTestCase, NixVectorRoutingTest, Ns2MobilityHelperTest, Ns3TcpCubicTestCase, Ns3TcpLossTestCase, Ns3TcpNoDelayTestCase, Ns3TcpSocketTestCaseCsma, Ns3TcpSocketTestCaseP2P, Ns3TcpStateTestCase, Ns3WimaxCsParamTlvTestCase, Ns3WimaxFragmentationTestCase, Ns3WimaxManagementConnectionsTestCase, Ns3WimaxNetworkEntryTestCase, Ns3WimaxSFTypeTestCase, Ns3WimaxSNRtoBLERTestCase, Ns3WimaxSchedulingTestCase, Ns3WimaxSfCreationTestCase, Ns3WimaxSfTlvTestCase, Ns3WimaxSimpleOFDMTestCase, NullifyCallbackTestCase, ObjectMapAttributeTestCase, ObjectVectorAttributeTestCase, OfdmaAckSequenceTest, OkumuraHataPropagationLossModelTestCase, OlsrEmfTestCase, OlsrHelloTestCase, OlsrHnaTestCase, OlsrMidTestCase, OlsrMprTestCase, OlsrTcTestCase, OneIntegerAverageTestCase, OneIntegerTestCase, OneVectorConstructorTestCase, OriginatorBlockAckWindowTest, OutdoorRandomWalkTestCase, OverallGainAverageTest, PacketBufferingCaseA, PacketBufferingCaseB, PacketLossCounterTestCase, PacketMetadataTest, PacketSocketAppsTest, PacketTagListTest, PacketTest, PairValueSettingsTestCase, PairValueTestCase, ParabolicAntennaModelTestCase, PbbTestCase, PeerLinkFrameStartTest, PeerManagementProtocolRegressionTest, PfifoFastQueueDiscDscpPrioritization, PfifoFastQueueDiscNoPriority, PfifoFastQueueDiscOverflow, PfifoFastQueueDiscTosPrioritization, PhyHeaderSectionsTest, PieQueueDiscTestCase, PingTestCase, PointToPointTest, PointerAttributeTestCase, PowerRateAdaptationTest, PreservePacketsInAmpdus, PrioQueueDiscTestCase, ProbeTestCase1, PrrRecoveryTest, QkdTestCase1, QosFragmentationTestCase, QosUtilsIsOldPacketTest, QueueDiscTracesTestCase, RadiansToDegreesTestCase, RadvdTestCase, RandCartAroundGeoTestCase, RandomRoomPositionAllocatorTestCase, RandomVariableStreamAttributeTestCase, RangePropagationLossModelTestCase, ReadFileTestCase, ReadModeCreateTestCase, RecordHeaderTestCase, RectangleClosestBorderTestCase, RedQueueDiscTestCase, ResetAllocatorHelperTestCase, RngExponentialTestCase, RngNormalTestCase, RngParetoTestCase, RngUniformTestCase, RocketfuelTopologyReaderMapsTest, RocketfuelTopologyReaderWeightsTest, RrcHeaderTestCase, RttEstimatorTestCase, SameRoomPositionAllocatorTestCase, SequenceNumberTestCase, SetChannelFrequencyTest, SimulatorEventsTestCase, SimulatorTemplateTestCase, SixlowpanFragmentationTest, SixlowpanHc1ImplTest, SixlowpanIphcImplTest, SixlowpanIphcStatefulImplTest, SpectrumIdealPhyTestCase, SpectrumInterferenceTestCase, SpectrumValueTestCase, SpectrumWifiPhyBasicTest, SpectrumWifiPhyFilterTest, SpectrumWifiPhyInterfacesHelperTest, SpectrumWifiPhyMultipleInterfacesTest, StaWifiMacScanningTestCase, SteadyStateRandomWaypointTest, SwitchFlowTableTestCase, TableBasedErrorRateTestCase, TbfQueueDiscTestCase, TcFlowControlTestCase, TcpBicDecrementTest, TcpBicIncrementTest, TcpDctcpToLinuxReno, TcpEndPointBug2211Test, TcpHeaderFlagsToString, TcpHeaderGetSetTestCase, TcpHeaderWithRFC793OptionTestCase, TcpHighSpeedDecrementTest, TcpHighSpeedIncrementTest, TcpHtcpIncrementTest, TcpHyblaIncrementTest, TcpIllinoisTest, TcpLedbatDecrementTest, TcpLedbatIncrementTest, TcpLedbatToNewReno, TcpOptionTSTestCase, TcpOptionWSTestCase, TcpRateLinuxBasicTest, TcpRateLinuxWithBufferTest, TcpRxBufferTestCase, TcpScalableDecrementTest, TcpScalableIncrementTest, TcpSynConnectionFailedTest, TcpTestCase, TcpTxBufferTestCase, TcpVegasTest, TcpVenoTest, TcpYeahDecrementTest, TcpYeahIncrementTest, TestActiveScanPanDescriptors, TestDlMuMimoPhyTransmission, TestDlMuTxVector, TestDlOfdmaPhyPuncturing, TestDlOfdmaPhyTransmission, TestEmptyOptionField, TestFulfilledAlignment, TestInterBssConstantObssPdAlgo, TestMultipleCtsResponsesFromMuRts, TestMultipleHeTbPreambles, TestNonHtDuplicatePhyReception, TestOptionWithAlignment, TestOptionWithoutAlignment, TestOrphanScan, TestPhyPaddingExclusion, TestPrimary20CoveredByPpdu, TestRxOffWhenIdleAfterCsmaFailure, TestSpectrumChannelWithBandwidthFilter, TestUlMuMimoPhyTransmission, TestUlOfdmaPhyTransmission, TestUlOfdmaPowerControl, TestUlOfdmaPpduUid, TestUnsupportedBandwidthReception, TestUnsupportedModulationReception, ThreadedSimulatorEventsTestCase, ThreeGppCalcLongTermMultiPortTest, ThreeGppChannelConditionModelTestCase, ThreeGppChannelMatrixComputationTest, ThreeGppChannelMatrixUpdateTest, ThreeGppHttpObjectTestCase, ThreeGppIndoorOfficePropagationLossModelTestCase, ThreeGppMimoPolarizationTest, ThreeGppRmaPropagationLossModelTestCase, ThreeGppShadowingTestCase, ThreeGppSpectrumPropagationLossModelTest, ThreeGppUmaPropagationLossModelTestCase, ThreeGppUmiPropagationLossModelTestCase, ThreeGppV2vBuildingsChCondModelTestCase, ThreeGppV2vHighwayLosNlosvChCondModelTestCase, ThreeGppV2vHighwayPropagationLossModelTestCase, ThreeGppV2vUrbanLosNlosvChCondModelTestCase, ThreeGppV2vUrbanPropagationLossModelTestCase, TimeInputOutputTestCase, TimeSimpleTestCase, TimeWithSignTestCase, TimerStateTestCase, TimerTemplateTestCase, TimestampValueTestCase, TracedCallbackTestCase, TracedCallbackTypedefTestCase, TracedValueCallbackTestCase, TupleValueTestCase, TvHelperDistributionTestCase, TvSpectrumTransmitterTestCase, TwoBridgeTest, TwoLanTest, TwoLinkTest, TwoRayGroundPropagationLossModelTestCase, TwoVectorsConstructorTestCase, TxDurationTest, UanTest, Udp6SocketImplTest, Udp6SocketLoopbackTest, UdpClientServerTestCase, UdpEchoClientSetFillTestCase, UdpSocketImplTest, UdpSocketLoopbackTest, UdpTraceClientServerTestCase, UniformPlanarArrayTestCase, UniqueTypeIdTestCase, V2vHighwayProbChCondModelTestCase, V2vUrbanProbChCondModelTestCase, WaveformGeneratorTestCase, WaypointInitialPositionIsWaypoint, WaypointLazyNotifyFalse, WaypointLazyNotifyTrue, WaypointMobilityModelAddWaypointTest, WaypointMobilityModelNotifyTest, WaypointMobilityModelViaHelper, Wifi20MHzChannelIndicesTest, Wifi20MHzIndicesCoveringRuTest, WifiAcMappingTest, WifiChannelSwitchingTest, WifiErrorRateModelsTestCaseDsss, WifiErrorRateModelsTestCaseMimo, WifiErrorRateModelsTestCaseNist, WifiExtractExpiredMpdusTest, WifiMacQueueDropOldestTest, WifiMsduAggregatorThroughputTest, WifiOfdmMaskSlopesTestCase, WifiPhyCcaIndicationTest, WifiPhyCcaThresholdsTest, WifiPhyReceptionTest, WifiPhyThresholdsTest, WifiPrimaryChannelsTest, WifiTest, WifiTxopTest, WifiUseAvailBwTest, WrapToRangeFunctionalTestCase, WrapToRangeTestCase, WriteModeCreateTestCase, ns3::ExampleAsTestCase, ns3::HeaderSerializationTestCase, ns3::Ipv4ListRoutingNegativeTestCase, ns3::Ipv4ListRoutingPositiveTestCase, ns3::Ipv6ListRoutingNegativeTestCase, ns3::Ipv6ListRoutingPositiveTestCase, ns3::LenaDeactivateBearerTestCase, ns3::RlcAmStatusPduTestCase, ns3::TcpBbrCheckGainValuesTest, ns3::TcpBbrPacingEnableTest, ns3::TcpGeneralTest, ns3::TcpLpInferenceTest1, ns3::TcpLpInferenceTest2, ns3::TcpLpToNewReno, ns3::TestSuite, ns3::aodv::AodvRqueueTest, ns3::aodv::AodvRtableEntryTest, ns3::aodv::AodvRtableTest, ns3::aodv::IdCacheTest, ns3::aodv::LoopbackTestCase, ns3::aodv::NeighborTest, ns3::aodv::QueueEntryTest, ns3::aodv::RerrHeaderTest, ns3::aodv::RrepAckHeaderTest, ns3::aodv::RrepHeaderTest, ns3::aodv::RreqHeaderTest, ns3::aodv::TypeHeaderTest, ns3::int64x64::test::Int64x64ArithmeticTestCase, ns3::int64x64::test::Int64x64Bug1786TestCase, ns3::int64x64::test::Int64x64Bug455TestCase, ns3::int64x64::test::Int64x64Bug863TestCase, ns3::int64x64::test::Int64x64CompareTestCase, ns3::int64x64::test::Int64x64DoubleTestCase, ns3::int64x64::test::Int64x64HiLoTestCase, ns3::int64x64::test::Int64x64ImplTestCase, ns3::int64x64::test::Int64x64InputOutputTestCase, ns3::int64x64::test::Int64x64InputTestCase, ns3::int64x64::test::Int64x64IntRoundTestCase, ns3::int64x64::test::Int64x64InvertTestCase, ns3::olsr::Bug780Test, ns3::olsr::HelloRegressionTest, ns3::olsr::TcRegressionTest, ns3::test::RandomVariable::TestCaseBase, ns3::tests::AggregateObjectTestCase, ns3::tests::AlternateFindTestCase, ns3::tests::BasicAddTestCase, ns3::tests::BasicFindTestCase, ns3::tests::BasicRenameTestCase, ns3::tests::BuildProfileTestCase, ns3::tests::CommandLineTestCaseBase, ns3::tests::ComplexMatrixArrayTestCase, ns3::tests::CreateObjectTestCase, ns3::tests::EnvVarTestCase, ns3::tests::EventGarbageCollectorTestCase, ns3::tests::FindPathTestCase, ns3::tests::FullyQualifiedAddTestCase, ns3::tests::FullyQualifiedFindTestCase, ns3::tests::FullyQualifiedRenameTestCase, ns3::tests::GlobalValueTestCase, ns3::tests::HashTestCase, ns3::tests::ManyUniformRandomVariablesOneGetValueCallTestCase, ns3::tests::MatrixArrayTestCase< T >, ns3::tests::ObjectFactoryTestCase, ns3::tests::ObjectVectorConfigTestCase, ns3::tests::ObjectVectorTraceConfigTestCase, ns3::tests::OneUniformRandomVariableManyGetValueCallsTestCase, ns3::tests::PtrTestCase, ns3::tests::RelativeAddTestCase, ns3::tests::RelativeFindTestCase, ns3::tests::RelativeRenameTestCase, ns3::tests::RootNamespaceConfigTestCase, ns3::tests::SampleTestCase1, ns3::tests::SearchAttributesOfParentObjectsTestCase, ns3::tests::SplitStringTestCase, ns3::tests::StringContextAddTestCase, ns3::tests::StringContextFindTestCase, ns3::tests::StringContextRenameTestCase, ns3::tests::TrickleTimerTestCase, ns3::tests::TypeTraitsTestCase, ns3::tests::UnderRootNamespaceConfigTestCase, ns3::tests::ValArrayTestCase< T >, and ns3::tests::WatchdogTestCase.

+ Collaboration diagram for ns3::TestCase:

Classes

struct  Result
 Container for results from a TestCase. More...
 

Public Types

enum  TestDuration { QUICK = 1 , EXTENSIVE = 2 , TAKES_FOREVER = 3 }
 How long the test takes to execute. More...
 

Public Member Functions

 TestCase (const TestCase &)=delete
 
virtual ~TestCase ()
 Destructor. More...
 
std::string GetName () const
 
TestCaseoperator= (const TestCase &)=delete
 

Protected Member Functions

 TestCase (std::string name)
 Constructor. More...
 
void AddTestCase (TestCase *testCase, TestDuration duration=QUICK)
 Add an individual child TestCase to this test suite. More...
 
TestCaseGetParent () const
 Get the parent of this TestCase. More...
 
bool IsStatusFailure () const
 Check if any tests failed. More...
 
bool IsStatusSuccess () const
 Check if all tests passed. More...
 
void SetDataDir (std::string directory)
 Set the data directory where reference trace files can be found. More...
 
Internal Interface

These methods are the interface used by test macros and should not be used directly by normal test code.

void ReportTestFailure (std::string cond, std::string actual, std::string limit, std::string message, std::string file, int32_t line)
 Log the failure of this TestCase. More...
 
bool MustAssertOnFailure () const
 Check if this run should assert on failure. More...
 
bool MustContinueOnFailure () const
 Check if this run should continue on failure. More...
 
std::string CreateDataDirFilename (std::string filename)
 Construct the full path to a file in the data directory. More...
 
std::string CreateTempDirFilename (std::string filename)
 Construct the full path to a file in a temporary directory. More...
 

Private Member Functions

virtual void DoRun ()=0
 Implementation to actually run this TestCase. More...
 
virtual void DoSetup ()
 Implementation to do any local setup required for this TestCase. More...
 
virtual void DoTeardown ()
 Implementation to do any local setup required for this TestCase. More...
 
bool IsFailed () const
 Check if any tests failed. More...
 
void Run (TestRunnerImpl *runner)
 Actually run this TestCase. More...
 

Private Attributes

std::vector< TestCase * > m_children
 Vector of my children. More...
 
std::string m_dataDir
 My data directory. More...
 
TestDuration m_duration
 TestCase duration. More...
 
std::string m_name
 TestCase name. More...
 
TestCasem_parent
 Pointer to my parent TestCase. More...
 
Resultm_result
 Results data. More...
 
TestRunnerImplm_runner
 Pointer to the TestRunner. More...
 

Friends

class TestRunnerImpl
 Needs access to the TestCase data members. More...
 

Detailed Description

encapsulates test code

To allow a new test to be run within the ns-3 test framework, users need to create subclasses of this base class, override the DoRun method, and use the NS_TEST_* macros within DoRun.

See also
sample-test-suite.cc

Definition at line 1059 of file test.h.

Member Enumeration Documentation

◆ TestDuration

How long the test takes to execute.

Enumerator
QUICK 

Fast test.

EXTENSIVE 

Medium length test.

TAKES_FOREVER 

Very long running test.

Definition at line 1063 of file test.h.

Constructor & Destructor Documentation

◆ ~TestCase()

ns3::TestCase::~TestCase ( )
virtual

Destructor.

Definition at line 287 of file test.cc.

References m_children, m_parent, m_result, m_runner, NS_ASSERT, and NS_LOG_FUNCTION.

◆ TestCase() [1/2]

ns3::TestCase::TestCase ( const TestCase )
delete

◆ TestCase() [2/2]

ns3::TestCase::TestCase ( std::string  name)
protected

Constructor.

Parameters
[in]nameThe name of the new TestCase created

Definition at line 276 of file test.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

◆ AddTestCase()

void ns3::TestCase::AddTestCase ( TestCase testCase,
TestCase::TestDuration  duration = QUICK 
)
protected

Add an individual child TestCase to this test suite.

Parameters
[in]testCasePointer to the TestCase object to be added.
[in]durationAmount of time this test takes to execute (defaults to QUICK).

Definition at line 301 of file test.cc.

References m_children, m_duration, m_name, m_parent, NS_LOG_FUNCTION, and NS_LOG_UNCOND.

Referenced by AnglesTestSuite::AnglesTestSuite(), AnimationInterfaceTestSuite::AnimationInterfaceTestSuite(), ns3::aodv::AodvLoopbackTestSuite::AodvLoopbackTestSuite(), ns3::aodv::AodvTestSuite::AodvTestSuite(), AredQueueDiscTestSuite::AredQueueDiscTestSuite(), Asn1EncodingSuite::Asn1EncodingSuite(), AttributeContainerTestSuite::AttributeContainerTestSuite(), AttributesTestSuite::AttributesTestSuite(), AverageTestSuite::AverageTestSuite(), BasicDataCalculatorsTestSuite::BasicDataCalculatorsTestSuite(), BasicEnergyHarvesterTestSuite::BasicEnergyHarvesterTestSuite(), BitSerializerTestSuite::BitSerializerTestSuite(), BlockAckTestSuite::BlockAckTestSuite(), BoxLineIntersectionTestSuite::BoxLineIntersectionTestSuite(), BriteTestSuite::BriteTestSuite(), BufferTestSuite::BufferTestSuite(), BuildingPositionAllocatorTestSuite::BuildingPositionAllocatorTestSuite(), BuildingsChannelConditionModelsTestSuite::BuildingsChannelConditionModelsTestSuite(), BuildingsHelperTestSuite::BuildingsHelperTestSuite(), BuildingsPathlossTestSuite::BuildingsPathlossTestSuite(), BuildingsPenetrationLossesTestSuite::BuildingsPenetrationLossesTestSuite(), BuildingsShadowingTestSuite::BuildingsShadowingTestSuite(), ns3::tests::BuildProfileTestSuite::BuildProfileTestSuite(), BulkSendTestSuite::BulkSendTestSuite(), CallbackTestSuite::CallbackTestSuite(), CarrierAggregationConfigTestSuite::CarrierAggregationConfigTestSuite(), ChannelAccessManagerTestSuite::ChannelAccessManagerTestSuite(), ChannelConditionModelsTestSuite::ChannelConditionModelsTestSuite(), ClassicRecoveryTestSuite::ClassicRecoveryTestSuite(), ClickIfidFromNameTestSuite::ClickIfidFromNameTestSuite(), CobaltQueueDiscTestSuite::CobaltQueueDiscTestSuite(), CoDelQueueDiscTestSuite::CoDelQueueDiscTestSuite(), ns3::tests::CommandLineTestSuite::CommandLineTestSuite(), ns3::tests::ConfigTestSuite::ConfigTestSuite(), CosineAntennaModelTestSuite::CosineAntennaModelTestSuite(), CsmaSystemTestSuite::CsmaSystemTestSuite(), DataRateTestSuite::DataRateTestSuite(), DegreesRadiansTestSuite::DegreesRadiansTestSuite(), DhcpTestSuite::DhcpTestSuite(), Dot11sTestSuite::Dot11sTestSuite(), DropTailQueueTestSuite::DropTailQueueTestSuite(), DsdvTestSuite::DsdvTestSuite(), DsrTestSuite::DsrTestSuite(), ns3::tests::EnvironmentVariableTestSuite::EnvironmentVariableTestSuite(), EpcS1uDlTestSuite::EpcS1uDlTestSuite(), EpcS1uUlTestSuite::EpcS1uUlTestSuite(), EpcTftClassifierTestSuite::EpcTftClassifierTestSuite(), EpsGtpuTestSuite::EpsGtpuTestSuite(), ErrorModelTestSuite::ErrorModelTestSuite(), ns3::tests::EventGarbageCollectorTestSuite::EventGarbageCollectorTestSuite(), ns3::tests::ExamplesAsTestsTestSuite::ExamplesAsTestsTestSuite(), FifoQueueDiscTestSuite::FifoQueueDiscTestSuite(), FlameTestSuite::FlameTestSuite(), FqCobaltQueueDiscTestSuite::FqCobaltQueueDiscTestSuite(), FqCoDelQueueDiscTestSuite::FqCoDelQueueDiscTestSuite(), FqPieQueueDiscTestSuite::FqPieQueueDiscTestSuite(), GeoToCartesianTestSuite::GeoToCartesianTestSuite(), GlobalRouteManagerImplTestSuite::GlobalRouteManagerImplTestSuite(), ns3::tests::GlobalValueTestSuite::GlobalValueTestSuite(), ns3::tests::HashTestSuite::HashTestSuite(), HistogramTestSuite::HistogramTestSuite(), IcmpTestSuite::IcmpTestSuite(), ns3::aodv::IdCacheTestSuite::IdCacheTestSuite(), ns3::int64x64::test::Int64x64TestSuite::Int64x64TestSuite(), InterBssTestSuite::InterBssTestSuite(), InternetStackHelperTestSuite::InternetStackHelperTestSuite(), Ipv4AddressGeneratorTestSuite::Ipv4AddressGeneratorTestSuite(), Ipv4AddressHelperTestSuite::Ipv4AddressHelperTestSuite(), Ipv4DeduplicationPerformanceTestSuite::Ipv4DeduplicationPerformanceTestSuite(), Ipv4DeduplicationTestSuite::Ipv4DeduplicationTestSuite(), Ipv4ForwardingTestSuite::Ipv4ForwardingTestSuite(), Ipv4FragmentationTestSuite::Ipv4FragmentationTestSuite(), Ipv4GlobalRoutingTestSuite::Ipv4GlobalRoutingTestSuite(), Ipv4HeaderTestSuite::Ipv4HeaderTestSuite(), IPv4L3ProtocolTestSuite::IPv4L3ProtocolTestSuite(), ns3::Ipv4ListRoutingTestSuite::Ipv4ListRoutingTestSuite(), Ipv4PacketInfoTagTestSuite::Ipv4PacketInfoTagTestSuite(), Ipv4RawTestSuite::Ipv4RawTestSuite(), Ipv4RipTestSuite::Ipv4RipTestSuite(), Ipv4StaticRoutingTestSuite::Ipv4StaticRoutingTestSuite(), Ipv6AddressGeneratorTestSuite::Ipv6AddressGeneratorTestSuite(), Ipv6AddressHelperTestSuite::Ipv6AddressHelperTestSuite(), Ipv6AddressTestSuite::Ipv6AddressTestSuite(), Ipv6DadTestSuite::Ipv6DadTestSuite(), Ipv6DualStackTestSuite::Ipv6DualStackTestSuite(), Ipv6ForwardingTestSuite::Ipv6ForwardingTestSuite(), Ipv6FragmentationTestSuite::Ipv6FragmentationTestSuite(), IPv6L3ProtocolTestSuite::IPv6L3ProtocolTestSuite(), ns3::Ipv6ListRoutingTestSuite::Ipv6ListRoutingTestSuite(), Ipv6PacketInfoTagTestSuite::Ipv6PacketInfoTagTestSuite(), Ipv6RawTestSuite::Ipv6RawTestSuite(), Ipv6RipngTestSuite::Ipv6RipngTestSuite(), IsotropicAntennaModelTestSuite::IsotropicAntennaModelTestSuite(), Issue211TestSuite::Issue211TestSuite(), ItuR1411LosPropagationLossModelTestSuite::ItuR1411LosPropagationLossModelTestSuite(), ItuR1411NlosOverRooftopPropagationLossModelTestSuite::ItuR1411NlosOverRooftopPropagationLossModelTestSuite(), Kun2600MhzPropagationLossModelTestSuite::Kun2600MhzPropagationLossModelTestSuite(), ns3::LenaTestBearerDeactivateSuite::LenaTestBearerDeactivateSuite(), LenaTestCqaFfMacSchedulerSuite::LenaTestCqaFfMacSchedulerSuite(), LenaTestFdBetFfMacSchedulerSuite::LenaTestFdBetFfMacSchedulerSuite(), LenaTestFdMtFfMacSchedulerSuite::LenaTestFdMtFfMacSchedulerSuite(), LenaTestFdTbfqFfMacSchedulerSuite::LenaTestFdTbfqFfMacSchedulerSuite(), LenaTestHarqSuite::LenaTestHarqSuite(), LenaTestMimoSuite::LenaTestMimoSuite(), LenaTestPfFfMacSchedulerSuite::LenaTestPfFfMacSchedulerSuite(), LenaTestPhyErrorModelSuite::LenaTestPhyErrorModelSuite(), LenaTestPssFfMacSchedulerSuite::LenaTestPssFfMacSchedulerSuite(), LenaTestRrFfMacSchedulerSuite::LenaTestRrFfMacSchedulerSuite(), LenaTestTdBetFfMacSchedulerSuite::LenaTestTdBetFfMacSchedulerSuite(), LenaTestTdMtFfMacSchedulerSuite::LenaTestTdMtFfMacSchedulerSuite(), LenaTestTdTbfqFfMacSchedulerSuite::LenaTestTdTbfqFfMacSchedulerSuite(), LenaTestTtaFfMacSchedulerSuite::LenaTestTtaFfMacSchedulerSuite(), LengthTestSuite::LengthTestSuite(), LiIonEnergySourceTestSuite::LiIonEnergySourceTestSuite(), LolipopCounterTestSuite::LolipopCounterTestSuite(), LrWpanAckTestSuite::LrWpanAckTestSuite(), LrWpanCcaTestSuite::LrWpanCcaTestSuite(), LrWpanCollisionTestSuite::LrWpanCollisionTestSuite(), LrWpanEdTestSuite::LrWpanEdTestSuite(), LrWpanErrorModelTestSuite::LrWpanErrorModelTestSuite(), LrWpanIfsTestSuite::LrWpanIfsTestSuite(), LrWpanMacTestSuite::LrWpanMacTestSuite(), LrWpanPacketTestSuite::LrWpanPacketTestSuite(), LrWpanPlmeAndPdInterfaceTestSuite::LrWpanPlmeAndPdInterfaceTestSuite(), LrWpanSlottedCsmacaTestSuite::LrWpanSlottedCsmacaTestSuite(), LrWpanSpectrumValueHelperTestSuite::LrWpanSpectrumValueHelperTestSuite(), LteAggregationThroughputScaleTestSuite::LteAggregationThroughputScaleTestSuite(), LteAntennaTestSuite::LteAntennaTestSuite(), LteCellSelectionTestSuite::LteCellSelectionTestSuite(), LteCqiGenerationTestSuite::LteCqiGenerationTestSuite(), LteDownlinkPowerControlTestSuite::LteDownlinkPowerControlTestSuite(), LteDownlinkSinrTestSuite::LteDownlinkSinrTestSuite(), LteEarfcnTestSuite::LteEarfcnTestSuite(), LteEpcE2eDataTestSuite::LteEpcE2eDataTestSuite(), LteFrequencyReuseTestSuite::LteFrequencyReuseTestSuite(), LteHandoverTargetTestSuite::LteHandoverTargetTestSuite(), LteInterferenceFrTestSuite::LteInterferenceFrTestSuite(), LteInterferenceTestSuite::LteInterferenceTestSuite(), LteIpv6RoutingTestSuite::LteIpv6RoutingTestSuite(), LteLinkAdaptationTestSuite::LteLinkAdaptationTestSuite(), LtePathlossModelTestSuite::LtePathlossModelTestSuite(), LtePrimaryCellChangeTestSuite::LtePrimaryCellChangeTestSuite(), LteRadioLinkFailureTestSuite::LteRadioLinkFailureTestSuite(), LteRlcAmE2eTestSuite::LteRlcAmE2eTestSuite(), LteRlcAmTransmitterTestSuite::LteRlcAmTransmitterTestSuite(), ns3::LteRlcHeaderTestSuite::LteRlcHeaderTestSuite(), LteRlcUmE2eTestSuite::LteRlcUmE2eTestSuite(), LteRlcUmTransmitterTestSuite::LteRlcUmTransmitterTestSuite(), LteRrcTestSuite::LteRrcTestSuite(), LteSecondaryCellHandoverTestSuite::LteSecondaryCellHandoverTestSuite(), LteSecondaryCellSelectionTestSuite::LteSecondaryCellSelectionTestSuite(), LteSpectrumValueHelperTestSuite::LteSpectrumValueHelperTestSuite(), LteUeMeasurementsHandoverTestSuite::LteUeMeasurementsHandoverTestSuite(), LteUeMeasurementsPiecewiseTestSuite1::LteUeMeasurementsPiecewiseTestSuite1(), LteUeMeasurementsPiecewiseTestSuite2::LteUeMeasurementsPiecewiseTestSuite2(), LteUeMeasurementsPiecewiseTestSuite3::LteUeMeasurementsPiecewiseTestSuite3(), LteUeMeasurementsTestSuite::LteUeMeasurementsTestSuite(), LteUplinkPowerControlTestSuite::LteUplinkPowerControlTestSuite(), LteUplinkSinrTestSuite::LteUplinkSinrTestSuite(), LteX2HandoverMeasuresTestSuite::LteX2HandoverMeasuresTestSuite(), LteX2HandoverTestSuite::LteX2HandoverTestSuite(), ns3::tests::ManyUniformRandomVariablesOneGetValueCallTestSuite::ManyUniformRandomVariablesOneGetValueCallTestSuite(), ns3::tests::MatrixArrayTestSuite::MatrixArrayTestSuite(), MeshTestSuite::MeshTestSuite(), MobilityTestSuite::MobilityTestSuite(), MobilityTraceTestSuite::MobilityTraceTestSuite(), MpiTestSuite::MpiTestSuite(), ns3::tests::NamesTestSuite::NamesTestSuite(), NeighborCacheTestSuite::NeighborCacheTestSuite(), NixVectorRoutingTestSuite::NixVectorRoutingTestSuite(), Ns3TcpCubicTestSuite::Ns3TcpCubicTestSuite(), Ns3TcpLossTestSuite::Ns3TcpLossTestSuite(), Ns3TcpNoDelayTestSuite::Ns3TcpNoDelayTestSuite(), Ns3TcpSocketTestSuite::Ns3TcpSocketTestSuite(), Ns3TcpStateTestSuite::Ns3TcpStateTestSuite(), Ns3WimaxFragmentationTestSuite::Ns3WimaxFragmentationTestSuite(), Ns3WimaxMacMessagesTestSuite::Ns3WimaxMacMessagesTestSuite(), Ns3WimaxPhyTestSuite::Ns3WimaxPhyTestSuite(), Ns3WimaxQoSTestSuite::Ns3WimaxQoSTestSuite(), Ns3WimaxServiceFlowTestSuite::Ns3WimaxServiceFlowTestSuite(), Ns3WimaxSSMacTestSuite::Ns3WimaxSSMacTestSuite(), Ns3WimaxTlvTestSuite::Ns3WimaxTlvTestSuite(), ns3::tests::ObjectTestSuite::ObjectTestSuite(), OkumuraHataPropagationLossModelTestSuite::OkumuraHataPropagationLossModelTestSuite(), OlsrProtocolTestSuite::OlsrProtocolTestSuite(), OlsrTestSuite::OlsrTestSuite(), ns3::tests::OneUniformRandomVariableManyGetValueCallsTestSuite::OneUniformRandomVariableManyGetValueCallsTestSuite(), OutdoorRandomWalkTestSuite::OutdoorRandomWalkTestSuite(), PacketMetadataTestSuite::PacketMetadataTestSuite(), PacketSocketAppsTestSuite::PacketSocketAppsTestSuite(), PacketTestSuite::PacketTestSuite(), PairValueTestSuite::PairValueTestSuite(), ParabolicAntennaModelTestSuite::ParabolicAntennaModelTestSuite(), PbbTestSuite::PbbTestSuite(), PcapFileTestSuite::PcapFileTestSuite(), PfifoFastQueueDiscTestSuite::PfifoFastQueueDiscTestSuite(), PieQueueDiscTestSuite::PieQueueDiscTestSuite(), PingTestSuite::PingTestSuite(), PointToPointTestSuite::PointToPointTestSuite(), PowerRateAdaptationTestSuite::PowerRateAdaptationTestSuite(), PrioQueueDiscTestSuite::PrioQueueDiscTestSuite(), ProbabilisticV2vChCondModelsTestSuite::ProbabilisticV2vChCondModelsTestSuite(), ProbeTestSuite::ProbeTestSuite(), PropagationLossModelsTestSuite::PropagationLossModelsTestSuite(), PrrRecoveryTestSuite::PrrRecoveryTestSuite(), ns3::tests::PtrTestSuite::PtrTestSuite(), QkdTestSuite::QkdTestSuite(), QosTxopTestSuite::QosTxopTestSuite(), QueueDiscTracesTestSuite::QueueDiscTracesTestSuite(), RadvdTestSuite::RadvdTestSuite(), RandCartAroundGeoTestSuite::RandCartAroundGeoTestSuite(), ns3::test::RandomVariable::RandomVariableSuite::RandomVariableSuite(), RectangleClosestBorderTestSuite::RectangleClosestBorderTestSuite(), RedQueueDiscTestSuite::RedQueueDiscTestSuite(), RngTestSuite::RngTestSuite(), RocketfuelTopologyReaderTestSuite::RocketfuelTopologyReaderTestSuite(), RttEstimatorTestSuite::RttEstimatorTestSuite(), ns3::tests::SampleTestSuite::SampleTestSuite(), SequenceNumberTestSuite::SequenceNumberTestSuite(), SimulatorTestSuite::SimulatorTestSuite(), SixlowpanFragmentationTestSuite::SixlowpanFragmentationTestSuite(), SixlowpanHc1TestSuite::SixlowpanHc1TestSuite(), SixlowpanIphcStatefulTestSuite::SixlowpanIphcStatefulTestSuite(), SixlowpanIphcTestSuite::SixlowpanIphcTestSuite(), SpectrumConverterTestSuite::SpectrumConverterTestSuite(), SpectrumIdealPhyTestSuite::SpectrumIdealPhyTestSuite(), SpectrumInterferenceTestSuite::SpectrumInterferenceTestSuite(), SpectrumValueTestSuite::SpectrumValueTestSuite(), SpectrumWifiPhyTestSuite::SpectrumWifiPhyTestSuite(), ns3::tests::SplitStringTestSuite::SplitStringTestSuite(), SwitchTestSuite::SwitchTestSuite(), TbfQueueDiscTestSuite::TbfQueueDiscTestSuite(), TcFlowControlTestSuite::TcFlowControlTestSuite(), TcpAdvertisedWindowTestSuite::TcpAdvertisedWindowTestSuite(), ns3::TcpBbrTestSuite::TcpBbrTestSuite(), TcpBicTestSuite::TcpBicTestSuite(), TcpBytesInFlightTestSuite::TcpBytesInFlightTestSuite(), TcpDctcpTestSuite::TcpDctcpTestSuite(), ns3::TcpEcnTestSuite::TcpEcnTestSuite(), TcpEndpointBug2211TestSuite::TcpEndpointBug2211TestSuite(), TcpFastRetrTestSuite::TcpFastRetrTestSuite(), TcpHeaderTestSuite::TcpHeaderTestSuite(), TcpHighSpeedTestSuite::TcpHighSpeedTestSuite(), TcpHtcpTestSuite::TcpHtcpTestSuite(), TcpHyblaTestSuite::TcpHyblaTestSuite(), TcpIllinoisTestSuite::TcpIllinoisTestSuite(), TcpLedbatTestSuite::TcpLedbatTestSuite(), TcpLinuxRenoTestSuite::TcpLinuxRenoTestSuite(), TcpLossTestSuite::TcpLossTestSuite(), ns3::TcpLpTestSuite::TcpLpTestSuite(), TcpOptionTestSuite::TcpOptionTestSuite(), TcpPacingTestSuite::TcpPacingTestSuite(), TcpPktsAckedTestSuite::TcpPktsAckedTestSuite(), TcpRateOpsTestSuite::TcpRateOpsTestSuite(), TcpRenoCongAvoidTestSuite::TcpRenoCongAvoidTestSuite(), TcpRtoTestSuite::TcpRtoTestSuite(), TcpRttEstimationTestSuite::TcpRttEstimationTestSuite(), TcpRxBufferTestSuite::TcpRxBufferTestSuite(), TcpSackPermittedTestSuite::TcpSackPermittedTestSuite(), TcpScalableTestSuite::TcpScalableTestSuite(), TcpSlowStartTestSuite::TcpSlowStartTestSuite(), TcpSynConnectionFailedTestSuite::TcpSynConnectionFailedTestSuite(), ns3::TcpTcpCloseTestSuite::TcpTcpCloseTestSuite(), TcpTestSuite::TcpTestSuite(), TcpTimestampTestSuite::TcpTimestampTestSuite(), TcpTxBufferTestSuite::TcpTxBufferTestSuite(), TcpVegasTestSuite::TcpVegasTestSuite(), TcpVenoTestSuite::TcpVenoTestSuite(), TcpWScalingTestSuite::TcpWScalingTestSuite(), TcpYeahTestSuite::TcpYeahTestSuite(), TcpZeroWindowTestSuite::TcpZeroWindowTestSuite(), TestCarrierAggregationSuite::TestCarrierAggregationSuite(), ThreadedSimulatorTestSuite::ThreadedSimulatorTestSuite(), ThreeGppChannelTestSuite::ThreeGppChannelTestSuite(), ThreeGppPropagationLossModelsTestSuite::ThreeGppPropagationLossModelsTestSuite(), ThreeGppV2vChCondModelsTestSuite::ThreeGppV2vChCondModelsTestSuite(), TimerTestSuite::TimerTestSuite(), TimeTestSuite::TimeTestSuite(), TracedCallbackTestSuite::TracedCallbackTestSuite(), TracedCallbackTypedefTestSuite::TracedCallbackTypedefTestSuite(), TracedValueCallbackTestSuite::TracedValueCallbackTestSuite(), ns3::tests::TrickleTimerTestSuite::TrickleTimerTestSuite(), TupleValueTestSuite::TupleValueTestSuite(), TvHelperDistributionTestSuite::TvHelperDistributionTestSuite(), TvSpectrumTransmitterTestSuite::TvSpectrumTransmitterTestSuite(), TwoRaySplmTestSuite::TwoRaySplmTestSuite(), TxDurationTestSuite::TxDurationTestSuite(), TxopTestSuite::TxopTestSuite(), TypeIdPerformanceSuite::TypeIdPerformanceSuite(), TypeIdTestSuite::TypeIdTestSuite(), ns3::tests::TypeTraitsTestSuite::TypeTraitsTestSuite(), UanEnergyModelTestSuite::UanEnergyModelTestSuite(), UanTestSuite::UanTestSuite(), UdpClientServerTestSuite::UdpClientServerTestSuite(), UdpTestSuite::UdpTestSuite(), UniformPlanarArrayTestSuite::UniformPlanarArrayTestSuite(), ns3::tests::ValArrayTestSuite::ValArrayTestSuite(), ns3::tests::WatchdogTestSuite::WatchdogTestSuite(), WaveformGeneratorTestSuite::WaveformGeneratorTestSuite(), WifiAcMappingTestSuite::WifiAcMappingTestSuite(), WifiAggregationTestSuite::WifiAggregationTestSuite(), WifiChannelSwitchingTestSuite::WifiChannelSwitchingTestSuite(), WifiDynamicBwOpTestSuite::WifiDynamicBwOpTestSuite(), WifiEhtInfoElemsTestSuite::WifiEhtInfoElemsTestSuite(), WifiEmlsrTestSuite::WifiEmlsrTestSuite(), WifiErrorRateModelsTestSuite::WifiErrorRateModelsTestSuite(), WifiIeFragmentationTestSuite::WifiIeFragmentationTestSuite(), WifiMacOfdmaTestSuite::WifiMacOfdmaTestSuite(), WifiMacQueueTestSuite::WifiMacQueueTestSuite(), WifiMsduAggregatorTestSuite::WifiMsduAggregatorTestSuite(), WifiMultiLinkOperationsTestSuite::WifiMultiLinkOperationsTestSuite(), WifiNonHtDuplicateTestSuite::WifiNonHtDuplicateTestSuite(), WifiPhyCcaTestSuite::WifiPhyCcaTestSuite(), WifiPhyMuMimoTestSuite::WifiPhyMuMimoTestSuite(), WifiPhyOfdmaTestSuite::WifiPhyOfdmaTestSuite(), WifiPhyReceptionTestSuite::WifiPhyReceptionTestSuite(), WifiPhyThresholdsTestSuite::WifiPhyThresholdsTestSuite(), WifiPrimaryChannelsTestSuite::WifiPrimaryChannelsTestSuite(), WifiRuAllocationTestSuite::WifiRuAllocationTestSuite(), WifiTestSuite::WifiTestSuite(), WifiTransmitMaskTestSuite::WifiTransmitMaskTestSuite(), WifiTxopTestSuite::WifiTxopTestSuite(), and ThreeGppHttpClientServerTestSuite::AddHttpObjectTestCase().

◆ CreateDataDirFilename()

std::string ns3::TestCase::CreateDataDirFilename ( std::string  filename)
protected

Construct the full path to a file in the data directory.

The data directory is configured by SetDataDirectory().

Parameters
[in]filenameThe bare (no path) file name
Returns
The full path to filename in the data directory

Definition at line 419 of file test.cc.

References ns3::SystemPath::Append(), ns3::TestRunnerImpl::GetTopLevelSourceDir(), m_dataDir, m_parent, m_runner, NS_FATAL_ERROR, and NS_LOG_FUNCTION.

Referenced by CreateTempDirFilename(), MobilityTraceTestCase::DoRun(), ReadFileTestCase::DoRun(), DiffTestCase::DoRun(), Ns3TcpLossTestCase::DoSetup(), and Ns3TcpStateTestCase::DoSetup().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CreateTempDirFilename()

std::string ns3::TestCase::CreateTempDirFilename ( std::string  filename)
protected

Construct the full path to a file in a temporary directory.

If the TestRunner is invoked with "--update-data", this will be the data directory instead.

Parameters
[in]filenameThe bare (no path) file name
Returns
The full path to filename in the temporary directory.

Definition at line 438 of file test.cc.

References ns3::SystemPath::Append(), CreateDataDirFilename(), ns3::SystemPath::CreateValidSystemPath(), ns3::TestRunnerImpl::GetTempDir(), ns3::SystemPath::Join(), m_name, m_parent, m_runner, ns3::SystemPath::MakeDirectories(), ns3::TestRunnerImpl::MustUpdateData(), and NS_LOG_FUNCTION.

Referenced by ChainRegressionTest::CreateDevices(), HwmpProactiveRegressionTest::CreateDevices(), HwmpReactiveRegressionTest::CreateDevices(), HwmpSimplestRegressionTest::CreateDevices(), HwmpDoRfRegressionTest::CreateDevices(), PeerManagementProtocolRegressionTest::CreateDevices(), FlameRegressionTest::CreateDevices(), LrWpanAckTestCase::DoRun(), CarrierAggregationTestCase::DoRun(), LenaCqaFfMacSchedulerTestCase1::DoRun(), LenaCqaFfMacSchedulerTestCase2::DoRun(), ns3::LenaDeactivateBearerTestCase::DoRun(), LenaFdBetFfMacSchedulerTestCase1::DoRun(), LenaFdBetFfMacSchedulerTestCase2::DoRun(), LenaFdMtFfMacSchedulerTestCase::DoRun(), LenaFdTbfqFfMacSchedulerTestCase1::DoRun(), LenaFdTbfqFfMacSchedulerTestCase2::DoRun(), LenaHarqTestCase::DoRun(), LteLinkAdaptationTestCase::DoRun(), LenaMimoTestCase::DoRun(), LtePathlossModelSystemTestCase::DoRun(), LenaPfFfMacSchedulerTestCase1::DoRun(), LenaPfFfMacSchedulerTestCase2::DoRun(), LenaDlCtrlPhyErrorModelTestCase::DoRun(), LenaPssFfMacSchedulerTestCase1::DoRun(), LenaPssFfMacSchedulerTestCase2::DoRun(), LteRadioLinkFailureTestCase::DoRun(), LenaRrFfMacSchedulerTestCase::DoRun(), LenaTdBetFfMacSchedulerTestCase1::DoRun(), LenaTdBetFfMacSchedulerTestCase2::DoRun(), LenaTdMtFfMacSchedulerTestCase::DoRun(), LenaTdTbfqFfMacSchedulerTestCase1::DoRun(), LenaTdTbfqFfMacSchedulerTestCase2::DoRun(), LenaTtaFfMacSchedulerTestCase::DoRun(), LteEpcE2eDataTestCase::DoRun(), MobilityTraceTestCase::DoRun(), DiffTestCase::DoRun(), WriteModeCreateTestCase::DoSetup(), ReadModeCreateTestCase::DoSetup(), FileHeaderTestCase::DoSetup(), and RecordHeaderTestCase::DoSetup().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DoRun()

virtual void ns3::TestCase::DoRun ( )
privatepure virtual

Implementation to actually run this TestCase.

Subclasses should override this method to conduct their tests.

Implemented in QkdTestCase1, DataRateTestCase, RrcHeaderTestCase, Ns3WimaxSfTlvTestCase, Ns3WimaxCsParamTlvTestCase, Ns3WimaxSfCreationTestCase, Ns3WimaxFragmentationTestCase, Ns3WimaxManagementConnectionsTestCase, Ns3WimaxNetworkEntryTestCase, Ns3WimaxSFTypeTestCase, Ns3WimaxSchedulingTestCase, Ns3WimaxSNRtoBLERTestCase, Ns3WimaxSimpleOFDMTestCase, DsaRequestTestCase, WifiTxopTest, WifiOfdmMaskSlopesTestCase, WifiMgtHeaderTest, HeRuMcsDataRateTestCase, IdealRateManagerMimoTest, IdealRateManagerChannelWidthTest, Issue169TestCase, Issue40TestCase, Bug2470TestCase, StaWifiMacScanningTestCase, Bug2831TestCase, Bug2843TestCase, Bug2222TestCase, SetChannelFrequencyTest, QosFragmentationTestCase, Bug730TestCase, DcfImmediateAccessBroadcastTestCase, InterferenceHelperSequenceTest, QosUtilsIsOldPacketTest, WifiTest, Wifi20MHzIndicesCoveringRuTest, Wifi20MHzChannelIndicesTest, WifiPrimaryChannelsTest, WifiPhyThresholdsStrongForeignSignalTest, WifiPhyThresholdsStrongWifiSignalTest, WifiPhyThresholdsWeakForeignSignalTest, WifiPhyThresholdsWeakWifiSignalTest, TestSpectrumChannelWithBandwidthFilter, TestPrimary20CoveredByPpdu, TestUnsupportedBandwidthReception, TestUnsupportedModulationReception, TestAmpduReception, TestPhyHeadersReception, TestSimpleFrameCaptureModel, TestThresholdPreambleDetectionWithFrameCapture, TestThresholdPreambleDetectionWithoutFrameCapture, TestUlOfdmaPowerControl, TestPhyPaddingExclusion, TestUlOfdmaPhyTransmission, TestMultipleHeTbPreambles, TestUlOfdmaPpduUid, TestDlOfdmaPhyPuncturing, TestDlOfdmaPhyTransmission, TestUlMuMimoPhyTransmission, TestDlMuMimoPhyTransmission, TestDlMuTxVector, WifiPhyCcaIndicationTest, WifiPhyCcaThresholdsTest, TestMultipleCtsResponsesFromMuRts, TestNonHtDuplicatePhyReception, ReleaseSeqNoAfterCtsTimeoutTest, MultiLinkMuTxTest, MultiLinkTxTest, MultiLinkSetupTest, MldSwapLinksTest, GetRnrLinkInfoTest, WifiExtractExpiredMpdusTest, WifiMacQueueDropOldestTest, OfdmaAckSequenceTest, WifiIeFragmentationTest, TableBasedErrorRateTestCase, WifiErrorRateModelsTestCaseMimo, WifiErrorRateModelsTestCaseNist, WifiErrorRateModelsTestCaseDsss, EmlsrLinkSwitchTest, EmlsrUlTxopTest, EmlsrDlTxopTest, EmlOmnExchangeTest, EmlOperatingModeNotificationTest, EhtOperationElementTest, TidToLinkMappingElementTest, WifiEhtCapabilitiesIeTest, ReducedNeighborReportTest, BasicMultiLinkElementTest, WifiUseAvailBwTest, WifiChannelSwitchingTest, PreservePacketsInAmpdus, EhtAggregationTest, HeAggregationTest, TwoLevelAggregationTest, AmpduAggregationTest, PhyHeaderSectionsTest, HeSigBDurationTest, TxDurationTest, SpectrumWifiPhyInterfacesHelperTest, SpectrumWifiPhyMultipleInterfacesTest, SpectrumWifiPhyFilterTest, SpectrumWifiPhyListenerTest, SpectrumWifiPhyBasicTest, PowerRateAdaptationTest, TestInterBssConstantObssPdAlgo, LargestIdlePrimaryChannelTest, ChannelAccessManagerTest< TxopType >, BlockAckAggregationDisabledTest, MultiStaCtrlBAckResponseHeaderTest, BlockAckRecipientBufferTest, CtrlBAckResponseHeaderTest, OriginatorBlockAckWindowTest, PacketBufferingCaseB, PacketBufferingCaseA, UanTest, AcousticModemEnergyDepletionTestCase, AcousticModemEnergyTestCase, TcFlowControlTestCase, TbfQueueDiscTestCase, RedQueueDiscTestCase, QueueDiscTracesTestCase, PrioQueueDiscTestCase, PieQueueDiscTestCase, FifoQueueDiscTestCase, CoDelQueueDiscBasicMark, CoDelQueueDiscBasicDrop, CoDelQueueDiscControlLawTest, CoDelQueueDiscNewtonStepTest, CoDelQueueDiscBasicOverflow, CoDelQueueDiscBasicEnqueueDequeue, CobaltQueueDiscEnhancedBlueTest, CobaltQueueDiscCeThresholdTest, CobaltQueueDiscMarkTest, CobaltQueueDiscDropTest, CobaltQueueDiscBasicEnqueueDequeue, AredQueueDiscTestCase, RocketfuelTopologyReaderMapsTest, RocketfuelTopologyReaderWeightsTest, TracedValueCallbackTestCase, TracedCallbackTypedefTestCase, WifiMsduAggregatorThroughputTest, Issue211Test, WifiAcMappingTest, Ns3TcpStateTestCase, Ns3TcpSocketTestCaseCsma, Ns3TcpSocketTestCaseP2P, Ns3TcpNoDelayTestCase, Ns3TcpLossTestCase, Ns3TcpCubicTestCase, PfifoFastQueueDiscNoPriority, PfifoFastQueueDiscOverflow, PfifoFastQueueDiscDscpPrioritization, PfifoFastQueueDiscTosPrioritization, FqPieQueueDiscL4sMode, FqPieQueueDiscSetLinearProbing, FqPieQueueDiscUDPFlowsSeparation, FqPieQueueDiscTCPFlowsSeparation, FqPieQueueDiscDeficit, FqPieQueueDiscIPFlowsSeparationAndPacketLimit, FqPieQueueDiscNoSuitableFilter, FqCoDelQueueDiscL4sMode, FqCoDelQueueDiscSetLinearProbing, FqCoDelQueueDiscECNMarking, FqCoDelQueueDiscUDPFlowsSeparation, FqCoDelQueueDiscTCPFlowsSeparation, FqCoDelQueueDiscDeficit, FqCoDelQueueDiscIPFlowsSeparationAndPacketLimit, FqCoDelQueueDiscNoSuitableFilter, FqCobaltQueueDiscL4sMode, FqCobaltQueueDiscSetLinearProbing, FqCobaltQueueDiscEcnMarking, FqCobaltQueueDiscUDPFlowsSeparation, FqCobaltQueueDiscTCPFlowsSeparation, FqCobaltQueueDiscDeficit, FqCobaltQueueDiscIPFlowsSeparationAndPacketLimit, FqCobaltQueueDiscNoSuitableFilter, CsmaStarTestCase, CsmaRawIpSocketTestCase, CsmaPingTestCase, CsmaPacketSocketTestCase, CsmaOneSubnetTestCase, CsmaMulticastTestCase, CsmaBroadcastTestCase, CsmaBridgeTestCase, HistogramTestCase, ProbeTestCase1, FiveDoublesTestCase, FiveIntegersTestCase, OneIntegerTestCase, FiveDoublesAverageTestCase, FiveIntegersAverageTestCase, OneIntegerAverageTestCase, OverallGainAverageTest, ArrayResponseTest, FtrFadingModelAverageTest, TvSpectrumTransmitterTestCase, TvHelperDistributionTestCase, ThreeGppMimoPolarizationTest, ThreeGppCalcLongTermMultiPortTest, ThreeGppSpectrumPropagationLossModelTest, ThreeGppChannelMatrixUpdateTest, ThreeGppChannelMatrixComputationTest, WaveformGeneratorTestCase, SpectrumValueTestCase, SpectrumInterferenceTestCase, SpectrumIdealPhyTestCase, SixlowpanIphcImplTest, SixlowpanIphcStatefulImplTest, SixlowpanHc1ImplTest, SixlowpanFragmentationTest, ThreeGppShadowingTestCase, ThreeGppV2vHighwayPropagationLossModelTestCase, ThreeGppV2vUrbanPropagationLossModelTestCase, ThreeGppIndoorOfficePropagationLossModelTestCase, ThreeGppUmiPropagationLossModelTestCase, ThreeGppUmaPropagationLossModelTestCase, ThreeGppRmaPropagationLossModelTestCase, RangePropagationLossModelTestCase, MatrixPropagationLossModelTestCase, LogDistancePropagationLossModelTestCase, TwoRayGroundPropagationLossModelTestCase, FriisPropagationLossModelTestCase, V2vHighwayProbChCondModelTestCase, V2vUrbanProbChCondModelTestCase, OkumuraHataPropagationLossModelTestCase, Kun2600MhzPropagationLossModelTestCase, ItuR1411NlosOverRooftopPropagationLossModelTestCase, ItuR1411LosPropagationLossModelTestCase, ThreeGppChannelConditionModelTestCase, PointToPointTest, SwitchFlowTableTestCase, ns3::olsr::TcRegressionTest, OlsrMprTestCase, OlsrHnaTestCase, OlsrTcTestCase, OlsrHelloTestCase, OlsrMidTestCase, OlsrEmfTestCase, ns3::olsr::HelloRegressionTest, ns3::olsr::Bug780Test, NixVectorRoutingTest, DataRateTestCase2, DataRateTestCase1, SequenceNumberTestCase, DiffTestCase, ReadFileTestCase, RecordHeaderTestCase, FileHeaderTestCase, ReadModeCreateTestCase, WriteModeCreateTestCase, PbbTestCase, PacketTagListTest, PacketTest, PacketSocketAppsTest, PacketMetadataTest, LollipopCounterTest, Ipv6AddressTestCase, BurstErrorModelSimple, ErrorModelSimple, DropTailQueueTestCase, BufferTest, BitDeserializerTest, BitSerializerTest, AbstractAnimationInterfaceTestCase, WaypointMobilityModelAddWaypointTest, WaypointMobilityModelNotifyTest, SteadyStateRandomWaypointTest, RectangleClosestBorderTestCase, RandCartAroundGeoTestCase, Ns2MobilityHelperTest, MobilityTraceTestCase, WaypointMobilityModelViaHelper, WaypointInitialPositionIsWaypoint, WaypointLazyNotifyTrue, WaypointLazyNotifyFalse, CartesianToGeoTestCase, GeoToCartesianTestCase, BoxLineIntersectionTestCase, MeshInformationElementVectorBist, FlameRtableTest, FlameHeaderTest, FlameRegressionTest, PeerManagementProtocolRegressionTest, HwmpDoRfRegressionTest, HwmpSimplestRegressionTest, HwmpReactiveRegressionTest, HwmpProactiveRegressionTest, PeerLinkFrameStartTest, HwmpRtableTest, MeshHeaderTest, LteX2HandoverTestCase, LteX2HandoverMeasuresTestCase, LteRrcConnectionEstablishmentErrorTestCase, LteRrcConnectionEstablishmentTestCase, ns3::RlcAmStatusPduTestCase, LteHandoverTargetTestCase, LteHandoverFailureTestCase, LteHandoverDelayTestCase, LteEpcE2eDataTestCase, LteEnbAntennaTestCase, EpcTftClassifierTestCase, MeasurementReportTestCase, RrcConnectionRejectTestCase, RrcConnectionReestablishmentCompleteTestCase, RrcConnectionReestablishmentTestCase, RrcConnectionReestablishmentRequestTestCase, HandoverPreparationInfoTestCase, RrcConnectionReconfigurationTestCase, RrcConnectionReconfigurationCompleteTestCase, RrcConnectionSetupCompleteTestCase, RrcConnectionSetupTestCase, RrcConnectionRequestTestCase, LteUplinkSrsSinrTestCase, LteUplinkDataSinrTestCase, LteUplinkClosedLoopPowerControlAccumulatedModeTestCase, LteUplinkClosedLoopPowerControlAbsoluteModeTestCase, LteUplinkOpenLoopPowerControlTestCase, LteUplinkPowerControlTestCase, LteUeMeasurementsHandoverTestCase, LteUeMeasurementsPiecewiseTestCase3, LteUeMeasurementsPiecewiseTestCase2, LteUeMeasurementsPiecewiseTestCase1, LteUeMeasurementsTestCase, LenaTtaFfMacSchedulerTestCase, LenaTdTbfqFfMacSchedulerTestCase2, LenaTdTbfqFfMacSchedulerTestCase1, LenaTdMtFfMacSchedulerTestCase, LenaTdBetFfMacSchedulerTestCase2, LenaTdBetFfMacSchedulerTestCase1, LteTxPsdTestCase, LteNoisePsdTestCase, LteSpectrumModelTestCase, LteSecondaryCellSelectionTestCase, LteSecondaryCellHandoverTestCase, LenaRrFfMacSchedulerTestCase, LteRlcUmTransmitterReportBufferStatusTestCase, LteRlcUmTransmitterConcatenationTestCase, LteRlcUmTransmitterSegmentationTestCase, LteRlcUmTransmitterOneSduTestCase, LteRlcUmTransmitterTestCase, LteRlcUmE2eTestCase, LteRlcAmTransmitterReportBufferStatusTestCase, LteRlcAmTransmitterConcatenationTestCase, LteRlcAmTransmitterSegmentationTestCase, LteRlcAmTransmitterOneSduTestCase, LteRlcAmTransmitterTestCase, LteRlcAmE2eTestCase, LteRadioLinkFailureTestCase, LenaPssFfMacSchedulerTestCase2, LenaPssFfMacSchedulerTestCase1, LtePrimaryCellChangeTestCase, LenaDlCtrlPhyErrorModelTestCase, LenaDataPhyErrorModelTestCase, LenaPfFfMacSchedulerTestCase2, LenaPfFfMacSchedulerTestCase1, LtePathlossModelSystemTestCase, LenaMimoTestCase, LteLinkAdaptationTestCase, LteIpv6RoutingTestCase, LteInterferenceTestCase, LteInterferenceStrictFrTestCase, LteInterferenceHardFrTestCase, LenaHarqTestCase, LteDistributedFfrAreaTestCase, LteEnhancedFfrAreaTestCase, LteSoftFfrAreaTestCase, LteSoftFrAreaTestCase, LteStrictFrAreaTestCase, LteFrAreaTestCase, LteStrictFrTestCase, LteHardFrTestCase, LteFrTestCase, LenaFdTbfqFfMacSchedulerTestCase2, LenaFdTbfqFfMacSchedulerTestCase1, LenaFdMtFfMacSchedulerTestCase, LenaFdBetFfMacSchedulerTestCase2, LenaFdBetFfMacSchedulerTestCase1, LteEarfcnUlTestCase, LteEarfcnDlTestCase, LteEarfcnTestCase, LteDownlinkCtrlSinrTestCase, LteDownlinkDataSinrTestCase, LteDownlinkPowerControlRrcConnectionReconfigurationTestCase, LteDownlinkPowerControlTestCase, LteDownlinkPowerControlSpectrumValueTestCase, ns3::LenaDeactivateBearerTestCase, LteCqiGenerationDlPowerControlTestCase, LteCqiGenerationTestCase, LenaCqaFfMacSchedulerTestCase2, LenaCqaFfMacSchedulerTestCase1, LteCellSelectionTestCase, CarrierAggregationTestCase, CarrierAggregationConfigTestCase, LteAggregationThroughputScaleTestCase, EpcS1uUlTestCase, EpcS1uDlTestCase, EpsGtpuHeaderTestCase, LrWpanSpectrumValueHelperTestCase, LrWpanSlottedCsmacaTestCase, LrWpanPlmeAndPdInterfaceTestCase, LrWpanPacketTestCase, TestOrphanScan, TestActiveScanPanDescriptors, TestRxOffWhenIdleAfterCsmaFailure, LrWpanDataIfsTestCase, LrWpanErrorModelTestCase, LrWpanErrorDistanceTestCase, LrWpanEdTestCase, LrWpanCollisionTestCase, LrWpanCcaTestCase, LrWpanAckTestCase, Udp6SocketImplTest, UdpSocketImplTest, Udp6SocketLoopbackTest, UdpSocketLoopbackTest, TcpYeahDecrementTest, TcpYeahIncrementTest, TcpVenoTest, TcpVegasTest, TcpTxBufferTestCase, TimestampValueTestCase, TcpTestCase, TcpSynConnectionFailedTest, TcpScalableDecrementTest, TcpScalableIncrementTest, TcpRxBufferTestCase, TcpRateLinuxWithBufferTest, TcpRateLinuxBasicTest, PrrRecoveryTest, TcpOptionTSTestCase, TcpOptionWSTestCase, ns3::TcpLpInferenceTest2, ns3::TcpLpInferenceTest1, ns3::TcpLpToNewReno, TcpLedbatDecrementTest, TcpLedbatIncrementTest, TcpLedbatToNewReno, TcpIllinoisTest, TcpHyblaIncrementTest, TcpHtcpIncrementTest, TcpHighSpeedDecrementTest, TcpHighSpeedIncrementTest, TcpHeaderFlagsToString, TcpHeaderWithRFC793OptionTestCase, TcpHeaderGetSetTestCase, ns3::TcpGeneralTest, TcpEndPointBug2211Test, TcpDctcpToLinuxReno, ClassicRecoveryTest, TcpBicDecrementTest, TcpBicIncrementTest, ns3::TcpBbrCheckGainValuesTest, ns3::TcpBbrPacingEnableTest, RttEstimatorTestCase, DynamicPartialTest, DuplicateTest, FlushTest, InterfaceContainerTest, NetDeviceContainerTest, ChannelTest, DynamicNeighborCacheTest, Ipv6L3ProtocolTestCase, Ipv6RipngSplitHorizonStrategyTest, Ipv6RipngCountToInfinityTest, Ipv6RipngTest, Ipv6RawSocketImplTest, Ipv6PacketInfoTagTest, ns3::Ipv6ListRoutingPositiveTestCase, ns3::Ipv6ListRoutingNegativeTestCase, Ipv6FragmentationTest, Ipv6ForwardingTest, TestFulfilledAlignment, TestOptionWithAlignment, TestOptionWithoutAlignment, TestEmptyOptionField, DualStackTestCase, IpAddressHelperTestCasev6, AddressCollision6TestCase, ExampleAddress6GeneratorTestCase, NetworkAndAddress6TestCase, AddressAllocator6TestCase, NetworkNumber6AllocatorTestCase, Ipv6DadTest, Ipv4L3ProtocolTestCase, Ipv4StaticRoutingSlash32TestCase, Ipv4RipSplitHorizonStrategyTest, Ipv4RipCountToInfinityTest, Ipv4RipTest, Ipv4RawSocketImplTest, Ipv4PacketInfoTagTest, ns3::Ipv4ListRoutingPositiveTestCase, ns3::Ipv4ListRoutingNegativeTestCase, Ipv4HeaderTest, Ipv4GlobalRoutingSlash32TestCase, Ipv4DynamicGlobalRoutingTestCase, TwoBridgeTest, BridgeTest, TwoLanTest, TwoLinkTest, LanTest, LinkTest, Ipv4FragmentationTest, Ipv4ForwardingTest, Ipv4DeduplicationPerformanceTest, Ipv4DeduplicationTest, IpAddressHelperTestCasev4, ResetAllocatorHelperTestCase, AddressAllocatorHelperTestCase, NetworkAllocatorHelperTestCase, AddressCollisionTestCase, ExampleAddressGeneratorTestCase, NetworkAndAddressTestCase, AddressAllocatorTestCase, NetworkNumberAllocatorTestCase, InternetStackHelperTestCase, IcmpV6TimeExceedTestCase, IcmpV6EchoReplyTestCase, IcmpTimeExceedTestCase, IcmpEchoReplyTestCase, GlobalRouteManagerImplTestCase, PingTestCase, RadvdTestCase, DhcpTestCase, LiIonEnergyTestCase, BasicEnergyHarvesterTestCase, DsrRreqTableTest, DsrSendBuffTest, DsrCacheEntryTest, DsrAckHeaderTest, DsrAckReqHeaderTest, DsrRerrHeaderTest, DsrSRHeaderTest, DsrRrepHeaderTest, DsrRreqHeaderTest, DsrFsHeaderTest, DsdvTableTestCase, DsdvHeaderTestCase, ns3::tests::WatchdogTestCase, ns3::tests::ValArrayTestCase< T >, ns3::tests::TypeTraitsTestCase, LookupTimeTestCase, DeprecatedAttributeTestCase, CollisionTestCase, UniqueTypeIdTestCase, TupleValueTestCase, ns3::tests::TrickleTimerTestCase, BasicTracedCallbackTestCase, TimerTemplateTestCase, TimerStateTestCase, TimeInputOutputTestCase, TimeWithSignTestCase, TimeSimpleTestCase, ThreadedSimulatorEventsTestCase, ns3::tests::SplitStringTestCase, SimulatorTemplateTestCase, SimulatorEventsTestCase, ns3::tests::SampleTestCase1, RngParetoTestCase, RngExponentialTestCase, RngNormalTestCase, RngUniformTestCase, ns3::test::RandomVariable::BinomialAntitheticTestCase, ns3::test::RandomVariable::BinomialTestCase, ns3::test::RandomVariable::BernoulliAntitheticTestCase, ns3::test::RandomVariable::BernoulliTestCase, ns3::test::RandomVariable::NormalCachingTestCase, ns3::test::RandomVariable::EmpiricalAntitheticTestCase, ns3::test::RandomVariable::EmpiricalTestCase, ns3::test::RandomVariable::DeterministicTestCase, ns3::test::RandomVariable::ZetaAntitheticTestCase, ns3::test::RandomVariable::ZetaTestCase, ns3::test::RandomVariable::ZipfAntitheticTestCase, ns3::test::RandomVariable::ZipfTestCase, ns3::test::RandomVariable::ErlangAntitheticTestCase, ns3::test::RandomVariable::ErlangTestCase, ns3::test::RandomVariable::GammaAntitheticTestCase, ns3::test::RandomVariable::GammaTestCase, ns3::test::RandomVariable::LogNormalAntitheticTestCase, ns3::test::RandomVariable::LogNormalTestCase, ns3::test::RandomVariable::WeibullAntitheticTestCase, ns3::test::RandomVariable::WeibullTestCase, ns3::test::RandomVariable::ParetoAntitheticTestCase, ns3::test::RandomVariable::ParetoTestCase, ns3::test::RandomVariable::ExponentialAntitheticTestCase, ns3::test::RandomVariable::ExponentialTestCase, ns3::test::RandomVariable::NormalAntitheticTestCase, ns3::test::RandomVariable::NormalTestCase, ns3::test::RandomVariable::SequentialTestCase, ns3::test::RandomVariable::ConstantTestCase, ns3::test::RandomVariable::UniformAntitheticTestCase, ns3::test::RandomVariable::UniformTestCase, ns3::tests::PtrTestCase, PairValueSettingsTestCase, PairValueTestCase, ns3::tests::OneUniformRandomVariableManyGetValueCallsTestCase, ns3::tests::ObjectFactoryTestCase, ns3::tests::AggregateObjectTestCase, ns3::tests::CreateObjectTestCase, ns3::tests::AlternateFindTestCase, ns3::tests::RelativeFindTestCase, ns3::tests::FullyQualifiedFindTestCase, ns3::tests::StringContextFindTestCase, ns3::tests::BasicFindTestCase, ns3::tests::FindPathTestCase, ns3::tests::RelativeRenameTestCase, ns3::tests::FullyQualifiedRenameTestCase, ns3::tests::StringContextRenameTestCase, ns3::tests::BasicRenameTestCase, ns3::tests::RelativeAddTestCase, ns3::tests::FullyQualifiedAddTestCase, ns3::tests::StringContextAddTestCase, ns3::tests::BasicAddTestCase, ns3::tests::ComplexMatrixArrayTestCase, ns3::tests::MatrixArrayTestCase< T >, ns3::tests::ManyUniformRandomVariablesOneGetValueCallTestCase, LengthValueTestCase, LengthTestCase, ns3::int64x64::test::Int64x64ImplTestCase, ns3::int64x64::test::Int64x64DoubleTestCase, ns3::int64x64::test::Int64x64InvertTestCase, ns3::int64x64::test::Int64x64CompareTestCase, ns3::int64x64::test::Int64x64Bug1786TestCase, ns3::int64x64::test::Int64x64Bug863TestCase, ns3::int64x64::test::Int64x64Bug455TestCase, ns3::int64x64::test::Int64x64ArithmeticTestCase, ns3::int64x64::test::Int64x64InputOutputTestCase, ns3::int64x64::test::Int64x64InputTestCase, ns3::int64x64::test::Int64x64IntRoundTestCase, ns3::int64x64::test::Int64x64HiLoTestCase, ns3::tests::IncrementalTestCase, ns3::tests::Hash64FunctionPtrTestCase, ns3::tests::Hash32FunctionPtrTestCase, ns3::tests::Murmur3TestCase, ns3::tests::Fnv1aTestCase, ns3::tests::DefaultHashTestCase, ns3::tests::HashTestCase, ns3::tests::GlobalValueTestCase, ns3::tests::EventGarbageCollectorTestCase, ns3::tests::EnvVarTestCase, ns3::tests::SearchAttributesOfParentObjectsTestCase, ns3::tests::ObjectVectorTraceConfigTestCase, ns3::tests::ObjectVectorConfigTestCase, ns3::tests::UnderRootNamespaceConfigTestCase, ns3::tests::RootNamespaceConfigTestCase, ns3::tests::CommandLineCharStarTestCase, ns3::tests::CommandLineNonOptionTestCase, ns3::tests::CommandLineInvalidTestCase, ns3::tests::CommandLineOrderTestCase, ns3::tests::CommandLineStringTestCase, ns3::tests::CommandLineUnsignedIntTestCase, ns3::tests::CommandLineIntTestCase, ns3::tests::CommandLineUint8tTestCase, ns3::tests::CommandLineBooleanTestCase, MakeCallbackTemplatesTestCase, NullifyCallbackTestCase, CallbackEqualityTestCase, MakeBoundCallbackTestCase, MakeCallbackTestCase, BasicCallbackTestCase, ns3::tests::BuildProfileTestCase, CallbackValueTestCase, PointerAttributeTestCase, TracedCallbackTestCase, IntegerTraceSourceTestCase, IntegerTraceSourceAttributeTestCase, ObjectMapAttributeTestCase, ObjectVectorAttributeTestCase, RandomVariableStreamAttributeTestCase, AttributeTestCase< T >, AttributeContainerSetGetTestCase, AttributeContainerSerializationTestCase, AttributeContainerTestCase, ns3::TestSuite, ns3::ExampleAsTestCase, ClickTrivialTest, ClickIpMacAddressFromNameTest, ClickIfidFromNameTest, ThreeGppV2vHighwayLosNlosvChCondModelTestCase, ThreeGppV2vUrbanLosNlosvChCondModelTestCase, ThreeGppV2vBuildingsChCondModelTestCase, OutdoorRandomWalkTestCase, BuildingsShadowingTestCase, BuildingsPenetrationLossesTestCase, BuildingsPathlossTestCase, BuildingsHelperOneTestCase, BuildingsChannelConditionModelTestCase, SameRoomPositionAllocatorTestCase, RandomRoomPositionAllocatorTestCase, BriteTopologyFunctionTestCase, BriteTopologyStructureTestCase, UdpEchoClientSetFillTestCase, PacketLossCounterTestCase, UdpTraceClientServerTestCase, UdpClientServerTestCase, ThreeGppHttpObjectTestCase, BulkSendSeqTsSizeTestCase, BulkSendBasicTestCase, ns3::aodv::LoopbackTestCase, Bug772ChainTest, ns3::aodv::AodvRtableTest, ns3::aodv::AodvRtableEntryTest, ns3::aodv::AodvRqueueTest, ns3::aodv::QueueEntryTest, ns3::aodv::RerrHeaderTest, ns3::aodv::RrepAckHeaderTest, ns3::aodv::RrepHeaderTest, ns3::aodv::RreqHeaderTest, ns3::aodv::TypeHeaderTest, ns3::aodv::NeighborTest, ChainRegressionTest, ns3::aodv::IdCacheTest, UniformPlanarArrayTestCase, ParabolicAntennaModelTestCase, IsotropicAntennaModelTestCase, RadiansToDegreesTestCase, DegreesToRadiansTestCase, CosineAntennaModelTestCase, WrapToRangeFunctionalTestCase, WrapToRangeTestCase, TwoVectorsConstructorTestCase, OneVectorConstructorTestCase, ChannelAccessManagerTest< TxopType >, ChannelAccessManagerTest< TxopType >, AttributeTestCase< T >, AttributeTestCase< T >, AttributeTestCase< T >, AttributeTestCase< T >, AttributeTestCase< T >, AttributeTestCase< T >, and AttributeTestCase< T >.

◆ DoSetup()

void ns3::TestCase::DoSetup ( )
privatevirtual

Implementation to do any local setup required for this TestCase.

Subclasses should override this method to perform any costly per-test setup before DoRun is invoked.

Reimplemented in WifiOfdmMaskSlopesTestCase, WifiPrimaryChannelsTest, WifiPhyThresholdsTest, TestSpectrumChannelWithBandwidthFilter, TestPrimary20CoveredByPpdu, TestUnsupportedBandwidthReception, TestAmpduReception, TestSimpleFrameCaptureModel, TestThresholdPreambleDetectionWithFrameCapture, TestThresholdPreambleDetectionWithoutFrameCapture, WifiPhyReceptionTest, TestUlOfdmaPowerControl, TestPhyPaddingExclusion, TestUlOfdmaPhyTransmission, TestMultipleHeTbPreambles, TestUlOfdmaPpduUid, TestDlOfdmaPhyPuncturing, TestDlOfdmaPhyTransmission, TestUlMuMimoPhyTransmission, TestDlMuMimoPhyTransmission, WifiPhyCcaIndicationTest, WifiPhyCcaThresholdsTest, TestMultipleCtsResponsesFromMuRts, TestNonHtDuplicatePhyReception, ReleaseSeqNoAfterCtsTimeoutTest, MultiLinkMuTxTest, MultiLinkTxTest, MultiLinkSetupTest, MultiLinkOperationsTestBase, EmlsrLinkSwitchTest, EmlsrUlTxopTest, EmlsrDlTxopTest, EmlOmnExchangeTest, EmlsrOperationsTestBase, TidToLinkMappingElementTest, AmpduAggregationTest, SpectrumWifiPhyMultipleInterfacesTest, SpectrumWifiPhyFilterTest, SpectrumWifiPhyListenerTest, SpectrumWifiPhyBasicTest, Ns3TcpStateTestCase, Ns3TcpLossTestCase, ReadFileTestCase, RecordHeaderTestCase, FileHeaderTestCase, ReadModeCreateTestCase, WriteModeCreateTestCase, Ns2MobilityHelperTest, TwoBridgeTest, BridgeTest, TwoLanTest, TwoLinkTest, LanTest, LinkTest, PingTestCase, LookupTimeTestCase, TimeWithSignTestCase, TimeSimpleTestCase, ThreadedSimulatorEventsTestCase, NullifyCallbackTestCase, CallbackEqualityTestCase, MakeBoundCallbackTestCase, MakeCallbackTestCase, and BasicCallbackTestCase.

Definition at line 485 of file test.cc.

References NS_LOG_FUNCTION.

Referenced by Run().

+ Here is the caller graph for this function:

◆ DoTeardown()

void ns3::TestCase::DoTeardown ( )
privatevirtual

Implementation to do any local setup required for this TestCase.

Subclasses should override this method to perform any costly per-test teardown

Reimplemented in WifiPhyThresholdsTest, TestSpectrumChannelWithBandwidthFilter, TestPrimary20CoveredByPpdu, TestUnsupportedBandwidthReception, WifiPhyReceptionTest, TestUlOfdmaPowerControl, TestPhyPaddingExclusion, TestUlOfdmaPhyTransmission, TestMultipleHeTbPreambles, TestUlOfdmaPpduUid, TestDlOfdmaPhyPuncturing, TestDlOfdmaPhyTransmission, TestUlMuMimoPhyTransmission, TestDlMuMimoPhyTransmission, WifiPhyCcaIndicationTest, WifiPhyCcaThresholdsTest, TestMultipleCtsResponsesFromMuRts, TestNonHtDuplicatePhyReception, AmpduAggregationTest, SpectrumWifiPhyMultipleInterfacesTest, SpectrumWifiPhyFilterTest, SpectrumWifiPhyBasicTest, Ns3TcpStateTestCase, Ns3TcpLossTestCase, ReadFileTestCase, RecordHeaderTestCase, FileHeaderTestCase, ReadModeCreateTestCase, WriteModeCreateTestCase, WaypointMobilityModelAddWaypointTest, WaypointMobilityModelNotifyTest, SteadyStateRandomWaypointTest, Ns2MobilityHelperTest, LteHandoverTargetTestCase, LteHandoverFailureTestCase, LteUeMeasurementsHandoverTestCase, LteUeMeasurementsPiecewiseTestCase3, LteUeMeasurementsPiecewiseTestCase2, LteUeMeasurementsPiecewiseTestCase1, LteSecondaryCellHandoverTestCase, TcpTxBufferTestCase, TimestampValueTestCase, TcpTestCase, TcpRxBufferTestCase, TcpRateLinuxWithBufferTest, TcpOptionTSTestCase, TcpOptionWSTestCase, TcpLinuxRenoCongAvoidTest, TcpLinuxRenoSSTest, TcpHeaderWithRFC793OptionTestCase, TcpHeaderGetSetTestCase, ns3::TcpGeneralTest, RttEstimatorTestCase, DualStackTestCase, IpAddressHelperTestCasev6, AddressCollision6TestCase, ExampleAddress6GeneratorTestCase, NetworkAndAddress6TestCase, AddressAllocator6TestCase, NetworkNumber6AllocatorTestCase, IpAddressHelperTestCasev4, ResetAllocatorHelperTestCase, AddressAllocatorHelperTestCase, NetworkAllocatorHelperTestCase, AddressCollisionTestCase, ExampleAddressGeneratorTestCase, NetworkAndAddressTestCase, AddressAllocatorTestCase, NetworkNumberAllocatorTestCase, InternetStackHelperTestCase, PingTestCase, TimerTemplateTestCase, TimeWithSignTestCase, TimeSimpleTestCase, ThreadedSimulatorEventsTestCase, ns3::tests::AlternateFindTestCase, ns3::tests::RelativeFindTestCase, ns3::tests::FullyQualifiedFindTestCase, ns3::tests::StringContextFindTestCase, ns3::tests::BasicFindTestCase, ns3::tests::FindPathTestCase, ns3::tests::RelativeRenameTestCase, ns3::tests::FullyQualifiedRenameTestCase, ns3::tests::StringContextRenameTestCase, ns3::tests::BasicRenameTestCase, ns3::tests::RelativeAddTestCase, ns3::tests::FullyQualifiedAddTestCase, ns3::tests::StringContextAddTestCase, ns3::tests::BasicAddTestCase, and ThreeGppHttpObjectTestCase.

Definition at line 491 of file test.cc.

References NS_LOG_FUNCTION.

◆ GetName()

std::string ns3::TestCase::GetName ( ) const
Returns
The name of this test

Definition at line 373 of file test.cc.

References m_name, and NS_LOG_FUNCTION.

Referenced by LteAggregationThroughputScaleTestCase::LteAggregationThroughputScaleTestCase(), LteCellSelectionTestCase::LteCellSelectionTestCase(), LtePrimaryCellChangeTestCase::LtePrimaryCellChangeTestCase(), LteRadioLinkFailureTestCase::LteRadioLinkFailureTestCase(), LteRrcConnectionEstablishmentErrorTestCase::LteRrcConnectionEstablishmentErrorTestCase(), LteRrcConnectionEstablishmentTestCase::LteRrcConnectionEstablishmentTestCase(), LteSecondaryCellSelectionTestCase::LteSecondaryCellSelectionTestCase(), TcpRenoCongAvoidTestSuite::TcpRenoCongAvoidTestSuite(), TcpSlowStartTestSuite::TcpSlowStartTestSuite(), ThreeGppHttpObjectTestCase::ThreeGppHttpObjectTestCase(), LteAggregationThroughputScaleTestCase::~LteAggregationThroughputScaleTestCase(), LteCellSelectionTestCase::~LteCellSelectionTestCase(), LtePrimaryCellChangeTestCase::~LtePrimaryCellChangeTestCase(), LteRadioLinkFailureTestCase::~LteRadioLinkFailureTestCase(), LteSecondaryCellSelectionTestCase::~LteSecondaryCellSelectionTestCase(), PacketTagListTest::AddRemoveTime(), ns3::int64x64::test::Int64x64CompareTestCase::Check(), ns3::int64x64::test::Int64x64Bug455TestCase::Check(), ns3::int64x64::test::Int64x64Bug863TestCase::Check(), ns3::int64x64::test::Int64x64HiLoTestCase::Check(), ns3::int64x64::test::Int64x64IntRoundTestCase::Check(), ns3::int64x64::test::Int64x64DoubleTestCase::Check(), TimeInputOutputTestCase::Check(), ns3::int64x64::test::Int64x64InputTestCase::Check(), ns3::int64x64::test::Int64x64InputOutputTestCase::Check(), ns3::tests::HashTestCase::Check(), ns3::int64x64::test::Int64x64Bug1786TestCase::Check(), TimeInputOutputTestCase::CheckAs(), ns3::int64x64::test::Int64x64InvertTestCase::CheckCase(), ThreeGppHttpObjectTestCase::DoRun(), ns3::tests::BuildProfileTestCase::DoRun(), ns3::tests::DefaultHashTestCase::DoRun(), ns3::tests::IncrementalTestCase::DoRun(), ns3::int64x64::test::Int64x64HiLoTestCase::DoRun(), ns3::int64x64::test::Int64x64IntRoundTestCase::DoRun(), ns3::int64x64::test::Int64x64InputTestCase::DoRun(), ns3::int64x64::test::Int64x64InputOutputTestCase::DoRun(), ns3::int64x64::test::Int64x64ArithmeticTestCase::DoRun(), ns3::int64x64::test::Int64x64Bug455TestCase::DoRun(), ns3::int64x64::test::Int64x64Bug863TestCase::DoRun(), ns3::int64x64::test::Int64x64Bug1786TestCase::DoRun(), ns3::int64x64::test::Int64x64CompareTestCase::DoRun(), ns3::int64x64::test::Int64x64InvertTestCase::DoRun(), ns3::int64x64::test::Int64x64DoubleTestCase::DoRun(), ns3::int64x64::test::Int64x64ImplTestCase::DoRun(), TimeInputOutputTestCase::DoRun(), UniqueTypeIdTestCase::DoRun(), CollisionTestCase::DoRun(), DeprecatedAttributeTestCase::DoRun(), LookupTimeTestCase::DoRun(), LteCellSelectionTestCase::DoRun(), LenaCqaFfMacSchedulerTestCase1::DoRun(), LenaFdTbfqFfMacSchedulerTestCase1::DoRun(), LteInterferenceHardFrTestCase::DoRun(), LteInterferenceStrictFrTestCase::DoRun(), LteInterferenceTestCase::DoRun(), LenaMimoTestCase::DoRun(), LtePrimaryCellChangeTestCase::DoRun(), LenaPssFfMacSchedulerTestCase1::DoRun(), LteRadioLinkFailureTestCase::DoRun(), LteSecondaryCellHandoverTestCase::DoRun(), LteSecondaryCellSelectionTestCase::DoRun(), LenaTdTbfqFfMacSchedulerTestCase1::DoRun(), LteUeMeasurementsTestCase::DoRun(), LteUeMeasurementsPiecewiseTestCase1::DoRun(), LteUeMeasurementsPiecewiseTestCase2::DoRun(), LteUeMeasurementsPiecewiseTestCase3::DoRun(), LteUeMeasurementsHandoverTestCase::DoRun(), LteEpcE2eDataTestCase::DoRun(), LteHandoverTargetTestCase::DoRun(), LteRrcConnectionEstablishmentTestCase::DoRun(), LteRrcConnectionEstablishmentErrorTestCase::DoRun(), PacketTagListTest::DoRun(), ThreeGppHttpObjectTestCase::DoTeardown(), LteAggregationThroughputScaleTestCase::GetThroughput(), ns3::tests::CommandLineTestCaseBase::Parse(), and PacketTagListTest::RemoveTime().

◆ GetParent()

TestCase * ns3::TestCase::GetParent ( ) const
protected

Get the parent of this TestCase.

Returns
A pointer to the parent of this test.

Definition at line 380 of file test.cc.

References m_parent.

Referenced by ns3::int64x64::test::Int64x64CompareTestCase::Check(), ns3::int64x64::test::Int64x64Bug455TestCase::Check(), ns3::int64x64::test::Int64x64Bug863TestCase::Check(), ns3::int64x64::test::Int64x64HiLoTestCase::Check(), ns3::int64x64::test::Int64x64IntRoundTestCase::Check(), ns3::int64x64::test::Int64x64DoubleTestCase::Check(), TimeInputOutputTestCase::Check(), ns3::int64x64::test::Int64x64InputTestCase::Check(), ns3::int64x64::test::Int64x64InputOutputTestCase::Check(), ns3::int64x64::test::Int64x64Bug1786TestCase::Check(), TimeInputOutputTestCase::CheckAs(), ns3::int64x64::test::Int64x64InvertTestCase::CheckCase(), ns3::int64x64::test::Int64x64HiLoTestCase::DoRun(), ns3::int64x64::test::Int64x64IntRoundTestCase::DoRun(), ns3::int64x64::test::Int64x64InputTestCase::DoRun(), ns3::int64x64::test::Int64x64InputOutputTestCase::DoRun(), ns3::int64x64::test::Int64x64ArithmeticTestCase::DoRun(), ns3::int64x64::test::Int64x64Bug455TestCase::DoRun(), ns3::int64x64::test::Int64x64Bug863TestCase::DoRun(), ns3::int64x64::test::Int64x64Bug1786TestCase::DoRun(), ns3::int64x64::test::Int64x64CompareTestCase::DoRun(), ns3::int64x64::test::Int64x64InvertTestCase::DoRun(), ns3::int64x64::test::Int64x64DoubleTestCase::DoRun(), ns3::int64x64::test::Int64x64ImplTestCase::DoRun(), TimeInputOutputTestCase::DoRun(), and ns3::tests::CommandLineTestCaseBase::Parse().

+ Here is the caller graph for this function:

◆ IsFailed()

bool ns3::TestCase::IsFailed ( ) const
private

Check if any tests failed.

Returns
true if any of the tests have failed, false otherwise.

Definition at line 342 of file test.cc.

References ns3::TestCase::Result::childrenFailed, ns3::TestCase::Result::failure, m_result, and NS_LOG_FUNCTION.

◆ IsStatusFailure()

bool ns3::TestCase::IsStatusFailure ( ) const
protected

Check if any tests failed.

Returns
true if any of the tests have failed, false otherwise.

Definition at line 464 of file test.cc.

References IsStatusSuccess(), and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ IsStatusSuccess()

bool ns3::TestCase::IsStatusSuccess ( ) const
protected

Check if all tests passed.

Returns
true if the tests have succeeded, false otherwise.

Definition at line 471 of file test.cc.

References ns3::TestCase::Result::failure, m_result, and NS_LOG_FUNCTION.

Referenced by Ns3TcpLossTestCase::Ipv4L3Tx(), Ns3TcpStateTestCase::Ipv4L3Tx(), and IsStatusFailure().

+ Here is the caller graph for this function:

◆ MustAssertOnFailure()

bool ns3::TestCase::MustAssertOnFailure ( ) const
protected

Check if this run should assert on failure.

Returns
true if we should assert on failure.

Definition at line 405 of file test.cc.

References m_runner, ns3::TestRunnerImpl::MustAssertOnFailure(), and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ MustContinueOnFailure()

bool ns3::TestCase::MustContinueOnFailure ( ) const
protected

Check if this run should continue on failure.

Returns
true if we should continue on failure.

Definition at line 412 of file test.cc.

References m_runner, ns3::TestRunnerImpl::MustContinueOnFailure(), and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ operator=()

TestCase& ns3::TestCase::operator= ( const TestCase )
delete

◆ ReportTestFailure()

void ns3::TestCase::ReportTestFailure ( std::string  cond,
std::string  actual,
std::string  limit,
std::string  message,
std::string  file,
int32_t  line 
)
protected

Log the failure of this TestCase.

Parameters
[in]condThe test condition.
[in]actualActual value of the test.
[in]limitExpected value of the test.
[in]messageMessage indicating the type of failure.
[in]fileThe file where the test failed.
[in]lineThe line number in file where the test failed.

Definition at line 386 of file test.cc.

References ns3::TestCase::Result::childrenFailed, ns3::TestCase::Result::failure, create-module::file, m_parent, m_result, and NS_LOG_FUNCTION.

◆ Run()

void ns3::TestCase::Run ( TestRunnerImpl runner)
private

Actually run this TestCase.

Parameters
[in]runnerThe test runner implementation.

Definition at line 349 of file test.cc.

References ns3::TestCase::Result::clock, DoSetup(), m_children, m_result, m_runner, NS_LOG_FUNCTION, and ns3::SystemWallClockMs::Start().

+ Here is the call graph for this function:

◆ SetDataDir()

void ns3::TestCase::SetDataDir ( std::string  directory)
protected

Set the data directory where reference trace files can be found.

Parameters
[in]directoryThe directory where the test data is located

In general, this method is invoked as SetDataDir (NS_TEST_SOURCEDIR); However, if a module contains a test directory with subdirectories (e.g. src/mesh/test), and the test data (e.g. pcap traces) is located in one of these subdirectories, then the variable NS_TEST_SOURCEDIR may not work and the user may want to explicitly pass in a directory string.

Note that NS_TEST_SOURCEDIR is set in src/CMakeLists.txt for each module

Definition at line 478 of file test.cc.

References m_dataDir, and NS_LOG_FUNCTION.

Referenced by ns3::aodv::AodvLoopbackTestSuite::AodvLoopbackTestSuite(), Ns3TcpLossTestSuite::Ns3TcpLossTestSuite(), Ns3TcpStateTestSuite::Ns3TcpStateTestSuite(), PcapFileTestSuite::PcapFileTestSuite(), and MobilityTraceTestCase::DoRun().

+ Here is the caller graph for this function:

Friends And Related Function Documentation

◆ TestRunnerImpl

friend class TestRunnerImpl
friend

Needs access to the TestCase data members.

Definition at line 1196 of file test.h.

Member Data Documentation

◆ m_children

std::vector<TestCase*> ns3::TestCase::m_children
private

Vector of my children.

Definition at line 1240 of file test.h.

Referenced by ~TestCase(), AddTestCase(), and Run().

◆ m_dataDir

std::string ns3::TestCase::m_dataDir
private

My data directory.

Definition at line 1241 of file test.h.

Referenced by CreateDataDirFilename(), and SetDataDir().

◆ m_duration

TestDuration ns3::TestCase::m_duration
private

TestCase duration.

Definition at line 1245 of file test.h.

Referenced by AddTestCase().

◆ m_name

std::string ns3::TestCase::m_name
private

TestCase name.

Definition at line 1244 of file test.h.

Referenced by AddTestCase(), CreateTempDirFilename(), and GetName().

◆ m_parent

TestCase* ns3::TestCase::m_parent
private

Pointer to my parent TestCase.

Definition at line 1239 of file test.h.

Referenced by ~TestCase(), AddTestCase(), CreateDataDirFilename(), CreateTempDirFilename(), GetParent(), and ReportTestFailure().

◆ m_result

Result* ns3::TestCase::m_result
private

Results data.

Definition at line 1243 of file test.h.

Referenced by ~TestCase(), IsFailed(), IsStatusSuccess(), ReportTestFailure(), and Run().

◆ m_runner

TestRunnerImpl* ns3::TestCase::m_runner
private

The documentation for this class was generated from the following files: