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
Matt
8243c2b64e
Update CMakeLists.txt
2019-10-20 13:49:39 +02:00
Matt
45452ad2c8
Run replay tests with network disabled
2019-08-12 18:04:08 +02:00
Tom Lankhorst
744f2225ed
Write platform tests
2019-05-11 13:54:16 +01:00
Matt
15838861cd
Add load and save test.
2019-03-02 13:11:08 +01:00
Tom Lankhorst
94758bccf6
Link with platform libraries
2019-02-05 20:17:14 +01:00
Tom Lankhorst
ce6e08c633
Introduce SET_CHECK_CXX_FLAGS
2019-02-03 23:32:51 +01:00
Michał Janiszewski
f4685f7b94
Add Pathfinding test to CMake
2019-01-02 14:12:51 +00:00
Matt
5cfc06573e
Ignore replay test when network is disabled.
2018-12-29 19:23:27 +01:00
Matt
ccc3227113
Cleanup.
2018-12-29 19:23:27 +01:00
Michał Janiszewski
05ede45b8e
Fix ICU include dirs for tests ( #8499 )
2018-12-19 23:31:24 +01:00
Ted John
f325568a97
Fix non-network builds
2018-06-01 22:47:29 +01:00
Ted John
ae81af7965
Fix Linux
2018-06-01 21:28:27 +01:00
Ted John
865bfb7b1b
Refactor implementations to different files
2018-06-01 21:27:33 +01:00
Ted John
b149c1c4ca
Add unit tests for SHA1 hashing
2018-06-01 21:27:33 +01:00
Aaron van Geffen
bf1fd997d0
Do not require ICU on MinGW and MSVC targets.
2018-05-22 17:37:07 +02:00
Aaron van Geffen
ee8bf9bd4a
Use ICU for converting strings to UTF-8 instead of our own tables.
...
Co-authored-by: Fusxfaranto <fusxfaranto@gmail.com>
2018-05-22 17:37:07 +02:00
Ted John
44764874a3
Add test for ImageImporter
2018-05-13 01:11:56 +01:00
Ted John
1226402d6e
Enable localisation tests for cmake
2018-04-18 13:16:20 +02:00
Michał Janiszewski
4d7d7500a1
Fix CMake for test_tile_elements
2018-04-17 20:43:49 +02:00
Hielke Morsink
f661d48d90
Add tests for tile_element_wants_path_connection_towards
2018-04-17 20:43:49 +02:00
Michał Janiszewski
22c755f820
Fix tests on travis
2018-04-12 22:06:42 +02:00
Ted John
9a10de7442
Enable integration tests on CI
2018-04-10 13:28:26 +01:00
Michael Steenbeek
755add6c9a
Compile localisation folder as C++
2018-01-06 18:32:25 +01:00
Michael Steenbeek
1a9975d683
Compile util and cheats as C++
2017-12-14 10:03:21 +01:00
Michael Steenbeek
6dc49d643a
Compile files in base dir as C++
2017-12-13 08:03:48 +01:00
Ted John
a737848e8e
Remove old C decoding functions and fix tests
2017-10-22 16:21:13 +02:00
Michał Janiszewski
e01cd0fd40
Use googletest with google/googletest#1045
2017-10-10 22:26:35 +02:00
Michał Janiszewski
ef5ad36cf5
Build RCT2 tests even when not running them
2017-08-31 11:02:25 +02:00
Hendrik v. Raven
75275d64b7
add a warning when using system gtest
...
gtest upstream advices against using a globally installed gtest. Make
sure the user is aware of this.
2017-07-26 11:44:06 +02:00
Hendrik v. Raven
5b3f0454dd
reformatting to match if clause
...
reformat the existing code to match the newly introduced indention level
2017-07-26 11:44:06 +02:00
Hendrik v. Raven
0f111de224
add SYSTEM_GTEST option to use gtest of the system
...
This adds a new configure option forcing the system to use googletest
installed on the system instead of downloading a version. The default
is still to download googletest.
2017-07-26 11:44:06 +02:00
Hendrik v. Raven
cfa20d2117
rename GTEST_INCLUDE_DIR to GTEST_INCLUDE_DIRS
...
GTEST_INCLUDE_DIRS is the name used by the CMake GTest package. This
is a preparation for the optional usage of a system installed gtest.
2017-07-26 11:44:06 +02:00
Brian Callahan
e7da549920
No -ldl on the BSDs, so make sure only Linux gets it
2017-06-25 23:28:04 +02:00
Michał Janiszewski
6aa4722c22
Add MultiLaunch test
2017-06-24 09:56:51 +02:00
Michał Janiszewski
105f353092
Fix symlink created for ride ratings test
2017-06-05 23:09:43 +02:00
Michał Janiszewski
eafd2ac7a7
Add option to force-disable RCT2 tests
2017-06-05 23:08:45 +02:00
Michał Janiszewski
c64076e17d
Disable ride ratings test on CI
2017-06-05 22:51:57 +02:00
Michał Janiszewski
46e9978262
Create symlink for rides test
2017-06-05 22:46:49 +02:00
Ted John
38fb37c84c
Enable ride ratings test for cmake
2017-06-04 00:48:45 +01:00
Ted John
00199051c1
Add SDL2 include to test cmake
2017-05-29 22:38:45 +02:00
Ted John
1f8f354e49
Update root cmake and enable tests
2017-05-29 22:38:44 +02:00
Ted John
23a314d4ba
Convert tabs to spaces for test cmakelists
2017-05-29 22:38:44 +02:00
Michał Janiszewski
d610ef5447
Remove unnecessary libs from linking to tests
...
[ci skip]
2017-02-25 00:10:27 +01:00
Michał Janiszewski
5f43c37ca0
Add String test to CMake
2017-02-24 23:04:36 +01:00
Michał Janiszewski
d41293fa6b
Extract common test sources into library
2017-02-24 23:04:20 +01:00
Michał Janiszewski
8143be0707
Add IniReader, IniWriter tests
2017-02-23 23:37:22 +01:00
Ted John
e649e7ad4a
Move creation of version string to Version.cpp
2017-02-09 17:58:19 +00:00
Michał Janiszewski
99032651d2
Add BUILD_BYPRODUCTS entries to CMakeLists for googletest
...
This allows building tests with ninja build system
2017-01-11 12:10:40 +01:00
Michał Janiszewski
0d88276abe
Fix tests for new source layout
2017-01-04 18:28:39 +00:00