Skip to content

Commit

Permalink
[IR] update testdata: print whole string concatenation at one line
Browse files Browse the repository at this point in the history
  • Loading branch information
bashor authored and teamcityserver committed Nov 25, 2020
1 parent 91c9d9d commit 21da2b0
Show file tree
Hide file tree
Showing 19 changed files with 31 additions and 161 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,34 +82,7 @@ data class Test1 {
}

override fun toString(): String {
return "Test1(" +
"stringArray=" +
dataClassArrayMemberToString(arg0 = <this>.#stringArray) +
", " +
"charArray=" +
dataClassArrayMemberToString(arg0 = <this>.#charArray) +
", " +
"booleanArray=" +
dataClassArrayMemberToString(arg0 = <this>.#booleanArray) +
", " +
"byteArray=" +
dataClassArrayMemberToString(arg0 = <this>.#byteArray) +
", " +
"shortArray=" +
dataClassArrayMemberToString(arg0 = <this>.#shortArray) +
", " +
"intArray=" +
dataClassArrayMemberToString(arg0 = <this>.#intArray) +
", " +
"longArray=" +
dataClassArrayMemberToString(arg0 = <this>.#longArray) +
", " +
"floatArray=" +
dataClassArrayMemberToString(arg0 = <this>.#floatArray) +
", " +
"doubleArray=" +
dataClassArrayMemberToString(arg0 = <this>.#doubleArray) +
")"
return "Test1(" + "stringArray=" + dataClassArrayMemberToString(arg0 = <this>.#stringArray) + ", " + "charArray=" + dataClassArrayMemberToString(arg0 = <this>.#charArray) + ", " + "booleanArray=" + dataClassArrayMemberToString(arg0 = <this>.#booleanArray) + ", " + "byteArray=" + dataClassArrayMemberToString(arg0 = <this>.#byteArray) + ", " + "shortArray=" + dataClassArrayMemberToString(arg0 = <this>.#shortArray) + ", " + "intArray=" + dataClassArrayMemberToString(arg0 = <this>.#intArray) + ", " + "longArray=" + dataClassArrayMemberToString(arg0 = <this>.#longArray) + ", " + "floatArray=" + dataClassArrayMemberToString(arg0 = <this>.#floatArray) + ", " + "doubleArray=" + dataClassArrayMemberToString(arg0 = <this>.#doubleArray) + ")"
}

override fun hashCode(): Int {
Expand Down Expand Up @@ -185,10 +158,7 @@ data class Test2<T : Any?> {
}

override fun toString(): String {
return "Test2(" +
"genericArray=" +
dataClassArrayMemberToString(arg0 = <this>.#genericArray) +
")"
return "Test2(" + "genericArray=" + dataClassArrayMemberToString(arg0 = <this>.#genericArray) + ")"
}

override fun hashCode(): Int {
Expand Down Expand Up @@ -231,10 +201,7 @@ data class Test3 {
}

override fun toString(): String {
return "Test3(" +
"anyArrayN=" +
dataClassArrayMemberToString(arg0 = <this>.#anyArrayN) +
")"
return "Test3(" + "anyArrayN=" + dataClassArrayMemberToString(arg0 = <this>.#anyArrayN) + ")"
}

override fun hashCode(): Int {
Expand Down
30 changes: 3 additions & 27 deletions compiler/testData/ir/irText/classes/dataClasses.kt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,7 @@ data class Test1 {
}

override fun toString(): String {
return "Test1(" +
"x=" +
<this>.#x +
", " +
"y=" +
<this>.#y +
", " +
"z=" +
<this>.#z +
")"
return "Test1(" + "x=" + <this>.#x + ", " + "y=" + <this>.#y + ", " + "z=" + <this>.#z + ")"
}

override fun hashCode(): Int {
Expand Down Expand Up @@ -95,10 +86,7 @@ data class Test2 {
}

override fun toString(): String {
return "Test2(" +
"x=" +
<this>.#x +
")"
return "Test2(" + "x=" + <this>.#x + ")"
}

override fun hashCode(): Int {
Expand Down Expand Up @@ -168,19 +156,7 @@ data class Test3 {
}

override fun toString(): String {
return "Test3(" +
"d=" +
<this>.#d +
", " +
"dn=" +
<this>.#dn +
", " +
"f=" +
<this>.#f +
", " +
"df=" +
<this>.#df +
")"
return "Test3(" + "d=" + <this>.#d + ", " + "dn=" + <this>.#dn + ", " + "f=" + <this>.#f + ", " + "df=" + <this>.#df + ")"
}

override fun hashCode(): Int {
Expand Down
20 changes: 4 additions & 16 deletions compiler/testData/ir/irText/classes/dataClassesGeneric.kt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ data class Test1<T : Any?> {
}

override fun toString(): String {
return "Test1(" +
"x=" +
<this>.#x +
")"
return "Test1(" + "x=" + <this>.#x + ")"
}

override fun hashCode(): Int {
Expand Down Expand Up @@ -67,10 +64,7 @@ data class Test2<T : Number> {
}

override fun toString(): String {
return "Test2(" +
"x=" +
<this>.#x +
")"
return "Test2(" + "x=" + <this>.#x + ")"
}

override fun hashCode(): Int {
Expand Down Expand Up @@ -113,10 +107,7 @@ data class Test3<T : Any?> {
}

override fun toString(): String {
return "Test3(" +
"x=" +
<this>.#x +
")"
return "Test3(" + "x=" + <this>.#x + ")"
}

override fun hashCode(): Int {
Expand Down Expand Up @@ -159,10 +150,7 @@ data class Test4 {
}

override fun toString(): String {
return "Test4(" +
"x=" +
<this>.#x +
")"
return "Test4(" + "x=" + <this>.#x + ")"
}

override fun hashCode(): Int {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,7 @@ open enum class A : Enum<A> {
}

open fun f(): String {
return <this>.<get-prop1>() +
"#" +
<this>.<get-prop2>() +
"#" +
<this>.<get-prop3>()
return <this>.<get-prop1>() + "#" + <this>.<get-prop2>() + "#" + <this>.<get-prop3>()
}

fun values(): Array<A> /* Synthetic body for ENUM_VALUES */
Expand Down
5 changes: 1 addition & 4 deletions compiler/testData/ir/irText/classes/inlineClass.kt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ inline class Test {
get

override fun toString(): String {
return "Test(" +
"x=" +
<this>.#x +
")"
return "Test(" + "x=" + <this>.#x + ")"
}

override fun hashCode(): Int {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,7 @@ inline class IC<TT : Any?> {
}

override fun toString(): String {
return "IC(" +
"c=" +
<this>.#c +
")"
return "IC(" + "c=" + <this>.#c + ")"
}

override fun hashCode(): Int {
Expand Down
10 changes: 2 additions & 8 deletions compiler/testData/ir/irText/classes/kt31649.kt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ data class TestData {
}

override fun toString(): String {
return "TestData(" +
"nn=" +
<this>.#nn +
")"
return "TestData(" + "nn=" + <this>.#nn + ")"
}

override fun hashCode(): Int {
Expand Down Expand Up @@ -59,10 +56,7 @@ inline class TestInline {
get

override fun toString(): String {
return "TestInline(" +
"nn=" +
<this>.#nn +
")"
return "TestInline(" + "nn=" + <this>.#nn + ")"
}

override fun hashCode(): Int {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@ data class A {
}

override fun toString(): String {
return "A(" +
"runA=" +
<this>.#runA +
")"
return "A(" + "runA=" + <this>.#runA + ")"
}

override fun hashCode(): Int {
Expand Down Expand Up @@ -78,10 +75,7 @@ data class B {
}

override fun toString(): String {
return "B(" +
"x=" +
<this>.#x +
")"
return "B(" + "x=" + <this>.#x + ")"
}

override fun hashCode(): Int {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ inline class IT {
get

override fun toString(): String {
return "IT(" +
"x=" +
<this>.#x +
")"
return "IT(" + "x=" + <this>.#x + ")"
}

override fun hashCode(): Int {
Expand Down Expand Up @@ -90,10 +87,7 @@ inline class InlineMutableSet : MutableSet<IT> {
}

override fun toString(): String {
return "InlineMutableSet(" +
"ms=" +
<this>.#ms +
")"
return "InlineMutableSet(" + "ms=" + <this>.#ms + ")"
}

override fun hashCode(): Int {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,7 @@ data class Test<T : Any?> {
}

override fun toString(): String {
return "Test(" +
"x=" +
<this>.#x +
", " +
"y=" +
<this>.#y +
")"
return "Test(" + "x=" + <this>.#x + ", " + "y=" + <this>.#y + ")"
}

override fun hashCode(): Int {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ fun testContinueDoWhile() {
when {
greater(arg0 = k, arg1 = 2) -> continue
}
s = s.plus(other = k +
";")
s = s.plus(other = k + ";")
// } while (less(arg0 = k, arg1 = 10))
}
when {
Expand Down
10 changes: 3 additions & 7 deletions compiler/testData/ir/irText/expressions/kt28006.kt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,14 @@ const val testConst4: String
get

fun test1(x: Int): String {
return "🤗" +
x
return "🤗" + x
}

fun test2(x: Int): String {
return x +
"🤗"
return x + "🤗"
}

fun test3(x: Int): String {
return x +
"🤗" +
x
return x + "🤗" + x
}

Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ object A {
private get

private val b: String
field = "1234" +
<this>.<get-a>()
field = "1234" + <this>.<get-a>()
private get

private val c: Int
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ abc
get

val test6: String
field = <get-test1>() +
" " +
foo()
field = <get-test1>() + " " + foo()
get

val test7: String
Expand Down
5 changes: 1 addition & 4 deletions compiler/testData/ir/irText/firProblems/MultiList.kt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ data class Some<T : Any?> {
}

override fun toString(): String {
return "Some(" +
"value=" +
<this>.#value +
")"
return "Some(" + "value=" + <this>.#value + ")"
}

override fun hashCode(): Int {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,7 @@ data class DataClass : Derived, Delegate {
}

override fun toString(): String {
return "DataClass(" +
"delegate=" +
<this>.#delegate +
")"
return "DataClass(" + "delegate=" + <this>.#delegate + ")"
}

override fun hashCode(): Int {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,7 @@ data class A {
}

override fun toString(): String {
return "A(" +
"x=" +
<this>.#x +
", " +
"y=" +
<this>.#y +
")"
return "A(" + "x=" + <this>.#x + ", " + "y=" + <this>.#y + ")"
}

override fun hashCode(): Int {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ fun box(): String {
var i: Int = 0
while (x.hasNext()) { // BLOCK
when {
ieee754equals(arg0 = a.get(index = i), arg1 = x.next()).not() -> return "Fail " +
i
ieee754equals(arg0 = a.get(index = i), arg1 = x.next()).not() -> return "Fail " + i
}
{ // BLOCK
val tmp0: Int = i
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,7 @@ data class P {
}

override fun toString(): String {
return "P(" +
"x=" +
<this>.#x +
", " +
"y=" +
<this>.#y +
")"
return "P(" + "x=" + <this>.#x + ", " + "y=" + <this>.#y + ")"
}

override fun hashCode(): Int {
Expand Down

0 comments on commit 21da2b0

Please sign in to comment.