Fix tests after disabling trailing comma

#KT-34744
This commit is contained in:
Dmitry Gridin
2020-01-31 16:18:13 +07:00
parent 3fb34596ae
commit c34b417d0c
146 changed files with 612 additions and 945 deletions
@@ -3,19 +3,15 @@ fun <caret>foo(a: Int, b: Int, d: Int, c: Int, e: Int) {
}
fun test() {
foo(
1,
foo(1,
2,
4,
3,
5
)
foo(
1, 2,
5)
foo(1, 2,
4,
3,
5
)
5)
foo(
1,
2,
@@ -3,11 +3,7 @@ fun foo(x: Int, cl: () -> Int, y: Int): Int {
}
fun bar() {
foo(
1,
{
3
},
2
)
foo(1, {
3
}, 2)
}
@@ -1,24 +1,18 @@
interface T {
fun foo(
a: Int = 1,
b: String = "2"
)
fun foo(a: Int = 1,
b: String = "2")
}
open class A: T {
override fun foo(
a: Int,
b: String
) {
override fun foo(a: Int,
b: String) {
throw UnsupportedOperationException()
}
}
class B: A() {
override fun foo(
a: Int,
b: String
) {
override fun foo(a: Int,
b: String) {
throw UnsupportedOperationException()
}
}
@@ -3,10 +3,8 @@ fun <caret>foo(b: Int, c: Int) {
}
fun test() {
foo(
2,
3
)
foo(2,
3)
foo(2, 3)
foo(
2,
@@ -3,10 +3,8 @@ fun <caret>foo(a: Int, c: Int) {
}
fun test() {
foo(
1,
3
)
foo(1,
3)
foo(1, 3)
foo(
1,
@@ -3,10 +3,8 @@ fun <caret>foo(a: Int, b: Int) {
}
fun test() {
foo(
1,
2
)
foo(1,
2)
foo(1, 2)
foo(
1,
@@ -3,15 +3,11 @@ fun <caret>foo(c: Int, b: Int, a: Int) {
}
fun test() {
foo(
3,
foo(3,
2,
1
)
foo(
3, 2,
1
)
1)
foo(3, 2,
1)
foo(
3,
2,
@@ -3,6 +3,5 @@ fun callInDefault(simple: List<String> = provideSimple(), complex: List<String>
val result = mutableListOf("statement 1")
result.add("statement 2")
result
}
) {
}) {
}
@@ -1,8 +1,6 @@
fun g() {
println(
listOf("a", "b").any {
if (it.isEmpty()) return@any false
it.length < 10
}
)
}
println(listOf("a", "b").any {
if (it.isEmpty()) return@any false
it.length < 10
})
}
@@ -1,10 +1,8 @@
fun foo(i: Int) { }
fun test(
i: () -> Int = {
(1
+ 2)
}
) {
fun test(i: () -> Int = {
(1
+ 2)
}) {
foo(i())
}
@@ -1,10 +1,8 @@
fun foo(i: Int) { }
fun test(
i: () -> Int = {
(1 // abc
/*def*/ + 2)
}
) {
fun test(i: () -> Int = {
(1 // abc
/*def*/ + 2)
}) {
foo(i())
}
@@ -1,10 +1,8 @@
fun foo(i: Int) { }
fun test(
i: () -> Int = {
(1
+ 2 - 3)
}
) {
fun test(i: () -> Int = {
(1
+ 2 - 3)
}) {
foo(i())
}
@@ -1,10 +1,8 @@
fun foo(i: Int) { }
fun test(
i: () -> Int = {
(1 + 2
- 3)
}
) {
fun test(i: () -> Int = {
(1 + 2
- 3)
}) {
foo(i())
}
@@ -1,10 +1,7 @@
fun foo(
a: Int,
s: (Int) -> String = { a ->
"""c$a
fun foo(a: Int, s: (Int) -> String = { a ->
"""c$a
:${a + 1}d"""
}
): String {
}): String {
val x = """_${s(a)}_"""
val y = "_$a:${a + 1}d_"
val z = """_c$a:${a + 1}d_"""
@@ -1,8 +1,6 @@
fun foo(i: Int) { }
fun test(
i: Int = (1
+ 2)
) {
fun test(i: Int = (1
+ 2)) {
foo(i)
}
@@ -1,8 +1,6 @@
fun foo(i: Int) { }
fun test(
i: Int = (1 // abc
/*def*/ + 2)
) {
fun test(i: Int = (1 // abc
/*def*/ + 2)) {
foo(i)
}
@@ -1,8 +1,6 @@
fun foo(i: Int) { }
fun test(
i: Int = (1
+ 2 - 3)
) {
fun test(i: Int = (1
+ 2 - 3)) {
foo(i)
}
@@ -1,8 +1,6 @@
fun foo(i: Int) { }
fun test(
i: Int = (1 + 2
- 3)
) {
fun test(i: Int = (1 + 2
- 3)) {
foo(i)
}
@@ -1,8 +1,5 @@
fun foo(
a: Int,
s: String = """c$a
:${a + 1}d"""
): String {
fun foo(a: Int, s: String = """c$a
:${a + 1}d"""): String {
val x = """_${s}_"""
val y = "_$a:${a + 1}d_"
val z = """_c$a:${a + 1}d_"""
@@ -10,10 +10,8 @@ fun boo(s: Second, body: () -> Unit) { }
fun foo(s: Second) {
boo(s) {
s.testInvoke[
{
s.testInvoke[{
"Hello"
}
]
}]
}
}
@@ -10,10 +10,8 @@ fun boo(s: Second?, body: () -> Unit) { }
fun foo(s: Second?) {
boo(s) {
s?.testInvoke[
{
s?.testInvoke[{
"Hello"
}
]
}]
}
}