Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support of UTF-16 surrogate pairs to okio streams
Fixes #2030
- Loading branch information
Showing
3 changed files
with
67 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
formats/json-tests/commonTest/src/kotlinx/serialization/features/EmojiTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* Copyright 2017-2022 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. | ||
*/ | ||
|
||
package kotlinx.serialization.features | ||
|
||
import kotlinx.serialization.builtins.serializer | ||
import kotlinx.serialization.json.JsonTestBase | ||
import kotlin.test.Test | ||
|
||
|
||
class EmojiTest : JsonTestBase() { | ||
|
||
@Test | ||
fun testEmojiString() { | ||
assertJsonFormAndRestored( | ||
String.serializer(), | ||
"\uD83C\uDF34", | ||
"\"\uD83C\uDF34\"" | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters