1
0
Fork 0
flightgear/test_suite/unit_tests/Autopilot/testMonostable.hxx
James Turner c54fba1095 AP: fix erroneous warning with Monostable FlipFlip
Add a unit-test written by Huntely, and extend the AP configure code, so the
'time' config of monostables doesn't trigger an incorrect warning in the
console / logs.

Thanks to Huntley Palmer for pointing this out.

SF-ID: https://sourceforge.net/p/flightgear/codetickets/2812/
2023-07-25 11:39:11 +01:00

37 lines
791 B
C++

/*
* SPDX-FileName: testMonostable.hxx
* SPDX-FileComment: Unit tests for monostable autopilot element
* SPDX-FileCopyrightText: Copyright (C) 2023 Huntley Palmer
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#pragma once
#include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h>
#include <simgear/props/props.hxx>
// The system tests.
class MonostableTests : public CppUnit::TestFixture
{
// Set up the test suite.
CPPUNIT_TEST_SUITE(MonostableTests);
CPPUNIT_TEST(testMonostable);
CPPUNIT_TEST_SUITE_END();
SGPropertyNode_ptr configFromString(const std::string& s);
public:
// Set up function for each test.
void setUp();
// Clean up after each test.
void tearDown();
// The tests.
void testMonostable();
};