[Tests] Use stable order for ir/kotlinLike dumps
^KT-65406
This commit is contained in:
committed by
Space Team
parent
0fa42a9c11
commit
e6f4d6e6fa
+20
-19
@@ -1,10 +1,4 @@
|
||||
data class Test<T : Any?> {
|
||||
constructor(x: T, y: String = "") /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val x: T
|
||||
field = x
|
||||
get
|
||||
@@ -13,6 +7,12 @@ data class Test<T : Any?> {
|
||||
field = y
|
||||
get
|
||||
|
||||
constructor(x: T, y: String = "") /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
operator fun component1(): T {
|
||||
return <this>.#x
|
||||
}
|
||||
@@ -25,19 +25,6 @@ data class Test<T : Any?> {
|
||||
return Test<T>(x = x, y = y)
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "Test(" + "x=" + <this>.#x + ", " + "y=" + <this>.#y + ")"
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
var result: Int = when {
|
||||
EQEQ(arg0 = <this>.#x, arg1 = null) -> 0
|
||||
else -> <this>.#x.hashCode()
|
||||
}
|
||||
result = result.times(other = 31).plus(other = <this>.#y.hashCode())
|
||||
return result
|
||||
}
|
||||
|
||||
override operator fun equals(other: Any?): Boolean {
|
||||
when {
|
||||
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
|
||||
@@ -55,4 +42,18 @@ data class Test<T : Any?> {
|
||||
return true
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
var result: Int = when {
|
||||
EQEQ(arg0 = <this>.#x, arg1 = null) -> 0
|
||||
else -> <this>.#x.hashCode()
|
||||
}
|
||||
result = result.times(other = 31).plus(other = <this>.#y.hashCode())
|
||||
return result
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "Test(" + "x=" + <this>.#x + ", " + "y=" + <this>.#y + ")"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user