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
@@ -3,15 +3,19 @@ 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,7 +3,11 @@ fun foo(x: Int, cl: () -> Int, y: Int): Int {
}
fun bar() {
foo(1, {
3
}, 2)
foo(
1,
{
3
},
2
)
}
@@ -1,18 +1,24 @@
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,8 +3,10 @@ fun <caret>foo(b: Int, c: Int) {
}
fun test() {
foo(2,
3)
foo(
2,
3
)
foo(2, 3)
foo(
2,
@@ -3,8 +3,10 @@ fun <caret>foo(a: Int, c: Int) {
}
fun test() {
foo(1,
3)
foo(
1,
3
)
foo(1, 3)
foo(
1,
@@ -3,8 +3,10 @@ fun <caret>foo(a: Int, b: Int) {
}
fun test() {
foo(1,
2)
foo(
1,
2
)
foo(1, 2)
foo(
1,
@@ -3,11 +3,15 @@ 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,5 +3,6 @@ fun callInDefault(simple: List<String> = provideSimple(), complex: List<String>
val result = mutableListOf("statement 1")
result.add("statement 2")
result
}) {
}
) {
}
@@ -1,6 +1,8 @@
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,8 +1,10 @@
fun foo(i: Int) { }
fun test(i: () -> Int = {
(1
+ 2)
}) {
fun test(
i: () -> Int = {
(1
+ 2)
}
) {
foo(i())
}
@@ -1,8 +1,10 @@
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,10 @@
fun foo(i: Int) { }
fun test(i: () -> Int = {
(1
+ 2 - 3)
}) {
fun test(
i: () -> Int = {
(1
+ 2 - 3)
}
) {
foo(i())
}
@@ -1,8 +1,10 @@
fun foo(i: Int) { }
fun test(i: () -> Int = {
(1 + 2
- 3)
}) {
fun test(
i: () -> Int = {
(1 + 2
- 3)
}
) {
foo(i())
}
@@ -1,7 +1,10 @@
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,6 +1,8 @@
fun foo(i: Int) { }
fun test(i: Int = (1
+ 2)) {
fun test(
i: Int = (1
+ 2)
) {
foo(i)
}
@@ -1,6 +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,6 +1,8 @@
fun foo(i: Int) { }
fun test(i: Int = (1
+ 2 - 3)) {
fun test(
i: Int = (1
+ 2 - 3)
) {
foo(i)
}
@@ -1,6 +1,8 @@
fun foo(i: Int) { }
fun test(i: Int = (1 + 2
- 3)) {
fun test(
i: Int = (1 + 2
- 3)
) {
foo(i)
}
@@ -1,5 +1,8 @@
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,8 +10,10 @@ fun boo(s: Second, body: () -> Unit) { }
fun foo(s: Second) {
boo(s) {
s.testInvoke[{
s.testInvoke[
{
"Hello"
}]
}
]
}
}
@@ -10,8 +10,10 @@ fun boo(s: Second?, body: () -> Unit) { }
fun foo(s: Second?) {
boo(s) {
s?.testInvoke[{
s?.testInvoke[
{
"Hello"
}]
}
]
}
}