Accommodate n-Dimensional HR coordinates
refs: #3751
Change-Id: Ib705b671daba56f58e09876a48d8b31649bd7ab1
diff --git a/tests/test-conf-file-processor.cpp b/tests/test-conf-file-processor.cpp
index e818ac3..df347f1 100644
--- a/tests/test-conf-file-processor.cpp
+++ b/tests/test-conf-file-processor.cpp
@@ -98,6 +98,14 @@
" angle 1.45\n"
"}\n\n";
+const std::string SECTION_HYPERBOLIC_ANGLES_ON =
+ "hyperbolic\n"
+ "{\n"
+ " state on\n"
+ " radius 123.456\n"
+ " angle 1.45,2.25\n"
+ "}\n\n";
+
const std::string SECTION_HYPERBOLIC_OFF =
"hyperbolic\n"
"{\n"
@@ -128,6 +136,10 @@
const std::string CONFIG_HYPERBOLIC = SECTION_GENERAL + SECTION_NEIGHBORS +
SECTION_HYPERBOLIC_ON + SECTION_FIB + SECTION_ADVERTISING;
+const std::string CONFIG_HYPERBOLIC_ANGLES = SECTION_GENERAL + SECTION_NEIGHBORS +
+ SECTION_HYPERBOLIC_ANGLES_ON + SECTION_FIB +
+ SECTION_ADVERTISING;
+
class ConfFileProcessorFixture : public BaseFixture
{
public:
@@ -365,7 +377,22 @@
ConfParameter& conf = nlsr.getConfParameter();
BOOST_CHECK_EQUAL(conf.getHyperbolicState(), 1);
BOOST_CHECK_EQUAL(conf.getCorR(), 123.456);
- BOOST_CHECK_EQUAL(conf.getCorTheta(), 1.45);
+ std::vector<double> angles;
+ angles.push_back(1.45);
+ BOOST_CHECK(conf.getCorTheta() == angles);
+}
+
+BOOST_AUTO_TEST_CASE(Hyperbolic2)
+{
+ processConfigurationString(CONFIG_HYPERBOLIC_ANGLES);
+
+ ConfParameter& conf = nlsr.getConfParameter();
+ BOOST_CHECK_EQUAL(conf.getHyperbolicState(), 1);
+ BOOST_CHECK_EQUAL(conf.getCorR(), 123.456);
+ std::vector<double> angles;
+ angles.push_back(1.45);
+ angles.push_back(2.25);
+ BOOST_CHECK(conf.getCorTheta() == angles);
}
BOOST_AUTO_TEST_CASE(DefaultValuesGeneral)