Fix tests after implementing trailing comma in formatter

#KT-34744
This commit is contained in:
Dmitry Gridin
2020-01-14 20:56:48 +07:00
parent d98794479d
commit d06787886a
112 changed files with 598 additions and 371 deletions
@@ -4,9 +4,8 @@ val x = listOf(1, 2, 3).joinToString(
// comment2
prefix = "= ",
// comment3
separator = " + "
separator = " + ",
// comment4
,
// comment1
transform = Int::toString
transform = Int::toString,
)
@@ -7,6 +7,6 @@ val x = listOf(1, 2, 3).joinTo(
// comment2
prefix = "= ",
// comment3
separator = " + "
separator = " + ",
// comment4
) { "$it*$it" }
@@ -3,6 +3,6 @@
fun test() {
<caret>listOfNotNull(
true, // comment1
null // comment2
null, // comment2
).first()
}
@@ -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
}
)
}
@@ -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() {
@@ -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
}
)
}