Fix tests after disabling trailing comma
#KT-34744
This commit is contained in:
+2
-4
@@ -2,7 +2,5 @@ internal annotation class A
|
||||
|
||||
internal annotation class B
|
||||
|
||||
class U(
|
||||
@param:A @field:B
|
||||
var i: Int
|
||||
)
|
||||
class U(@param:A @field:B
|
||||
var i: Int)
|
||||
@@ -1,7 +1,5 @@
|
||||
internal annotation class Anon(
|
||||
val stringArray: Array<String>, val intArray: IntArray, // string
|
||||
val string: String
|
||||
)
|
||||
internal annotation class Anon(val stringArray: Array<String>, val intArray: IntArray, // string
|
||||
val string: String)
|
||||
|
||||
@Anon(string = "a", stringArray = ["a", "b"], intArray = [1, 2])
|
||||
@Target(AnnotationTarget.CONSTRUCTOR, AnnotationTarget.FIELD)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
internal class C(
|
||||
private val p1: Int, /* parameter p1 */ // field p1
|
||||
private val p1: Int /* parameter p1 */ // field p1
|
||||
,
|
||||
/**
|
||||
* Field myP2
|
||||
*/
|
||||
|
||||
@@ -1,18 +1,12 @@
|
||||
internal class C1(
|
||||
arg1: Int,
|
||||
arg2: Int,
|
||||
arg3: Int
|
||||
) {
|
||||
internal class C1(arg1: Int,
|
||||
arg2: Int,
|
||||
arg3: Int) {
|
||||
|
||||
constructor(
|
||||
x: Int,
|
||||
y: Int
|
||||
) : this(x, x + y, 0) {
|
||||
constructor(x: Int,
|
||||
y: Int) : this(x, x + y, 0) {
|
||||
}
|
||||
}
|
||||
|
||||
internal class C2(
|
||||
private val arg1: Int,
|
||||
private val arg2: Int,
|
||||
arg3: Int
|
||||
)
|
||||
internal class C2(private val arg1: Int,
|
||||
private val arg2: Int,
|
||||
arg3: Int)
|
||||
|
||||
+1
-2
@@ -1,5 +1,4 @@
|
||||
internal class A(
|
||||
// comment for field2 getter
|
||||
internal class A(// comment for field2 getter
|
||||
// comment for field2 setter
|
||||
var field2: Int // comment for field2
|
||||
) {
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
internal annotation class TestAnnotation
|
||||
|
||||
class Test(
|
||||
@param:TestAnnotation @field:TestAnnotation
|
||||
@get:TestAnnotation
|
||||
@set:TestAnnotation
|
||||
var arg: String?
|
||||
)
|
||||
class Test(@param:TestAnnotation @field:TestAnnotation
|
||||
@get:TestAnnotation
|
||||
@set:TestAnnotation
|
||||
var arg: String?)
|
||||
|
||||
+6
-8
@@ -1,9 +1,7 @@
|
||||
@Deprecated(
|
||||
"Ph'nglui mglw'nafh\n" +
|
||||
" Cthulhu R'lyeh wgah'nagl fhtagn.\n" +
|
||||
" 'In His House at R'lyeh\n" +
|
||||
" Dead Cthulhu waits dreaming,\n" +
|
||||
" yet He shall rise and His kingdom\n" +
|
||||
" shall cover the Earth.'"
|
||||
)
|
||||
@Deprecated("Ph'nglui mglw'nafh\n" +
|
||||
" Cthulhu R'lyeh wgah'nagl fhtagn.\n" +
|
||||
" 'In His House at R'lyeh\n" +
|
||||
" Dead Cthulhu waits dreaming,\n" +
|
||||
" yet He shall rise and His kingdom\n" +
|
||||
" shall cover the Earth.'")
|
||||
class TestDeprecatedInJavadocWithMultilineMessage
|
||||
@@ -2,9 +2,7 @@ internal enum class Color : Runnable {
|
||||
WHITE, BLACK, RED, YELLOW, BLUE;
|
||||
|
||||
override fun run() {
|
||||
println(
|
||||
"name()=" + name +
|
||||
", toString()=" + toString()
|
||||
)
|
||||
println("name()=" + name +
|
||||
", toString()=" + toString())
|
||||
}
|
||||
}
|
||||
@@ -2,10 +2,9 @@ internal class F {
|
||||
fun f1(p1: Int, p2: Int, p3: Int, p4: Int, vararg p5: Int) {}
|
||||
|
||||
fun f2(array: IntArray) {
|
||||
f1(
|
||||
1, 2,
|
||||
f1(1, 2,
|
||||
3, 4,
|
||||
*array
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,14 +3,11 @@ internal class C {
|
||||
|
||||
fun foo2(
|
||||
p1: Int,
|
||||
p2: Int
|
||||
) {
|
||||
p2: Int) {
|
||||
}
|
||||
|
||||
fun foo3(
|
||||
p1: Int,
|
||||
p2: Int
|
||||
) {
|
||||
fun foo3(p1: Int,
|
||||
p2: Int) {
|
||||
}
|
||||
|
||||
fun foo4(
|
||||
|
||||
@@ -2,13 +2,11 @@
|
||||
import java.util.*
|
||||
|
||||
internal class A<T> {
|
||||
fun foo(
|
||||
nonMutableCollection: Collection<String>,
|
||||
fun foo(nonMutableCollection: Collection<String>,
|
||||
mutableCollection: MutableCollection<String>,
|
||||
mutableSet: MutableSet<T>,
|
||||
mutableMap: MutableMap<String, T>
|
||||
) {
|
||||
mutableMap: MutableMap<String, T>) {
|
||||
mutableCollection.addAll(nonMutableCollection)
|
||||
mutableSet.add(mutableMap.remove("a"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,10 +2,8 @@ internal class C(p1: Int, p2: Int, p3: Int)
|
||||
|
||||
internal class User {
|
||||
fun foo() {
|
||||
C(
|
||||
1,
|
||||
C(1,
|
||||
2,
|
||||
3
|
||||
)
|
||||
3)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+3
-5
@@ -24,11 +24,9 @@ internal class Client : Frame() {
|
||||
|
||||
addWindowListener(a)
|
||||
|
||||
addWindowListener(
|
||||
object : WindowAdapter() {
|
||||
override fun windowClosing() {}
|
||||
}
|
||||
)
|
||||
addWindowListener(object : WindowAdapter() {
|
||||
override fun windowClosing() {}
|
||||
})
|
||||
|
||||
val b = object : EmptyWindowListener {
|
||||
|
||||
|
||||
@@ -5,12 +5,10 @@ internal interface I {
|
||||
internal class C {
|
||||
val `object`: Any?
|
||||
get() {
|
||||
foo(
|
||||
object : I {
|
||||
override val int: Int
|
||||
get() = 0
|
||||
}
|
||||
)
|
||||
foo(object : I {
|
||||
override val int: Int
|
||||
get() = 0
|
||||
})
|
||||
return string
|
||||
}
|
||||
|
||||
|
||||
@@ -9,15 +9,12 @@ class C {
|
||||
@Throws(IOException::class)
|
||||
internal fun foo() {
|
||||
ByteArrayInputStream(ByteArray(10)).use { stream ->
|
||||
bar(
|
||||
object : I {
|
||||
@Throws(IOException::class)
|
||||
override fun doIt(stream: InputStream): Int {
|
||||
return stream.available()
|
||||
}
|
||||
},
|
||||
stream
|
||||
)
|
||||
bar(object : I {
|
||||
@Throws(IOException::class)
|
||||
override fun doIt(stream: InputStream): Int {
|
||||
return stream.available()
|
||||
}
|
||||
}, stream)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,4 +22,4 @@ class C {
|
||||
internal fun bar(i: I, stream: InputStream): Int {
|
||||
return i.doIt(stream)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,15 +9,12 @@ class C {
|
||||
@Throws(IOException::class)
|
||||
internal fun foo(): Int {
|
||||
ByteArrayInputStream(ByteArray(10)).use { stream ->
|
||||
return bar(
|
||||
object : I {
|
||||
@Throws(IOException::class)
|
||||
override fun doIt(stream: InputStream): Int {
|
||||
return stream.available()
|
||||
}
|
||||
},
|
||||
stream
|
||||
)
|
||||
return bar(object : I {
|
||||
@Throws(IOException::class)
|
||||
override fun doIt(stream: InputStream): Int {
|
||||
return stream.available()
|
||||
}
|
||||
}, stream)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,4 +22,4 @@ class C {
|
||||
internal fun bar(i: I, stream: InputStream): Int {
|
||||
return i.doIt(stream)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user