| 1 | // SPDX-FileCopyrightText: (C) 2025 James Turner <[email protected]> |
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later |
| 3 | |
| 4 | #pragma once |
| 5 | |
| 6 | #include <cppunit/TestFixture.h> |
| 7 | #include <cppunit/extensions/HelperMacros.h> |
| 8 | |
| 9 | #include <memory> |
| 10 | |
| 11 | #include <simgear/structure/SGSharedPtr.hxx> |
| 12 | |
| 13 | #include <Aircraft/controls.hxx> |
| 14 | |
| 15 | // The flight plan unit tests. |
| 16 | class ControlsTests : public CppUnit::TestFixture |
| 17 | { |
| 18 | // Set up the test suite. |
| 19 | CPPUNIT_TEST_SUITE(ControlsTests); |
| 20 | CPPUNIT_TEST(testClamp); |
| 21 | CPPUNIT_TEST(testNANRejection); |
| 22 | CPPUNIT_TEST_SUITE_END(); |
| 23 | |
| 24 | SGSharedPtr<FGControls> controls; |
| 25 | |
| 26 | public: |
| 27 | ~ControlsTests(); |
| 28 | |
| 29 | // Set up function for each test. |
| 30 | void setUp(); |
| 31 | |
| 32 | // Clean up after each test. |
| 33 | void tearDown(); |
| 34 | |
| 35 | // The tests. |
| 36 | void testClamp(); |
| 37 | void testNANRejection(); |
| 38 | }; |