A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ns3::TestCase Class Referenceabstract

encapsulates test code More...

#include <test.h>

Inherited by AbstractAnimationInterfaceTestCase, AcousticModemEnergyDepletionTestCase, AcousticModemEnergyTestCase, AddressAllocator6TestCase, AddressAllocatorHelperTestCase, AddressAllocatorTestCase, AddressCollision6TestCase, AddressCollisionTestCase, AggregateObjectTestCase, AlternateFindTestCase, AttributeTestCase< T >, BasicAddTestCase, BasicCallbackTestCase, BasicEnergyDepletionTest, BasicEnergyUpdateTest, BasicFindTestCase, BasicRandomNumberTestCase, BasicRenameTestCase, BasicTracedCallbackTestCase, BatteryLifetimeTest, BriteTopologyFunctionTestCase, BriteTopologyStructureTestCase, BufferTest, Bug555TestCase, Bug772ChainTest, BuildingsHelperOneTestCase, BuildingsPathlossTestCase, BuildingsShadowingTestCase, BurstErrorModelSimple, CallbackValueTestCase, ChainRegressionTest, CollisionTestCase, CommandLineTestCaseBase, CosineAntennaModelTestCase, CreateObjectTestCase, CsmaBridgeTestCase, CsmaBroadcastTestCase, CsmaMulticastTestCase, CsmaOneSubnetTestCase, CsmaPacketSocketTestCase, CsmaPingTestCase, CsmaRawIpSocketTestCase, CsmaStarTestCase, CtrlBAckResponseHeaderTest, DcfManagerTest, DegreesToRadiansTestCase, DiffTestCase, DropTailQueueTestCase, DsaRequestTestCase, DsdvHeaderTestCase, DsdvTableTestCase, DsrAckHeaderTest, DsrAckReqHeaderTest, DsrCacheEntryTest, DsrFsHeaderTest, DsrRerrHeaderTest, DsrRrepHeaderTest, DsrRreqHeaderTest, DsrRreqTableTest, DsrSendBuffTest, DsrSRHeaderTest, DualStackTestCase, DynamicGlobalRoutingTestCase, EpcS1uDlTestCase, EpcS1uUlTestCase, EpcTftClassifierTestCase, EpsGtpuHeaderTestCase, ErrorModelSimple, EventGarbageCollectorTestCase, ExampleAddress6GeneratorTestCase, ExampleAddressGeneratorTestCase, FileHeaderTestCase, FindPathTestCase, FiveDoublesAverageTestCase, FiveDoublesTestCase, FiveIntegersAverageTestCase, FiveIntegersTestCase, FlameHeaderTest, FlameRegressionTest, FlameRtableTest, FriisPropagationLossModelTestCase, FullyQualifiedAddTestCase, FullyQualifiedFindTestCase, FullyQualifiedRenameTestCase, GlobalRouteManagerImplTestCase, GlobalRoutingSlash32TestCase, GlobalValueTestCase, HashTestCase, HistogramTestCase, HwmpDoRfRegressionTest, HwmpProactiveRegressionTest, HwmpReactiveRegressionTest, HwmpRtableTest, HwmpSimplestRegressionTest, IntegerTraceSourceAttributeTestCase, IntegerTraceSourceTestCase, InterferenceHelperSequenceTest, IpAddressHelperTestCasev4, IpAddressHelperTestCasev6, Ipv4ForwardingTest, Ipv4FragmentationTest, Ipv4HeaderTest, Ipv4L3ProtocolTestCase, Ipv4ListRoutingNegativeTestCase, Ipv4ListRoutingPositiveTestCase, Ipv4PacketInfoTagTest, Ipv4RawSocketImplTest, Ipv6AddressTestCase1, Ipv6ForwardingTest, Ipv6FragmentationTest, Ipv6L3ProtocolTestCase, Ipv6ListRoutingNegativeTestCase, Ipv6ListRoutingPositiveTestCase, Ipv6PacketInfoTagTest, Ipv6RawSocketImplTest, Ipv6RipngCountToInfinityTest, Ipv6RipngSplitHorizonStrategyTest, Ipv6RipngTest, IsotropicAntennaModelTestCase, ItuR1411LosPropagationLossModelTestCase, ItuR1411NlosOverRooftopPropagationLossModelTestCase, Kun2600MhzPropagationLossModelTestCase, LenaCqaFfMacSchedulerTestCase1, LenaCqaFfMacSchedulerTestCase2, LenaDataPhyErrorModelTestCase, LenaDlCtrlPhyErrorModelTestCase, LenaFdBetFfMacSchedulerTestCase1, LenaFdBetFfMacSchedulerTestCase2, LenaFdMtFfMacSchedulerTestCase, LenaFdTbfqFfMacSchedulerTestCase1, LenaFdTbfqFfMacSchedulerTestCase2, LenaHarqTestCase, LenaMimoTestCase, LenaPfFfMacSchedulerTestCase1, LenaPfFfMacSchedulerTestCase2, LenaPssFfMacSchedulerTestCase1, LenaPssFfMacSchedulerTestCase2, LenaRrFfMacSchedulerTestCase, LenaTdBetFfMacSchedulerTestCase1, LenaTdBetFfMacSchedulerTestCase2, LenaTdMtFfMacSchedulerTestCase, LenaTdTbfqFfMacSchedulerTestCase1, LenaTdTbfqFfMacSchedulerTestCase2, LenaTtaFfMacSchedulerTestCase, LiIonEnergyTestCase, LogDistancePropagationLossModelTestCase, LookupTimeTestCase, LrWpanAckTestCase, LrWpanCcaTestCase, LrWpanCollisionTestCase, LrWpanEdTestCase, LrWpanErrorDistanceTestCase, LrWpanErrorModelTestCase, LrWpanPacketTestCase, LrWpanPlmeAndPdInterfaceTestCase, LrWpanSpectrumValueHelperTestCase, LteCellSelectionTestCase, LteDownlinkCtrlSinrTestCase, LteDownlinkDataSinrTestCase, LteEarfcnTestCase, LteEnbAntennaTestCase, LteEpcE2eDataTestCase, LteFadingSystemTestCase, LteFadingTestCase, LteHandoverDelayTestCase, LteHandoverTargetTestCase, LteInterferenceTestCase, LteLinkAdaptationTestCase, LteNoisePsdTestCase, LtePathlossModelSystemTestCase, LteRlcAmE2eTestCase, LteRlcAmTransmitterTestCase, LteRlcUmE2eTestCase, LteRlcUmTransmitterTestCase, LteRrcConnectionEstablishmentTestCase, LteSpectrumModelTestCase, LteTxPsdTestCase, LteUeMeasurementsHandoverTestCase, LteUeMeasurementsPiecewiseTestCase1, LteUeMeasurementsPiecewiseTestCase2, LteUeMeasurementsTestCase, LteUplinkDataSinrTestCase, 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::olsr::Bug780Test, ns3::olsr::HelloRegressionTest, ns3::olsr::TcRegressionTest, 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, PacketTagListTest, PacketTest, ParabolicAntennaModelTestCase, PbbTestCase, PeerLinkFrameStartTest, PeerManagementProtocolRegressionTest, PointerAttributeTestCase, PointToPointTest, ProbeTestCase1, PtrTestCase, QosUtilsIsOldPacketTest, RadiansToDegreesTestCase, RandomNumberSerializationTestCase, 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, RedQueueTestCase, RelativeAddTestCase, RelativeFindTestCase, RelativeRenameTestCase, ResetAllocatorHelperTestCase, RngExponentialTestCase, RngNormalTestCase, RngParetoTestCase, RngUniformTestCase, RocketfuelTopologyReaderTest, RootNamespaceConfigTestCase, RrcHeaderTestCase, RttTestCase, SameRoomPositionAllocatorTestCase, SampleTestCase1, SequenceNumberTestCase, SimulatorEventsTestCase, SimulatorTemplateTestCase, SixlowpanFragmentationTest, SixlowpanHc1ImplTest, SixlowpanIphcImplTest, SpectrumIdealPhyTestCase, SpectrumInterferenceTestCase, SpectrumValueTestCase, StaticRoutingSlash32TestCase, SteadyStateRandomWaypointTest, StringContextAddTestCase, StringContextFindTestCase, StringContextRenameTestCase, SwitchFlowTableTestCase, TcpTestCase, TestEmptyOptionField, TestFulfilledAlignment, TestOptionWithAlignment, TestOptionWithoutAlignment, ThreadedSimulatorEventsTestCase, TimeIntputOutputTestCase, TimerStateTestCase, TimerTemplateTestCase, TimeSimpleTestCase, TimesWithSignsTestCase, TracedCallbackTestCase, TwoRayGroundPropagationLossModelTestCase, TwoVectorsConstructorTestCase, TxDurationTest, TypeTraitsTestCase, UanTest, Udp6SocketImplTest, Udp6SocketLoopbackTest, UdpClientServerTestCase, UdpEchoClientSetFillTestCase, UdpSocketImplTest, UdpSocketLoopbackTest, UdpTraceClientServerTestCase, UnderRootNamespaceConfigTestCase, UniqueTypeIdTestCase, WatchdogTestCase, WaypointInitialPositionIsWaypoint, WaypointLazyNotifyFalse, WaypointLazyNotifyTrue, WaypointMobilityModelNotifyTest, WaypointMobilityModelViaHelper, WifiInterferenceTestCase, WifiMsduAggregatorThroughputTest, WifiTest, and WriteModeCreateTestCase.

+ Collaboration diagram for ns3::TestCase:

Classes

struct  Result
 

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)
 
void AddTestCase (TestCase *testCase) NS_DEPRECATED
 Add an individual child TestCase case to this TestCase. More...
 
void AddTestCase (TestCase *testCase, enum TestDuration duration)
 Add an individual child TestCase to this test suite. More...
 
bool GetErrorStatus (void) const NS_DEPRECATED
 
TestCaseGetParent () const
 
bool IsStatusFailure (void) const
 
bool IsStatusSuccess (void) const
 
void SetDataDir (std::string directory)
 
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
 
bool MustContinueOnFailure (void) const
 
std::string CreateDataDirFilename (std::string filename)
 
std::string CreateTempDirFilename (std::string filename)
 

Private Member Functions

 TestCase (TestCase &tc)
 Private, to block copying. More...
 
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
 
TestCaseoperator= (TestCase &tc)
 Private, to block copying. More...
 
void Run (TestRunnerImpl *runner)
 Actually run this TestCase. More...
 

Private Attributes

std::vector< TestCase * > m_children
 Vector of my children. More...
 
std::string m_dataDir
 My data directory. More...
 
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 929 of file test.h.

Member Enumeration Documentation

How long the test takes to execute.

Enumerator
QUICK 

