1
0
Fork 0
Commit graph

38 commits

Author SHA1 Message Date
James Turner
d1fc4b58cb Start creating tests of AIModel code
First test just creates the manager, and ensures the user aircraft
updates in sync with the real aircraft.
2020-09-03 17:51:40 +01:00
James Turner
1e403ae6dd Fix an assert running aero tests
FGLocale needs to be init-ed, before calling splash progress.
2020-07-22 11:49:14 +01:00
James Turner
f0d3663102 Nasal unit-testing: allow deep struct equality.
Add a deep comparison of vecs and hashes, when deciding equality in
test assertions.
2020-07-08 15:22:27 +01:00
James Turner
c3fce7e436 Tests: load loadprioirty.xml
Otherwise we screw up Nasal load order.
2020-07-02 12:19:19 +01:00
James Turner
03563a1601 Fix DME intercept handling in route/GPS
Both the route-path cade and the RNAV code were using some bad logic
to compute the intersection point. All fixed now, but requires a
new helper in Simgear.
2020-05-30 15:59:07 +01:00
James Turner
eb55cd4a8c Test pilot changes for data logging 2020-05-30 15:59:07 +01:00
James Turner
5a73859b62 Add missing license 2020-05-30 15:59:07 +01:00
James Turner
e8bf4220a8 Add test-data logger 2020-05-30 15:58:59 +01:00
James Turner
54f660764e Tests: change how we find+load data files
Avoid encoding test-data as strings, since this exceeds MSVC limits
on string literals, and tests don’t need to be relocatable anyway,
so we can just hard-code the source location into config.h
2020-05-24 14:14:35 +01:00
James Turner
ce6bd859b3 Add Nasal source location to unit-tests 2020-05-22 17:35:24 +01:00
James Turner
fffcd14362 Fix FlightPlan procedure transition handling
Overhaul how transitions are stored in FlightPlan XML, and how
they’re exposed to Nasal. Simplify the Nasal access by making
‘sid_trans’ and ‘star_trans’ writeable.

Extend the unit-tests a lot to cover this, both from C++ and also
from Nasal

As part of this, overhaul the ownership of FlightPlan delegate
factories, to make it safer (use ref-counting of the factories,
and allow the factory to customise delegate clean-up behaviour)
2020-05-21 22:32:28 +01:00
James Turner
522c742419 Draft version of Nasal unit-testing API
Only the in-sim version works for now, the test-suite mode is not
implemented yet. Also the test API will evolve, but should stay close
to what CppUnit defines.

Run a test file by specifying a path to nasal-test : examples will be
added to FGData shortly.
2020-05-06 15:20:26 +01:00
James Turner
b85048db2d GPS/FLightPlan test updates
- fix reseting of the NavData each test
- improve the test-pilot’s GPS following (reduce turn range close
   to the desired course)
- test DME intercepts
2020-04-21 15:48:41 +01:00
James Turner
444fbd7af4 Tests: add RNAV Heading-to-Alt basic test 2020-04-16 16:41:12 +01:00
James Turner
4c0965e3c1 Some initial tests for route discontinuities.
Probably many more to add, but this is some basic testing at least of
inserting, querying and removing discontinuities.
2020-04-15 16:11:33 +01:00
James Turner
c12824bc94 Basic Canvas tests, including image pixel ops 2020-03-11 17:14:38 +00:00
James Turner
45fbdaa9c9 Starting tests for RNAV/procedures
One test so far, attempting to reproduce a bug I see with the 737.

Note these tests are skipped unless you have procedures available
and set a magic env var to find them.
2019-10-16 23:28:52 +01:00
James Turner
847275e65a Tweaks to test helper APIs
Incorporate some feedback from Edward.
2019-09-24 11:39:56 +01:00
James Turner
36f88f6f07 Rename test globals to testGlobals [.cxx|.hxx] 2019-09-24 11:39:34 +01:00
James Turner
18c19885c6 Improvements to Nasal hold API
Ensure changes from Nasal are picked up by delegates (such as GPS) when
they are made. Add a route-manager test which sets and exits a hold
using Nasal.

As part of this, update the test API to make it easy to run Nasal from
a test.
2019-09-24 11:29:05 +01:00
James Turner
fafc9e3e64 Fix windows build, hopefully. 2019-09-23 23:14:32 +01:00
James Turner
45df8f51b2 Move GPS sequencing into Nasal (optionally)
GPS now lets the delegate handle the sequencing behaviour, by
setting a new config property. The default GPS delegate (in Nasal)
now sets this property.

This requires a corresponding FGData update.
2019-09-20 13:05:57 +01:00
James Turner
833cc61293 GPS intercept tests 2019-09-20 09:50:55 +01:00
James Turner
19af6994fb GPS : Offset flight test 2019-09-19 17:27:13 +01:00
James Turner
05e99d3a3b More GPS sequencing tests
Also extended the test helpers in various ways.
2019-09-19 17:27:13 +01:00
James Turner
2434c037c8 Improve Leg mode course/track computation 2019-09-19 17:27:13 +01:00
James Turner
1c09704903 Fix tests until GPS course changes land 2019-09-18 23:42:39 +01:00
James Turner
1c58de62ed Route-manager unit-tests
Also contains large extensions to the TestPilot helper
2019-09-18 23:42:39 +01:00
James Turner
21a8e89a0a Basic flight-plan/leg tests for GPS 2019-09-18 23:42:38 +01:00
James Turner
e15d67e637 TestPilot helper in the test API
Use this in the GPS tests.
2019-09-18 23:40:36 +01:00
James Turner
c7b28a1960 UNit-tests for the NavRadio
Still needs ILS and GS tests, but starting to be useful already.
2018-11-25 13:12:50 +00:00
Edward d'Auvergne
0ea357b04c TestSuite: Improved memory management for the event manager.
In the initTestGlobals() helper function, the event manager is added to the subsystem manager (both
created by the FGGlobals ctor).  This allows the event manager to be destroyed via the subsystem
manager in the FGGlobals dtor.
2018-07-26 15:52:07 +02:00
Edward d'Auvergne
dbe7c90115 TestSuite: Shifted the YASim atmosphere test into the CppUnit framework. 2018-07-26 15:52:07 +02:00
Edward d'Auvergne
feb854946e TestSuite: Complete removal of FG_TESTLIB. 2018-07-26 15:52:07 +02:00
Edward d'Auvergne
2aa8d8ccbf TestSuite: Activation of the runtime headless mode whenever globals are set up. 2018-07-26 15:52:06 +02:00
Edward d'Auvergne
99a50508a7 TestSuite: Spun out the NavDataCache initialisation code.
Not all tests will require the NavDataCache, so it is no longer set up with the
dummy globals data structure.
2018-07-26 15:52:06 +02:00
Edward d'Auvergne
acb3307a1a TestSuite: Migration of the AeroMesh tests into the CppUnit infrastructure. 2018-07-26 15:52:06 +02:00
Edward d'Auvergne
88179ec9c1 TestSuite: Implementation of FGTestApi.
The test_suite/helpers directory has been renamed to test_suite/FGTestApi/ and
all the fgtest namespaces renamed to FGTestApi.  The helper functions are now
also placed into either a setUp or tearDown namespace depending on their
function.  And a new FGTestApi::PrivateAccessor::FDM namespace has been created
for holding friend classes used to access private or protected variables or
functions from solely within the test suite.
2018-07-26 15:52:06 +02:00