26e7c29a91
The logic of detecting changes in Kotlin facets was changed from "Include selected fields" to "Include all compiler arguments and exclude selected". This will help to avoid multiple IC issues when new change-sensitive compiler arguments will be added (#KTIJ-17137, #KT-51536, #KTIJ-17170, #KTIJ-17300, #KT-47983) Fixed Merge-request: KT-MR-7455 Merged-by: Aleksei Cherepanov <aleksei.cherepanov@jetbrains.com>
59 lines
1.3 KiB
Kotlin
59 lines
1.3 KiB
Kotlin
/*
|
|
* 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 org.jetbrains.kotlin.build
|
|
|
|
import junit.framework.TestCase
|
|
|
|
class JoinToReadableStringTest : TestCase() {
|
|
fun test0() {
|
|
assertEquals(
|
|
"",
|
|
listOf<String>().joinToReadableString()
|
|
)
|
|
}
|
|
|
|
fun test1() {
|
|
assertEquals(
|
|
"a",
|
|
listOf("a").joinToReadableString()
|
|
)
|
|
}
|
|
|
|
fun test2() {
|
|
assertEquals(
|
|
"a and b",
|
|
listOf("a", "b").joinToReadableString()
|
|
)
|
|
}
|
|
|
|
fun test3() {
|
|
assertEquals(
|
|
"a, b and c",
|
|
listOf("a", "b", "c").joinToReadableString()
|
|
)
|
|
}
|
|
|
|
fun test4() {
|
|
assertEquals(
|
|
"a, b, c and d",
|
|
listOf("a", "b", "c", "d").joinToReadableString()
|
|
)
|
|
}
|
|
|
|
fun test5() {
|
|
assertEquals(
|
|
"a, b, c, d and e",
|
|
listOf("a", "b", "c", "d", "e").joinToReadableString()
|
|
)
|
|
}
|
|
|
|
fun test6() {
|
|
assertEquals(
|
|
"a, b, c, d, e and 1 more",
|
|
listOf("a", "b", "c", "d", "e", "f").joinToReadableString()
|
|
)
|
|
}
|
|
} |