Fast test.

EXTENSIVE 

Medium length test.

TAKES_FOREVER 

Very long running test.

Definition at line 936 of file test.h.

Constructor & Destructor Documentation

ns3::TestCase::~TestCase ( )
virtual

Destructor.

Definition at line 170 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
Parameters
namethe name of the new TestCase created

Definition at line 159 of file test.cc.

References NS_LOG_FUNCTION.

ns3::TestCase::TestCase ( TestCase tc)
private

Private, to block copying.

Member Function Documentation

void ns3::TestCase::AddTestCase ( TestCase testCase)
protected

Add an individual child TestCase case to this TestCase.

Parameters
testCasePointer to the TestCase object to be added.
Deprecated:
this method will go away in future versions of ns-3. Please use instead AddTestCase (TestCase, TestDuration)

Definition at line 184 of file test.cc.

References QUICK.

Referenced by AnglesTestSuite::AnglesTestSuite(), AnimationInterfaceTestSuite::AnimationInterfaceTestSuite(), ns3::aodv::AodvTestSuite::AodvTestSuite(), Asn1EncodingSuite::Asn1EncodingSuite(), AttributesTestSuite::AttributesTestSuite(), AverageTestSuite::AverageTestSuite(), BasicDataCalculatorsTestSuite::BasicDataCalculatorsTestSuite(), BasicEnergyModelTestSuite::BasicEnergyModelTestSuite(), BasicRandomNumberTestSuite::BasicRandomNumberTestSuite(), BlockAckTestSuite::BlockAckTestSuite(), BriteTestSuite::BriteTestSuite(), BufferTestSuite::BufferTestSuite(), BuildingPositionAllocatorTestSuite::BuildingPositionAllocatorTestSuite(), BuildingsHelperTestSuite::BuildingsHelperTestSuite(), BuildingsPathlossTestSuite::BuildingsPathlossTestSuite(), BuildingsShadowingTestSuite::BuildingsShadowingTestSuite(), CallbackTestSuite::CallbackTestSuite(), 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(), GlobalRouteManagerImplTestSuite::GlobalRouteManagerImplTestSuite(), GlobalRoutingTestSuite::GlobalRoutingTestSuite(), GlobalValueTestSuite::GlobalValueTestSuite(), HashTestSuite::HashTestSuite(), HistogramTestSuite::HistogramTestSuite(), ns3::aodv::IdCacheTestSuite::IdCacheTestSuite(), ns3::int64x64::test::Int64x64TestSuite::Int64x64TestSuite(), Ipv4AddressGeneratorTestSuite::Ipv4AddressGeneratorTestSuite(), Ipv4AddressHelperTestSuite::Ipv4AddressHelperTestSuite(), Ipv4ForwardingTestSuite::Ipv4ForwardingTestSuite(), Ipv4FragmentationTestSuite::Ipv4FragmentationTestSuite(), Ipv4HeaderTestSuite::Ipv4HeaderTestSuite(), IPv4L3ProtocolTestSuite::IPv4L3ProtocolTestSuite(), Ipv4ListRoutingTestSuite::Ipv4ListRoutingTestSuite(), Ipv4PacketInfoTagTestSuite::Ipv4PacketInfoTagTestSuite(), Ipv4RawTestSuite::Ipv4RawTestSuite(), 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(), 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(), LteDownlinkSinrTestSuite::LteDownlinkSinrTestSuite(), LteEarfcnTestSuite::LteEarfcnTestSuite(), LteEpcE2eDataTestSuite::LteEpcE2eDataTestSuite(), LteFadingTestSuite::LteFadingTestSuite(), LteHandoverTargetTestSuite::LteHandoverTargetTestSuite(), LteInterferenceTestSuite::LteInterferenceTestSuite(), LteLinkAdaptationTestSuite::LteLinkAdaptationTestSuite(), LtePathlossModelTestSuite::LtePathlossModelTestSuite(), LteRlcAmE2eTestSuite::LteRlcAmE2eTestSuite(), LteRlcAmTransmitterTestSuite::LteRlcAmTransmitterTestSuite(), LteRlcUmE2eTestSuite::LteRlcUmE2eTestSuite(), LteRlcUmTransmitterTestSuite::LteRlcUmTransmitterTestSuite(), LteRrcTestSuite::LteRrcTestSuite(), LteSpectrumValueHelperTestSuite::LteSpectrumValueHelperTestSuite(), LteUeMeasurementsHandoverTestSuite::LteUeMeasurementsHandoverTestSuite(), LteUeMeasurementsPiecewiseTestSuite1::LteUeMeasurementsPiecewiseTestSuite1(), LteUeMeasurementsPiecewiseTestSuite2::LteUeMeasurementsPiecewiseTestSuite2(), LteUeMeasurementsTestSuite::LteUeMeasurementsTestSuite(), 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(), PacketTestSuite::PacketTestSuite(), ParabolicAntennaModelTestSuite::ParabolicAntennaModelTestSuite(), PbbTestSuite::PbbTestSuite(), PcapFileTestSuite::PcapFileTestSuite(), PointToPointTestSuite::PointToPointTestSuite(), ProbeTestSuite::ProbeTestSuite(), PropagationLossModelsTestSuite::PropagationLossModelsTestSuite(), PtrTestSuite::PtrTestSuite(), RandomVariableStreamTestSuite::RandomVariableStreamTestSuite(), RedQueueTestSuite::RedQueueTestSuite(), RngTestSuite::RngTestSuite(), RocketfuelTopologyReaderTestSuite::RocketfuelTopologyReaderTestSuite(), RttTestSuite::RttTestSuite(), RvBatteryModelTestSuite::RvBatteryModelTestSuite(), SampleTestSuite::SampleTestSuite(), SequenceNumberTestSuite::SequenceNumberTestSuite(), SimulatorTestSuite::SimulatorTestSuite(), SixlowpanFragmentationTestSuite::SixlowpanFragmentationTestSuite(), SixlowpanHc1TestSuite::SixlowpanHc1TestSuite(), SixlowpanIphcTestSuite::SixlowpanIphcTestSuite(), SpectrumConverterTestSuite::SpectrumConverterTestSuite(), SpectrumIdealPhyTestSuite::SpectrumIdealPhyTestSuite(), SpectrumInterferenceTestSuite::SpectrumInterferenceTestSuite(), SpectrumValueTestSuite::SpectrumValueTestSuite(), StaticRoutingTestSuite::StaticRoutingTestSuite(), SwitchTestSuite::SwitchTestSuite(), TcpTestSuite::TcpTestSuite(), ThreadedSimulatorTestSuite::ThreadedSimulatorTestSuite(), TimerTestSuite::TimerTestSuite(), TimeTestSuite::TimeTestSuite(), TracedCallbackTestSuite::TracedCallbackTestSuite(), TxDurationTestSuite::TxDurationTestSuite(), TypeIdPerformanceSuite::TypeIdPerformanceSuite(), TypeIdTestSuite::TypeIdTestSuite(), TypeTraitsTestSuite::TypeTraitsTestSuite(), UanEnergyModelTestSuite::UanEnergyModelTestSuite(), UanTestSuite::UanTestSuite(), UdpClientServerTestSuite::UdpClientServerTestSuite(), UdpTestSuite::UdpTestSuite(), WatchdogTestSuite::WatchdogTestSuite(), WifiInterferenceTestSuite::WifiInterferenceTestSuite(), WifiMsduAggregatorTestSuite::WifiMsduAggregatorTestSuite(), and WifiTestSuite::WifiTestSuite().

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

