Index: src/antenna/test/test-angles.cc |
=================================================================== |
--- a/src/antenna/test/test-angles.cc |
+++ b/src/antenna/test/test-angles.cc |
@@ -28,17 +28,41 @@ |
using namespace ns3; |
+/** |
+ * \ingroup antenna |
+ * \defgroup antenna-test antenna module tests |
+ */ |
+ |
+ |
+/** |
+ * \ingroup antenna-test |
+ * \ingroup tests |
+ * |
+ * \brief One vector constructor test case |
+ */ |
class OneVectorConstructorTestCase : public TestCase |
{ |
public: |
+ /** |
+ * One vector build name string function |
+ * |
+ * \param v the vector |
+ * \returns name string |
+ */ |
static std::string BuildNameString (Vector v); |
+ /** |
+ * Constructor |
+ * |
+ * \param v vector |
+ * \param a angle |
+ */ |
OneVectorConstructorTestCase (Vector v, Angles a); |
private: |
virtual void DoRun (void); |
- Vector m_v; |
- Angles m_a; |
+ Vector m_v; ///< the test vector |
+ Angles m_a; ///< the test angle |
}; |
std::string OneVectorConstructorTestCase::BuildNameString (Vector v) |
@@ -64,22 +88,39 @@ |
NS_TEST_EXPECT_MSG_EQ_TOL ( a.theta, m_a.theta, 1e-10, "incorrect theta"); |
} |
- |
- |
- |
- |
+/** |
+ * \ingroup antenna-test |
+ * \ingroup tests |
+ * |
+ * \brief Two vector constructor test case |
+ */ |
class TwoVectorsConstructorTestCase : public TestCase |
{ |
public: |
+ /** |
+ * Two vector build name string function |
+ * |
+ * \param v the first vector |
+ * \param o the second vector |
+ * \returns name string |
+ */ |
+ |
static std::string BuildNameString (Vector v, Vector o); |
+ /** |
+ * Constructor |
+ * |
+ * \param v vector one |
+ * \param o vector two |
+ * \param a angle |
+ */ |
TwoVectorsConstructorTestCase (Vector v, Vector o, Angles a); |
private: |
virtual void DoRun (void); |
- Vector m_v; |
- Vector m_o; |
- Angles m_a; |
+ Vector m_v; ///< test vector one |
+ Vector m_o; ///< test vector two |
+ Angles m_a; ///< test angle |
}; |
std::string TwoVectorsConstructorTestCase::BuildNameString (Vector v, Vector o) |
@@ -106,11 +147,12 @@ |
NS_TEST_EXPECT_MSG_EQ_TOL ( a.theta, m_a.theta, 1e-10, "incorrect theta"); |
} |
- |
- |
- |
- |
- |
+/** |
+ * \ingroup antenna-test |
+ * \ingroup tests |
+ * |
+ * \brief angles test suite |
+ */ |
class AnglesTestSuite : public TestSuite |
{ |
public: |
@@ -135,22 +177,22 @@ |
AddTestCase (new OneVectorConstructorTestCase (Vector (0, 0, -2), Angles (0, M_PI)), TestCase::QUICK); |
AddTestCase (new OneVectorConstructorTestCase (Vector (1, 0, 1), Angles (0, M_PI_4)), TestCase::QUICK); |
- AddTestCase (new OneVectorConstructorTestCase (Vector (1, 0, -1), Angles (0, 3*M_PI_4)), TestCase::QUICK); |
+ AddTestCase (new OneVectorConstructorTestCase (Vector (1, 0, -1), Angles (0, 3 * M_PI_4)), TestCase::QUICK); |
AddTestCase (new OneVectorConstructorTestCase (Vector (1, 1, 0), Angles (M_PI_4, M_PI_2)), TestCase::QUICK); |
AddTestCase (new OneVectorConstructorTestCase (Vector (1, -1, 0), Angles (-M_PI_4, M_PI_2)), TestCase::QUICK); |
AddTestCase (new OneVectorConstructorTestCase (Vector (-1, 0, 1), Angles (M_PI, M_PI_4)), TestCase::QUICK); |
- AddTestCase (new OneVectorConstructorTestCase (Vector (-1, 0, -1), Angles (M_PI, 3*M_PI_4)), TestCase::QUICK); |
- AddTestCase (new OneVectorConstructorTestCase (Vector (-1, 1, 0), Angles (3*M_PI_4, M_PI_2)), TestCase::QUICK); |
- AddTestCase (new OneVectorConstructorTestCase (Vector (-1, -1, 0), Angles (-3*M_PI_4, M_PI_2)), TestCase::QUICK); |
+ AddTestCase (new OneVectorConstructorTestCase (Vector (-1, 0, -1), Angles (M_PI, 3 * M_PI_4)), TestCase::QUICK); |
+ AddTestCase (new OneVectorConstructorTestCase (Vector (-1, 1, 0), Angles (3 * M_PI_4, M_PI_2)), TestCase::QUICK); |
+ AddTestCase (new OneVectorConstructorTestCase (Vector (-1, -1, 0), Angles (-3 * M_PI_4, M_PI_2)), TestCase::QUICK); |
AddTestCase (new OneVectorConstructorTestCase (Vector (0, 1, 1), Angles (M_PI_2, M_PI_4)), TestCase::QUICK); |
- AddTestCase (new OneVectorConstructorTestCase (Vector (0, 1, -1), Angles (M_PI_2, 3*M_PI_4)), TestCase::QUICK); |
+ AddTestCase (new OneVectorConstructorTestCase (Vector (0, 1, -1), Angles (M_PI_2, 3 * M_PI_4)), TestCase::QUICK); |
AddTestCase (new OneVectorConstructorTestCase (Vector (0, -1, 1), Angles (-M_PI_2, M_PI_4)), TestCase::QUICK); |
- AddTestCase (new OneVectorConstructorTestCase (Vector (0, -1, -1), Angles (-M_PI_2, 3*M_PI_4)), TestCase::QUICK); |
+ AddTestCase (new OneVectorConstructorTestCase (Vector (0, -1, -1), Angles (-M_PI_2, 3 * M_PI_4)), TestCase::QUICK); |
AddTestCase (new OneVectorConstructorTestCase (Vector (1, 1, std::sqrt (2)), Angles (M_PI_4, M_PI_4)), TestCase::QUICK); |
- AddTestCase (new OneVectorConstructorTestCase (Vector (1, 1, -std::sqrt (2)), Angles (M_PI_4, 3*M_PI_4)), TestCase::QUICK); |
+ AddTestCase (new OneVectorConstructorTestCase (Vector (1, 1, -std::sqrt (2)), Angles (M_PI_4, 3 * M_PI_4)), TestCase::QUICK); |
AddTestCase (new OneVectorConstructorTestCase (Vector (1, -1, std::sqrt (2)), Angles (-M_PI_4, M_PI_4)), TestCase::QUICK); |
- AddTestCase (new OneVectorConstructorTestCase (Vector (-1, 1, std::sqrt (2)), Angles (3*M_PI_4, M_PI_4)), TestCase::QUICK); |
+ AddTestCase (new OneVectorConstructorTestCase (Vector (-1, 1, std::sqrt (2)), Angles (3 * M_PI_4, M_PI_4)), TestCase::QUICK); |
@@ -170,22 +212,22 @@ |
AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, 0, -2), Vector (0, 0, 0), Angles (0, M_PI)), TestCase::QUICK); |
AddTestCase (new TwoVectorsConstructorTestCase (Vector (1, 0, 1), Vector (0, 0, 0), Angles (0, M_PI_4)), TestCase::QUICK); |
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (1, 0, -1), Vector (0, 0, 0), Angles (0, 3*M_PI_4)), TestCase::QUICK); |
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (1, 0, -1), Vector (0, 0, 0), Angles (0, 3 * M_PI_4)), TestCase::QUICK); |
AddTestCase (new TwoVectorsConstructorTestCase (Vector (1, 1, 0), Vector (0, 0, 0), Angles (M_PI_4, M_PI_2)), TestCase::QUICK); |
AddTestCase (new TwoVectorsConstructorTestCase (Vector (1, -1, 0), Vector (0, 0, 0), Angles (-M_PI_4, M_PI_2)), TestCase::QUICK); |
AddTestCase (new TwoVectorsConstructorTestCase (Vector (-1, 0, 1), Vector (0, 0, 0), Angles (M_PI, M_PI_4)), TestCase::QUICK); |
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (-1, 0, -1), Vector (0, 0, 0), Angles (M_PI, 3*M_PI_4)), TestCase::QUICK); |
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (-1, 1, 0), Vector (0, 0, 0), Angles (3*M_PI_4, M_PI_2)), TestCase::QUICK); |
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (-1, -1, 0), Vector (0, 0, 0), Angles (-3*M_PI_4, M_PI_2)), TestCase::QUICK); |
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (-1, 0, -1), Vector (0, 0, 0), Angles (M_PI, 3 * M_PI_4)), TestCase::QUICK); |
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (-1, 1, 0), Vector (0, 0, 0), Angles (3 * M_PI_4, M_PI_2)), TestCase::QUICK); |
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (-1, -1, 0), Vector (0, 0, 0), Angles (-3 * M_PI_4, M_PI_2)), TestCase::QUICK); |
AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, 1, 1), Vector (0, 0, 0), Angles (M_PI_2, M_PI_4)), TestCase::QUICK); |
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, 1, -1), Vector (0, 0, 0), Angles (M_PI_2, 3*M_PI_4)), TestCase::QUICK); |
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, 1, -1), Vector (0, 0, 0), Angles (M_PI_2, 3 * M_PI_4)), TestCase::QUICK); |
AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, -1, 1), Vector (0, 0, 0), Angles (-M_PI_2, M_PI_4)), TestCase::QUICK); |
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, -1, -1), Vector (0, 0, 0), Angles (-M_PI_2, 3*M_PI_4)), TestCase::QUICK); |
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, -1, -1), Vector (0, 0, 0), Angles (-M_PI_2, 3 * M_PI_4)), TestCase::QUICK); |
AddTestCase (new TwoVectorsConstructorTestCase (Vector (1, 1, std::sqrt (2)), Vector (0, 0, 0), Angles (M_PI_4, M_PI_4)), TestCase::QUICK); |
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (1, 1, -std::sqrt (2)), Vector (0, 0, 0), Angles (M_PI_4, 3*M_PI_4)), TestCase::QUICK); |
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (1, 1, -std::sqrt (2)), Vector (0, 0, 0), Angles (M_PI_4, 3 * M_PI_4)), TestCase::QUICK); |
AddTestCase (new TwoVectorsConstructorTestCase (Vector (1, -1, std::sqrt (2)), Vector (0, 0, 0), Angles (-M_PI_4, M_PI_4)), TestCase::QUICK); |
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (-1, 1, std::sqrt (2)), Vector (0, 0, 0), Angles (3*M_PI_4, M_PI_4)), TestCase::QUICK); |
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (-1, 1, std::sqrt (2)), Vector (0, 0, 0), Angles (3 * M_PI_4, M_PI_4)), TestCase::QUICK); |
AddTestCase (new TwoVectorsConstructorTestCase (Vector (3, 2, 2), Vector (2, 2, 2), Angles (0, M_PI_2)), TestCase::QUICK); |
@@ -199,13 +241,13 @@ |
AddTestCase (new TwoVectorsConstructorTestCase (Vector (2, 2, 0), Vector (4, 2, 0), Angles (M_PI, M_PI_2)), TestCase::QUICK); |
AddTestCase (new TwoVectorsConstructorTestCase (Vector (-1, 4, 4), Vector (-2, 4, 3), Angles (0, M_PI_4)), TestCase::QUICK); |
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, -2, -6), Vector (-1, -2, -5), Angles (0, 3*M_PI_4)), TestCase::QUICK); |
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (77, 3, 43), Vector (78, 2, 43), Angles (3*M_PI_4, M_PI_2)), TestCase::QUICK); |
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, -2, -6), Vector (-1, -2, -5), Angles (0, 3 * M_PI_4)), TestCase::QUICK); |
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (77, 3, 43), Vector (78, 2, 43), Angles (3 * M_PI_4, M_PI_2)), TestCase::QUICK); |
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (24, -2, -6 -std::sqrt (2)), Vector (23, -3, -6), Angles (M_PI_4, 3*M_PI_4)), TestCase::QUICK); |
- AddTestCase (new TwoVectorsConstructorTestCase (Vector (0.5, 11.45, std::sqrt (2)-1), Vector (-0.5, 12.45, -1), Angles (-M_PI_4, M_PI_4)), TestCase::QUICK); |
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (24, -2, -6 - std::sqrt (2)), Vector (23, -3, -6), Angles (M_PI_4, 3 * M_PI_4)), TestCase::QUICK); |
+ AddTestCase (new TwoVectorsConstructorTestCase (Vector (0.5, 11.45, std::sqrt (2) - 1), Vector (-0.5, 12.45, -1), Angles (-M_PI_4, M_PI_4)), TestCase::QUICK); |
-}; |
+} |
static AnglesTestSuite staticAnglesTestSuiteInstance; |