CircularApertureAntennaModel Test Case. More...
Classes | |
| struct | TestPoint |
| Description of a single test point. More... | |
Public Member Functions | |
| CircularApertureAntennaModelTestCase () | |
| void | TestAntennaGain (TestPoint testPoint) |
| Test the antenna gain for a specific parameter configuration, by comparing the antenna gain obtained using CircularApertureAntennaModel::GetGainDb and the one obtained using MATLAB. | |
| Public Member Functions inherited from ns3::TestCase | |
| TestCase (const TestCase &)=delete | |
| virtual | ~TestCase () |
| Destructor. | |
| std::string | GetName () const |
| TestCase & | operator= (const TestCase &)=delete |
Static Public Member Functions | |
| static std::string | BuildNameString (TestPoint testPoint) |
| Generate a string containing all relevant parameters. | |
Private Member Functions | |
| void | DoRun () override |
| Run the test. | |
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... | |
| Static Public Attributes inherited from ns3::TestCase | |
| static constexpr auto | QUICK = Duration::QUICK |
| Deprecated test duration simple enums. | |
| static constexpr auto | EXTENSIVE = Duration::EXTENSIVE |
| static constexpr auto | TAKES_FOREVER = Duration::TAKES_FOREVER |
| 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. | |
| TestCase * | GetParent () 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. | |
CircularApertureAntennaModel Test Case.
Note: Since Clang libc++ does not support the Mathematical special functions (P0226R1) yet, this class falls back to Boost's implementation of cyl_bessel_j whenever the above standard library is in use. If neither is available in the host system, this class is not compiled.
Definition at line 35 of file test-circular-aperture-antenna.cc.
| CircularApertureAntennaModelTestCase::CircularApertureAntennaModelTestCase | ( | ) |
Definition at line 114 of file test-circular-aperture-antenna.cc.
References ns3::TestCase::TestCase().
|
static |
Generate a string containing all relevant parameters.
| testPoint | the parameter configuration to be tested |
Definition at line 120 of file test-circular-aperture-antenna.cc.
References CircularApertureAntennaModelTestCase::TestPoint::m_antennaCircularApertureRadius, CircularApertureAntennaModelTestCase::TestPoint::m_antennaMaxGainDb, CircularApertureAntennaModelTestCase::TestPoint::m_antennaMinGainDb, CircularApertureAntennaModelTestCase::TestPoint::m_operatingFrequency, CircularApertureAntennaModelTestCase::TestPoint::m_testAzimuth, CircularApertureAntennaModelTestCase::TestPoint::m_testInclination, and ns3::RadiansToDegrees().
Referenced by TestAntennaGain().
|
overrideprivatevirtual |
Run the test.
Implements ns3::TestCase.
Definition at line 167 of file test-circular-aperture-antenna.cc.
References TestAntennaGain().
| void CircularApertureAntennaModelTestCase::TestAntennaGain | ( | TestPoint | testPoint | ) |
Test the antenna gain for a specific parameter configuration, by comparing the antenna gain obtained using CircularApertureAntennaModel::GetGainDb and the one obtained using MATLAB.
| testPoint | the parameter configuration to be tested |
Definition at line 133 of file test-circular-aperture-antenna.cc.
References BuildNameString(), ns3::CreateObjectWithAttributes(), CircularApertureAntennaModelTestCase::TestPoint::m_antennaCircularApertureRadius, CircularApertureAntennaModelTestCase::TestPoint::m_antennaMaxGainDb, CircularApertureAntennaModelTestCase::TestPoint::m_antennaMinGainDb, CircularApertureAntennaModelTestCase::TestPoint::m_expectedGain, CircularApertureAntennaModelTestCase::TestPoint::m_forceGainBounds, CircularApertureAntennaModelTestCase::TestPoint::m_operatingFrequency, CircularApertureAntennaModelTestCase::TestPoint::m_testAzimuth, CircularApertureAntennaModelTestCase::TestPoint::m_testInclination, NS_LOG_INFO, and NS_TEST_EXPECT_MSG_EQ_TOL.
Referenced by DoRun().