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

encapsulates test code More...

#include "test.h"

Inherits ns3::NonCopyable.

Inherited by AbstractAnimationInterfaceTestCase, AcousticModemEnergyDepletionTestCase, AcousticModemEnergyTestCase, AdaptiveRedQueueDiscTestCase, AddressAllocator6TestCase, AddressAllocatorHelperTestCase, AddressAllocatorTestCase, AddressCollision6TestCase, AddressCollisionTestCase, AggregateObjectTestCase, AlternateFindTestCase, AmpduAggregationTest, AnnexC_TestCase, AttributeTestCase< T >, AutoRedQueueDiscTestCase, BasicAddTestCase, BasicCallbackTestCase, BasicEnergyHarvesterTestCase, BasicFindTestCase, BasicRenameTestCase, BasicTracedCallbackTestCase, BridgeTest, BriteTopologyFunctionTestCase, BriteTopologyStructureTestCase, BufferTest, Bug2222TestCase, Bug730TestCase, Bug772ChainTest, BuildingsHelperOneTestCase, BuildingsPathlossTestCase, BuildingsShadowingTestCase, BuildProfileTestCase, BurstErrorModelSimple, CallbackValueTestCase, ChainRegressionTest, ChannelAccessTestCase, ChannelCoordinationTestCase, ChannelRoutingTestCase, CoDelQueueDiscBasicDrop, CoDelQueueDiscBasicEnqueueDequeue, CoDelQueueDiscBasicOverflow, CoDelQueueDiscControlLawTest, CoDelQueueDiscNewtonStepTest, CollisionTestCase, CommandLineTestCaseBase, CosineAntennaModelTestCase, CreateObjectTestCase, CsmaBridgeTestCase, CsmaBroadcastTestCase, CsmaMulticastTestCase, CsmaOneSubnetTestCase, CsmaPacketSocketTestCase, CsmaPingTestCase, CsmaRawIpSocketTestCase, CsmaStarTestCase, CtrlBAckResponseHeaderTest, DcfImmediateAccessBroadcastTestCase, DcfManagerTest, DegreesToRadiansTestCase, DeprecatedAttributeTestCase, DiffTestCase, DropTailQueueTestCase, DsaRequestTestCase, DsdvHeaderTestCase, DsdvTableTestCase, DsrAckHeaderTest, DsrAckReqHeaderTest, DsrCacheEntryTest, DsrFsHeaderTest, DsrRerrHeaderTest, DsrRrepHeaderTest, DsrRreqHeaderTest, DsrRreqTableTest, DsrSendBuffTest, DsrSRHeaderTest, DualStackTestCase, EpcS1uDlTestCase, EpcS1uUlTestCase, EpcTftClassifierTestCase, EpsGtpuHeaderTestCase, ErrorModelSimple, EventGarbageCollectorTestCase, ExampleAddress6GeneratorTestCase, ExampleAddressGeneratorTestCase, FileHeaderTestCase, FindPathTestCase, FiveDoublesAverageTestCase, FiveDoublesTestCase, FiveIntegersAverageTestCase, FiveIntegersTestCase, FlameHeaderTest, FlameRegressionTest, FlameRtableTest, FqCoDelQueueDiscDeficit, FqCoDelQueueDiscIPFlowsSeparationAndPacketLimit, FqCoDelQueueDiscNoSuitableFilter, FqCoDelQueueDiscTCPFlowsSeparation, FqCoDelQueueDiscUDPFlowsSeparation, FriisPropagationLossModelTestCase, FullyQualifiedAddTestCase, FullyQualifiedFindTestCase, FullyQualifiedRenameTestCase, GeoToCartesianTestCase, GlobalRouteManagerImplTestCase, GlobalValueTestCase, HashTestCase, HistogramTestCase, HwmpDoRfRegressionTest, HwmpProactiveRegressionTest, HwmpReactiveRegressionTest, HwmpRtableTest, HwmpSimplestRegressionTest, IntegerTraceSourceAttributeTestCase, IntegerTraceSourceTestCase, InterferenceHelperSequenceTest, IpAddressHelperTestCasev4, IpAddressHelperTestCasev6, Ipv4DynamicGlobalRoutingTestCase, Ipv4ForwardingTest, Ipv4FragmentationTest, Ipv4GlobalRoutingSlash32TestCase, Ipv4HeaderTest, Ipv4L3ProtocolTestCase, Ipv4ListRoutingNegativeTestCase, Ipv4ListRoutingPositiveTestCase, Ipv4PacketInfoTagTest, Ipv4RawSocketImplTest, Ipv4RipCountToInfinityTest, Ipv4RipSplitHorizonStrategyTest, Ipv4RipTest, Ipv4StaticRoutingSlash32TestCase, Ipv6AddressTestCase1, Ipv6ForwardingTest, Ipv6FragmentationTest, Ipv6L3ProtocolTestCase, Ipv6ListRoutingNegativeTestCase, Ipv6ListRoutingPositiveTestCase, Ipv6PacketInfoTagTest, Ipv6RawSocketImplTest, Ipv6RipngCountToInfinityTest, Ipv6RipngSplitHorizonStrategyTest, Ipv6RipngTest, IsotropicAntennaModelTestCase, ItuR1411LosPropagationLossModelTestCase, ItuR1411NlosOverRooftopPropagationLossModelTestCase, Kun2600MhzPropagationLossModelTestCase, LanTest, LenaCqaFfMacSchedulerTestCase1, LenaCqaFfMacSchedulerTestCase2, LenaDataPhyErrorModelTestCase, LenaDlCtrlPhyErrorModelTestCase, LenaFdBetFfMacSchedulerTestCase1, LenaFdBetFfMacSchedulerTestCase2, LenaFdMtFfMacSchedulerTestCase, LenaFdTbfqFfMacSchedulerTestCase1, LenaFdTbfqFfMacSchedulerTestCase2, LenaHarqTestCase, LenaMimoTestCase, LenaPfFfMacSchedulerTestCase1, LenaPfFfMacSchedulerTestCase2, LenaPssFfMacSchedulerTestCase1, LenaPssFfMacSchedulerTestCase2, LenaRrFfMacSchedulerTestCase, LenaTdBetFfMacSchedulerTestCase1, LenaTdBetFfMacSchedulerTestCase2, LenaTdMtFfMacSchedulerTestCase, LenaTdTbfqFfMacSchedulerTestCase1, LenaTdTbfqFfMacSchedulerTestCase2, LenaTtaFfMacSchedulerTestCase, LiIonEnergyTestCase, LinkTest, LogDistancePropagationLossModelTestCase, LookupTimeTestCase, LrWpanAckTestCase, LrWpanCcaTestCase, LrWpanCollisionTestCase, LrWpanEdTestCase, LrWpanErrorDistanceTestCase, LrWpanErrorModelTestCase, LrWpanPacketTestCase, LrWpanPlmeAndPdInterfaceTestCase, LrWpanSpectrumValueHelperTestCase, LteCellSelectionTestCase, LteCqiGenerationDlPowerControlTestCase, LteCqiGenerationTestCase, LteDownlinkCtrlSinrTestCase, LteDownlinkDataSinrTestCase, LteDownlinkPowerControlRrcConnectionReconfigurationTestCase, LteDownlinkPowerControlSpectrumValueTestCase, LteDownlinkPowerControlTestCase, LteEarfcnTestCase, LteEnbAntennaTestCase, LteEpcE2eDataTestCase, LteFadingSystemTestCase, LteFadingTestCase, LteFrAreaTestCase, LteFrTestCase, LteHandoverDelayTestCase, LteHandoverTargetTestCase, LteInterferenceHardFrTestCase, LteInterferenceStrictFrTestCase, LteInterferenceTestCase, LteLinkAdaptationTestCase, LteNoisePsdTestCase, LtePathlossModelSystemTestCase, LteRlcAmE2eTestCase, LteRlcAmTransmitterTestCase, LteRlcUmE2eTestCase, LteRlcUmTransmitterTestCase, LteRrcConnectionEstablishmentTestCase, LteSpectrumModelTestCase, LteTxPsdTestCase, LteUeMeasurementsHandoverTestCase, LteUeMeasurementsPiecewiseTestCase1, LteUeMeasurementsPiecewiseTestCase2, LteUeMeasurementsTestCase, LteUplinkDataSinrTestCase, LteUplinkPowerControlTestCase, LteUplinkSrsSinrTestCase, LteX2HandoverMeasuresTestCase, LteX2HandoverTestCase, MakeBoundCallbackTestCase, MakeCallbackTemplatesTestCase, MakeCallbackTestCase, ManyUniformRandomVariablesOneGetValueCallTestCase, MatrixPropagationLossModelTestCase, MeshHeaderTest, MeshInformationElementVectorBist, MobilityTraceTestCase, NetworkAllocatorHelperTestCase, NetworkAndAddress6TestCase, NetworkAndAddressTestCase, NetworkNumber6AllocatorTestCase, NetworkNumberAllocatorTestCase, Ns2MobilityHelperTest, 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::Int64x64InvertTestCase, ns3::LenaDeactivateBearerTestCase, ns3::olsr::Bug780Test, ns3::olsr::HelloRegressionTest, ns3::olsr::TcRegressionTest, ns3::RlcAmStatusPduTestCase, ns3::TcpBicDecrementTest, ns3::TcpBicIncrementTest, ns3::TcpEndPointBug2211Test, ns3::TcpGeneralTest, ns3::TcpHeaderFlagsToString, ns3::TcpHeaderGetSetTestCase, ns3::TcpHeaderWithRFC793OptionTestCase, ns3::TcpHighSpeedDecrementTest, ns3::TcpHighSpeedIncrementTest, ns3::TcpHtcpIncrementTest, ns3::TcpHyblaIncrementTest, ns3::TcpIllinoisTest, ns3::TcpOptionTSTestCase, ns3::TcpOptionWSTestCase, ns3::TcpScalableDecrementTest, ns3::TcpScalableIncrementTest, ns3::TcpVegasTest, ns3::TcpVenoTest, ns3::TcpYeahDecrementTest, ns3::TcpYeahIncrementTest, ns3::TestSuite, ns3::TimestampValueTestCase, Ns3TcpCwndTestCase1, Ns3TcpCwndTestCase2, Ns3TcpInteroperabilityTestCase, Ns3TcpLossTestCase, Ns3TcpNoDelayTestCase, Ns3TcpSocketTestCase1, Ns3TcpSocketTestCase2, Ns3TcpStateTestCase, Ns3WimaxCsParamTlvTestCase, Ns3WimaxFragmentationTestCase, Ns3WimaxManagementConnectionsTestCase, Ns3WimaxNetworkEntryTestCase, Ns3WimaxSchedulingTestCase, Ns3WimaxSfCreationTestCase, Ns3WimaxSfTlvTestCase, Ns3WimaxSFTypeTestCase, Ns3WimaxSimpleOFDMTestCase, Ns3WimaxSNRtoBLERTestCase, NscTcpLossTestCase1, NscTcpLossTestCase2, NullifyCallbackTestCase, ObjectFactoryTestCase, ObjectMapAttributeTestCase, ObjectVectorAttributeTestCase, ObjectVectorConfigTestCase, ObjectVectorTraceConfigTestCase, OcbWifiMacTestCase, OkumuraHataPropagationLossModelTestCase, OlsrEmfTestCase, OlsrHelloTestCase, OlsrHnaTestCase, OlsrMidTestCase, OlsrMprTestCase, OlsrTcTestCase, OneIntegerAverageTestCase, OneIntegerTestCase, OneUniformRandomVariableManyGetValueCallsTestCase, OneVectorConstructorTestCase, PacketBufferingCaseA, PacketBufferingCaseB, PacketLossCounterTestCase, PacketMetadataTest, PacketSocketAppsTest, PacketTagListTest, PacketTest, ParabolicAntennaModelTestCase, PbbTestCase, PeerLinkFrameStartTest, PeerManagementProtocolRegressionTest, PfifoFastQueueDiscDscpPrioritization, PfifoFastQueueDiscNoPriority, PfifoFastQueueDiscOverflow, PfifoFastQueueDiscTosPrioritization, PieQueueDiscTestCase, PointerAttributeTestCase, PointToPointTest, PowerRateAdaptationTest, ProbeTestCase1, PtrTestCase, QosUtilsIsOldPacketTest, RadiansToDegreesTestCase, RandCartAroundGeoTestCase, RandomRoomPositionAllocatorTestCase, RandomVariableStreamAttributeTestCase, RandomVariableStreamConstantTestCase, RandomVariableStreamDeterministicTestCase, RandomVariableStreamEmpiricalAntitheticTestCase, RandomVariableStreamEmpiricalTestCase, RandomVariableStreamErlangAntitheticTestCase, RandomVariableStreamErlangTestCase, RandomVariableStreamExponentialAntitheticTestCase, RandomVariableStreamExponentialTestCase, RandomVariableStreamGammaAntitheticTestCase, RandomVariableStreamGammaTestCase, RandomVariableStreamLogNormalAntitheticTestCase, RandomVariableStreamLogNormalTestCase, RandomVariableStreamNormalAntitheticTestCase, RandomVariableStreamNormalTestCase, RandomVariableStreamParetoAntitheticTestCase, RandomVariableStreamParetoTestCase, RandomVariableStreamSequentialTestCase, RandomVariableStreamUniformAntitheticTestCase, RandomVariableStreamUniformTestCase, RandomVariableStreamWeibullAntitheticTestCase, RandomVariableStreamWeibullTestCase, RandomVariableStreamZetaAntitheticTestCase, RandomVariableStreamZetaTestCase, RandomVariableStreamZipfAntitheticTestCase, RandomVariableStreamZipfTestCase, RangePropagationLossModelTestCase, ReadFileTestCase, ReadModeCreateTestCase, RecordHeaderTestCase, RedQueueDiscTestCase, RelativeAddTestCase, RelativeFindTestCase, RelativeRenameTestCase, ResetAllocatorHelperTestCase, RngExponentialTestCase, RngNormalTestCase, RngParetoTestCase, RngUniformTestCase, RocketfuelTopologyReaderTest, RootNamespaceConfigTestCase, RrcHeaderTestCase, RttEstimatorTestCase, SameRoomPositionAllocatorTestCase, SampleTestCase1, SearchAttributesOfParentObjectsTestCase, SequenceNumberTestCase, SetChannelFrequencyTest, SimulatorEventsTestCase, SimulatorTemplateTestCase, SixlowpanFragmentationTest, SixlowpanHc1ImplTest, SixlowpanIphcImplTest, SpectrumIdealPhyTestCase, SpectrumInterferenceTestCase, SpectrumValueTestCase, SpectrumWifiPhyBasicTest, SteadyStateRandomWaypointTest, StringContextAddTestCase, StringContextFindTestCase, StringContextRenameTestCase, SwitchFlowTableTestCase, TcpTestCase, TestEmptyOptionField, TestFulfilledAlignment, TestOptionWithAlignment, TestOptionWithoutAlignment, ThreadedSimulatorEventsTestCase, TimeInputOutputTestCase, TimerStateTestCase, TimerTemplateTestCase, TimeSimpleTestCase, TimeWithSignTestCase, TracedCallbackTestCase, TracedCallbackTypedefTestCase, TracedValueCallbackTestCase, TvHelperDistributionTestCase, TvSpectrumTransmitterTestCase, TwoBridgeTest, TwoLanTest, TwoLevelAggregationTest, TwoLinkTest, TwoRayGroundPropagationLossModelTestCase, TwoVectorsConstructorTestCase, TxDurationTest, TypeTraitsTestCase, UanTest, Udp6SocketImplTest, Udp6SocketLoopbackTest, UdpClientServerTestCase, UdpEchoClientSetFillTestCase, UdpSocketImplTest, UdpSocketLoopbackTest, UdpTraceClientServerTestCase, UnderRootNamespaceConfigTestCase, UniqueTypeIdTestCase, WatchdogTestCase, WaveformGeneratorTestCase, WaypointInitialPositionIsWaypoint, WaypointLazyNotifyFalse, WaypointLazyNotifyTrue, WaypointMobilityModelAddWaypointTest, WaypointMobilityModelNotifyTest, WaypointMobilityModelViaHelper, WifiAcMappingTest, WifiErrorRateModelsTestCaseDsss, WifiErrorRateModelsTestCaseNist, WifiInterferenceTestCase, WifiMsduAggregatorThroughputTest, WifiTest, and WriteModeCreateTestCase.

