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

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, LteUeMeasurementsHandoverTestCase, FullyQualifiedRenameTestCase, FileHeaderTestCase, StringContextRenameTestCase, ns3::TcpGeneralTest, BasicRenameTestCase, LteUeMeasurementsPiecewiseTestCase2, RelativeAddTestCase, AddressCollisionTestCase, AddressCollision6TestCase, Ns2MobilityHelperTest, TimestampValueTestCase, ExampleAddressGeneratorTestCase, IpAddressHelperTestCasev4, ReadModeCreateTestCase, FullyQualifiedAddTestCase, LteUeMeasurementsPiecewiseTestCase1, ExampleAddress6GeneratorTestCase, WaypointMobilityModelAddWaypointTest, TcpHeaderWithRFC793OptionTestCase, StringContextAddTestCase, NetworkAndAddressTestCase, NetworkAndAddress6TestCase, ResetAllocatorHelperTestCase, TcpOptionTSTestCase, LteHandoverTargetTestCase, TimeWithSignTestCase, TimerTemplateTestCase, Ns3TcpInteroperabilityTestCase, WriteModeCreateTestCase, AddressAllocatorTestCase, AddressAllocatorHelperTestCase, AddressAllocator6TestCase, BasicAddTestCase, TcpTestCase, Ns3TcpStateTestCase, Ns3TcpLossTestCase, DualStackTestCase, ThreadedSimulatorEventsTestCase, TcpHeaderGetSetTestCase, WaypointMobilityModelNotifyTest, TcpOptionWSTestCase, SteadyStateRandomWaypointTest, IpAddressHelperTestCasev6, RttEstimatorTestCase, TcpTxBufferTestCase, TimeSimpleTestCase, TcpRxBufferTestCase, 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(), UniqueTypeIdTestCase::DoRun(), LenaMimoTestCase::DoRun(), LteRrcConnectionEstablishmentTestCase::DoRun(), LenaCqaFfMacSchedulerTestCase1::DoRun(), LteInterferenceHardFrTestCase::DoRun(), LenaPssFfMacSchedulerTestCase1::DoRun(), LenaTdTbfqFfMacSchedulerTestCase1::DoRun(), LenaFdTbfqFfMacSchedulerTestCase1::DoRun(), LteFadingTestCase::DoRun(), LteInterferenceTestCase::DoRun(), LteInterferenceStrictFrTestCase::DoRun(), LteUeMeasurementsTestCase::DoRun(), LteCellSelectionTestCase::DoRun(), DefaultHashTestCase::DoRun(), LteEpcE2eDataTestCase::DoRun(), ns3::int64x64::test::Int64x64HiLoTestCase::DoRun(), LteHandoverTargetTestCase::DoRun(), CollisionTestCase::DoRun(), TimeInputOutputTestCase::DoRun(), ns3::int64x64::test::Int64x64InputTestCase::DoRun(), LteUeMeasurementsPiecewiseTestCase1::DoRun(), ns3::int64x64::test::Int64x64InputOutputTestCase::DoRun(), DeprecatedAttributeTestCase::DoRun(), IncrementalTestCase::DoRun(), LteUeMeasurementsPiecewiseTestCase2::DoRun(), LookupTimeTestCase::DoRun(), ns3::int64x64::test::Int64x64ArithmeticTestCase::DoRun(), LteUeMeasurementsHandoverTestCase::DoRun(), ns3::int64x64::test::Int64x64Bug455TestCase::DoRun(), ns3::int64x64::test::Int64x64Bug863TestCase::DoRun(), LteRrcConnectionEstablishmentErrorTestCase::DoRun(), ns3::int64x64::test::Int64x64Bug1786TestCase::DoRun(), PacketTagListTest::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: