Add set operator to make the work with StringBuilder more list-like.

Make StringBuilder.set jvm-only.
Move jvm-specific test.
This commit is contained in:
Daniel Rothmaler
2015-10-14 14:59:56 +03:00
committed by Ilya Gorbunov
parent e155e426c2
commit 67229401c6
2 changed files with 21 additions and 0 deletions
@@ -0,0 +1,15 @@
package test.text
import kotlin.*
import kotlin.test.*
import org.junit.Test as test
class StringBuilderJVMTest() {
@test fun getAndSetChar() {
val sb = StringBuilder("abc")
sb[1] = 'z'
assertEquals("azc", sb.toString())
assertEquals('c', sb[2])
}
}