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

A suite of tests to run. More...

#include <test.h>

Inherits ns3::TestCase.

Inherited by AnglesTestSuite, AnimationInterfaceTestSuite, AodvRegressionTestSuite, Asn1EncodingSuite, AttributesTestSuite, AverageTestSuite, BasicDataCalculatorsTestSuite, BasicEnergyModelTestSuite, BasicRandomNumberTestSuite, BlockAckTestSuite, BriteTestSuite, BufferTestSuite, BuildingPositionAllocatorTestSuite, BuildingsHelperTestSuite, BuildingsPathlossTestSuite, BuildingsShadowingTestSuite, CallbackTestSuite, CommandLineTestSuite, ConfigTestSuite, CosineAntennaModelTestSuite, CsmaSystemTestSuite, DcfTestSuite, DegreesRadiansTestSuite, Dot11sRegressionSuite, Dot11sTestSuite, DropTailQueueTestSuite, DsdvTestSuite, DsrTestSuite, EpcS1uDlTestSuite, EpcS1uUlTestSuite, EpcTftClassifierTestSuite, EpsGtpuTestSuite, ErrorModelTestSuite, EventGarbageCollectorTestSuite, FlameRegressionSuite, FlameTestSuite, GlobalRouteManagerImplTestSuite, GlobalRoutingTestSuite, GlobalValueTestSuite, HashTestSuite, HistogramTestSuite, Ipv4AddressGeneratorTestSuite, Ipv4AddressHelperTestSuite, Ipv4ForwardingTestSuite, Ipv4FragmentationTestSuite, Ipv4HeaderTestSuite, IPv4L3ProtocolTestSuite, Ipv4ListRoutingTestSuite, Ipv4PacketInfoTagTestSuite, Ipv4RawTestSuite, Ipv6AddressGeneratorTestSuite, Ipv6AddressHelperTestSuite, Ipv6AddressTestSuite, Ipv6DualStackTestSuite, Ipv6ExtensionHeaderTestSuite, Ipv6ForwardingTestSuite, Ipv6FragmentationTestSuite, IPv6L3ProtocolTestSuite, Ipv6ListRoutingTestSuite, Ipv6PacketInfoTagTestSuite, Ipv6RawTestSuite, Ipv6RipngTestSuite, IsotropicAntennaModelTestSuite, ItuR1411LosPropagationLossModelTestSuite, ItuR1411NlosOverRooftopPropagationLossModelTestSuite, Kun2600MhzPropagationLossModelTestSuite, LenaTestCqaFfMacSchedulerSuite, LenaTestFdBetFfMacSchedulerSuite, LenaTestFdMtFfMacSchedulerSuite, LenaTestFdTbfqFfMacSchedulerSuite, LenaTestHarqSuite, LenaTestMimoSuite, LenaTestPfFfMacSchedulerSuite, LenaTestPhyErrorModelSuite, LenaTestPssFfMacSchedulerSuite, LenaTestRrFfMacSchedulerSuite, LenaTestTdBetFfMacSchedulerSuite, LenaTestTdMtFfMacSchedulerSuite, LenaTestTdTbfqFfMacSchedulerSuite, LenaTestTtaFfMacSchedulerSuite, LiIonEnergySourceTestSuite, LrWpanAckTestSuite, LrWpanCcaTestSuite, LrWpanCollisionTestSuite, LrWpanEdTestSuite, LrWpanErrorModelTestSuite, LrWpanPacketTestSuite, LrWpanPlmeAndPdInterfaceTestSuite, LrWpanSpectrumValueHelperTestSuite, LteAntennaTestSuite, LteCellSelectionTestSuite, LteDownlinkSinrTestSuite, LteEarfcnTestSuite, LteEpcE2eDataTestSuite, LteFadingTestSuite, LteHandoverDelayTestSuite, LteHandoverTargetTestSuite, LteInterferenceTestSuite, LteLinkAdaptationTestSuite, LtePathlossModelTestSuite, LteRlcAmE2eTestSuite, LteRlcAmTransmitterTestSuite, LteRlcUmE2eTestSuite, LteRlcUmTransmitterTestSuite, LteRrcTestSuite, LteSpectrumValueHelperTestSuite, LteUeMeasurementsHandoverTestSuite, LteUeMeasurementsPiecewiseTestSuite1, LteUeMeasurementsPiecewiseTestSuite2, LteUeMeasurementsTestSuite, LteUplinkSinrTestSuite, LteX2HandoverMeasuresTestSuite, LteX2HandoverTestSuite, ManyUniformRandomVariablesOneGetValueCallTestSuite, MeshTestSuite, MobilityTestSuite, MobilityTraceTestSuite, NamesTestSuite, Ns2MobilityHelperTestSuite, ns3::aodv::AodvTestSuite, ns3::aodv::IdCacheTestSuite, ns3::int64x64::test::Int64x64TestSuite, Ns3TcpCwndTestSuite, Ns3TcpInteroperabilityTestSuite, Ns3TcpLossTestSuite, Ns3TcpNoDelayTestSuite, Ns3TcpSocketTestSuite, Ns3TcpStateTestSuite, Ns3WimaxFragmentationTestSuite, Ns3WimaxMacMessagesTestSuite, Ns3WimaxPhyTestSuite, Ns3WimaxQoSTestSuite, Ns3WimaxServiceFlowTestSuite, Ns3WimaxSSMacTestSuite, Ns3WimaxTlvTestSuite, NscTcpLossTestSuite, ObjectTestSuite, OcbTestSuite, OkumuraHataPropagationLossModelTestSuite, OlsrProtocolTestSuite, OlsrTestSuite, OneUniformRandomVariableManyGetValueCallsTestSuite, PacketMetadataTestSuite, PacketTestSuite, ParabolicAntennaModelTestSuite, PbbTestSuite, PcapFileTestSuite, PointToPointTestSuite, ProbeTestSuite, PropagationLossModelsTestSuite, PtrTestSuite, RandomVariableStreamTestSuite, RedQueueTestSuite, RegressionTestSuite, RngTestSuite, RocketfuelTopologyReaderTestSuite, RttTestSuite, RvBatteryModelTestSuite, SampleTestSuite, SequenceNumberTestSuite, SimulatorTestSuite, SixlowpanFragmentationTestSuite, SixlowpanHc1TestSuite, SixlowpanIphcTestSuite, SpectrumConverterTestSuite, SpectrumIdealPhyTestSuite, SpectrumInterferenceTestSuite, SpectrumValueTestSuite, StaticRoutingTestSuite, SteadyStateRandomWaypointTestSuite, SwitchTestSuite, TcpTestSuite, ThreadedSimulatorTestSuite, TimerTestSuite, TimeTestSuite, TracedCallbackTestSuite, TxDurationTestSuite, TypeIdPerformanceSuite, TypeIdTestSuite, TypeTraitsTestSuite, UanEnergyModelTestSuite, UanTestSuite, UdpClientServerTestSuite, UdpTestSuite, WatchdogTestSuite, WaypointMobilityModelTestSuite, WifiInterferenceTestSuite, WifiMsduAggregatorTestSuite, and WifiTestSuite.

