Deprecate join (use joinToString instead)
#KT-6909
This commit is contained in:
@@ -14,13 +14,13 @@ class CollectionTest {
|
||||
assertEquals("{foo-bar}", buffer.toString())
|
||||
}
|
||||
|
||||
@test fun join() {
|
||||
@test fun joinToString() {
|
||||
val data = listOf("foo", "bar")
|
||||
val text = data.join("-", "<", ">")
|
||||
val text = data.joinToString("-", "<", ">")
|
||||
assertEquals("<foo-bar>", text)
|
||||
|
||||
val big = listOf("a", "b", "c", "d", "e", "f")
|
||||
val text2 = big.join(limit = 3, truncated = "*")
|
||||
val text2 = big.joinToString(limit = 3, truncated = "*")
|
||||
assertEquals("a, b, c, *", text2)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user