Deprecate StringBuilder { } function, and introduce buildString { } instead.

#KT-7295 Fixed
This commit is contained in:
Ilya Gorbunov
2015-10-08 21:25:44 +03:00
parent 6d7cc0671e
commit af0a59dd02
3 changed files with 14 additions and 12 deletions
@@ -6,10 +6,10 @@ import org.junit.Test as test
class StringBuilderTest {
@test fun stringBuild() {
val s = StringBuilder {
val s = buildString {
append("a")
append(true)
}.toString()
}
assertEquals("atrue", s)
}
@@ -21,8 +21,8 @@ class StringBuilderTest {
@test fun append() {
// this test is needed for JS implementation
assertEquals("em", StringBuilder {
assertEquals("em", buildString {
append("element", 2, 4)
}.toString())
})
}
}