mirror of
https://github.com/4ian/GDevelop.git
synced 2025-10-15 10:19:04 +00:00
Add missing u8 prefix for UTF8 strings in tests
This commit is contained in:
@@ -46,11 +46,11 @@ TEST_CASE( "Serializer", "[common]" ) {
|
||||
}
|
||||
|
||||
SECTION("UTF8 characters") {
|
||||
gd::String originalJSON = "{\"Ich heiße GDevelop\": \"Gut!\",\"Bonjour à tout le monde\": 1,\"Hello 官话 world\": \"官话\"}";
|
||||
gd::String originalJSON = u8"{\"Ich heiße GDevelop\": \"Gut!\",\"Bonjour à tout le monde\": 1,\"Hello 官话 world\": \"官话\"}";
|
||||
SerializerElement element = Serializer::FromJSON(originalJSON);
|
||||
REQUIRE(element.GetChild("Bonjour à tout le monde").GetValue().GetBool() == true);
|
||||
REQUIRE(element.GetChild("Ich heiße GDevelop").GetValue().GetString() == "Gut!");
|
||||
REQUIRE(element.GetChild("Hello 官话 world").GetValue().GetString() == "官话");
|
||||
REQUIRE(element.GetChild(u8"Bonjour à tout le monde").GetValue().GetBool() == true);
|
||||
REQUIRE(element.GetChild(u8"Ich heiße GDevelop").GetValue().GetString() == "Gut!");
|
||||
REQUIRE(element.GetChild(u8"Hello 官话 world").GetValue().GetString() == u8"官话");
|
||||
|
||||
gd::String json = Serializer::ToJSON(element);
|
||||
REQUIRE(json == originalJSON);
|
||||
|
Reference in New Issue
Block a user