+ 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

virtual ~TestCase ()
 Destructor. More...
 
std::string GetName (void) const
 

Protected Member Functions

 TestCase (std::string name)
 Constructor. More...
 
void AddTestCase (TestCase *testCase, enum TestDuration duration)
 Add an individual child TestCase to this test suite. More...
 
TestCaseGetParent () const
 Get the parent of this TestCsse. More...
 
bool IsStatusFailure (void) const
 Check if any tests failed. More...
 
bool IsStatusSuccess (void) 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 (void) const
 Check if this run should assert on failure. More...
 
bool MustContinueOnFailure (void) 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 (void)=0
 Implementation to actually run this TestCase. More...
 
virtual void DoSetup (void)
 Implementation to do any local setup required for this TestCase. More...
 
virtual void DoTeardown (void)
 Implementation to do any local setup required for this TestCase. More...
 
bool IsFailed (void) const
 Check if any tests failed. More...
 
void Run (TestRunnerImpl *runner)
 Actually run this TestCase. More...
 
- Private Member Functions inherited from ns3::NonCopyable
 NonCopyable ()
 Constructor. More...
 
 ~NonCopyable ()
 Destructor. More...
 

Private Attributes

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

Friends

class TestRunnerImpl
 

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.

Definition at line 1147 of file test.h.

