| 1 | /* |
| 2 | * Copyright (C) 2020 James Turner |
| 3 | * |
| 4 | * This file is part of the program FlightGear. |
| 5 | * |
| 6 | * This program is free software: you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation, either version 2 of the License, or |
| 9 | * (at your option) any later version. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License |
| 17 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 18 | */ |
| 19 | |
| 20 | #pragma once |
| 21 | |
| 22 | #include "test_suite/FGTestApi/testStringUtils.hxx" |
| 23 | #include <cppunit/TestFixture.h> |
| 24 | #include <cppunit/extensions/HelperMacros.h> |
| 25 | |
| 26 | #include <memory> |
| 27 | |
| 28 | #include <simgear/props/props.hxx> |
| 29 | |
| 30 | class SGGeod; |
| 31 | |
| 32 | class FGAIAircraft; |
| 33 | |
| 34 | // The flight plan unit tests. |
| 35 | class TrafficTests : public CppUnit::TestFixture |
| 36 | { |
| 37 | // Set up the test suite. |
| 38 | CPPUNIT_TEST_SUITE(TrafficTests); |
| 39 | CPPUNIT_TEST(testPushback); |
| 40 | CPPUNIT_TEST(testPushbackCargo); |
| 41 | CPPUNIT_TEST(testPushbackCargoInProgress); |
| 42 | CPPUNIT_TEST(testPushbackCargoInProgressDownWindEast); |
| 43 | CPPUNIT_TEST(testPushbackCargoInProgressDownWindWest); |
| 44 | CPPUNIT_TEST(testPushbackCargoInProgressNotBeyond); |
| 45 | CPPUNIT_TEST(testPushbackCargoInProgressNotBeyondNorth); |
| 46 | CPPUNIT_TEST(testPushbackCargoInProgressBeyond); |
| 47 | CPPUNIT_TEST(testPushbackCargoInProgressBeyondNorth); |
| 48 | CPPUNIT_TEST(testChangeRunway); |
| 49 | CPPUNIT_TEST(testPushforward); |
| 50 | CPPUNIT_TEST(testPushforwardSpeedy); |
| 51 | CPPUNIT_TEST(testPushforwardParkYBBN); |
| 52 | CPPUNIT_TEST(testPushforwardParkYBBNRepeatGa); |
| 53 | CPPUNIT_TEST(testPushforwardParkYBBNRepeatGaDelayed); |
| 54 | CPPUNIT_TEST(testPushforwardParkYBBNRepeatGate); |
| 55 | CPPUNIT_TEST_SUITE_END(); |
| 56 | public: |
| 57 | // Set up function for each test. |
| 58 | void setUp(); |
| 59 | |
| 60 | // Clean up after each test. |
| 61 | void tearDown(); |
| 62 | |
| 63 | // Pushback Tests |
| 64 | void testPushback(); |
| 65 | void testPushbackCargo(); |
| 66 | void testPushbackCargoInProgress(); |
| 67 | void testPushbackCargoInProgressDownWindEast(); |
| 68 | void testPushbackCargoInProgressDownWindWest(); |
| 69 | void testPushbackCargoInProgressNotBeyond(); |
| 70 | void testPushbackCargoInProgressNotBeyondNorth(); |
| 71 | void testPushbackCargoInProgressBeyond(); |
| 72 | void testPushbackCargoInProgressBeyondNorth(); |
| 73 | void testChangeRunway(); |
| 74 | //GA Tests with forward push |
| 75 | void testPushforward(); |
| 76 | void testPushforwardSpeedy(); |
| 77 | void testPushforwardParkYBBN(); |
| 78 | void testPushforwardParkYBBNRepeatGa(); |
| 79 | void testPushforwardParkYBBNRepeatGaDelayed(); |
| 80 | void testPushforwardParkYBBNRepeatGate(); |
| 81 | private: |
| 82 | long currentWorldTime; |
| 83 | FGAIAircraft * flyAI(SGSharedPtr<FGAIAircraft> aiAircraft, std::string fName); |
| 84 | }; |