Add an individual child TestCase to this test suite.

Parameters
testCasePointer to the TestCase object to be added.
durationAmount of time this test takes to execute.

Definition at line 190 of file test.cc.

References current, m_children, m_duration, m_name, m_parent, NS_FATAL_ERROR, and NS_LOG_FUNCTION.

std::string ns3::TestCase::CreateDataDirFilename ( std::string  filename)
protected
Parameters
filenamethe bare (no path) file name
Returns
the full path to filename in the data directory

Definition at line 295 of file test.cc.

References ns3::SystemPath::Append(), current, 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(), and Ns3TcpLossTestCase::DoSetup().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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, CallbackValueTestCase, RandomVariableStreamWeibullTestCase, PointerAttributeTestCase, ns3::int64x64::test::Int64x64ImplTestCase, ns3::TestSuite, TracedCallbackTestCase, DiffTestCase, RandomVariableStreamParetoAntitheticTestCase, IntegerTraceSourceTestCase, ReadFileTestCase, ns3::int64x64::test::Int64x64DoubleTestCase, IntegerTraceSourceAttributeTestCase, RandomVariableStreamParetoTestCase, MeasurementReportTestCase, CsmaStarTestCase, AlternateFindTestCase, ObjectMapAttributeTestCase, RrcConnectionRejectTestCase, ns3::int64x64::test::Int64x64InvertTestCase, RelativeFindTestCase, RrcConnectionReestablishmentCompleteTestCase, CsmaRawIpSocketTestCase, ObjectVectorAttributeTestCase, RandomVariableStreamExponentialAntitheticTestCase, RrcConnectionReestablishmentTestCase, FullyQualifiedFindTestCase, RandomVariableStreamAttributeTestCase, ns3::int64x64::test::Int64x64CompareTestCase, RrcConnectionReestablishmentRequestTestCase, StringContextFindTestCase, CsmaPingTestCase, RandomVariableStreamExponentialTestCase, RecordHeaderTestCase, AttributeTestCase< T >, HandoverPreparationInfoTestCase, BasicFindTestCase, AttributeTestCase< T >, AttributeTestCase< T >, ns3::int64x64::test::Int64x64Bug1786TestCase, MakeCallbackTemplatesTestCase, FindPathTestCase, CsmaPacketSocketTestCase, RandomVariableStreamNormalAntitheticTestCase, NullifyCallbackTestCase, ns3::int64x64::test::Int64x64Bug863TestCase, RelativeRenameTestCase, AttributeTestCase< T >, DsrRreqTableTest, ObjectVectorTraceConfigTestCase, ns3::aodv::AodvRtableTest, Ipv6RipngSplitHorizonStrategyTest, PacketTagListTest, ns3::int64x64::test::Int64x64Bug455TestCase, FullyQualifiedRenameTestCase, CsmaOneSubnetTestCase, RrcConnectionReconfigurationTestCase, FileHeaderTestCase, RandomVariableStreamNormalTestCase, RangePropagationLossModelTestCase, AttributeTestCase< T >, Udp6SocketImplTest, ns3::aodv::AodvRtableEntryTest, DsrSendBuffTest, StringContextRenameTestCase, RrcConnectionReconfigurationCompleteTestCase, Ns3TcpCwndTestCase2, Bug555TestCase, MatrixPropagationLossModelTestCase, ObjectFactoryTestCase, RandomVariableStreamSequentialTestCase, LteUeMeasurementsHandoverTestCase, RrcConnectionSetupCompleteTestCase, DsrCacheEntryTest, RngParetoTestCase, BasicRenameTestCase, AttributeTestCase< T >, IncrementalTestCase, ObjectVectorConfigTestCase, ns3::int64x64::test::Int64x64ArithmeticTestCase, DsrAckHeaderTest, ns3::aodv::AodvRqueueTest, RandomVariableStreamConstantTestCase, MakeBoundCallbackTestCase, RrcConnectionSetupTestCase, Hash64FunctionPtrTestCase, GlobalRoutingSlash32TestCase, WaypointMobilityModelViaHelper, CsmaMulticastTestCase, AttributeTestCase< T >, EpcS1uUlTestCase, LogDistancePropagationLossModelTestCase, UdpEchoClientSetFillTestCase, RelativeAddTestCase, Ipv6RipngCountToInfinityTest, ns3::aodv::QueueEntryTest, DsrAckReqHeaderTest, Hash32FunctionPtrTestCase, PacketMetadataTest, OlsrHnaTestCase, RrcConnectionRequestTestCase, AddressCollisionTestCase, Ns2MobilityHelperTest, RngExponentialTestCase, ns3::aodv::RerrHeaderTest, LteUeMeasurementsPiecewiseTestCase2, ns3::int64x64::test::Int64x64InputOutputTestCase, DsrRerrHeaderTest, PacketTest, InterferenceHelperSequenceTest, CtrlBAckResponseHeaderTest, BasicEnergyDepletionTest, OlsrTcTestCase, ns3::aodv::RrepAckHeaderTest, PeerLinkFrameStartTest, AddressCollision6TestCase, CommandLineStringTestCase, UnderRootNamespaceConfigTestCase, ReadModeCreateTestCase, FullyQualifiedAddTestCase, LookupTimeTestCase, AcousticModemEnergyDepletionTestCase, UdpSocketImplTest, PacketLossCounterTestCase, QosUtilsIsOldPacketTest, ExampleAddressGeneratorTestCase, TestFulfilledAlignment, IpAddressHelperTestCasev4, ChainRegressionTest, Murmur3TestCase, RandomVariableStreamUniformAntitheticTestCase, FiveDoublesTestCase, Ns3TcpCwndTestCase1, DsrSRHeaderTest, SimulatorTemplateTestCase, FiveDoublesAverageTestCase, CommandLineUnsignedIntTestCase, AggregateObjectTestCase, ns3::aodv::RrepHeaderTest, MakeCallbackTestCase, Ns3WimaxSFTypeTestCase, TimeIntputOutputTestCase, ExampleAddress6GeneratorTestCase, CsmaBroadcastTestCase, NscTcpLossTestCase2, WaypointInitialPositionIsWaypoint, Ns3TcpSocketTestCase2, OlsrHelloTestCase, ns3::int64x64::test::Int64x64InputTestCase, Fnv1aTestCase, SameRoomPositionAllocatorTestCase, Udp6SocketLoopbackTest, BurstErrorModelSimple, RootNamespaceConfigTestCase, PacketBufferingCaseB, Ns3WimaxSfTlvTestCase, TestOptionWithAlignment, TwoRayGroundPropagationLossModelTestCase, RngNormalTestCase, DsrRrepHeaderTest, CommandLineIntTestCase, StringContextAddTestCase, Ns3WimaxSNRtoBLERTestCase, LteUeMeasurementsPiecewiseTestCase1, Ipv6FragmentationTest, NetworkAndAddressTestCase, UdpTraceClientServerTestCase, ns3::aodv::RreqHeaderTest, NetworkAndAddress6TestCase, CollisionTestCase, ResetAllocatorHelperTestCase, LteRlcAmTransmitterReportBufferStatusTestCase, LteRlcUmTransmitterReportBufferStatusTestCase, DefaultHashTestCase, LteTxPsdTestCase, LteHandoverTargetTestCase, Ipv4FragmentationTest, Ns3WimaxManagementConnectionsTestCase, FiveIntegersTestCase, CreateObjectTestCase, TimesWithSignsTestCase, UdpSocketLoopbackTest, FiveIntegersAverageTestCase, LteRlcAmTransmitterConcatenationTestCase, DsdvTableTestCase, LteRlcUmTransmitterConcatenationTestCase, WaypointLazyNotifyTrue, RandomNumberSerializationTestCase, ns3::aodv::TypeHeaderTest, LteCellSelectionTestCase, TimerTemplateTestCase, BuildingsHelperOneTestCase, SixlowpanFragmentationTest, LteEarfcnUlTestCase, BriteTopologyFunctionTestCase, DsrRreqHeaderTest, RrcHeaderTestCase, LteEpcE2eDataTestCase, Ipv6ListRoutingPositiveTestCase, LteRlcAmTransmitterSegmentationTestCase, LteRlcUmTransmitterSegmentationTestCase, WriteModeCreateTestCase, ns3::olsr::TcRegressionTest, CommandLineBooleanTestCase, HwmpRtableTest, Ns3TcpInteroperabilityTestCase, TestOptionWithoutAlignment, Ipv4ListRoutingPositiveTestCase, LteX2HandoverMeasuresTestCase, ns3::int64x64::test::Int64x64HiLoTestCase, Ipv4RawSocketImplTest, Ipv4PacketInfoTagTest, WifiTest, Ipv4HeaderTest, EpcS1uDlTestCase, OcbWifiMacTestCase, AddressAllocatorTestCase, LteNoisePsdTestCase, Ipv6RawSocketImplTest, LteFadingSystemTestCase, TwoVectorsConstructorTestCase, LteRlcAmTransmitterOneSduTestCase, SixlowpanHc1ImplTest, SixlowpanIphcImplTest, SpectrumIdealPhyTestCase, RadiansToDegreesTestCase, AddressAllocatorHelperTestCase, LteRlcUmTransmitterOneSduTestCase, HwmpReactiveRegressionTest, SequenceNumberTestCase, AddressAllocator6TestCase, Ipv6PacketInfoTagTest, RandomVariableStreamUniformTestCase, Ipv4ForwardingTest, Ipv6ForwardingTest, HwmpSimplestRegressionTest, ErrorModelSimple, Bug772ChainTest, BasicAddTestCase, HwmpDoRfRegressionTest, RandomRoomPositionAllocatorTestCase, LteEarfcnDlTestCase, LteHandoverDelayTestCase, LenaDlCtrlPhyErrorModelTestCase, EpcTftClassifierTestCase, ProbeTestCase1, LenaFdTbfqFfMacSchedulerTestCase2, LenaPssFfMacSchedulerTestCase2, LenaTdTbfqFfMacSchedulerTestCase2, LteUeMeasurementsTestCase, LenaCqaFfMacSchedulerTestCase2, LenaFdBetFfMacSchedulerTestCase2, LenaTdBetFfMacSchedulerTestCase2, LteUplinkSrsSinrTestCase, PacketBufferingCaseA, TcpTestCase, LenaPfFfMacSchedulerTestCase2, Ns3TcpLossTestCase, Ns3TcpStateTestCase, Ipv6ListRoutingNegativeTestCase, ns3::olsr::HelloRegressionTest, BatteryLifetimeTest, LteDownlinkCtrlSinrTestCase, ThreadedSimulatorEventsTestCase, DsrFsHeaderTest, LrWpanErrorModelTestCase, HwmpProactiveRegressionTest, FlameRtableTest, Ipv6RipngTest, LteX2HandoverTestCase, FlameRegressionTest, DcfManagerTest, CsmaBridgeTestCase, DualStackTestCase, PeerManagementProtocolRegressionTest, WifiInterferenceTestCase, RngUniformTestCase, Ipv4ListRoutingNegativeTestCase, Ns3WimaxSimpleOFDMTestCase, DsdvHeaderTestCase, LteEnbAntennaTestCase, DynamicGlobalRoutingTestCase, NscTcpLossTestCase1, PtrTestCase, LteRlcAmTransmitterTestCase, Ns3WimaxNetworkEntryTestCase, TimerStateTestCase, LrWpanCcaTestCase, LteFadingTestCase, LtePathlossModelSystemTestCase, LteRlcUmTransmitterTestCase, Ns3TcpSocketTestCase1, Ns3WimaxFragmentationTestCase, Ns3WimaxSfCreationTestCase, Ns3WimaxCsParamTlvTestCase, Ipv6L3ProtocolTestCase, LteInterferenceTestCase, Ns3TcpNoDelayTestCase, BasicEnergyUpdateTest, OlsrMidTestCase, DsaRequestTestCase, UdpClientServerTestCase, Ipv4L3ProtocolTestCase, MobilityTraceTestCase, AbstractAnimationInterfaceTestCase, AcousticModemEnergyTestCase, LrWpanErrorDistanceTestCase, LteLinkAdaptationTestCase, LteUplinkDataSinrTestCase, StaticRoutingSlash32TestCase, LrWpanAckTestCase, LenaFdBetFfMacSchedulerTestCase1, LenaFdMtFfMacSchedulerTestCase, LenaFdTbfqFfMacSchedulerTestCase1, LenaPssFfMacSchedulerTestCase1, LenaTdBetFfMacSchedulerTestCase1, LenaTdMtFfMacSchedulerTestCase, LenaTdTbfqFfMacSchedulerTestCase1, LenaTtaFfMacSchedulerTestCase, WifiMsduAggregatorThroughputTest, CosineAntennaModelTestCase, ParabolicAntennaModelTestCase, EpsGtpuHeaderTestCase, LteDownlinkDataSinrTestCase, LenaPfFfMacSchedulerTestCase1, WaypointMobilityModelNotifyTest, OlsrMprTestCase, Ns3WimaxSchedulingTestCase, LenaCqaFfMacSchedulerTestCase1, LenaDataPhyErrorModelTestCase, LteRlcAmE2eTestCase, LteRlcUmE2eTestCase, LteRrcConnectionEstablishmentTestCase, WaypointLazyNotifyFalse, BuildingsPathlossTestCase, BuildingsShadowingTestCase, LrWpanEdTestCase, LenaRrFfMacSchedulerTestCase, SwitchFlowTableTestCase, UniqueTypeIdTestCase, MeshInformationElementVectorBist, ns3::olsr::Bug780Test, HashTestCase, LrWpanCollisionTestCase, LenaHarqTestCase, ns3::aodv::IdCacheTest, LteSpectrumModelTestCase, ItuR1411LosPropagationLossModelTestCase, ItuR1411NlosOverRooftopPropagationLossModelTestCase, Kun2600MhzPropagationLossModelTestCase, OkumuraHataPropagationLossModelTestCase, FriisPropagationLossModelTestCase, LteEarfcnTestCase, SpectrumInterferenceTestCase, SpectrumValueTestCase, BasicRandomNumberTestCase, SteadyStateRandomWaypointTest, UanTest, BriteTopologyStructureTestCase, ManyUniformRandomVariablesOneGetValueCallTestCase, OneUniformRandomVariableManyGetValueCallsTestCase, TestEmptyOptionField, LrWpanPacketTestCase, LenaMimoTestCase, OneIntegerAverageTestCase, OneIntegerTestCase, RocketfuelTopologyReaderTest, BasicCallbackTestCase, TimeSimpleTestCase, PbbTestCase, DegreesToRadiansTestCase, IsotropicAntennaModelTestCase, ns3::aodv::LoopbackTestCase, MeshHeaderTest, OneVectorConstructorTestCase, LiIonEnergyTestCase, IpAddressHelperTestCasev6, LrWpanPlmeAndPdInterfaceTestCase, EventGarbageCollectorTestCase, GlobalRouteManagerImplTestCase, FlameHeaderTest, TxDurationTest, ns3::aodv::NeighborTest, GlobalValueTestCase, RttTestCase, LrWpanSpectrumValueHelperTestCase, RedQueueTestCase, SimulatorEventsTestCase, BasicTracedCallbackTestCase, TypeTraitsTestCase, NetworkAllocatorHelperTestCase, HistogramTestCase, NetworkNumber6AllocatorTestCase, OlsrEmfTestCase, WatchdogTestCase, NetworkNumberAllocatorTestCase, DropTailQueueTestCase, Ipv6AddressTestCase1, SampleTestCase1, BufferTest, and PointToPointTest.

