A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
SpectrumModelTestCase Class Reference

Spectrum Value Test. More...

Inheritance diagram for SpectrumModelTestCase:
Collaboration diagram for SpectrumModelTestCase:

Public Member Functions

 SpectrumModelTestCase (Ptr< SpectrumModel > a, Ptr< SpectrumModel > b, const std::string &name, bool expectOrthogonal, bool expectAligned)
 Constructor.
void DoRun () override
 Implementation to actually run this TestCase.
Public Member Functions inherited from ns3::TestCase
 TestCase (const TestCase &)=delete
 Caller graph was not generated because of its size.
virtual ~TestCase ()
 Destructor.
std::string GetName () const
TestCaseoperator= (const TestCase &)=delete

Private Attributes

Ptr< SpectrumModelm_a
 first SpectrumModel
Ptr< SpectrumModelm_b
 second SpectrumModel
bool m_expectAligned
 whether the two models are expected to be aligned
bool m_expectOrthogonal
 whether the two models are expected to be orthogonal

Additional Inherited Members

Public Types inherited from ns3::TestCase
enum class  Duration { QUICK = 1 , EXTENSIVE = 2 , TAKES_FOREVER = 3 }
 How long the test takes to execute. More...
Protected Member Functions inherited from ns3::TestCase
 TestCase (std::string name)
 Constructor.
void AddTestCase (TestCase *testCase, Duration duration=Duration::QUICK)
 Add an individual child TestCase to this test suite.
TestCaseGetParent () const
 Get the parent of this TestCase.
bool IsStatusFailure () const
 Check if any tests failed.
bool IsStatusSuccess () const
 Check if all tests passed.
void SetDataDir (std::string directory)
 Set the data directory where reference trace files can be found.
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.
bool MustAssertOnFailure () const
 Check if this run should assert on failure.
bool MustContinueOnFailure () const
 Check if this run should continue on failure.
std::string CreateDataDirFilename (std::string filename)
 Construct the full path to a file in the data directory.
std::string CreateTempDirFilename (std::string filename)
 Construct the full path to a file in a temporary directory.

Detailed Description

Spectrum Value Test.

Definition at line 30 of file spectrum-value-test.cc.

Constructor & Destructor Documentation

◆ SpectrumModelTestCase()

SpectrumModelTestCase::SpectrumModelTestCase ( Ptr< SpectrumModel > a,
Ptr< SpectrumModel > b,
const std::string & name,
bool expectOrthogonal,
bool expectAligned )

Constructor.

Parameters
afirst SpectrumModel
bsecond SpectrumModel
nametest name
expectOrthogonalwhether the two models are expected to be orthogonal
expectAlignedwhether the two models are expected to be aligned

Definition at line 55 of file spectrum-value-test.cc.

References ns3::TestCase::TestCase(), m_a, m_b, m_expectAligned, and m_expectOrthogonal.

Here is the call graph for this function:

Member Function Documentation

◆ DoRun()

void SpectrumModelTestCase::DoRun ( )
overridevirtual

Implementation to actually run this TestCase.

Subclasses should override this method to conduct their tests.

Implements ns3::TestCase.

Definition at line 69 of file spectrum-value-test.cc.

References m_a, m_b, m_expectAligned, m_expectOrthogonal, and NS_TEST_EXPECT_MSG_EQ.

Member Data Documentation

◆ m_a

Ptr<SpectrumModel> SpectrumModelTestCase::m_a
private

first SpectrumModel

Definition at line 49 of file spectrum-value-test.cc.

Referenced by SpectrumModelTestCase(), and DoRun().

◆ m_b

Ptr<SpectrumModel> SpectrumModelTestCase::m_b
private

second SpectrumModel

Definition at line 50 of file spectrum-value-test.cc.

Referenced by SpectrumModelTestCase(), and DoRun().

◆ m_expectAligned

bool SpectrumModelTestCase::m_expectAligned
private

whether the two models are expected to be aligned

Definition at line 52 of file spectrum-value-test.cc.

Referenced by SpectrumModelTestCase(), and DoRun().

◆ m_expectOrthogonal

bool SpectrumModelTestCase::m_expectOrthogonal
private

whether the two models are expected to be orthogonal

Definition at line 51 of file spectrum-value-test.cc.

Referenced by SpectrumModelTestCase(), and DoRun().


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