test(KT-31614): fixate behavior of serialization/deserialization of UTF characters.

This commit is contained in:
Artem Kobzar
2022-04-21 09:22:24 +00:00
committed by Space
parent e974d16e7a
commit 7327bc864e
12 changed files with 82 additions and 0 deletions
@@ -0,0 +1,24 @@
fun box(step: Int): String {
return when (step) {
0 -> checkStep(step, qux = "\uD800", quz = "\uD800")
1 -> checkStep(step, qux = "\uDB6A", quz = "\uD800")
2 -> checkStep(step, qux = "\uDB6A", quz = "\uDFFF")
else -> "Unknown Step"
}
}
fun checkStep(step: Int, qux: String, quz: String): String {
val a = qux()
val b = quz()
if (a != qux || a == "?") {
return "Fail(qux): Step $step"
}
if (b != quz || b == "?") {
return "Fail(quz): Step $step"
}
return "OK"
}
@@ -0,0 +1,7 @@
STEP 0:
dependencies: stdlib, lib1, lib2, lib3
dirty: m.kt
STEP 1:
dependencies: stdlib, lib1, lib2, lib3
STEP 2:
dependencies: stdlib, lib1, lib2, lib3