tests: apply official code style

#KT-38632 Fixed
This commit is contained in:
Dmitry Gridin
2020-04-28 15:51:57 +07:00
parent d8f9643650
commit 11a3482970
406 changed files with 1785 additions and 1525 deletions
@@ -26,7 +26,13 @@ fun foo(a: Int): Int {
return b + c + d + e
}
private fun list(b: Int, a: Int, c: Int, d: Int, e: Int): List<Int> {
private fun list(
b: Int,
a: Int,
c: Int,
d: Int,
e: Int
): List<Int> {
var b1 = b
var c1 = c
var d1 = d
@@ -21,7 +21,12 @@ fun foo(a: Int): Int {
return b + c + d
}
private fun triple(b: Int, a: Int, c: Int, d: Int): Triple<Int, Int, Int> {
private fun triple(
b: Int,
a: Int,
c: Int,
d: Int
): Triple<Int, Int, Int> {
var b1 = b
var c1 = c
var d1 = d
@@ -16,7 +16,7 @@ fun foo1() {
val x = 1
var y: Int = x
println(
i(x, y)
i(x, y)
)
}
@@ -13,5 +13,8 @@ fun foo(n: Int): Int {
return i(n, Int::bar1, Int::bar2)
}
private fun i(n: Int, bar1: Int.(m: Int) -> Int, bar2: Int.(m: Int) -> Int) =
n.bar1(n + 1).bar2(n + 2)
private fun i(
n: Int,
bar1: Int.(m: Int) -> Int,
bar2: Int.(m: Int) -> Int
) = n.bar1(n + 1).bar2(n + 2)
@@ -17,5 +17,8 @@ class A<T: Data>(val t: T) where T: DataEx {
}
}
private fun <T : Data, U : Data, V : Data> i(a: A<T>, b: A<T>.B<U>, v: V) where T : DataEx, U : DataExEx, V : DataEx =
a.t.x + b.u.x + v.x
private fun <T : Data, U : Data, V : Data> i(
a: A<T>,
b: A<T>.B<U>,
v: V
) where T : DataEx, U : DataExEx, V : DataEx = a.t.x + b.u.x + v.x
@@ -4,5 +4,5 @@ import foo.Z
class C(
// INFO: {checked: "true", toAbstract: "true"}
override val z: Z
override val z: Z
) : ISomething
@@ -2,7 +2,7 @@
fun <caret>foo(p1: String, p2: () -> Boolean) = bar(p1, null, p2)
fun bar(p1: String, p2: String?, p3: () -> Boolean)
fun bar(p1: String, p2: String?, p3: () -> Boolean) = Unit
fun foo(i: I) {
foo("foo") {
@@ -1,6 +1,6 @@
// COMPILER_ARGUMENTS: -XXLanguage:-NewInference
fun bar(p1: String, p2: String?, p3: () -> Boolean)
fun bar(p1: String, p2: String?, p3: () -> Boolean) = Unit
fun foo(i: I) {
bar("foo", null) {
@@ -10,13 +10,13 @@ object Foo {
internal object Bar {
@JvmStatic fun main(args: Array<String>) {
bar(object : Runnable {
override fun run() {
doRun()
}
override fun run() {
doRun()
}
private fun doRun() {
// Woo-hoo
}
})
private fun doRun() {
// Woo-hoo
}
})
}
}
@@ -3,5 +3,6 @@ fun callInDefault(simple: List<String> = provideSimple(), complex: List<String>
val result = mutableListOf("statement 1")
result.add("statement 2")
result
}) {
}
) {
}
@@ -7,7 +7,7 @@ fun foo(a: Int, s: String, i: (Int) -> Int): Int {
fun test() {
foo(1, "2") { a ->
a
.plus(1)
.plus(2)
.plus(1)
.plus(2)
}
}
@@ -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,9 @@
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,7 @@
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_"""
@@ -1,8 +1,8 @@
// WITH_RUNTIME
abstract class <caret>B(
// INFO: {"checked": "true"}
val n: Int,
// INFO: {"checked": "true"}
val s: String,
val b: Boolean
// INFO: {"checked": "true"}
val n: Int,
// INFO: {"checked": "true"}
val s: String,
val b: Boolean
): A()
@@ -1,6 +1,6 @@
// WITH_RUNTIME
abstract class B(
// INFO: {"checked": "true"}
// INFO: {"checked": "true"}
val b: Boolean
// INFO: {"checked": "true"}
// INFO: {"checked": "true"}
val b: Boolean
): A()
@@ -1,9 +1,9 @@
interface I
class <caret>B(
// INFO: {"checked": "true", "toAbstract": "true"}
val s: String,
// INFO: {"checked": "true", "toAbstract": "true"}
val b: Boolean,
val i: Int
// INFO: {"checked": "true", "toAbstract": "true"}
val s: String,
// INFO: {"checked": "true", "toAbstract": "true"}
val b: Boolean,
val i: Int
) : I
@@ -4,9 +4,9 @@ interface I {
}
class B(
// INFO: {"checked": "true", "toAbstract": "true"}
override val s: String,
// INFO: {"checked": "true", "toAbstract": "true"}
override val b: Boolean,
val i: Int
// INFO: {"checked": "true", "toAbstract": "true"}
override val s: String,
// INFO: {"checked": "true", "toAbstract": "true"}
override val b: Boolean,
val i: Int
) : I
@@ -3,9 +3,9 @@ open class A(n: Int) {
}
class <caret>B(
// INFO: {"checked": "true", "toAbstract": "true"}
val s: String,
// INFO: {"checked": "true", "toAbstract": "true"}
val b: Boolean,
val i: Int
// INFO: {"checked": "true", "toAbstract": "true"}
val s: String,
// INFO: {"checked": "true", "toAbstract": "true"}
val b: Boolean,
val i: Int
) : A(1)
@@ -5,9 +5,9 @@ abstract class A(n: Int) {
}
class B(
// INFO: {"checked": "true", "toAbstract": "true"}
override val s: String,
// INFO: {"checked": "true", "toAbstract": "true"}
override val b: Boolean,
val i: Int
// INFO: {"checked": "true", "toAbstract": "true"}
override val s: String,
// INFO: {"checked": "true", "toAbstract": "true"}
override val b: Boolean,
val i: Int
) : A(1)
@@ -34,7 +34,8 @@ abstract class A<T: I, U: I, V>(x: T, y: Any?) {
}
// INFO: {"checked": "true"}
inner class Foo<S>(x1: T, x2: Z<T>, y1: Any?, y2: Z<Any?>, w1: I, w2: Z<I>, s1: S, s2: Z<S>): A<T, I, Z<Any?>>(), Z<I> {
inner class Foo<S>(x1: T, x2: Z<T>, y1: Any?, y2: Z<Any?>, w1: I, w2: Z<I>, s1: S, s2: Z<S>): A<T, I, Z<Any?>>(),
Z<I> {
}
}