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

+ 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...
 

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...
 
std::string CreateDataDirFilename (std::string filename)
 
std::string CreateTempDirFilename (std::string filename)
 
bool GetErrorStatus (void) const NS_DEPRECATED
 
std::string GetName (void) const
 
bool IsStatusFailure (void) const
 
bool IsStatusSuccess (void) const
 
bool MustAssertOnFailure (void) const
 
bool MustContinueOnFailure (void) const
 
void ReportTestFailure (std::string cond, std::string actual, std::string limit, std::string message, std::string file, int32_t line)
 
void SetDataDir (std::string directory)
 

Detailed Description

A suite of tests to run.

Definition at line 1025 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 1032 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 355 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 371 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 364 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 1060 of file test.h.

Referenced by GetTestType().


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