Commit Graph

40 Commits

Author SHA1 Message Date
frozensnowy b3217703fe Fix #25910: Folders starting with numbers sort incorrectly (#25914)
Commit 43f7d2d91 introduced a regression where logicalCmp compared digit starting strings lexicographically instead of numerically, causing folders to sort as "1, 10, 11, 2..." instead of "1, 2... 10, 11". This commit removes the broken special case,  the main loop already handles
numeric comparison correctly
2026-02-05 21:50:21 +01:00
matheusvb3 6ce7379d9b Remove redundant namespace qualifiers from tests project 2026-01-07 21:04:15 -03:00
ζeh Matt 518a75f30d Parsing floats/doubles currently unsupported 2025-09-29 13:12:24 +03:00
ζeh Matt 9eeaf9a001 Rename parse to tryParse, add throwing version, return views for split 2025-09-28 23:07:29 +03:00
ζeh Matt 725b3782bd Add tests for String::parse 2025-09-28 22:35:11 +03:00
ζeh Matt 43f7d2d912 Fix logicalCmp not sorting in natural order, refactor the entire thing 2025-09-27 20:21:30 +03:00
Aaron van Geffen fa06a49302 Update copyright year to 2025 (#23514) 2024-12-31 20:30:04 +01:00
Aaron van Geffen 6ee798337a Introduce EnumUtils header (#23407) 2024-12-15 17:39:52 +01:00
Aaron van Geffen 35e117aca2 Rename String methods to use lowerCamelCase 2024-12-11 22:49:37 +01:00
Aaron van Geffen 5442b20a7a Move StrLogicalCmp, SafeStrCpy, SafeStrCat to String.hpp 2024-12-11 20:42:43 +01:00
Aaron van Geffen 1b7bbee608 Move CodepointView class to its own header 2024-09-10 23:36:59 +02:00
Aaron van Geffen 05e56517ab Adopt existing namespaces into OpenRCT2 namespace (#22368)
* Put all of TitleSequenceManager into the same namespace

* Move RideConstructionState into the OpenRCT2 namespace

* Adopt existing namespaces into OpenRCT2 namespace

This adds `using namespace OpenRCT2` to compilation units where appropriate,
as a means to get the codebase to compile until these units have been placed
in a namespace of their own.
2024-07-26 09:59:58 +02:00
James103 1d8dc111f1 Replace 2023 with 2024 in copyright headers (#21139)
Replace all instances of the year 2023 with 2024 in all copyright headers
2024-01-01 12:52:28 +01:00
ζeh Matt 378e1f3c15 Ensure the tests use the correct overloads 2023-07-06 01:32:28 +03:00
ζeh Matt c55eb50740 Add some basic tests for Equals and IEquals 2023-07-06 00:51:52 +03:00
Hielke Morsink 0762fcb601 Rename snake_case functions in OpenRCT2/util folder 2023-01-18 22:44:13 +01:00
James103 73738bbdc8 Replace 2022 with 2023 in copyright headers
Replace all instances of the year 2022 with 2023 in all copyright headers
2023-01-01 11:58:01 +01:00
73 b9e677945d Replace 20XX with 2022 (#18158)
* Replace 2020 with 2022

Replace all 2020 headers with 2022

* replace other years with 2022

add missing years
2022-10-01 08:42:14 +01:00
Michael Steenbeek db900b12db Create enum for codepages (#17181) 2022-05-10 12:55:39 +02:00
Michał Janiszewski d81b36e16f Update GoogleTest version 2022-05-08 22:22:03 +02:00
Gymnasiast 34eeacf376 Update tests 2022-05-01 18:52:28 +02:00
Ted John c7fea71db5 Add test for codepoint view 2020-11-27 18:54:57 +00:00
Duncan 1207434afa Add test cases for updated logical sort (#13143) 2020-10-10 13:37:56 +01: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
clang-format 7eafeaa971 Apply clang-format changes to tests 2018-07-23 16:00:23 +02:00
clang-format 42fa1b0f63 clang-format tests 2018-07-23 15:58:01 +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
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 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
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
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
Ted John 0ec43e3611 Improve String::Split and add tests 2017-03-08 19:06:42 +00:00
Michał Janiszewski e39444b592 Add more test cases to StringTest 2017-02-25 00:07:45 +01:00
Ted John 3b341de835 Fix String::Trim and add test 2017-02-24 21:48:06 +00:00