OpenRCT2/test/tests
Breno Rodrigues Guimarães ab53ddf59f Avoid fast-forwarding peep into the ride
The code being removed in the patch tries to fast forward a peep into the ride when it is the second peep for a vehicle that is used in pairs. Problem is that funds checking does not happen, so it happens that a peep may pay against its will.
Lets say a rich peep enters in line and a poor peep enters in line right after.
If the price of the ride is such that the rich peep can pay and the poor peep can't, it will be dragged into the ride because funds checking only happened for the first.
The second part of the patch just adjusts we consider the vehicle a full car if the second position is filled.

Add test to verify that a peep is not dragged into a ride it can't pay

This test puts two peeps in a Ferris Wheel. The first peep is rich and the second peep is poor. When they are both in line, the ride price is raised so that the poor peep can't pay.
Make sure the poor peep turns back and leaves the ride.

During development, a mistake in the logic would have broken all rides other than ferris wheels in a way that multiple guests could enter the same car.
Also add a test to make sure that is never broken.
2020-04-25 18:27:33 -03:00
..
helpers Allow tests to work with CRLF test data 2020-02-02 15:47:50 +00:00
testdata Avoid fast-forwarding peep into the ride 2020-04-25 18:27:33 -03:00
AssertHelpers.hpp clang-format tests 2018-07-23 15:58:01 +02:00
CMakeLists.txt Avoid fast-forwarding peep into the ride 2020-04-25 18:27:33 -03:00
CircularBuffer.cpp Update copyright. 2019-02-07 18:50:58 +01:00
CryptTests.cpp Allow tests to work with CRLF test data 2020-02-02 15:47:50 +00:00
Endianness.cpp Allow SwapBE to swap non-uint types 2019-09-01 18:40:11 +01:00
ImageImporterTests.cpp Release ImageImporter'd buffer after the test is done 2019-01-02 20:14:28 +01: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 Remove ride classifications 2019-08-04 16:43:50 +01:00
Pathfinding.cpp Fix compilation error in pathfinding test 2020-03-13 20:30:23 +01:00
Platform.cpp Implement replace_if condition lambda 2019-05-11 13:54:16 +01:00
PlayTests.cpp Avoid fast-forwarding peep into the ride 2020-04-25 18:27:33 -03:00
ReplayTests.cpp Remove all replay tests from 32bit builds 2020-04-12 11:18:23 +01:00
RideRatings.cpp Remove ride classifications 2019-08-04 16:43:50 +01:00
S6ImportExportTests.cpp Move vehicle track location to CoordsXYZ (#10856) 2020-03-01 15:45:51 -03: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 Refactor map_get_footpath_element() and fix #10486 2019-12-31 10:08:36 +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 Avoid fast-forwarding peep into the ride 2020-04-25 18:27:33 -03:00