Introduce a deprecated StringBuilder.append(CharArray, Int, Int) in Common #KT-52336

This commit is contained in:
Abduqodiri Qurbonzoda
2022-09-08 14:34:38 +00:00
committed by Space
parent faedd76b32
commit 0db9326105
5 changed files with 52 additions and 0 deletions
@@ -0,0 +1,20 @@
/*
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package test.text
import kotlin.test.*
class StringBuilderJVMTest {
// KT-52336
// Tests that the deprecated Common StringBuilder.append(CharArray, Int, Int) does not affect JVM target.
@Test
fun deprecatedAppend() {
val chars = charArrayOf('a', 'b', 'c', 'd')
val sb = StringBuilder()
sb.append(chars, 1, 2)
assertEquals("bc", sb.toString())
}
}