Referenced by Run().

+ Here is the caller graph for this function:

void ns3::TestCase::DoSetup ( void  )
privatevirtual

Implementation to do any local setup required for this TestCase.

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

Reimplemented in ReadFileTestCase, RecordHeaderTestCase, NullifyCallbackTestCase, FileHeaderTestCase, MakeBoundCallbackTestCase, Ns2MobilityHelperTest, ReadModeCreateTestCase, LookupTimeTestCase, MakeCallbackTestCase, TimesWithSignsTestCase, WriteModeCreateTestCase, Ns3TcpInteroperabilityTestCase, Ns3TcpLossTestCase, Ns3TcpStateTestCase, ThreadedSimulatorEventsTestCase, BasicCallbackTestCase, and TimeSimpleTestCase.

Definition at line 361 of file test.cc.

References NS_LOG_FUNCTION.

Referenced by Run().

+ Here is the caller graph for this function:

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, RelativeAddTestCase, AddressCollisionTestCase, LteUeMeasurementsPiecewiseTestCase2, Ns2MobilityHelperTest, AddressCollision6TestCase, ReadModeCreateTestCase, FullyQualifiedAddTestCase, ExampleAddressGeneratorTestCase, IpAddressHelperTestCasev4, ExampleAddress6GeneratorTestCase, StringContextAddTestCase, LteUeMeasurementsPiecewiseTestCase1, NetworkAndAddressTestCase, NetworkAndAddress6TestCase, ResetAllocatorHelperTestCase, LteHandoverTargetTestCase, TimesWithSignsTestCase, TimerTemplateTestCase, WriteModeCreateTestCase, Ns3TcpInteroperabilityTestCase, AddressAllocatorTestCase, AddressAllocatorHelperTestCase, AddressAllocator6TestCase, BasicAddTestCase, TcpTestCase, Ns3TcpLossTestCase, Ns3TcpStateTestCase, ThreadedSimulatorEventsTestCase, DualStackTestCase, WaypointMobilityModelNotifyTest, SteadyStateRandomWaypointTest, TimeSimpleTestCase, IpAddressHelperTestCasev6, RttTestCase, NetworkAllocatorHelperTestCase, NetworkNumber6AllocatorTestCase, and NetworkNumberAllocatorTestCase.