Constructor & Destructor Documentation

ns3::TestCase::~TestCase ( )
virtual

Destructor.

Definition at line 284 of file test.cc.

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

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

Constructor.

Parameters
[in]nameThe name of the new TestCase created

Definition at line 273 of file test.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

void ns3::TestCase::AddTestCase ( TestCase testCase,
enum TestDuration  duration 
)
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.

Definition at line 298 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(), AttributesTestSuite::AttributesTestSuite(), AverageTestSuite::AverageTestSuite(), BasicDataCalculatorsTestSuite::BasicDataCalculatorsTestSuite(), BasicEnergyHarvesterTestSuite::BasicEnergyHarvesterTestSuite(), BlockAckTestSuite::BlockAckTestSuite(), BriteTestSuite::BriteTestSuite(), BufferTestSuite::BufferTestSuite(), BuildingPositionAllocatorTestSuite::BuildingPositionAllocatorTestSuite(), BuildingsHelperTestSuite::BuildingsHelperTestSuite(), BuildingsPathlossTestSuite::BuildingsPathlossTestSuite(), BuildingsShadowingTestSuite::BuildingsShadowingTestSuite(), BuildProfileTestSuite::BuildProfileTestSuite(), CallbackTestSuite::CallbackTestSuite(), CoDelQueueDiscTestSuite::CoDelQueueDiscTestSuite(), CommandLineTestSuite::CommandLineTestSuite(), ConfigTestSuite::ConfigTestSuite(), CosineAntennaModelTestSuite::CosineAntennaModelTestSuite(), CsmaSystemTestSuite::CsmaSystemTestSuite(), DcfTestSuite::DcfTestSuite(), DegreesRadiansTestSuite::DegreesRadiansTestSuite(), Dot11sTestSuite::Dot11sTestSuite(), DropTailQueueTestSuite::DropTailQueueTestSuite(), DsdvTestSuite::DsdvTestSuite(), DsrTestSuite::DsrTestSuite(), EpcS1uDlTestSuite::EpcS1uDlTestSuite(), EpcS1uUlTestSuite::EpcS1uUlTestSuite(), EpcTftClassifierTestSuite::EpcTftClassifierTestSuite(), EpsGtpuTestSuite::EpsGtpuTestSuite(), ErrorModelTestSuite::ErrorModelTestSuite(), EventGarbageCollectorTestSuite::EventGarbageCollectorTestSuite(), FlameTestSuite::FlameTestSuite(), FqCoDelQueueDiscTestSuite::FqCoDelQueueDiscTestSuite(), GeoToCartesianTestSuite::GeoToCartesianTestSuite(), GlobalRouteManagerImplTestSuite::GlobalRouteManagerImplTestSuite(), GlobalValueTestSuite::GlobalValueTestSuite(), HashTestSuite::HashTestSuite(), HistogramTestSuite::HistogramTestSuite(), ns3::aodv::IdCacheTestSuite::IdCacheTestSuite(), ns3::int64x64::test::Int64x64TestSuite::Int64x64TestSuite(), Ipv4AddressGeneratorTestSuite::Ipv4AddressGeneratorTestSuite(), Ipv4AddressHelperTestSuite::Ipv4AddressHelperTestSuite(), Ipv4ForwardingTestSuite::Ipv4ForwardingTestSuite(), Ipv4FragmentationTestSuite::Ipv4FragmentationTestSuite(), Ipv4GlobalRoutingTestSuite::Ipv4GlobalRoutingTestSuite(), Ipv4HeaderTestSuite::Ipv4HeaderTestSuite(), IPv4L3ProtocolTestSuite::IPv4L3ProtocolTestSuite(), Ipv4ListRoutingTestSuite::Ipv4ListRoutingTestSuite(), Ipv4PacketInfoTagTestSuite::Ipv4PacketInfoTagTestSuite(), Ipv4RawTestSuite::Ipv4RawTestSuite(), Ipv4RipTestSuite::Ipv4RipTestSuite(), Ipv4StaticRoutingTestSuite::Ipv4StaticRoutingTestSuite(), Ipv6AddressGeneratorTestSuite::Ipv6AddressGeneratorTestSuite(), Ipv6AddressHelperTestSuite::Ipv6AddressHelperTestSuite(), Ipv6AddressTestSuite::Ipv6AddressTestSuite(), Ipv6DualStackTestSuite::Ipv6DualStackTestSuite(), Ipv6ForwardingTestSuite::Ipv6ForwardingTestSuite(), Ipv6FragmentationTestSuite::Ipv6FragmentationTestSuite(), IPv6L3ProtocolTestSuite::IPv6L3ProtocolTestSuite(), Ipv6ListRoutingTestSuite::Ipv6ListRoutingTestSuite(), Ipv6PacketInfoTagTestSuite::Ipv6PacketInfoTagTestSuite(), Ipv6RawTestSuite::Ipv6RawTestSuite(), Ipv6RipngTestSuite::Ipv6RipngTestSuite(), IsotropicAntennaModelTestSuite::IsotropicAntennaModelTestSuite(), 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(), LiIonEnergySourceTestSuite::LiIonEnergySourceTestSuite(), LrWpanAckTestSuite::LrWpanAckTestSuite(), LrWpanCcaTestSuite::LrWpanCcaTestSuite(), LrWpanCollisionTestSuite::LrWpanCollisionTestSuite(), LrWpanEdTestSuite::LrWpanEdTestSuite(), LrWpanErrorModelTestSuite::LrWpanErrorModelTestSuite(), LrWpanPacketTestSuite::LrWpanPacketTestSuite(), LrWpanPlmeAndPdInterfaceTestSuite::LrWpanPlmeAndPdInterfaceTestSuite(), LrWpanSpectrumValueHelperTestSuite::LrWpanSpectrumValueHelperTestSuite(), LteAntennaTestSuite::LteAntennaTestSuite(), LteCellSelectionTestSuite::LteCellSelectionTestSuite(), LteCqiGenerationTestSuite::LteCqiGenerationTestSuite(), LteDownlinkPowerControlTestSuite::LteDownlinkPowerControlTestSuite(), LteDownlinkSinrTestSuite::LteDownlinkSinrTestSuite(), LteEarfcnTestSuite::LteEarfcnTestSuite(), LteEpcE2eDataTestSuite::LteEpcE2eDataTestSuite(), LteFadingTestSuite::LteFadingTestSuite(), LteFrequencyReuseTestSuite::LteFrequencyReuseTestSuite(), LteHandoverTargetTestSuite::LteHandoverTargetTestSuite(), LteInterferenceFrTestSuite::LteInterferenceFrTestSuite(), LteInterferenceTestSuite::LteInterferenceTestSuite(), LteLinkAdaptationTestSuite::LteLinkAdaptationTestSuite(), LtePathlossModelTestSuite::LtePathlossModelTestSuite(), LteRlcAmE2eTestSuite::LteRlcAmE2eTestSuite(), LteRlcAmTransmitterTestSuite::LteRlcAmTransmitterTestSuite(), ns3::LteRlcHeaderTestSuite::LteRlcHeaderTestSuite(), LteRlcUmE2eTestSuite::LteRlcUmE2eTestSuite(), LteRlcUmTransmitterTestSuite::LteRlcUmTransmitterTestSuite(), LteRrcTestSuite::LteRrcTestSuite(), LteSpectrumValueHelperTestSuite::LteSpectrumValueHelperTestSuite(), LteUeMeasurementsHandoverTestSuite::LteUeMeasurementsHandoverTestSuite(), LteUeMeasurementsPiecewiseTestSuite1::LteUeMeasurementsPiecewiseTestSuite1(), LteUeMeasurementsPiecewiseTestSuite2::LteUeMeasurementsPiecewiseTestSuite2(), LteUeMeasurementsTestSuite::LteUeMeasurementsTestSuite(), LteUplinkPowerControlTestSuite::LteUplinkPowerControlTestSuite(), LteUplinkSinrTestSuite::LteUplinkSinrTestSuite(), LteX2HandoverMeasuresTestSuite::LteX2HandoverMeasuresTestSuite(), LteX2HandoverTestSuite::LteX2HandoverTestSuite(), ManyUniformRandomVariablesOneGetValueCallTestSuite::ManyUniformRandomVariablesOneGetValueCallTestSuite(), MeshTestSuite::MeshTestSuite(), MobilityTestSuite::MobilityTestSuite(), MobilityTraceTestSuite::MobilityTraceTestSuite(), NamesTestSuite::NamesTestSuite(), Ns3TcpCwndTestSuite::Ns3TcpCwndTestSuite(), Ns3TcpInteroperabilityTestSuite::Ns3TcpInteroperabilityTestSuite(), Ns3TcpLossTestSuite::Ns3TcpLossTestSuite(), Ns3TcpNoDelayTestSuite::Ns3TcpNoDelayTestSuite(), Ns3TcpSocketTestSuite::Ns3TcpSocketTestSuite(), Ns3TcpStateTestSuite::Ns3TcpStateTestSuite(), Ns3WimaxFragmentationTestSuite::Ns3WimaxFragmentationTestSuite(), Ns3WimaxMacMessagesTestSuite::Ns3WimaxMacMessagesTestSuite(), Ns3WimaxPhyTestSuite::Ns3WimaxPhyTestSuite(), Ns3WimaxQoSTestSuite::Ns3WimaxQoSTestSuite(), Ns3WimaxServiceFlowTestSuite::Ns3WimaxServiceFlowTestSuite(), Ns3WimaxSSMacTestSuite::Ns3WimaxSSMacTestSuite(), Ns3WimaxTlvTestSuite::Ns3WimaxTlvTestSuite(), NscTcpLossTestSuite::NscTcpLossTestSuite(), ObjectTestSuite::ObjectTestSuite(), OcbTestSuite::OcbTestSuite(), OkumuraHataPropagationLossModelTestSuite::OkumuraHataPropagationLossModelTestSuite(), OlsrProtocolTestSuite::OlsrProtocolTestSuite(), OlsrTestSuite::OlsrTestSuite(), OneUniformRandomVariableManyGetValueCallsTestSuite::OneUniformRandomVariableManyGetValueCallsTestSuite(), PacketMetadataTestSuite::PacketMetadataTestSuite(), PacketSocketAppsTestSuite::PacketSocketAppsTestSuite(), PacketTestSuite::PacketTestSuite(), ParabolicAntennaModelTestSuite::ParabolicAntennaModelTestSuite(), PbbTestSuite::PbbTestSuite(), PcapFileTestSuite::PcapFileTestSuite(), PfifoFastQueueDiscTestSuite::PfifoFastQueueDiscTestSuite(), PieQueueDiscTestSuite::PieQueueDiscTestSuite(), PointToPointTestSuite::PointToPointTestSuite(), PowerRateAdaptationTestSuite::PowerRateAdaptationTestSuite(), ProbeTestSuite::ProbeTestSuite(), PropagationLossModelsTestSuite::PropagationLossModelsTestSuite(), PtrTestSuite::PtrTestSuite(), RandCartAroundGeoTestSuite::RandCartAroundGeoTestSuite(), RandomVariableStreamTestSuite::RandomVariableStreamTestSuite(), RedQueueDiscTestSuite::RedQueueDiscTestSuite(), RngTestSuite::RngTestSuite(), RocketfuelTopologyReaderTestSuite::RocketfuelTopologyReaderTestSuite(), RttEstimatorTestSuite::RttEstimatorTestSuite(), SampleTestSuite::SampleTestSuite(), SequenceNumberTestSuite::SequenceNumberTestSuite(), SimulatorTestSuite::SimulatorTestSuite(), SixlowpanFragmentationTestSuite::SixlowpanFragmentationTestSuite(), SixlowpanHc1TestSuite::SixlowpanHc1TestSuite(), SixlowpanIphcTestSuite::SixlowpanIphcTestSuite(), SpectrumConverterTestSuite::SpectrumConverterTestSuite(), SpectrumIdealPhyTestSuite::SpectrumIdealPhyTestSuite(), SpectrumInterferenceTestSuite::SpectrumInterferenceTestSuite(), SpectrumValueTestSuite::SpectrumValueTestSuite(), SpectrumWifiPhyTestSuite::SpectrumWifiPhyTestSuite(), SwitchTestSuite::SwitchTestSuite(), ns3::TcpBicTestSuite::TcpBicTestSuite(), ns3::TcpBytesInFlightTestSuite::TcpBytesInFlightTestSuite(), ns3::TcpDataSentCbTestSuite::TcpDataSentCbTestSuite(), ns3::TcpEndpointBug2211TestSuite::TcpEndpointBug2211TestSuite(), ns3::TcpFastRetrTestSuite::TcpFastRetrTestSuite(), ns3::TcpHeaderTestSuite::TcpHeaderTestSuite(), ns3::TcpHighSpeedTestSuite::TcpHighSpeedTestSuite(), ns3::TcpHtcpTestSuite::TcpHtcpTestSuite(), ns3::TcpHyblaTestSuite::TcpHyblaTestSuite(), ns3::TcpIllinoisTestSuite::TcpIllinoisTestSuite(), ns3::TcpOptionTestSuite::TcpOptionTestSuite(), ns3::TcpPktsAckedTestSuite::TcpPktsAckedTestSuite(), ns3::TcpRenoCongAvoidTestSuite::TcpRenoCongAvoidTestSuite(), ns3::TcpRtoTestSuite::TcpRtoTestSuite(), ns3::TcpRttEstimationTestSuite::TcpRttEstimationTestSuite(), ns3::TcpScalableTestSuite::TcpScalableTestSuite(), ns3::TcpSlowStartTestSuite::TcpSlowStartTestSuite(), TcpTestSuite::TcpTestSuite(), ns3::TcpTimestampTestSuite::TcpTimestampTestSuite(), ns3::TcpVegasTestSuite::TcpVegasTestSuite(), ns3::TcpVenoTestSuite::TcpVenoTestSuite(), ns3::TcpWScalingTestSuite::TcpWScalingTestSuite(), ns3::TcpYeahTestSuite::TcpYeahTestSuite(), ns3::TcpZeroWindowTestSuite::TcpZeroWindowTestSuite(), ThreadedSimulatorTestSuite::ThreadedSimulatorTestSuite(), TimerTestSuite::TimerTestSuite(), TimeTestSuite::TimeTestSuite(), TracedCallbackTestSuite::TracedCallbackTestSuite(), TracedCallbackTypedefTestSuite::TracedCallbackTypedefTestSuite(), TracedValueCallbackTestSuite::TracedValueCallbackTestSuite(), TvHelperDistributionTestSuite::TvHelperDistributionTestSuite(), TvSpectrumTransmitterTestSuite::TvSpectrumTransmitterTestSuite(), TxDurationTestSuite::TxDurationTestSuite(), TypeIdPerformanceSuite::TypeIdPerformanceSuite(), TypeIdTestSuite::TypeIdTestSuite(), TypeTraitsTestSuite::TypeTraitsTestSuite(), UanEnergyModelTestSuite::UanEnergyModelTestSuite(), UanTestSuite::UanTestSuite(), UdpClientServerTestSuite::UdpClientServerTestSuite(), UdpTestSuite::UdpTestSuite(), WatchdogTestSuite::WatchdogTestSuite(), WaveformGeneratorTestSuite::WaveformGeneratorTestSuite(), WaveMacTestSuite::WaveMacTestSuite(), WifiAcMappingTestSuite::WifiAcMappingTestSuite(), WifiAggregationTestSuite::WifiAggregationTestSuite(), WifiErrorRateModelsTestSuite::WifiErrorRateModelsTestSuite(), WifiInterferenceTestSuite::WifiInterferenceTestSuite(), WifiMsduAggregatorTestSuite::WifiMsduAggregatorTestSuite(), and WifiTestSuite::WifiTestSuite().

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 411 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(), Ns3TcpStateTestCase::DoSetup(), and Ns3TcpInteroperabilityTestCase::DoSetup().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::string ns3::TestCase::CreateTempDirFilename ( std::string  filename)
protected
virtual void ns3::TestCase::DoRun ( void  )
privatepure virtual

Implementation to actually run this TestCase.

Subclasses should override this method to conduct their tests.

Implemented in RandomVariableStreamEmpiricalAntitheticTestCase, RandomVariableStreamEmpiricalTestCase, RandomVariableStreamDeterministicTestCase, RandomVariableStreamZetaAntitheticTestCase, RandomVariableStreamZetaTestCase, RandomVariableStreamZipfAntitheticTestCase, RandomVariableStreamZipfTestCase, RandomVariableStreamErlangAntitheticTestCase, RandomVariableStreamErlangTestCase, RandomVariableStreamGammaAntitheticTestCase, RandomVariableStreamGammaTestCase, RandomVariableStreamLogNormalAntitheticTestCase, RandomVariableStreamLogNormalTestCase, RandomVariableStreamWeibullAntitheticTestCase, ns3::TestSuite, CallbackValueTestCase, RandomVariableStreamWeibullTestCase, PointerAttributeTestCase, ns3::int64x64::test::Int64x64ImplTestCase, RandomVariableStreamParetoAntitheticTestCase, TracedCallbackTestCase, DiffTestCase, IntegerTraceSourceTestCase, Ipv4GlobalRoutingSlash32TestCase, RandomVariableStreamParetoTestCase, Bug2222TestCase, IntegerTraceSourceAttributeTestCase, ns3::int64x64::test::Int64x64DoubleTestCase, ReadFileTestCase, MeasurementReportTestCase, ObjectMapAttributeTestCase, AnnexC_TestCase, CsmaStarTestCase, RandomVariableStreamExponentialAntitheticTestCase, AlternateFindTestCase, RrcConnectionRejectTestCase, ns3::int64x64::test::Int64x64InvertTestCase, ObjectVectorAttributeTestCase, RrcConnectionReestablishmentCompleteTestCase, RelativeFindTestCase, RandomVariableStreamAttributeTestCase, Ipv4DynamicGlobalRoutingTestCase, CsmaRawIpSocketTestCase, RrcConnectionReestablishmentTestCase, RandomVariableStreamExponentialTestCase, FullyQualifiedFindTestCase, ns3::int64x64::test::Int64x64CompareTestCase, RrcConnectionReestablishmentRequestTestCase, AttributeTestCase< T >, StringContextFindTestCase, SearchAttributesOfParentObjectsTestCase, CsmaPingTestCase, RecordHeaderTestCase, HandoverPreparationInfoTestCase, TwoBridgeTest, AttributeTestCase< T >, SetChannelFrequencyTest, BasicFindTestCase, RandomVariableStreamNormalAntitheticTestCase, ns3::int64x64::test::Int64x64Bug1786TestCase, AttributeTestCase< T >, PacketTagListTest, FindPathTestCase, MakeCallbackTemplatesTestCase, CsmaPacketSocketTestCase, ns3::int64x64::test::Int64x64Bug863TestCase, AttributeTestCase< T >, ObjectVectorTraceConfigTestCase, NullifyCallbackTestCase, RelativeRenameTestCase, Bug730TestCase, LteRrcConnectionEstablishmentErrorTestCase, RandomVariableStreamNormalTestCase, GeoToCartesianTestCase, ns3::int64x64::test::Int64x64Bug455TestCase, DsrRreqTableTest, BridgeTest, ns3::aodv::AodvRtableTest, ChannelAccessTestCase, Ipv4RipSplitHorizonStrategyTest, Ipv6RipngSplitHorizonStrategyTest, FullyQualifiedRenameTestCase, RrcConnectionReconfigurationTestCase, CsmaOneSubnetTestCase, RandomVariableStreamSequentialTestCase, AttributeTestCase< T >, FileHeaderTestCase, Udp6SocketImplTest, FqCoDelQueueDiscUDPFlowsSeparation, RangePropagationLossModelTestCase, StringContextRenameTestCase, RrcConnectionReconfigurationCompleteTestCase, Ns3TcpCwndTestCase2, ns3::aodv::AodvRtableEntryTest, RandomVariableStreamConstantTestCase, DsrSendBuffTest, TwoLanTest, CoDelQueueDiscBasicDrop, DcfImmediateAccessBroadcastTestCase, ObjectVectorConfigTestCase, ObjectFactoryTestCase, MatrixPropagationLossModelTestCase, AttributeTestCase< T >, RrcConnectionSetupCompleteTestCase, ns3::int64x64::test::Int64x64ArithmeticTestCase, LteUeMeasurementsHandoverTestCase, BasicRenameTestCase, DsrCacheEntryTest, CoDelQueueDiscControlLawTest, LookupTimeTestCase, RngParetoTestCase, ns3::TcpHeaderFlagsToString, IncrementalTestCase, FqCoDelQueueDiscTCPFlowsSeparation, ns3::TcpGeneralTest, AttributeTestCase< T >, RrcConnectionSetupTestCase, DsrAckHeaderTest, CoDelQueueDiscNewtonStepTest, ns3::aodv::AodvRqueueTest, MakeBoundCallbackTestCase, Hash64FunctionPtrTestCase, WaypointMobilityModelViaHelper, CsmaMulticastTestCase, PacketTest, RandomVariableStreamUniformAntitheticTestCase, ChannelRoutingTestCase, RelativeAddTestCase, TwoLinkTest, DeprecatedAttributeTestCase, EpcS1uUlTestCase, PfifoFastQueueDiscNoPriority, UnderRootNamespaceConfigTestCase, LogDistancePropagationLossModelTestCase, UdpEchoClientSetFillTestCase, ns3::int64x64::test::Int64x64InputOutputTestCase, ns3::aodv::QueueEntryTest, DsrAckReqHeaderTest, Ipv4RipCountToInfinityTest, OlsrHnaTestCase, AdaptiveRedQueueDiscTestCase, Hash32FunctionPtrTestCase, Ipv6RipngCountToInfinityTest, RrcConnectionRequestTestCase, PacketMetadataTest, TwoLevelAggregationTest, AddressCollisionTestCase, CtrlBAckResponseHeaderTest, RngExponentialTestCase, Ns2MobilityHelperTest, ns3::aodv::RerrHeaderTest, LteUeMeasurementsPiecewiseTestCase2, CommandLineStringTestCase, DsrRerrHeaderTest, InterferenceHelperSequenceTest, OlsrTcTestCase, ns3::TcpYeahDecrementTest, ns3::aodv::RrepAckHeaderTest, AddressCollision6TestCase, RootNamespaceConfigTestCase, CoDelQueueDiscBasicOverflow, SpectrumWifiPhyListenerTest, PeerLinkFrameStartTest, FullyQualifiedAddTestCase, LteDistributedFfrAreaTestCase, ReadModeCreateTestCase, TracedValueCallbackTestCase, LanTest, Ns3TcpCwndTestCase1, AggregateObjectTestCase, AcousticModemEnergyDepletionTestCase, PfifoFastQueueDiscOverflow, CommandLineUnsignedIntTestCase, ns3::TimestampValueTestCase, LteEnhancedFfrAreaTestCase, PacketLossCounterTestCase, ns3::int64x64::test::Int64x64InputTestCase, QosUtilsIsOldPacketTest, ChainRegressionTest, ExampleAddressGeneratorTestCase, TestFulfilledAlignment, IpAddressHelperTestCasev4, Murmur3TestCase, LteSoftFfrAreaTestCase, FiveDoublesTestCase, ns3::TcpBicDecrementTest, DsrSRHeaderTest, SimulatorTemplateTestCase, FiveDoublesAverageTestCase, LteSoftFrAreaTestCase, FqCoDelQueueDiscDeficit, ns3::aodv::RrepHeaderTest, MakeCallbackTestCase, TimeInputOutputTestCase, ExampleAddress6GeneratorTestCase, WaypointMobilityModelAddWaypointTest, CsmaBroadcastTestCase, NscTcpLossTestCase2, LteStrictFrAreaTestCase, WaypointInitialPositionIsWaypoint, UdpSocketImplTest, OlsrHelloTestCase, Ns3WimaxSFTypeTestCase, CommandLineIntTestCase, Ns3TcpSocketTestCase2, PacketBufferingCaseB, Fnv1aTestCase, SameRoomPositionAllocatorTestCase, BurstErrorModelSimple, WifiErrorRateModelsTestCaseNist, TestOptionWithAlignment, StringContextAddTestCase, RngNormalTestCase, ns3::TcpHeaderWithRFC793OptionTestCase, TwoRayGroundPropagationLossModelTestCase, DsrRrepHeaderTest, Ns3WimaxSfTlvTestCase, CreateObjectTestCase, Ipv6FragmentationTest, LteFrAreaTestCase, RandomVariableStreamUniformTestCase, LteUeMeasurementsPiecewiseTestCase1, CollisionTestCase, NetworkAndAddressTestCase, UdpTraceClientServerTestCase, ns3::int64x64::test::Int64x64HiLoTestCase, ns3::aodv::RreqHeaderTest, LinkTest, NetworkAndAddress6TestCase, ResetAllocatorHelperTestCase, LteRlcAmTransmitterReportBufferStatusTestCase, LteRlcUmTransmitterReportBufferStatusTestCase, Ns3WimaxSNRtoBLERTestCase, DefaultHashTestCase, PfifoFastQueueDiscDscpPrioritization, LteTxPsdTestCase, LteHandoverTargetTestCase, CommandLineBooleanTestCase, FiveIntegersTestCase, TimeWithSignTestCase, FiveIntegersAverageTestCase, Udp6SocketLoopbackTest, LteRlcAmTransmitterConcatenationTestCase, DsdvTableTestCase, LteRlcUmTransmitterConcatenationTestCase, WaypointLazyNotifyTrue, ns3::TcpScalableDecrementTest, LteStrictFrTestCase, ns3::aodv::TypeHeaderTest, ns3::TcpOptionTSTestCase, Ns3WimaxManagementConnectionsTestCase, LteCellSelectionTestCase, TimerTemplateTestCase, LteUplinkClosedLoopPowerControlAccumulatedModeTestCase, FqCoDelQueueDiscIPFlowsSeparationAndPacketLimit, Ns3TcpInteroperabilityTestCase, BuildingsHelperOneTestCase, LteEarfcnUlTestCase, BriteTopologyFunctionTestCase, ns3::RlcAmStatusPduTestCase, DsrRreqHeaderTest, RrcHeaderTestCase, Ipv4FragmentationTest, Ipv6ListRoutingPositiveTestCase, LteRlcAmTransmitterSegmentationTestCase, LteRlcUmTransmitterSegmentationTestCase, LteEpcE2eDataTestCase, WriteModeCreateTestCase, HwmpRtableTest, ns3::TcpVenoTest, LteDownlinkPowerControlRrcConnectionReconfigurationTestCase, LteUplinkClosedLoopPowerControlAbsoluteModeTestCase, Ipv4PacketInfoTagTest, TestOptionWithoutAlignment, ns3::TcpHighSpeedDecrementTest, TracedCallbackTypedefTestCase, CoDelQueueDiscBasicEnqueueDequeue, Ipv4HeaderTest, Ipv4ListRoutingPositiveTestCase, ns3::olsr::TcRegressionTest, LteX2HandoverMeasuresTestCase, BasicAddTestCase, WifiTest, Ipv6PacketInfoTagTest, LteHardFrTestCase, OcbWifiMacTestCase, AddressAllocatorTestCase, Ipv4ForwardingTest, EpcS1uDlTestCase, LteNoisePsdTestCase, LteFadingSystemTestCase, LteUplinkOpenLoopPowerControlTestCase, ProbeTestCase1, TwoVectorsConstructorTestCase, Bug772ChainTest, LteRlcAmTransmitterOneSduTestCase, SequenceNumberTestCase, Ns3TcpStateTestCase, RadiansToDegreesTestCase, AddressAllocatorHelperTestCase, LteRlcUmTransmitterOneSduTestCase, HwmpReactiveRegressionTest, SpectrumIdealPhyTestCase, AddressAllocator6TestCase, Ns3TcpLossTestCase, LteUplinkSrsSinrTestCase, HwmpSimplestRegressionTest, ErrorModelSimple, HwmpDoRfRegressionTest, LteCqiGenerationDlPowerControlTestCase, LteEarfcnDlTestCase, RandomRoomPositionAllocatorTestCase, LenaDlCtrlPhyErrorModelTestCase, EpcTftClassifierTestCase, LteHandoverDelayTestCase, ns3::aodv::LoopbackTestCase, LteDownlinkPowerControlTestCase, LenaFdTbfqFfMacSchedulerTestCase2, LenaPssFfMacSchedulerTestCase2, LenaTdTbfqFfMacSchedulerTestCase2, LteUeMeasurementsTestCase, PacketBufferingCaseA, RandCartAroundGeoTestCase, UdpSocketLoopbackTest, LenaCqaFfMacSchedulerTestCase2, LenaFdBetFfMacSchedulerTestCase2, LenaTdBetFfMacSchedulerTestCase2, DcfManagerTest, TcpTestCase, LenaPfFfMacSchedulerTestCase2, Ipv4RawSocketImplTest, Ipv6ListRoutingNegativeTestCase, Ipv6RawSocketImplTest, LteDownlinkCtrlSinrTestCase, LteInterferenceStrictFrTestCase, PieQueueDiscTestCase, RedQueueDiscTestCase, ThreadedSimulatorEventsTestCase, DsrFsHeaderTest, LrWpanErrorModelTestCase, HwmpProactiveRegressionTest, FlameRtableTest, SixlowpanFragmentationTest, LteX2HandoverTestCase, FlameRegressionTest, LteRrcConnectionEstablishmentTestCase, ns3::olsr::HelloRegressionTest, CsmaBridgeTestCase, RngUniformTestCase, Ipv4RipTest, DualStackTestCase, PeerManagementProtocolRegressionTest, WifiInterferenceTestCase, Ipv6RipngTest, Ipv4ListRoutingNegativeTestCase, DsdvHeaderTestCase, LteUplinkPowerControlTestCase, LteEnbAntennaTestCase, NscTcpLossTestCase1, PtrTestCase, Ipv6ForwardingTest, ns3::TcpEndPointBug2211Test, LteDownlinkPowerControlSpectrumValueTestCase, LteRlcAmTransmitterTestCase, TimerStateTestCase, LrWpanCcaTestCase, LteFadingTestCase, LteFrTestCase, LtePathlossModelSystemTestCase, LteRlcUmTransmitterTestCase, OlsrMidTestCase, TvHelperDistributionTestCase, Ns3TcpSocketTestCase1, Ipv6L3ProtocolTestCase, ns3::TcpIllinoisTest, LteInterferenceTestCase, LteRlcAmE2eTestCase, TvSpectrumTransmitterTestCase, Ns3TcpNoDelayTestCase, SpectrumWifiPhyBasicTest, Ipv4StaticRoutingSlash32TestCase, ns3::TcpVegasTest, ns3::TcpYeahIncrementTest, WifiAcMappingTest, UdpClientServerTestCase, Ipv4L3ProtocolTestCase, MobilityTraceTestCase, AbstractAnimationInterfaceTestCase, AcousticModemEnergyTestCase, UniqueTypeIdTestCase, LrWpanErrorDistanceTestCase, LteLinkAdaptationTestCase, LteUplinkDataSinrTestCase, LrWpanAckTestCase, LenaFdBetFfMacSchedulerTestCase1, LenaFdMtFfMacSchedulerTestCase, LenaFdTbfqFfMacSchedulerTestCase1, LenaPssFfMacSchedulerTestCase1, LenaTdBetFfMacSchedulerTestCase1, LenaTdMtFfMacSchedulerTestCase, LenaTdTbfqFfMacSchedulerTestCase1, LenaTtaFfMacSchedulerTestCase, OlsrMprTestCase, SixlowpanHc1ImplTest, SixlowpanIphcImplTest, ChannelCoordinationTestCase, PowerRateAdaptationTest, CosineAntennaModelTestCase, ParabolicAntennaModelTestCase, ns3::TcpHtcpIncrementTest, ns3::TcpScalableIncrementTest, EpsGtpuHeaderTestCase, LteCqiGenerationTestCase, LteDownlinkDataSinrTestCase, LenaPfFfMacSchedulerTestCase1, WaypointMobilityModelNotifyTest, FqCoDelQueueDiscNoSuitableFilter, ns3::TcpHeaderGetSetTestCase, LenaCqaFfMacSchedulerTestCase1, LteInterferenceHardFrTestCase, LenaDataPhyErrorModelTestCase, LteRlcUmE2eTestCase, WaypointLazyNotifyFalse, WifiMsduAggregatorThroughputTest, WifiErrorRateModelsTestCaseDsss, BuildingsPathlossTestCase, BuildingsShadowingTestCase, LrWpanEdTestCase, LenaRrFfMacSchedulerTestCase, SwitchFlowTableTestCase, Ns3WimaxSimpleOFDMTestCase, MeshInformationElementVectorBist, PointToPointTest, ns3::aodv::IdCacheTest, HashTestCase, LrWpanCollisionTestCase, LenaHarqTestCase, AmpduAggregationTest, Ns3WimaxSfCreationTestCase, ns3::TcpBicIncrementTest, LteSpectrumModelTestCase, FriisPropagationLossModelTestCase, Ns3WimaxCsParamTlvTestCase, LteEarfcnTestCase, ItuR1411LosPropagationLossModelTestCase, ItuR1411NlosOverRooftopPropagationLossModelTestCase, Kun2600MhzPropagationLossModelTestCase, OkumuraHataPropagationLossModelTestCase, PfifoFastQueueDiscTosPrioritization, Ns3WimaxSchedulingTestCase, Ns3WimaxNetworkEntryTestCase, Ns3WimaxFragmentationTestCase, BasicEnergyHarvesterTestCase, SteadyStateRandomWaypointTest, SpectrumInterferenceTestCase, SpectrumValueTestCase, UanTest, BriteTopologyStructureTestCase, ManyUniformRandomVariablesOneGetValueCallTestCase, OneUniformRandomVariableManyGetValueCallsTestCase, TestEmptyOptionField, ns3::TcpHyblaIncrementTest, LrWpanPacketTestCase, LenaMimoTestCase, PacketSocketAppsTest, OneIntegerAverageTestCase, OneIntegerTestCase, RocketfuelTopologyReaderTest, TxDurationTest, BasicCallbackTestCase, TimeSimpleTestCase, ns3::TcpHighSpeedIncrementTest, PbbTestCase, ns3::olsr::Bug780Test, DegreesToRadiansTestCase, IsotropicAntennaModelTestCase, ns3::TcpOptionWSTestCase, MeshHeaderTest, OneVectorConstructorTestCase, LiIonEnergyTestCase, IpAddressHelperTestCasev6, LrWpanPlmeAndPdInterfaceTestCase, WaveformGeneratorTestCase, EventGarbageCollectorTestCase, GlobalRouteManagerImplTestCase, FlameHeaderTest, ns3::aodv::NeighborTest, GlobalValueTestCase, RttEstimatorTestCase, LrWpanSpectrumValueHelperTestCase, AutoRedQueueDiscTestCase, DsaRequestTestCase, SampleTestCase1, BufferTest, BuildProfileTestCase, SimulatorEventsTestCase, BasicTracedCallbackTestCase, TypeTraitsTestCase, NetworkAllocatorHelperTestCase, OlsrEmfTestCase, HistogramTestCase, NetworkNumber6AllocatorTestCase, WatchdogTestCase, NetworkNumberAllocatorTestCase, DropTailQueueTestCase, Ipv6AddressTestCase1, and ns3::LenaDeactivateBearerTestCase.

Referenced by Run().

+ Here is the caller graph for this function:

void ns3::TestCase::DoSetup ( void  )
privatevirtual
void ns3::TestCase::DoTeardown ( void  )
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 ReadFileTestCase, AlternateFindTestCase, RelativeFindTestCase, FullyQualifiedFindTestCase, StringContextFindTestCase, RecordHeaderTestCase, BasicFindTestCase, FindPathTestCase, RelativeRenameTestCase, FullyQualifiedRenameTestCase, FileHeaderTestCase, StringContextRenameTestCase, LteUeMeasurementsHandoverTestCase, BasicRenameTestCase, ns3::TcpGeneralTest, RelativeAddTestCase, AddressCollisionTestCase, LteUeMeasurementsPiecewiseTestCase2, Ns2MobilityHelperTest, AddressCollision6TestCase, FullyQualifiedAddTestCase, ReadModeCreateTestCase, ns3::TimestampValueTestCase, ExampleAddressGeneratorTestCase, IpAddressHelperTestCasev4, ExampleAddress6GeneratorTestCase, WaypointMobilityModelAddWaypointTest, StringContextAddTestCase, ns3::TcpHeaderWithRFC793OptionTestCase, LteUeMeasurementsPiecewiseTestCase1, NetworkAndAddressTestCase, NetworkAndAddress6TestCase, ResetAllocatorHelperTestCase, LteHandoverTargetTestCase, TimeWithSignTestCase, ns3::TcpOptionTSTestCase, TimerTemplateTestCase, Ns3TcpInteroperabilityTestCase, WriteModeCreateTestCase, BasicAddTestCase, AddressAllocatorTestCase, Ns3TcpStateTestCase, AddressAllocatorHelperTestCase, AddressAllocator6TestCase, Ns3TcpLossTestCase, TcpTestCase, ThreadedSimulatorEventsTestCase, DualStackTestCase, WaypointMobilityModelNotifyTest, ns3::TcpHeaderGetSetTestCase, SteadyStateRandomWaypointTest, TimeSimpleTestCase, ns3::TcpOptionWSTestCase, IpAddressHelperTestCasev6, RttEstimatorTestCase, NetworkAllocatorHelperTestCase, NetworkNumber6AllocatorTestCase, and NetworkNumberAllocatorTestCase.

Definition at line 476 of file test.cc.

References NS_LOG_FUNCTION.

Referenced by Run().

+ Here is the caller graph for this function:

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

Definition at line 369 of file test.cc.

References m_name, and NS_LOG_FUNCTION.

Referenced by PacketTagListTest::AddRemoveTime(), HashTestCase::Check(), ns3::int64x64::test::Int64x64HiLoTestCase::Check(), TimeInputOutputTestCase::Check(), ns3::int64x64::test::Int64x64InputTestCase::Check(), ns3::int64x64::test::Int64x64InputOutputTestCase::Check(), ns3::int64x64::test::Int64x64ArithmeticTestCase::Check(), ns3::int64x64::test::Int64x64Bug455TestCase::Check(), ns3::int64x64::test::Int64x64Bug863TestCase::Check(), ns3::int64x64::test::Int64x64Bug1786TestCase::Check(), ns3::int64x64::test::Int64x64CompareTestCase::Check(), ns3::int64x64::test::Int64x64DoubleTestCase::Check(), ns3::int64x64::test::Int64x64InvertTestCase::CheckCase(), BuildProfileTestCase::DoRun(), LenaMimoTestCase::DoRun(), LenaCqaFfMacSchedulerTestCase1::DoRun(), LteInterferenceHardFrTestCase::DoRun(), LenaFdTbfqFfMacSchedulerTestCase1::DoRun(), LenaPssFfMacSchedulerTestCase1::DoRun(), LenaTdTbfqFfMacSchedulerTestCase1::DoRun(), UniqueTypeIdTestCase::DoRun(), LteInterferenceTestCase::DoRun(), LteFadingTestCase::DoRun(), LteRrcConnectionEstablishmentTestCase::DoRun(), LteInterferenceStrictFrTestCase::DoRun(), LteUeMeasurementsTestCase::DoRun(), LteEpcE2eDataTestCase::DoRun(), LteCellSelectionTestCase::DoRun(), LteHandoverTargetTestCase::DoRun(), DefaultHashTestCase::DoRun(), ns3::int64x64::test::Int64x64HiLoTestCase::DoRun(), CollisionTestCase::DoRun(), LteUeMeasurementsPiecewiseTestCase1::DoRun(), TimeInputOutputTestCase::DoRun(), ns3::int64x64::test::Int64x64InputTestCase::DoRun(), LteUeMeasurementsPiecewiseTestCase2::DoRun(), ns3::int64x64::test::Int64x64InputOutputTestCase::DoRun(), DeprecatedAttributeTestCase::DoRun(), IncrementalTestCase::DoRun(), LookupTimeTestCase::DoRun(), LteUeMeasurementsHandoverTestCase::DoRun(), ns3::int64x64::test::Int64x64ArithmeticTestCase::DoRun(), ns3::int64x64::test::Int64x64Bug455TestCase::DoRun(), LteRrcConnectionEstablishmentErrorTestCase::DoRun(), ns3::int64x64::test::Int64x64Bug863TestCase::DoRun(), PacketTagListTest::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(), ns3::TestRunnerImpl::FilterTests(), LteCellSelectionTestCase::LteCellSelectionTestCase(), LteRrcConnectionEstablishmentErrorTestCase::LteRrcConnectionEstablishmentErrorTestCase(), LteRrcConnectionEstablishmentTestCase::LteRrcConnectionEstablishmentTestCase(), CommandLineTestCaseBase::Parse(), ns3::TestRunnerImpl::PrintReport(), ns3::TestRunnerImpl::PrintTestNameList(), PacketTagListTest::RemoveTime(), ns3::TestRunnerImpl::Run(), and LteCellSelectionTestCase::~LteCellSelectionTestCase().

TestCase * ns3::TestCase::GetParent ( ) const
protected
bool ns3::TestCase::IsFailed ( void  ) const
private

Check if any tests failed.

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

Definition at line 339 of file test.cc.

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

Referenced by ns3::TestRunnerImpl::PrintReport(), ns3::TestRunnerImpl::Run(), and Run().

+ Here is the caller graph for this function:

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

Check if any tests failed.

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

Definition at line 451 of file test.cc.

References IsStatusSuccess(), and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

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

Check if all tests passed.

Returns
true if the tests have succeeded, false otherwise.

Definition at line 457 of file test.cc.

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

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

+ Here is the caller graph for this function:

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

Check if this run should assert on failure.

Returns
true if we should assert on failure.

Definition at line 398 of file test.cc.

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

+ Here is the call graph for this function:

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

Check if this run should continue on failure.

Returns
true if we should continue on failure.

Definition at line 404 of file test.cc.

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

+ Here is the call graph for this function:

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 381 of file test.cc.

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

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

Actually run this TestCase.

Parameters
[in]runnerThe test runner implementation.

Definition at line 346 of file test.cc.

References ns3::TestCase::Result::clock, DoRun(), DoSetup(), DoTeardown(), ns3::SystemWallClockMs::End(), IsFailed(), m_children, m_result, m_runner, NS_LOG_FUNCTION, Run(), ns3::SystemWallClockMs::Start(), and test().

Referenced by ns3::TestRunnerImpl::Run(), and Run().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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/wscript for each module

Definition at line 464 of file test.cc.

References m_dataDir, and NS_LOG_FUNCTION.

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

+ Here is the caller graph for this function:

Friends And Related Function Documentation

friend class TestRunnerImpl
friend

Definition at line 1274 of file test.h.

Member Data Documentation

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

Vector of my children.

Definition at line 1320 of file test.h.

Referenced by AddTestCase(), ns3::TestRunnerImpl::PrintReport(), Run(), and ~TestCase().

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

My data directory.

Definition at line 1321 of file test.h.

Referenced by CreateDataDirFilename(), and SetDataDir().

enum TestDuration ns3::TestCase::m_duration
private

TestCase duration.

Definition at line 1325 of file test.h.

Referenced by AddTestCase(), and ns3::TestRunnerImpl::FilterTests().

std::string ns3::TestCase::m_name
private
TestCase* ns3::TestCase::m_parent
private

Pointer to my parent TestCase.

Definition at line 1317 of file test.h.

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

struct Result* ns3::TestCase::m_result
private

Results data.

Definition at line 1323 of file test.h.

Referenced by IsFailed(), IsStatusSuccess(), ns3::TestRunnerImpl::PrintReport(), ReportTestFailure(), Run(), and ~TestCase().

TestRunnerImpl* ns3::TestCase::m_runner
private

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