Fix tests after implementing trailing comma in formatter
#KT-34744
This commit is contained in:
+2
-3
@@ -4,9 +4,8 @@ val x = listOf(1, 2, 3).joinToString(
|
||||
// comment2
|
||||
prefix = "= ",
|
||||
// comment3
|
||||
separator = " + "
|
||||
separator = " + ",
|
||||
// comment4
|
||||
,
|
||||
// comment1
|
||||
transform = Int::toString
|
||||
transform = Int::toString,
|
||||
)
|
||||
Vendored
+1
-1
@@ -7,6 +7,6 @@ val x = listOf(1, 2, 3).joinTo(
|
||||
// comment2
|
||||
prefix = "= ",
|
||||
// comment3
|
||||
separator = " + "
|
||||
separator = " + ",
|
||||
// comment4
|
||||
) { "$it*$it" }
|
||||
Vendored
+1
-1
@@ -3,6 +3,6 @@
|
||||
fun test() {
|
||||
<caret>listOfNotNull(
|
||||
true, // comment1
|
||||
null // comment2
|
||||
null, // comment2
|
||||
).first()
|
||||
}
|
||||
+4
-2
@@ -2,6 +2,8 @@
|
||||
// HIGHLIGHT: INFORMATION
|
||||
|
||||
fun test(list: List<Int>) {
|
||||
println(list.filter { it > 1 }
|
||||
.filter { it > 2 })
|
||||
println(
|
||||
list.filter { it > 1 }
|
||||
.filter { it > 2 }
|
||||
)
|
||||
}
|
||||
@@ -2,7 +2,9 @@
|
||||
// HIGHLIGHT: INFORMATION
|
||||
|
||||
fun test() {
|
||||
println(runCatching {
|
||||
println(
|
||||
runCatching {
|
||||
/* lots of code*/
|
||||
})
|
||||
}
|
||||
)
|
||||
}
|
||||
@@ -3,9 +3,11 @@
|
||||
fun foo(x: Int) {}
|
||||
|
||||
fun bar() {
|
||||
foo(run {
|
||||
foo(1)
|
||||
foo(2)
|
||||
1
|
||||
})
|
||||
foo(
|
||||
run {
|
||||
foo(1)
|
||||
foo(2)
|
||||
1
|
||||
}
|
||||
)
|
||||
}
|
||||
Vendored
+6
-3
@@ -3,9 +3,12 @@ fun test() {
|
||||
operator fun get(a: Int, b: Int, fn: (i: Int) -> Int) : Int = 0
|
||||
}
|
||||
val test = Test()
|
||||
test<caret>[1, 2, { i ->
|
||||
i
|
||||
}]
|
||||
test<caret>[
|
||||
1, 2,
|
||||
{ i ->
|
||||
i
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
fun withSuppression() {
|
||||
|
||||
Vendored
+5
-3
@@ -3,7 +3,9 @@ fun test() {
|
||||
operator fun get(fn: (i: Int) -> Int) : Int = 0
|
||||
}
|
||||
val test = Test()
|
||||
test<caret>[{ i ->
|
||||
i
|
||||
}]
|
||||
test<caret>[
|
||||
{ i ->
|
||||
i
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
fun test() {
|
||||
Foo.Bar().bar({
|
||||
true
|
||||
})
|
||||
Foo.Bar().bar(
|
||||
{
|
||||
true
|
||||
}
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user