From 21da2b0350acc955a069c7e95db574372b626c40 Mon Sep 17 00:00:00 2001 From: Zalim Bashorov Date: Tue, 10 Nov 2020 03:15:39 +0300 Subject: [PATCH] [IR] update testdata: print whole string concatenation at one line --- .../classes/dataClassWithArrayMembers.kt.txt | 39 ++----------------- .../ir/irText/classes/dataClasses.kt.txt | 30 ++------------ .../irText/classes/dataClassesGeneric.kt.txt | 20 ++-------- .../classes/enumWithMultipleCtors.kt.txt | 6 +-- .../ir/irText/classes/inlineClass.kt.txt | 5 +-- .../inlineClassSyntheticMethods.kt.txt | 5 +-- .../testData/ir/irText/classes/kt31649.kt.txt | 10 +---- .../lambdaInDataClassDefaultParameter.kt.txt | 10 +---- .../inlineCollectionOfInlineClass.kt.txt | 10 +---- .../parameters/dataClassMembers.kt.txt | 8 +--- .../expressions/breakContinueInWhen.kt.txt | 3 +- .../ir/irText/expressions/kt28006.kt.txt | 10 ++--- .../objectReferenceInFieldInitializer.kt.txt | 3 +- .../irText/expressions/stringTemplates.kt.txt | 4 +- .../ir/irText/firProblems/MultiList.kt.txt | 5 +-- .../irText/firProblems/SignatureClash.kt.txt | 5 +-- .../lambdas/destructuringInLambda.kt.txt | 8 +--- .../irText/regressions/coercionInLoop.kt.txt | 3 +- .../enhancedNullabilityInForLoop.kt.txt | 8 +--- 19 files changed, 31 insertions(+), 161 deletions(-) diff --git a/compiler/testData/ir/irText/classes/dataClassWithArrayMembers.kt.txt b/compiler/testData/ir/irText/classes/dataClassWithArrayMembers.kt.txt index 48ed0c6244076..522024adae440 100644 --- a/compiler/testData/ir/irText/classes/dataClassWithArrayMembers.kt.txt +++ b/compiler/testData/ir/irText/classes/dataClassWithArrayMembers.kt.txt @@ -82,34 +82,7 @@ data class Test1 { } override fun toString(): String { - return "Test1(" + -"stringArray=" + -dataClassArrayMemberToString(arg0 = .#stringArray) + -", " + -"charArray=" + -dataClassArrayMemberToString(arg0 = .#charArray) + -", " + -"booleanArray=" + -dataClassArrayMemberToString(arg0 = .#booleanArray) + -", " + -"byteArray=" + -dataClassArrayMemberToString(arg0 = .#byteArray) + -", " + -"shortArray=" + -dataClassArrayMemberToString(arg0 = .#shortArray) + -", " + -"intArray=" + -dataClassArrayMemberToString(arg0 = .#intArray) + -", " + -"longArray=" + -dataClassArrayMemberToString(arg0 = .#longArray) + -", " + -"floatArray=" + -dataClassArrayMemberToString(arg0 = .#floatArray) + -", " + -"doubleArray=" + -dataClassArrayMemberToString(arg0 = .#doubleArray) + -")" + return "Test1(" + "stringArray=" + dataClassArrayMemberToString(arg0 = .#stringArray) + ", " + "charArray=" + dataClassArrayMemberToString(arg0 = .#charArray) + ", " + "booleanArray=" + dataClassArrayMemberToString(arg0 = .#booleanArray) + ", " + "byteArray=" + dataClassArrayMemberToString(arg0 = .#byteArray) + ", " + "shortArray=" + dataClassArrayMemberToString(arg0 = .#shortArray) + ", " + "intArray=" + dataClassArrayMemberToString(arg0 = .#intArray) + ", " + "longArray=" + dataClassArrayMemberToString(arg0 = .#longArray) + ", " + "floatArray=" + dataClassArrayMemberToString(arg0 = .#floatArray) + ", " + "doubleArray=" + dataClassArrayMemberToString(arg0 = .#doubleArray) + ")" } override fun hashCode(): Int { @@ -185,10 +158,7 @@ data class Test2 { } override fun toString(): String { - return "Test2(" + -"genericArray=" + -dataClassArrayMemberToString(arg0 = .#genericArray) + -")" + return "Test2(" + "genericArray=" + dataClassArrayMemberToString(arg0 = .#genericArray) + ")" } override fun hashCode(): Int { @@ -231,10 +201,7 @@ data class Test3 { } override fun toString(): String { - return "Test3(" + -"anyArrayN=" + -dataClassArrayMemberToString(arg0 = .#anyArrayN) + -")" + return "Test3(" + "anyArrayN=" + dataClassArrayMemberToString(arg0 = .#anyArrayN) + ")" } override fun hashCode(): Int { diff --git a/compiler/testData/ir/irText/classes/dataClasses.kt.txt b/compiler/testData/ir/irText/classes/dataClasses.kt.txt index 4a7145772793a..623d250267244 100644 --- a/compiler/testData/ir/irText/classes/dataClasses.kt.txt +++ b/compiler/testData/ir/irText/classes/dataClasses.kt.txt @@ -34,16 +34,7 @@ data class Test1 { } override fun toString(): String { - return "Test1(" + -"x=" + -.#x + -", " + -"y=" + -.#y + -", " + -"z=" + -.#z + -")" + return "Test1(" + "x=" + .#x + ", " + "y=" + .#y + ", " + "z=" + .#z + ")" } override fun hashCode(): Int { @@ -95,10 +86,7 @@ data class Test2 { } override fun toString(): String { - return "Test2(" + -"x=" + -.#x + -")" + return "Test2(" + "x=" + .#x + ")" } override fun hashCode(): Int { @@ -168,19 +156,7 @@ data class Test3 { } override fun toString(): String { - return "Test3(" + -"d=" + -.#d + -", " + -"dn=" + -.#dn + -", " + -"f=" + -.#f + -", " + -"df=" + -.#df + -")" + return "Test3(" + "d=" + .#d + ", " + "dn=" + .#dn + ", " + "f=" + .#f + ", " + "df=" + .#df + ")" } override fun hashCode(): Int { diff --git a/compiler/testData/ir/irText/classes/dataClassesGeneric.kt.txt b/compiler/testData/ir/irText/classes/dataClassesGeneric.kt.txt index 10bc1d47fcfa5..d4f69ebfbc2b9 100644 --- a/compiler/testData/ir/irText/classes/dataClassesGeneric.kt.txt +++ b/compiler/testData/ir/irText/classes/dataClassesGeneric.kt.txt @@ -18,10 +18,7 @@ data class Test1 { } override fun toString(): String { - return "Test1(" + -"x=" + -.#x + -")" + return "Test1(" + "x=" + .#x + ")" } override fun hashCode(): Int { @@ -67,10 +64,7 @@ data class Test2 { } override fun toString(): String { - return "Test2(" + -"x=" + -.#x + -")" + return "Test2(" + "x=" + .#x + ")" } override fun hashCode(): Int { @@ -113,10 +107,7 @@ data class Test3 { } override fun toString(): String { - return "Test3(" + -"x=" + -.#x + -")" + return "Test3(" + "x=" + .#x + ")" } override fun hashCode(): Int { @@ -159,10 +150,7 @@ data class Test4 { } override fun toString(): String { - return "Test4(" + -"x=" + -.#x + -")" + return "Test4(" + "x=" + .#x + ")" } override fun hashCode(): Int { diff --git a/compiler/testData/ir/irText/classes/enumWithMultipleCtors.kt.txt b/compiler/testData/ir/irText/classes/enumWithMultipleCtors.kt.txt index 2e75794e4fd70..56aac42189a03 100644 --- a/compiler/testData/ir/irText/classes/enumWithMultipleCtors.kt.txt +++ b/compiler/testData/ir/irText/classes/enumWithMultipleCtors.kt.txt @@ -50,11 +50,7 @@ open enum class A : Enum { } open fun f(): String { - return .() + -"#" + -.() + -"#" + -.() + return .() + "#" + .() + "#" + .() } fun values(): Array /* Synthetic body for ENUM_VALUES */ diff --git a/compiler/testData/ir/irText/classes/inlineClass.kt.txt b/compiler/testData/ir/irText/classes/inlineClass.kt.txt index fcaeb190100c1..5139d28a36dfd 100644 --- a/compiler/testData/ir/irText/classes/inlineClass.kt.txt +++ b/compiler/testData/ir/irText/classes/inlineClass.kt.txt @@ -10,10 +10,7 @@ inline class Test { get override fun toString(): String { - return "Test(" + -"x=" + -.#x + -")" + return "Test(" + "x=" + .#x + ")" } override fun hashCode(): Int { diff --git a/compiler/testData/ir/irText/classes/inlineClassSyntheticMethods.kt.txt b/compiler/testData/ir/irText/classes/inlineClassSyntheticMethods.kt.txt index cc443e401145b..4977347848e0f 100644 --- a/compiler/testData/ir/irText/classes/inlineClassSyntheticMethods.kt.txt +++ b/compiler/testData/ir/irText/classes/inlineClassSyntheticMethods.kt.txt @@ -31,10 +31,7 @@ inline class IC { } override fun toString(): String { - return "IC(" + -"c=" + -.#c + -")" + return "IC(" + "c=" + .#c + ")" } override fun hashCode(): Int { diff --git a/compiler/testData/ir/irText/classes/kt31649.kt.txt b/compiler/testData/ir/irText/classes/kt31649.kt.txt index 09853e020707f..c29091547d308 100644 --- a/compiler/testData/ir/irText/classes/kt31649.kt.txt +++ b/compiler/testData/ir/irText/classes/kt31649.kt.txt @@ -18,10 +18,7 @@ data class TestData { } override fun toString(): String { - return "TestData(" + -"nn=" + -.#nn + -")" + return "TestData(" + "nn=" + .#nn + ")" } override fun hashCode(): Int { @@ -59,10 +56,7 @@ inline class TestInline { get override fun toString(): String { - return "TestInline(" + -"nn=" + -.#nn + -")" + return "TestInline(" + "nn=" + .#nn + ")" } override fun hashCode(): Int { diff --git a/compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.kt.txt b/compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.kt.txt index e890a37861a8f..168e6397cee11 100644 --- a/compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.kt.txt +++ b/compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.kt.txt @@ -21,10 +21,7 @@ data class A { } override fun toString(): String { - return "A(" + -"runA=" + -.#runA + -")" + return "A(" + "runA=" + .#runA + ")" } override fun hashCode(): Int { @@ -78,10 +75,7 @@ data class B { } override fun toString(): String { - return "B(" + -"x=" + -.#x + -")" + return "B(" + "x=" + .#x + ")" } override fun hashCode(): Int { diff --git a/compiler/testData/ir/irText/declarations/inlineCollectionOfInlineClass.kt.txt b/compiler/testData/ir/irText/declarations/inlineCollectionOfInlineClass.kt.txt index 499310e63d31c..f76e715945d6d 100644 --- a/compiler/testData/ir/irText/declarations/inlineCollectionOfInlineClass.kt.txt +++ b/compiler/testData/ir/irText/declarations/inlineCollectionOfInlineClass.kt.txt @@ -10,10 +10,7 @@ inline class IT { get override fun toString(): String { - return "IT(" + -"x=" + -.#x + -")" + return "IT(" + "x=" + .#x + ")" } override fun hashCode(): Int { @@ -90,10 +87,7 @@ inline class InlineMutableSet : MutableSet { } override fun toString(): String { - return "InlineMutableSet(" + -"ms=" + -.#ms + -")" + return "InlineMutableSet(" + "ms=" + .#ms + ")" } override fun hashCode(): Int { diff --git a/compiler/testData/ir/irText/declarations/parameters/dataClassMembers.kt.txt b/compiler/testData/ir/irText/declarations/parameters/dataClassMembers.kt.txt index 5578254723ff1..48559daab2c0a 100644 --- a/compiler/testData/ir/irText/declarations/parameters/dataClassMembers.kt.txt +++ b/compiler/testData/ir/irText/declarations/parameters/dataClassMembers.kt.txt @@ -26,13 +26,7 @@ data class Test { } override fun toString(): String { - return "Test(" + -"x=" + -.#x + -", " + -"y=" + -.#y + -")" + return "Test(" + "x=" + .#x + ", " + "y=" + .#y + ")" } override fun hashCode(): Int { diff --git a/compiler/testData/ir/irText/expressions/breakContinueInWhen.kt.txt b/compiler/testData/ir/irText/expressions/breakContinueInWhen.kt.txt index 7054d892edb69..850acd9f9d3e5 100644 --- a/compiler/testData/ir/irText/expressions/breakContinueInWhen.kt.txt +++ b/compiler/testData/ir/irText/expressions/breakContinueInWhen.kt.txt @@ -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 { diff --git a/compiler/testData/ir/irText/expressions/kt28006.kt.txt b/compiler/testData/ir/irText/expressions/kt28006.kt.txt index 9e923701440d8..c0301248356e1 100644 --- a/compiler/testData/ir/irText/expressions/kt28006.kt.txt +++ b/compiler/testData/ir/irText/expressions/kt28006.kt.txt @@ -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 } diff --git a/compiler/testData/ir/irText/expressions/objectReferenceInFieldInitializer.kt.txt b/compiler/testData/ir/irText/expressions/objectReferenceInFieldInitializer.kt.txt index a8a1607b643c8..9ce2a8abc1d88 100644 --- a/compiler/testData/ir/irText/expressions/objectReferenceInFieldInitializer.kt.txt +++ b/compiler/testData/ir/irText/expressions/objectReferenceInFieldInitializer.kt.txt @@ -10,8 +10,7 @@ object A { private get private val b: String - field = "1234" + -.() + field = "1234" + .() private get private val c: Int diff --git a/compiler/testData/ir/irText/expressions/stringTemplates.kt.txt b/compiler/testData/ir/irText/expressions/stringTemplates.kt.txt index e8e47b4168a66..7a8f1c46f288f 100644 --- a/compiler/testData/ir/irText/expressions/stringTemplates.kt.txt +++ b/compiler/testData/ir/irText/expressions/stringTemplates.kt.txt @@ -29,9 +29,7 @@ abc get val test6: String - field = () + -" " + -foo() + field = () + " " + foo() get val test7: String diff --git a/compiler/testData/ir/irText/firProblems/MultiList.kt.txt b/compiler/testData/ir/irText/firProblems/MultiList.kt.txt index 594dc6801a4bf..8b9a49c5e4ae5 100644 --- a/compiler/testData/ir/irText/firProblems/MultiList.kt.txt +++ b/compiler/testData/ir/irText/firProblems/MultiList.kt.txt @@ -18,10 +18,7 @@ data class Some { } override fun toString(): String { - return "Some(" + -"value=" + -.#value + -")" + return "Some(" + "value=" + .#value + ")" } override fun hashCode(): Int { diff --git a/compiler/testData/ir/irText/firProblems/SignatureClash.kt.txt b/compiler/testData/ir/irText/firProblems/SignatureClash.kt.txt index 3382eec4c0301..b33ad6bb48ec4 100644 --- a/compiler/testData/ir/irText/firProblems/SignatureClash.kt.txt +++ b/compiler/testData/ir/irText/firProblems/SignatureClash.kt.txt @@ -53,10 +53,7 @@ data class DataClass : Derived, Delegate { } override fun toString(): String { - return "DataClass(" + -"delegate=" + -.#delegate + -")" + return "DataClass(" + "delegate=" + .#delegate + ")" } override fun hashCode(): Int { diff --git a/compiler/testData/ir/irText/lambdas/destructuringInLambda.kt.txt b/compiler/testData/ir/irText/lambdas/destructuringInLambda.kt.txt index 492ab2f9cd263..b26f811287d91 100644 --- a/compiler/testData/ir/irText/lambdas/destructuringInLambda.kt.txt +++ b/compiler/testData/ir/irText/lambdas/destructuringInLambda.kt.txt @@ -26,13 +26,7 @@ data class A { } override fun toString(): String { - return "A(" + -"x=" + -.#x + -", " + -"y=" + -.#y + -")" + return "A(" + "x=" + .#x + ", " + "y=" + .#y + ")" } override fun hashCode(): Int { diff --git a/compiler/testData/ir/irText/regressions/coercionInLoop.kt.txt b/compiler/testData/ir/irText/regressions/coercionInLoop.kt.txt index eeb31095210aa..08cf9e5251f7a 100644 --- a/compiler/testData/ir/irText/regressions/coercionInLoop.kt.txt +++ b/compiler/testData/ir/irText/regressions/coercionInLoop.kt.txt @@ -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 diff --git a/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInForLoop.kt.txt b/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInForLoop.kt.txt index 5926f965accb3..a43fd45e568d5 100644 --- a/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInForLoop.kt.txt +++ b/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInForLoop.kt.txt @@ -102,13 +102,7 @@ data class P { } override fun toString(): String { - return "P(" + -"x=" + -.#x + -", " + -"y=" + -.#y + -")" + return "P(" + "x=" + .#x + ", " + "y=" + .#y + ")" } override fun hashCode(): Int {