[Tests] Use stable order for ir/kotlinLike dumps
^KT-65406
This commit is contained in:
committed by
Space Team
parent
0fa42a9c11
commit
e6f4d6e6fa
@@ -1,10 +1,4 @@
|
||||
data class Test1 {
|
||||
constructor(x: Int, y: String, z: Any) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val x: Int
|
||||
field = x
|
||||
get
|
||||
@@ -17,6 +11,12 @@ data class Test1 {
|
||||
field = z
|
||||
get
|
||||
|
||||
constructor(x: Int, y: String, z: Any) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
operator fun component1(): Int {
|
||||
return <this>.#x
|
||||
}
|
||||
@@ -33,17 +33,6 @@ data class Test1 {
|
||||
return Test1(x = x, y = y, z = z)
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "Test1(" + "x=" + <this>.#x + ", " + "y=" + <this>.#y + ", " + "z=" + <this>.#z + ")"
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
var result: Int = <this>.#x.hashCode()
|
||||
result = result.times(other = 31).plus(other = <this>.#y.hashCode())
|
||||
result = result.times(other = 31).plus(other = <this>.#z.hashCode())
|
||||
return result
|
||||
}
|
||||
|
||||
override operator fun equals(other: Any?): Boolean {
|
||||
when {
|
||||
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
|
||||
@@ -64,19 +53,30 @@ data class Test1 {
|
||||
return true
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
var result: Int = <this>.#x.hashCode()
|
||||
result = result.times(other = 31).plus(other = <this>.#y.hashCode())
|
||||
result = result.times(other = 31).plus(other = <this>.#z.hashCode())
|
||||
return result
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "Test1(" + "x=" + <this>.#x + ", " + "y=" + <this>.#y + ", " + "z=" + <this>.#z + ")"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
data class Test2 {
|
||||
val x: Any?
|
||||
field = x
|
||||
get
|
||||
|
||||
constructor(x: Any?) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val x: Any?
|
||||
field = x
|
||||
get
|
||||
|
||||
operator fun component1(): Any? {
|
||||
return <this>.#x
|
||||
}
|
||||
@@ -85,17 +85,6 @@ data class Test2 {
|
||||
return Test2(x = x)
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "Test2(" + "x=" + <this>.#x + ")"
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return when {
|
||||
EQEQ(arg0 = <this>.#x, arg1 = null) -> 0
|
||||
else -> <this>.#x.hashCode()
|
||||
}
|
||||
}
|
||||
|
||||
override operator fun equals(other: Any?): Boolean {
|
||||
when {
|
||||
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
|
||||
@@ -110,15 +99,20 @@ data class Test2 {
|
||||
return true
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return when {
|
||||
EQEQ(arg0 = <this>.#x, arg1 = null) -> 0
|
||||
else -> <this>.#x.hashCode()
|
||||
}
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "Test2(" + "x=" + <this>.#x + ")"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
data class Test3 {
|
||||
constructor(d: Double, dn: Double?, f: Float, df: Float?) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val d: Double
|
||||
field = d
|
||||
get
|
||||
@@ -135,6 +129,12 @@ data class Test3 {
|
||||
field = df
|
||||
get
|
||||
|
||||
constructor(d: Double, dn: Double?, f: Float, df: Float?) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
operator fun component1(): Double {
|
||||
return <this>.#d
|
||||
}
|
||||
@@ -155,24 +155,6 @@ data class Test3 {
|
||||
return Test3(d = d, dn = dn, f = f, df = df)
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "Test3(" + "d=" + <this>.#d + ", " + "dn=" + <this>.#dn + ", " + "f=" + <this>.#f + ", " + "df=" + <this>.#df + ")"
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
var result: Int = <this>.#d.hashCode()
|
||||
result = result.times(other = 31).plus(other = when {
|
||||
EQEQ(arg0 = <this>.#dn, arg1 = null) -> 0
|
||||
else -> <this>.#dn.hashCode()
|
||||
})
|
||||
result = result.times(other = 31).plus(other = <this>.#f.hashCode())
|
||||
result = result.times(other = 31).plus(other = when {
|
||||
EQEQ(arg0 = <this>.#df, arg1 = null) -> 0
|
||||
else -> <this>.#df.hashCode()
|
||||
})
|
||||
return result
|
||||
}
|
||||
|
||||
override operator fun equals(other: Any?): Boolean {
|
||||
when {
|
||||
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
|
||||
@@ -196,4 +178,23 @@ data class Test3 {
|
||||
return true
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
var result: Int = <this>.#d.hashCode()
|
||||
result = result.times(other = 31).plus(other = when {
|
||||
EQEQ(arg0 = <this>.#dn, arg1 = null) -> 0
|
||||
else -> <this>.#dn.hashCode()
|
||||
})
|
||||
result = result.times(other = 31).plus(other = <this>.#f.hashCode())
|
||||
result = result.times(other = 31).plus(other = when {
|
||||
EQEQ(arg0 = <this>.#df, arg1 = null) -> 0
|
||||
else -> <this>.#df.hashCode()
|
||||
})
|
||||
return result
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "Test3(" + "d=" + <this>.#d + ", " + "dn=" + <this>.#dn + ", " + "f=" + <this>.#f + ", " + "df=" + <this>.#df + ")"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user