OpenRCT2/test/tests
Richard Fine 8fb81a2d89 Initial data-driven tests for pathfinder behaviour
Introduce some basic scenario-style tests for the pathfinding AI. There
are two tests:

* Test that a peep can get from a given start position to a given end
  position, and that it takes them an expected number of ticks to do so.
  Also test that they did not walk on any 'forbidden' tiles in the process,
  e.g. tiles that are completely the wrong direction from the goal etc.

* Test that a peep can *not* get from a given start position to a given
  end position after a given number of ticks.

Each test is parametric, and instantiated for multiple different
start/end positions within the provided test park. If we find a new
situation that needs a test, it should just be a matter of building
that situation in the saved game and then adding a line to the code to
set it up.

Indicating 'forbidden' tiles is done using terrain surface type IDs:
tiles that the pathfinder should never send the peep into should be
painted with the red neon surface type (index 8). This means we have
no way to forbid some path elements on a tile while allowing others,
but we don't need that right now.

Similarly, to help ensure that the test data and code are kept in
sync, the tests also require that peep start tiles are painted with
the green neon surface type (index 11) and that goal tiles are
painted with the yellow neon surface type (index 9).
2019-01-02 14:12:08 +00:00
..
helpers Replace 0 and NULL with nullptr (#7827) 2018-07-25 22:49:20 +02:00
testdata Initial data-driven tests for pathfinder behaviour 2019-01-02 14:12:08 +00:00
AssertHelpers.hpp clang-format tests 2018-07-23 15:58:01 +02:00
CMakeLists.txt Ignore replay test when network is disabled. 2018-12-29 19:23:27 +01:00
CryptTests.cpp Add trailing commas and clang-format comments to tests 2018-07-23 16:00:14 +02:00
ImageImporterTests.cpp clang-format tests 2018-07-23 15:58:01 +02:00
IniReaderTest.cpp Use std::size instead of Util::CountOf 2018-11-23 21:59:08 +01:00
IniWriterTest.cpp clang-format tests 2018-07-23 15:58:01 +02:00
LanguagePackTest.cpp Attempt at fixing language pack test 2018-10-01 19:34:09 +02:00
Localisation.cpp clang-format tests 2018-07-23 15:58:01 +02:00
MultiLaunch.cpp clang-format tests 2018-07-23 15:58:01 +02:00
Pathfinding.cpp Initial data-driven tests for pathfinder behaviour 2019-01-02 14:12:08 +00:00
ReplayTests.cpp Add missing static keyword. 2018-12-29 19:23:28 +01:00
RideRatings.cpp Apply clang-format changes to tests 2018-07-23 16:00:23 +02:00
StringTest.cpp Apply clang-format changes to tests 2018-07-23 16:00:23 +02:00
TestData.cpp clang-format tests 2018-07-23 15:58:01 +02:00
TestData.h clang-format tests 2018-07-23 15:58:01 +02:00
TileElements.cpp Fix TileElementWantsFootpathConnection test not releasing context. 2018-12-29 22:58:33 +01:00
sawyercoding_test.cpp Add trailing commas and clang-format comments to tests 2018-07-23 16:00:14 +02:00
tests.cpp Apply clang-format changes to tests 2018-07-23 16:00:23 +02:00
tests.vcxproj Initial data-driven tests for pathfinder behaviour 2019-01-02 14:12:08 +00:00