Skip to content

Commit 8e25204

Browse files
author
Sergey Mashkov
committed
Add test to ensure the bug is already fixed (#11)
1 parent 816f753 commit 8e25204

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

common/test/kotlinx/io/tests/StringsTest.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,11 @@ open class StringsTest {
469469
}
470470
}
471471

472+
@Test
473+
fun testStringCtorRange() {
474+
assertEquals("@C", String(byteArrayOf(64, 64, 67, 67), length = 2, offset = 1))
475+
}
476+
472477
private fun longMultibyteString() = StringBuilder().apply {
473478
repeat(10_000) {
474479
append("\uD858\uDE18")

0 commit comments

Comments
 (0)