Commit Graph

73 Commits

Author SHA1 Message Date
Aaron van Geffen 9e206d5528
Remove dependency on StringIds.h from Localisation.h (#22011)
* Remove dependency on StringIds.h from Localisation.h

* Include Language.h in UTF8.cpp for function declarations

* Rename tests/Localisation.cpp to tests/LocalisationTest.cpp
2024-05-10 19:14:05 +00:00
Duncan 1ec62e44bb
Add missing string test (#19837) 2023-04-05 21:28:50 +01:00
duncanspumpkin b9ce206044 Move to pretest discovery 2023-03-30 08:31:59 +01:00
duncanspumpkin bde48f0b25 Fix running the tests 2023-03-29 22:05:21 +01:00
duncanspumpkin aee3f17b93 Fix cmake tests compiling 2023-03-29 22:04:13 +01:00
Josh Trzebiatowski 3b82774df1
Rename snake_case methods/classes under tests (#19205)
* Remove snake_case method names in sawyercoding_test.cpp

* Rename sawyercoding_test.cpp to SawyerCodingTest.cpp

* Rename sawyercoding_test.cpp to SawyerCodingTest.cpp
2023-01-18 06:06:54 +00:00
Michał Janiszewski 0f11246a81
Sync cmake version required for tests to main project (#18766)
b7a1db6e69/CMakeLists.txt (L2)
2022-12-17 18:33:01 +01:00
Michał Janiszewski 1670aa759f Remove support for vendored gtest
Originally implemented only to satisfy the (somewhat dubious) claim of
gtest about the necessity to provide your own copy. The original claim
got removed here:
5437926b22
2022-05-09 23:04:53 +02:00
Michał Janiszewski d81b36e16f Update GoogleTest version 2022-05-08 22:22:03 +02:00
ZehMatt cd43cab999
Add tests for EnumMap 2021-07-29 17:07:49 +03:00
Ted John 1523597b50 Fix test failures 2021-02-16 20:25:11 +00:00
Ted John 92fcdfbd9b Fix GCC compiler errors 2020-11-27 18:54:57 +00:00
Hielke Morsink f0c1ea1d37
Split declarations and definitions to improve compile times when editing (#13332)
* Split FileStream declarations and definitions

* Split JobPool declarations and definitions

* Split StringBuilder declarations and definitions

* Split StringReader declarations and definitions

* Split ZoomLevel declarations and definitions

* Fix missing include in FileClassifier.cpp

* Remove pragma once from source files

* Fix missing include in StringBuilder.h

* Update Xcode project

* Fix compilation of tests

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
2020-11-07 12:42:04 +00:00
Tulio Leao bace4d62f8 Specify SYSTEM includes on CMAKE builds 2020-10-09 01:28:34 -03:00
Michael Steenbeek 6b9f83a5a4
Fix compilation on Linux and macOS 2020-09-18 19:46:12 +02:00
Gymnasiast 4ff77ebc35
Split RTL implementations to files; add preprocessor guards 2020-09-18 19:46:12 +02:00
Michał Janiszewski 13842198fa
Disable HTTP for targets that don't need it (#12375) 2020-07-25 09:09:15 +02:00
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