Tulio Leao
0933cd4e57
Rename Peep::litter_count to LitterCount
2020-06-04 19:16:11 +02:00
Tulio Leao
7665d1386f
Rename Peep:time_on_ride to TimeOnRide
2020-06-04 19:16:11 +02:00
Tulio Leao
e1d0d21b5e
Merge pull request #11849 from hdpoliveira/swing_vars
...
Rename swing-related variables in Vehicle
2020-06-01 08:27:57 -03:00
hdpoliveira
86550dad20
Rename swing-related variables in Vehicle
2020-05-31 16:37:09 -03:00
Tulio Leao
e18abc7e3d
Rename NoOf... to AmountOf... on Peep
2020-05-31 09:13:56 -03:00
Tulio Leao
0c502988ef
Rename Peep::disgusting_count to DisgustingCount
2020-05-30 20:35:06 -03:00
Tulio Leao
a987a9ee5e
Rename Peep::paid_to_enter to PaidToEnter
2020-05-30 20:35:06 -03:00
Tulio Leao
3f091d33e2
Rename Peep::paid_on_rides to PaidOnRides
2020-05-30 20:35:05 -03:00
Tulio Leao
414cff9b91
Rename Peep::paid_on_food to PaidOnFood
2020-05-30 20:35:05 -03:00
Tulio Leao
c2f7efa328
Rename Peep::paid_on_souvenirs to PaidOnSouvenirs
2020-05-30 20:35:05 -03:00
Tulio Leao
a729ac1589
Rename Peep::no_of_food to NoOfFood
2020-05-30 20:35:04 -03:00
Tulio Leao
bc7ea40c4b
Rename Peep::no_of_drinks to NoOfDrinks
2020-05-30 20:35:04 -03:00
Tulio Leao
625f7859a4
Rename Peep::no_of_souvenirs to NoOfSouvenirs
2020-05-30 20:35:04 -03:00
Tulio Leao
fc1ba40dc8
Rename Peep::vandalism_seen to VandalismSeen
2020-05-30 20:35:04 -03:00
Tulio Leao
fd71b1b009
Rename Peep::voucher_type to VoucherType
2020-05-30 20:35:04 -03:00
Tulio Leao
bf228abf55
Rename Peep::voucher_arguments to VoucherArguments
2020-05-30 20:35:03 -03:00
Michał Janiszewski
7f8a65c095
Make strlogicalcmp case insensitive
2020-05-20 08:35:41 +02:00
Michał Janiszewski
16d8c64cea
Improve strlogicalcmp for strings of unequal lengths
...
This version actually works and doesn't overrun provided buffers
2020-05-20 08:33:25 +02:00
Tulio Leao
e87343f9c6
Rename MoneyEffect member variables to prevent shadowing ( #11748 )
2020-05-16 17:04:31 -03:00
Tulio Leao
c17aa095d5
Rename Peep::surrounding_thought_timeout > SurroundingsThoughtTimeout
2020-05-13 23:28:16 -03:00
Tulio Leao
32c8e5614f
Rename Peep::angriness to Angriness
2020-05-13 23:25:09 -03:00
Tulio Leao
589a7a48be
Rename Peep::time_lost to TimeLost
2020-05-13 23:22:08 -03:00
Tulio Leao
a216cb9930
Rename Peep::days_in_queue to DaysInQueue
2020-05-13 23:19:41 -03:00
Tulio Leao
128c1993c1
Rename Peep::balloon_colour to BalloonColour
2020-05-13 23:16:43 -03:00
Tulio Leao
6c57f33dc9
Rename Peep::umbrella_colour to UmbrellaColour
2020-05-13 23:14:45 -03:00
Tulio Leao
222f8df6cb
Rename Peep::hat_colour to HatColour
2020-05-13 23:11:28 -03:00
Tulio Leao
3b632fcf95
Rename Peep::favourite_ride to FavouriteRide
2020-05-13 23:06:40 -03:00
Tulio Leao
7a6de648fe
Rename Peep::favourite_ride_rating to FavouriteRideRating
2020-05-13 23:03:58 -03:00
Tulio Leao
14e0cc5e4a
Rename Peep::item_standard_flags to ItemStandardFlags
2020-05-13 23:01:03 -03:00
Michael Steenbeek
d7637cd70f
Replace many C-style casts ( #11720 )
2020-05-11 14:32:56 +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
duncanspumpkin
bc04fb29c2
Remove all replay tests from 32bit builds
2020-04-12 11:18:23 +01:00
Gymnasiast
6b9b60aa94
Fix compilation error in pathfinding test
2020-03-13 20:30:23 +01:00
Gymnasiast
bdf681f440
Clean up many other coordinates
2020-03-13 12:03:43 +01:00
Michael Steenbeek
d5c4d78d49
Move vehicle track location to CoordsXYZ ( #10856 )
...
* Move vehicle track location to CoordsXYZ
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-03-01 15:45:51 -03:00
Duncan
b8b539c16e
Modify next_x/y/z to become a CoordsXYZ ( #10680 )
...
* Modify next_x/y/z to become a CoordsXYZ
Should be further scope for refactoring from this.
* Make suggested changes
* Fix default construct issues
2020-02-11 22:01:14 +00:00
Ted John
5dbd3c7c0c
Allow tests to work with CRLF test data
2020-02-02 15:47:50 +00:00
duncanspumpkin
28565b370d
Fix clang format
2020-01-19 17:19:45 +00:00
duncanspumpkin
a5ef8d6240
Rename rct_vehicle
2020-01-19 17:14:56 +00:00
duncanspumpkin
164acc85cc
Rename sprites to newer style naming
2020-01-19 17:10:53 +00:00
Gymnasiast
af12421f2d
Apply fixes
2020-01-19 17:34:11 +01:00
Gymnasiast
0d09a645fc
Refactor map_get_footpath_element() and fix #10486
2019-12-31 10:08:36 +01:00
Tulio Leao
0c2e5747b8
Clarify test coords conversions
2019-12-24 11:19:06 -03:00
Tulio Leao
6c998d7b4d
Make Map::map_get_track_element_at() use CoordsXYZ
2019-12-24 11:19:03 -03:00
Michael Steenbeek
6ede67d50a
Merge pull request #10371 from tupaschoal/coords-for-get-surface-element-at
...
Make map_get_surface_element_at only accept Coords objects
2019-12-19 13:24:17 +01:00
Tulio Leao
7e7b4029a9
Simplified conversions from TileCoordsXYZ to CoordsXY
2019-12-19 08:12:42 -03:00
Tulio Leao
aea755bd70
Allow TileCoordsXYZD to generate CoordsXYZD equivalent
2019-12-19 00:11:26 -03:00
Tulio Leao
5c657bde9f
Remove map_get_surface_element_at operating with TileCoordsXY
2019-12-18 23:47:17 -03:00
Tulio Leao
7c75db2b2d
Make map_get_surface_element_at only accept Coords objects
2019-12-18 23:46:50 -03:00
Tulio Leao
c71c4284d0
Make map entrance/exit fetching functions use only CoordsXY objects
2019-12-17 23:55:46 -03:00
Tulio Leao
03e7e29b21
Make map entrance/exit fetching functions use Coords objects
2019-12-14 12:13:09 -03:00
Matt
6dd00787f6
Add missing static keywords
2019-10-20 14:13:59 +02:00
Matt
3d7c06f4b3
Change fopen_s to fopen and use EXPECT_EQ for COMPARE_FIELD
2019-10-20 14:13:59 +02:00
Matt
e6d520e371
Add missing include
2019-10-20 13:49:39 +02:00
Matt
8243c2b64e
Update CMakeLists.txt
2019-10-20 13:49:39 +02:00
Matt
6177255991
Add S6 Import/Export test and remove old NetworkLoadSave test
2019-10-20 13:49:35 +02:00
Richard Fine
0e04dbeea1
Allow SwapBE to swap non-uint types
...
If we want to have more semantically meaningful types (like Direction), it's useful to be able to support those in the DataSerializer too. Swapping bytes for entire structures is probably never going to make sense, but for types that are pure wrappers around integer types, we want to be able to swap them as if they were the integer they wrap.
2019-09-01 18:40:11 +01:00
Richard Fine
6449393d50
Use Direction type in a bunch of the pathfinding code
2019-09-01 18:38:03 +01:00
Ted John
d5a1b4fc8f
Fix #9920 : Ghost pieces break maps on multiplayer for the client ( #9928 )
2019-08-23 21:05:00 +02:00
duncanspumpkin
5333dc4295
Return a SurfaceElement from get_surface_element
2019-08-19 20:04:56 +01:00
Matt
45452ad2c8
Run replay tests with network disabled
2019-08-12 18:04:08 +02:00
Ted John
cd4eb86a7c
Merge pull request #9725 from IntelOrca/refactor/ride-manager
...
Refactor ride list
2019-08-07 21:03:17 +01:00
ζeh Matt
7730b35d82
Merge pull request #9571 from ZehMatt/replay-cleanup
...
Replay cleanup
2019-08-05 18:31:03 +02:00
Ted John
a863c7ae50
Remove rest of FOR_ALL_RIDES instances
2019-08-04 16:44:17 +01:00
Ted John
414b53b56d
Remove ride classifications
2019-08-04 16:43:50 +01:00
Ted John
a3fe00f0a3
Refactor ride list to a manager with iterator
2019-08-04 16:43:50 +01:00
Ted John
3f8890afde
Fix remaining errors and a few bugs
2019-07-29 19:18:16 +01:00
Matt
17918d2f6b
Remove replays
2019-07-14 16:45:55 +02:00
Tom Lankhorst
ed353faccf
Implement replace_if condition lambda
...
Fix include typo and CS
2019-05-11 13:54:16 +01:00
Tom Lankhorst
744f2225ed
Write platform tests
2019-05-11 13:54:16 +01:00
Gymnasiast
17ddd451db
Fix tests, fix formatting
2019-05-07 20:04:07 +02:00
NexGenration
e6c88a05db
Make peep generate a static member function
2019-05-07 19:34:50 +02:00
Duncan
9c4430736d
Use get track element ( #8884 )
...
* Use get_track_element and change its return type
* Make things work
* Use helper functions where possible
2019-03-16 11:21:36 +00:00
Matt
15838861cd
Add load and save test.
2019-03-02 13:11:08 +01:00
Ted John
cdec457abd
Refactor peep struct
2019-02-28 20:28:58 +01:00
Matt
c631177877
[ci skip] Add bpb.sv6 to the replays with 7000 ticks.
2019-02-16 09:09:51 +01:00
ζeh Matt
20989ae4d8
Merge pull request #8675 from tomlankhorst/compress-replays
...
.sv6r version 2: introducing compression
2019-02-10 11:01:26 +01:00
Michał Janiszewski
2f16ad164d
Merge pull request #8671 from tomlankhorst/cmake-link-with-platform
...
Link targets with platform specific libs
2019-02-07 23:40:46 +01:00
Matt
598ea08529
Update copyright.
2019-02-07 18:50:58 +01:00
Matt
49a6ae7894
Add CircularBuffer test.
2019-02-07 18:50:58 +01:00
Tom Lankhorst
756b52186e
Normalised and upgraded all replays
2019-02-06 10:24:10 +01:00
Tom Lankhorst
94758bccf6
Link with platform libraries
2019-02-05 20:17:14 +01:00
Michał Janiszewski
6bdbe248fd
Merge pull request #8641 from tomlankhorst/use-lto
...
Detect availability of LTO, apply when available
2019-02-04 00:06:37 +01:00
Tom Lankhorst
ce6e08c633
Introduce SET_CHECK_CXX_FLAGS
2019-02-03 23:32:51 +01:00
Tom Lankhorst
6a42a95495
Refactor random engine
...
Introduce RotateEngine and Rct2Engine, FixedSeedSequence and Rct2Seed.
Adhere respectively to requirements `RandomNumberEngine` and `SeedSequence`.
Can be used with C++11 adaptors and distributions in <random>.
2019-02-01 14:32:04 +01:00
Ted John
8701286772
Use new ride_id_t typedef ( #8561 )
2019-01-12 10:11:55 +00:00
Matt
b01c93ba4c
Normalise replays.
2019-01-07 09:04:51 +01:00
Michał Janiszewski
37535f4642
Release ImageImporter'd buffer after the test is done
2019-01-02 20:14:28 +01:00
Richard Fine
cec457fbf1
Reformat
2019-01-02 14:12:51 +00:00
Richard Fine
315ea057fe
Verify that peeps stay on paths
...
As per PR recommendation, confirm that a peep is still on the footpath for every step of the pathfinding tests.
2019-01-02 14:12:51 +00:00
Richard Fine
bb4e79ddda
Rework tests to use ride entrances as path targets
...
It turns out that trying to just give a peep a pathfinding goal and then let them loose doesn't work, because every time they reach a junction, the pathfinder has them walk 'aimlessly' instead of pursuing their target. That's why we were seeing some very large step counts in previous tests - they were (eventually) walking onto the target square, but only after lots of wandering around in circles.
This commit reworks the test data to contain an actual ride for each test scenario, where the peep will path to the tile in front of the ride entrance. A nice side benefit of this is that the ride names must match the test names, so you can now tell from looking at the rides in the test data which one is used for which test instance.
The 'yellow marker' tiles for goal positions are also removed here, as we're deriving goal positions from the ride entrances instead.
2019-01-02 14:12:51 +00:00
Richard Fine
c8c1abd10a
Reformat
2019-01-02 14:12:51 +00:00
Richard Fine
a20c8d61be
Call core_init instead of bitcount_init
2019-01-02 14:12:51 +00:00
Richard Fine
280a0c61e4
Rename maxSteps to expectedSteps
...
To make it a little clearer what the parameter is for, rename FindPath::maxSteps to FindPath::expectedSteps, and extend the comment to describe what happens in negative test scenarios.
2019-01-02 14:12:51 +00:00
Richard Fine
357ee293f3
Remove default value for SimplePathfindingScenario steps
...
Remove the default value as it's more consistent to just always have the test case specify it explicitly.
2019-01-02 14:12:51 +00:00
Richard Fine
49e46f8940
Replace GetSurfaceStyleAtLocation with map_get_surface_element_at
...
There exists a helper function map_get_surface_element_at which already searches a tile's element list for the surface element, so we can just use that.
2019-01-02 14:12:51 +00:00
Michał Janiszewski
f4685f7b94
Add Pathfinding test to CMake
2019-01-02 14:12:51 +00:00
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
Matt
045e72e863
Add more replays to test.
2019-01-02 08:30:33 +01:00
Matt
8615690891
Fix timestamp not being stored.
2019-01-02 05:36:31 +01:00
Matt
f868c23077
Update replay.
2018-12-30 00:07:39 +01:00
Matt
0ba42d6899
Fix TileElementWantsFootpathConnection test not releasing context.
2018-12-29 22:58:33 +01:00
Matt
5497036f01
Add missing static keyword.
2018-12-29 19:23:28 +01:00
Matt
871a24c410
Rename replay file.
2018-12-29 19:23:28 +01:00
Matt
0a62938e42
Pretty print the test parameter.
2018-12-29 19:23:28 +01:00
Matt
711d93cb30
Update replay test.
2018-12-29 19:23:27 +01: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
Matt
669fbd62dd
Add missing source file.
2018-12-29 19:23:27 +01:00
Matt
017f190a52
Add basic regression tests via the replay system.
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
Hielke Morsink
354d973a48
Use std::size instead of Util::CountOf
2018-11-23 21:59:08 +01:00
Michael Steenbeek
f8add7f62e
Rename rct_tile_element to TileElement
2018-11-01 13:53:50 +01:00
Ted John
211bd84cc3
Merge pull request #7806 from Gymnasiast/feature/rtl-rendering
...
Fix RTL text rendering for Linux / macOS
2018-10-16 22:26:45 +01:00
Gymnasiast
37f59e17dc
Replace C-style isSloped() function
2018-10-04 12:13:17 +02:00
Gymnasiast
eae09ea16d
Attempt at fixing language pack test
2018-10-01 19:34:09 +02:00
Michael Steenbeek
ce13d1b961
Fix tests
2018-09-27 22:15:04 +02:00
Ted John
7faa4e06e0
Update gtest to latest snapshot ( #7950 )
...
This fixes issues when building with MSVC 15.8.
2018-08-30 10:10:36 +02:00
Hielke Morsink
0b03464186
Replace 0 and NULL with nullptr ( #7827 )
2018-07-25 22:49:20 +02:00
clang-format
7eafeaa971
Apply clang-format changes to tests
2018-07-23 16:00:23 +02:00
Hielke Morsink
6fd9843dc3
Add trailing commas and clang-format comments to tests
2018-07-23 16:00:14 +02:00
clang-format
42fa1b0f63
clang-format tests
2018-07-23 15:58:01 +02:00
Michael Steenbeek
fae7c61f05
Fix config read/write
2018-06-20 17:56:57 +02:00
Michael Steenbeek
57ab1bb2e9
Fix failing test
2018-06-20 17:55:17 +02:00
Michael Steenbeek
1b08fb4e69
Replace our own integer types with standard ones
2018-06-20 17:30:40 +02:00
Hielke Morsink
0cf256ac9e
Ready copyright notice for clang-format
...
Clang-format sees the text behind `#pragma region` as code and formats it. Instead of stating the copyright and date there, it's now in the comment block right below it. The text "Copyright" is left in the `#pragma region` line, as clang-format sees it as a single identifier.
I took the opportunity to normalize the dates, and add the copyright notice to the source files where it was missing them (except for third-party and the generated resources.h file).
2018-06-15 14:07:34 +02: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
65f0fbdf78
Add test data for crypt tests
2018-06-01 21:27:34 +01:00
Ted John
72293f2208
Implement new Crypt code and remove CNG for now
2018-06-01 21:27:34 +01:00
Ted John
b8d37548ed
Implement PEM writing for CNG implementation
2018-06-01 21:27:34 +01:00
Ted John
9467438c1c
Implement PEM reading for CNG implementation
2018-06-01 21:27:34 +01:00
Ted John
9e214258c3
Finish OpenSSL RSA implementation
2018-06-01 21:27:33 +01:00
Ted John
865bfb7b1b
Refactor implementations to different files
2018-06-01 21:27:33 +01:00
Ted John
966032a047
Add test for two digests with same hash object
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
Ted John
9d617958cf
Return date and park by reference from game state
2018-05-30 13:12:19 +01:00
Michał Janiszewski
afdcd35fb9
Fix MultiLaunch test.
2018-05-30 11:53:32 +02:00
Ted John
6af0cb2b88
Fix import of S4 and S6
2018-05-29 18:39:12 +01:00
Aaron van Geffen
b836ad050d
Rewrite CodePageFromUTF8 as CodePageFromUnicode.
2018-05-22 19:51:34 +02:00
Ted John
71a2cb46d2
Fix ToUpper tests on Windows
...
LCMapStringEx does not unfold ligatures if there is no uppercase equivalent.
2018-05-22 17:37:07 +02: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
4c67c0eaca
Split ToUpper tests into more granular subtests.
2018-05-22 17:37:07 +02:00
Fusxfaranto
a91dd6a356
Implement ICU support for uppercasing, with tests.
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
ad6ebd646c
Remove work around in TileElement test fixture
2018-05-11 20:39:00 +01:00
Michał Janiszewski
090c444353
Destroy context in TileElementWantsFootpathConnection::TearDownTestCase
...
Not destroying the context might upset some compilers due to the order
of destruction of variables the context might still require.
2018-05-11 20:37:48 +01:00
Ted John
7dc170ef85
Use shared_ptr for long-life objects
...
Use unique_ptr and shared_ptr for IContext, IPlatformEnvironment, IUiContext, and IAudioContext.
2018-05-11 20:37:48 +01:00
Hielke Morsink
8d10bfb5a1
Add namespace closing comments
2018-05-04 22:54:43 +02:00
Ted John
6d76d76f98
Protect against bad RCT2 strings
2018-04-19 22:36:14 +01:00
Ted John
a4ee512378
Fix test data in Localisation tests
2018-04-18 13:16:20 +02:00
Ted John
1226402d6e
Enable localisation tests for cmake
2018-04-18 13:16:20 +02:00
Ted John
e7fb20c283
Add tests for rct2 <-> utf8 conversions
2018-04-18 13:16:20 +02:00
Ted John
100b9cbba2
Add tests for String::Convert
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
58306e8055
Set tests output directory to bin
...
This is the easiest way to allow the tests to use the OpenRCT2 data for msbuild.
2018-04-10 18:00:02 +01:00
Ted John
9a10de7442
Enable integration tests on CI
2018-04-10 13:28:26 +01:00
Ted John
fe3c136083
Set no graphics for integration tests
2018-04-10 13:19:48 +01:00
Michał Janiszewski
764520076f
Reduce header inclusion
...
* Update includes in PlatformEnvironment.cpp
* Update includes in ParkImporter.h
* Update includes of OpenRCT2.h
* Update includes in Intro.h
* Remove unused include from Input.cpp
* Update includes of Imaging.h
* Update includes in Game.h
* Update includes in Editor.h
* Update includes of Context.cpp
* Update includes in Cheats.cpp, CmdlineSprite.cpp
* Update includes of some source files
* Update includes in some cpp files
* Update includes in some cpp files
* Update includes in TextureCache.h
* Fix tests
* Update includes in Font.cpp
* Update includes in LightFX files
* Update some includes
* Fix GCC builds
* Update some includes
* Update some includes
* Update includes in FontsFamilies.*
* Update includes of Console.h
* Improve includes in Window.h
* Improve headers in Viewport.h/Window.h
* Fix MSVC build
* Fix network-less builds
* Reduce inclusion of Map.h
2018-03-13 13:14:02 +01:00
Michael Steenbeek
755add6c9a
Compile localisation folder as C++
2018-01-06 18:32:25 +01:00
Aaron van Geffen
d768a467b7
Implement std::string variant of TrimStart; add tests.
...
This also makes String::TrimStart handle all-whitespace strings.
2017-12-25 00:30:21 +01:00
Aaron van Geffen
4bc2ad18c4
Trim ideographic spaces as well.
2017-12-25 00:30:21 +01:00
Aaron van Geffen
6c26009f19
Fix #6097 : String::Trim wasn't taking multibyte chars into account.
...
Extends StringTest with multibyte tests.
NB: ストリング is a katakana transcription of 'string'.
2017-12-25 00:30:21 +01:00
Aaron van Geffen
02abdb3709
Change failing test to expect nullptr rather than "". ( #6832 )
2017-12-16 12:06:22 +00: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
Michael Steenbeek
171271215e
Change some ride type names for clarity, fix Americanism
2017-12-08 07:59:44 +01:00
Michael Steenbeek
0ffa2b541a
Use more consistent terminology and remove some Americanisms
2017-12-05 10:23:36 +01:00
Michael Steenbeek
60d8865efb
Compile game.c and game.h as C++
2017-12-05 09:10:27 +01:00
Ted John
a737848e8e
Remove old C decoding functions and fix tests
2017-10-22 16:21:13 +02:00
Michał Janiszewski
69914b3078
Mark templates as static
2017-10-19 23:57:30 +02:00
Michał Janiszewski
e01cd0fd40
Use googletest with google/googletest#1045
2017-10-10 22:26:35 +02:00
Michał Janiszewski
5ab9f938a7
Update files missed in the great extern "C" cleanup of 2017
2017-09-28 23:29:16 +02:00
Michał Janiszewski
00fd18809c
Move extern "C" {} blocks to headers ( #6282 )
2017-09-18 17:05:28 +02:00
Gymnasiast
3891b9874d
Fix testpaint
2017-09-12 11:29:43 +02:00
Michał Janiszewski
ef5ad36cf5
Build RCT2 tests even when not running them
2017-08-31 11:02:25 +02:00
Richard Jenkins
71e580a58f
Refactor game load functions, resolves #6011
2017-08-23 08:04:36 +02:00
Michał Janiszewski
ede8054726
Make multilaunch retest ride count after some updates
2017-08-02 23:50:49 +02:00
Michał Janiszewski
b3b2a1ece2
Improve multilaunch test to delete the load result
2017-08-02 23:50:38 +02:00
Michał Janiszewski
01271f68d8
Call game_load_init() in multilaunch test
2017-08-02 19:39:52 +02:00
Michał Janiszewski
c3dd3f193f
Extend multilaunch test to perform game_logic_updates
2017-08-02 19:39:52 +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
Ted John
f275e5ba9b
Remove all platform.h includes from header files
...
System headers, particularly windows.h polute the namespace too much with macros and unwanted definitions. Do not use them in header files.
2017-06-25 18:59:56 +01:00
Michał Janiszewski
21e65934d6
Change number of launches in multilaunch test to 3
...
[ci skip]
2017-06-24 09:56:51 +02:00
Michał Janiszewski
6aa4722c22
Add MultiLaunch test
2017-06-24 09:56:51 +02:00
Michał Janiszewski
61d38511bc
Expand tabs to spaces
...
This commit expands tabs to spaces (ts=4) in all the files under src/
and test/.
Until now we had two wildly different code styles with C using tabs and
new C++ using spaces. It is painful to maintain as none of the commonly
used tools support this kind of setup and in reality is needless, as we
can simply convert all the sources to spaces and have opened PRs do the
same, where needed.
Additionally, trailing whitespace has been removed.
2017-06-06 23:46:14 +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
9a619b3e0a
Clean up branch
2017-06-05 17:38:14 +01:00
Ted John
38fb37c84c
Enable ride ratings test for cmake
2017-06-04 00:48:45 +01:00
Ted John
0662f1630a
Fix ride ratings test to work with new Context flow
2017-06-04 00:48:45 +01:00
Ted John
f2524c07b3
Add rating test data
2017-06-04 00:47:34 +01:00
Ted John
e9898ba82f
Use new rating test data
2017-06-04 00:47:33 +01:00
Ted John
7ca1173bcb
Fix warning
2017-06-04 00:47:33 +01:00
Ted John
b28fde6ae7
Create test data helpers
2017-06-04 00:47:33 +01:00
Ted John
cf7f1b7335
Change location of test data
2017-06-04 00:47:33 +01:00
Ted John
d65d31f632
Fix test expectations and describe ride types
2017-06-04 00:47:33 +01:00
Ted John
443e17c8fc
Force rating update on each ride before testing
2017-06-04 00:47:33 +01:00
Ted John
c5306d72f7
Add ride ratings test
2017-06-04 00:47:33 +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
CraigCraig
e0b875398b
Tons of spelling fixes ( #5413 )
...
[ci skip]
2017-04-30 06:39:24 +02:00
Ted John
0ec43e3611
Improve String::Split and add tests
2017-03-08 19:06:42 +00:00
Michał Janiszewski
6181d968e8
Add case insensitive test to INI tests
2017-03-06 22:28:33 +01:00
Michał Janiszewski
d610ef5447
Remove unnecessary libs from linking to tests
...
[ci skip]
2017-02-25 00:10:27 +01:00
Michał Janiszewski
e39444b592
Add more test cases to StringTest
2017-02-25 00:07:45 +01:00
Michał Janiszewski
62ab0e0e03
Add missing include to IniReaderTest
2017-02-25 00:07:45 +01:00
Ted John
f851198645
Fix and format test data
2017-02-24 23:01:06 +00:00
Ted John
fe2cb79d18
Use strings for test data in IniReaderTest
2017-02-24 22:57:32 +00:00
Michał Janiszewski
7d0cc83908
Add tests for untrimmed INI
2017-02-24 23:39:01 +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
Ted John
3b341de835
Fix String::Trim and add test
2017-02-24 21:48:06 +00:00
Michał Janiszewski
84d69b797b
Change type of variable used in test
2017-02-24 20:58:01 +01:00
Michał Janiszewski
58da1cde84
Make IniReader not throw while parsing invalid values
2017-02-24 20:26:49 +01:00
Michał Janiszewski
21827c91ab
Extend duplicate INI tests with values
2017-02-24 20:18:30 +01:00
Michał Janiszewski
94f0b39f0f
Add tests for duplicate sections
2017-02-24 20:15:15 +01:00
Michał Janiszewski
0a77374899
Move MemoryStreams in INI tests to stack
2017-02-24 19:53:23 +01:00
Michał Janiszewski
d23edb0f91
Fix INI tests for Windows' 2-byte newlines
2017-02-24 00:10:04 +01:00
Michał Janiszewski
e5d569ac6c
Add INI tests to MSVC
2017-02-23 23:38:25 +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
Ted John
3a4bc87198
Allow control of assertion behaviour
...
This allows tests to change the behaviour at runtime so that OpenRCT2 aborts instead of showing a message box.
2017-02-09 17:57:39 +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
Ted John
b7b58817bb
Rename openrct2-lib to libopenrct2
2017-01-10 17:29:03 +00:00
Ted John
73b21b5880
Convert openrct2 to static library
2017-01-10 17:29:02 +00:00
Michał Janiszewski
0d88276abe
Fix tests for new source layout
2017-01-04 18:28:39 +00:00
Ted John
a2e3f10ca1
Update VS project files
2017-01-04 18:28:37 +00:00
Ted John
c8dbc24ceb
Enable all C++ features for MSVC
2016-12-16 01:19:41 +00:00
Michał Janiszewski
2e674b9202
Migrate Linux Travis-CI jobs to docker containers
2016-12-15 16:55:17 +00:00
Michał Janiszewski
f9424455e7
Merge pull request janisozaur/OpenRCT2#23
...
Add msbuild / msvc / windows support for tests
2016-12-02 22:52:07 +01:00
Michał Janiszewski
3253ef7cae
Verify decoded chunk length
2016-12-02 22:12:55 +01:00
Michał Janiszewski
28098776b2
Convert tests to class + fixtures
...
This makes test data not require `extern`
2016-12-02 22:00:02 +01:00
Ted John
756e26ad45
Fix main function
2016-12-02 17:16:12 +00:00
Ted John
d26e1df21e
Automatically download googletest
2016-12-02 13:36:03 +00:00
Ted John
4ccb50409b
Add test configurations
2016-12-02 02:49:50 +00:00
Ted John
91e19c7d48
Move a lot of the common properties to a shared props file
2016-12-02 00:59:52 +00:00
Ted John
a08af1a253
Get tests to build for Windows and VS
2016-12-02 00:34:14 +00:00
Michał Janiszewski
86a336dd3d
Extend LanguagePack test with negative tests
2016-12-01 23:28:01 +01:00
Michał Janiszewski
a2d30ac405
Add multibyte LanguagePack test
2016-12-01 23:21:35 +01:00
Michał Janiszewski
e3a3cf375d
Add LanguagePackTest
2016-12-01 23:04:10 +01:00
Michał Janiszewski
729934193c
Improve tests' CMakeLists.txt
2016-12-01 16:03:27 +01:00
Michał Janiszewski
b0e5333ce6
Improve sawyercoding_test.cpp
2016-12-01 16:03:27 +01:00
Michał Janiszewski
cae3f776f3
Run tests on travis
2016-12-01 16:03:27 +01:00
Michał Janiszewski
f496fceb00
Download and compile our own gtest
2016-12-01 16:03:27 +01:00
Michał Janiszewski
be1028b20e
Add CMakeLists.txt file for tests
2016-12-01 16:03:27 +01:00
Michał Janiszewski
fdcbd583e3
Add first test for sawyercoding
2016-12-01 16:03:27 +01:00