From cd0534a114b78024cdd2ad8096c997a644041e4b Mon Sep 17 00:00:00 2001 From: Andy Ford Date: Sat, 24 Dec 2022 17:23:29 +0000 Subject: [PATCH] fix: irish G intention code directions --- .../intention/SectorExitRepositoryFactory.cpp | 23 +++++++++++++------ .../intention/SectorExitRepositoryTest.cpp | 19 +++++++++------ 2 files changed, 28 insertions(+), 14 deletions(-) diff --git a/src/plugin/intention/SectorExitRepositoryFactory.cpp b/src/plugin/intention/SectorExitRepositoryFactory.cpp index b6b6f4b86..92658cf47 100644 --- a/src/plugin/intention/SectorExitRepositoryFactory.cpp +++ b/src/plugin/intention/SectorExitRepositoryFactory.cpp @@ -122,13 +122,22 @@ namespace UKControllerPlugin { points["EVRIN"] = std::make_unique("EVRIN", "S", SectorExitPoint::outWest); // Irish Overflights - points["MOLAK"] = std::make_unique("MOLAK", "G1", SectorExitPoint::outWest); - points["NIPIT"] = std::make_unique("NIPIT", "G2", SectorExitPoint::outWest); - points["ERNAN"] = std::make_unique("ERNAN", "G3", SectorExitPoint::outWest); - points["DEGOS"] = std::make_unique("DEGOS", "G4", SectorExitPoint::outWest); - points["NIMAT"] = std::make_unique("NIMAT", "G5", SectorExitPoint::outWest); - points["NEVRI"] = std::make_unique("NEVRI", "G7", SectorExitPoint::outWest); - points["RUBEX"] = std::make_unique("RUBEX", "G9", SectorExitPoint::outWest); + points["MOLAK"] = std::make_unique( + "MOLAK", "G1", SectorExitPoint::outWest | SectorExitPoint::outSouthWest); + points["NIPIT"] = std::make_unique( + "NIPIT", "G2", SectorExitPoint::outWest | SectorExitPoint::outSouthWest); + points["ERNAN"] = std::make_unique( + "ERNAN", "G3", SectorExitPoint::outWest | SectorExitPoint::outSouthWest); + points["DEGOS"] = std::make_unique( + "DEGOS", "G4", SectorExitPoint::outWest | SectorExitPoint::outSouthWest); + points["NIMAT"] = std::make_unique( + "NIMAT", "G5", SectorExitPoint::outWest | SectorExitPoint::outSouthWest); + points["NEVRI"] = std::make_unique( + "NEVRI", "G7", SectorExitPoint::outWest | SectorExitPoint::outSouthWest); + points["ROTEV"] = std::make_unique( + "ROTEV", "G7", SectorExitPoint::outWest | SectorExitPoint::outSouthWest); + points["RUBEX"] = std::make_unique( + "RUBEX", "G9", SectorExitPoint::outWest | SectorExitPoint::outSouthWest); // Brest points["ANNET"] = std::make_unique("ANNET", "B4", SectorExitPoint::outSouth); diff --git a/test/plugin/intention/SectorExitRepositoryTest.cpp b/test/plugin/intention/SectorExitRepositoryTest.cpp index d971d9ce2..268a2492d 100644 --- a/test/plugin/intention/SectorExitRepositoryTest.cpp +++ b/test/plugin/intention/SectorExitRepositoryTest.cpp @@ -332,37 +332,42 @@ namespace UKControllerPluginTest { // MOLAK ASSERT_TRUE(repo->GetSectorExitPoint("MOLAK").GetName().compare("MOLAK") == 0); ASSERT_TRUE(repo->GetSectorExitPoint("MOLAK").GetIntentionCode(mockRoute, 0, 37000).compare("G1") == 0); - ASSERT_EQ(repo->outWest, repo->GetSectorExitPoint("MOLAK").GetOutDirection()); + ASSERT_EQ(repo->outWest | repo->outSouthWest, repo->GetSectorExitPoint("MOLAK").GetOutDirection()); // NIPIT ASSERT_TRUE(repo->GetSectorExitPoint("NIPIT").GetName().compare("NIPIT") == 0); ASSERT_TRUE(repo->GetSectorExitPoint("NIPIT").GetIntentionCode(mockRoute, 0, 37000).compare("G2") == 0); - ASSERT_EQ(repo->outWest, repo->GetSectorExitPoint("NIPIT").GetOutDirection()); + ASSERT_EQ(repo->outWest | repo->outSouthWest, repo->GetSectorExitPoint("NIPIT").GetOutDirection()); // ERNAN ASSERT_TRUE(repo->GetSectorExitPoint("ERNAN").GetName().compare("ERNAN") == 0); ASSERT_TRUE(repo->GetSectorExitPoint("ERNAN").GetIntentionCode(mockRoute, 0, 37000).compare("G3") == 0); - ASSERT_EQ(repo->outWest, repo->GetSectorExitPoint("ERNAN").GetOutDirection()); + ASSERT_EQ(repo->outWest | repo->outSouthWest, repo->GetSectorExitPoint("ERNAN").GetOutDirection()); // DEGOS ASSERT_TRUE(repo->GetSectorExitPoint("DEGOS").GetName().compare("DEGOS") == 0); ASSERT_TRUE(repo->GetSectorExitPoint("DEGOS").GetIntentionCode(mockRoute, 0, 37000).compare("G4") == 0); - ASSERT_EQ(repo->outWest, repo->GetSectorExitPoint("DEGOS").GetOutDirection()); + ASSERT_EQ(repo->outWest | repo->outSouthWest, repo->GetSectorExitPoint("DEGOS").GetOutDirection()); // NIMAT ASSERT_TRUE(repo->GetSectorExitPoint("NIMAT").GetName().compare("NIMAT") == 0); ASSERT_TRUE(repo->GetSectorExitPoint("NIMAT").GetIntentionCode(mockRoute, 0, 37000).compare("G5") == 0); - ASSERT_EQ(repo->outWest, repo->GetSectorExitPoint("NIMAT").GetOutDirection()); + ASSERT_EQ(repo->outWest | repo->outSouthWest, repo->GetSectorExitPoint("NIMAT").GetOutDirection()); // NEVRI ASSERT_TRUE(repo->GetSectorExitPoint("NEVRI").GetName().compare("NEVRI") == 0); ASSERT_TRUE(repo->GetSectorExitPoint("NEVRI").GetIntentionCode(mockRoute, 0, 37000).compare("G7") == 0); - ASSERT_EQ(repo->outWest, repo->GetSectorExitPoint("NEVRI").GetOutDirection()); + ASSERT_EQ(repo->outWest | repo->outSouthWest, repo->GetSectorExitPoint("NEVRI").GetOutDirection()); + + // ROTEV + ASSERT_TRUE(repo->GetSectorExitPoint("ROTEV").GetName().compare("ROTEV") == 0); + ASSERT_TRUE(repo->GetSectorExitPoint("ROTEV").GetIntentionCode(mockRoute, 0, 37000).compare("G7") == 0); + ASSERT_EQ(repo->outWest | repo->outSouthWest, repo->GetSectorExitPoint("ROTEV").GetOutDirection()); // RUBEX ASSERT_TRUE(repo->GetSectorExitPoint("RUBEX").GetName().compare("RUBEX") == 0); ASSERT_TRUE(repo->GetSectorExitPoint("RUBEX").GetIntentionCode(mockRoute, 0, 37000).compare("G9") == 0); - ASSERT_EQ(repo->outWest, repo->GetSectorExitPoint("RUBEX").GetOutDirection()); + ASSERT_EQ(repo->outWest | repo->outSouthWest, repo->GetSectorExitPoint("RUBEX").GetOutDirection()); // Brest