+ Collaboration diagram for ns3::TestSuite:

Public Types

enum  Type {
  ALL = 0, BVT = 1, UNIT, SYSTEM,
  EXAMPLE, PERFORMANCE
}
 Type of test. More...
 
- Public Types inherited from ns3::TestCase
enum  TestDuration { QUICK = 1, EXTENSIVE = 2, TAKES_FOREVER = 3 }
 How long the test takes to execute. More...
 

Public Member Functions

 TestSuite (std::string name, Type type=UNIT)
 Constuct a new test suite. More...
 
TestSuite::Type GetTestType (void)
 get the kind of test this test suite implements More...
 
- Public Member Functions inherited from ns3::TestCase
virtual ~TestCase ()
 Destructor. More...
 
std::string GetName (void) const
 

Private Member Functions

virtual void DoRun (void)
 Implementation to actually run this TestCase. More...
 

Private Attributes

TestSuite::Type m_type
 Type of this TestSuite. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ns3::TestCase
 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)
 

Detailed Description

A suite of tests to run.

Definition at line 1105 of file test.h.

Member Enumeration Documentation

Type of test.

Enumerator
ALL 
BVT 

This test suite implements a Build Verification Test.

UNIT 

This test suite implements a Unit Test.

SYSTEM 

This test suite implements a System Test.

EXAMPLE 

This test suite implements an Example Test.

PERFORMANCE 

This test suite implements a Performance Test.

Definition at line 1112 of file test.h.

Constructor & Destructor Documentation

ns3::TestSuite::TestSuite ( std::string  name,
TestSuite::Type  type = UNIT 
)

Constuct a new test suite.

Parameters
nameThe name of the test suite.
typeThe TestType of the test suite (defaults to UNIT test).

Definition at line 372 of file test.cc.

References ns3::TestRunnerImpl::AddTestSuite(), ns3::TestRunnerImpl::Instance(), and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

Member Function Documentation

void ns3::TestSuite::DoRun ( void  )
privatevirtual

Implementation to actually run this TestCase.

Subclasses should override this method to conduct their tests.

Implements ns3::TestCase.

Definition at line 388 of file test.cc.

References NS_LOG_FUNCTION.

TestSuite::Type ns3::TestSuite::GetTestType ( void  )

get the kind of test this test suite implements

Returns
the Type of the suite.

Definition at line 381 of file test.cc.

References m_type, and NS_LOG_FUNCTION.

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

+ Here is the caller graph for this function:

Member Data Documentation

TestSuite::Type ns3::TestSuite::m_type
private

Type of this TestSuite.

Definition at line 1140 of file test.h.

Referenced by GetTestType().


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