Definition at line 366 of file test.cc.

References NS_LOG_FUNCTION.

Referenced by Run().

+ Here is the caller graph for this function:

bool ns3::TestCase::GetErrorStatus ( void  ) const
protected
Deprecated:
This method is deprecated. IsStatusFailure replaces it.

Definition at line 335 of file test.cc.

References IsStatusFailure(), and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

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

Definition at line 253 of file test.cc.

References m_name, and NS_LOG_FUNCTION.

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

bool ns3::TestCase::IsFailed ( void  ) const
private
Returns
the failure status of this TestCase and all it's children

Definition at line 223 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
Returns
true if the tests have failed, false otherwise.

Definition at line 341 of file test.cc.

References IsStatusSuccess(), and NS_LOG_FUNCTION.

Referenced by GetErrorStatus().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ns3::TestCase::IsStatusSuccess ( void  ) const
protected
Returns
true if the tests have succeeded, false otherwise.

Definition at line 347 of file test.cc.

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

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

+ Here is the caller graph for this function:

bool ns3::TestCase::MustAssertOnFailure ( void  ) const
protected
Returns
should we assert on failure, per the TestSuite configuration

Definition at line 282 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
Returns
should we continue on failure, per the TestSuite configuration

Definition at line 288 of file test.cc.

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

+ Here is the call graph for this function:

TestCase& ns3::TestCase::operator= ( TestCase tc)
private

Private, to block copying.

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.

Internal:
The methods below are used only by test macros and should not be used by normal users.

Definition at line 265 of file test.cc.

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

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

Actually run this TestCase.

Parameters
runnerThe test runner implementation.

Definition at line 230 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
Parameters
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 354 of file test.cc.

References m_dataDir, and NS_LOG_FUNCTION.

Referenced by MobilityTraceTestCase::DoRun(), Ns3TcpLossTestSuite::Ns3TcpLossTestSuite(), and PcapFileTestSuite::PcapFileTestSuite().

+ Here is the caller graph for this function:

Friends And Related Function Documentation

friend class TestRunnerImpl
friend

Definition at line 1043 of file test.h.

Member Data Documentation

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

Vector of my children.

Definition at line 1092 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 1093 of file test.h.

Referenced by CreateDataDirFilename(), and SetDataDir().

enum TestDuration ns3::TestCase::m_duration
private

TestCase duration.

Definition at line 1097 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 1089 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 1095 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: