[IR] add testdata for dumpKotlinLike
This commit is contained in:
committed by
teamcityserver
parent
d2022ab115
commit
8d5facb15f
Vendored
+116
@@ -0,0 +1,116 @@
|
||||
fun test1d(x: Double, y: Double): Boolean {
|
||||
return x.equals(other = y)
|
||||
}
|
||||
|
||||
fun test2d(x: Double, y: Double?): Boolean {
|
||||
return x.equals(other = y)
|
||||
}
|
||||
|
||||
fun test3d(x: Double, y: Any): Boolean {
|
||||
return x.equals(other = y)
|
||||
}
|
||||
|
||||
fun test4d(x: Double, y: Number): Boolean {
|
||||
return x.equals(other = y)
|
||||
}
|
||||
|
||||
fun test5d(x: Double, y: Any): Boolean {
|
||||
return when {
|
||||
y is Double -> x.equals(other = y)
|
||||
true -> false
|
||||
}
|
||||
}
|
||||
|
||||
fun test6d(x: Any, y: Any): Boolean {
|
||||
return when {
|
||||
when {
|
||||
x is Double -> y is Double
|
||||
true -> false
|
||||
} -> x.equals(other = y)
|
||||
true -> false
|
||||
}
|
||||
}
|
||||
|
||||
fun test1f(x: Float, y: Float): Boolean {
|
||||
return x.equals(other = y)
|
||||
}
|
||||
|
||||
fun test2f(x: Float, y: Float?): Boolean {
|
||||
return x.equals(other = y)
|
||||
}
|
||||
|
||||
fun test3f(x: Float, y: Any): Boolean {
|
||||
return x.equals(other = y)
|
||||
}
|
||||
|
||||
fun test4f(x: Float, y: Number): Boolean {
|
||||
return x.equals(other = y)
|
||||
}
|
||||
|
||||
fun test5f(x: Float, y: Any): Boolean {
|
||||
return when {
|
||||
y is Float -> x.equals(other = y)
|
||||
true -> false
|
||||
}
|
||||
}
|
||||
|
||||
fun test6f(x: Any, y: Any): Boolean {
|
||||
return when {
|
||||
when {
|
||||
x is Float -> y is Float
|
||||
true -> false
|
||||
} -> x.equals(other = y)
|
||||
true -> false
|
||||
}
|
||||
}
|
||||
|
||||
fun testFD(x: Any, y: Any): Boolean {
|
||||
return when {
|
||||
when {
|
||||
x is Float -> y is Double
|
||||
true -> false
|
||||
} -> x.equals(other = y)
|
||||
true -> false
|
||||
}
|
||||
}
|
||||
|
||||
fun testDF(x: Any, y: Any): Boolean {
|
||||
return when {
|
||||
when {
|
||||
x is Double -> y is Float
|
||||
true -> false
|
||||
} -> x.equals(other = y)
|
||||
true -> false
|
||||
}
|
||||
}
|
||||
|
||||
fun Float.test1fr(x: Float): Boolean {
|
||||
return <this>.equals(other = x)
|
||||
}
|
||||
|
||||
fun Float.test2fr(x: Float?): Boolean {
|
||||
return <this>.equals(other = x)
|
||||
}
|
||||
|
||||
fun Float.test3fr(x: Any): Boolean {
|
||||
return <this>.equals(other = x)
|
||||
}
|
||||
|
||||
fun Float.test4fr(x: Number): Boolean {
|
||||
return <this>.equals(other = x)
|
||||
}
|
||||
|
||||
fun Float.test5fr(x: Any): Boolean {
|
||||
return when {
|
||||
x is Float -> <this>.equals(other = x)
|
||||
true -> false
|
||||
}
|
||||
}
|
||||
|
||||
fun Float.test6fr(x: Any): Boolean {
|
||||
return when {
|
||||
x is Double -> <this>.equals(other = x)
|
||||
true -> false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user