1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-02-01 19:25:12 +01:00

Implement ICU support for uppercasing, with tests.

This commit is contained in:
Fusxfaranto
2018-05-14 21:35:48 +02:00
committed by Aaron van Geffen
parent f29b42cc26
commit a91dd6a356
3 changed files with 31 additions and 6 deletions

View File

@@ -114,3 +114,18 @@ TEST_F(StringTest, Convert_Empty)
}
#endif
///////////////////////////////////////////////////////////////////////////////
// Tests for String::ToUpper
///////////////////////////////////////////////////////////////////////////////
TEST_F(StringTest, ToUpper_Basic)
{
auto actual = String::ToUpper("test TEST tEsT 1234");
ASSERT_STREQ(actual.c_str(), "TEST TEST TEST 1234");
}
TEST_F(StringTest, ToUpper_Unicode)
{
auto actual = String::ToUpper("éœǘξдȿ𞥃ꜳᲁ ÉŒǗΞДⱾ𞤡ꜲД 語");
ASSERT_STREQ(actual.c_str(), "ÉŒǗΞДⱾ𞤡ꜲД ÉŒǗΞДⱾ𞤡ꜲД 語");
}