From 585c821bdeb02fee6b800351922589f05c87a21d Mon Sep 17 00:00:00 2001 From: legoboyvdlp R Date: Thu, 18 Jun 2020 17:33:27 +0100 Subject: [PATCH] Extend wp.hidden unit test to ensure path is empty after a hidden waypoint --- test_suite/unit_tests/Navaids/test_routeManager.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test_suite/unit_tests/Navaids/test_routeManager.cxx b/test_suite/unit_tests/Navaids/test_routeManager.cxx index e304394c9..f40b1a2fd 100644 --- a/test_suite/unit_tests/Navaids/test_routeManager.cxx +++ b/test_suite/unit_tests/Navaids/test_routeManager.cxx @@ -392,8 +392,14 @@ void RouteManagerTests::testHiddenWaypoints() // ensure no visual path is generated for hidden waypoints RoutePath path(fp1); + + // no path should be generated between 2 and 3 CPPUNIT_ASSERT(path.pathForIndex(3).empty()); + // no path should be generated between 3 and 4 + CPPUNIT_ASSERT(path.pathForIndex(4).empty()); + CPPUNIT_ASSERT(!path.pathForIndex(5).empty()); + bool ok = FGTestApi::executeNasal(R"( var fp = flightplan(); # retrieve the global flightplan