[IR] add testdata for dumpKotlinLike
This commit is contained in:
committed by
teamcityserver
parent
d2022ab115
commit
8d5facb15f
Vendored
+80
@@ -0,0 +1,80 @@
|
||||
fun test1d(x: Double, y: Double): Int {
|
||||
return x.compareTo(other = y)
|
||||
}
|
||||
|
||||
fun test2d(x: Double, y: Any): Boolean {
|
||||
return when {
|
||||
y is Double -> EQEQ(arg0 = x.compareTo(other = y /*as Double */), arg1 = 0)
|
||||
true -> false
|
||||
}
|
||||
}
|
||||
|
||||
fun test3d(x: Any, y: Any): Boolean {
|
||||
return when {
|
||||
when {
|
||||
x is Double -> y is Double
|
||||
true -> false
|
||||
} -> EQEQ(arg0 = x /*as Double */.compareTo(other = y /*as Double */), arg1 = 0)
|
||||
true -> false
|
||||
}
|
||||
}
|
||||
|
||||
fun test1f(x: Float, y: Float): Int {
|
||||
return x.compareTo(other = y)
|
||||
}
|
||||
|
||||
fun test2f(x: Float, y: Any): Boolean {
|
||||
return when {
|
||||
y is Float -> EQEQ(arg0 = x.compareTo(other = y /*as Float */), arg1 = 0)
|
||||
true -> false
|
||||
}
|
||||
}
|
||||
|
||||
fun test3f(x: Any, y: Any): Boolean {
|
||||
return when {
|
||||
when {
|
||||
x is Float -> y is Float
|
||||
true -> false
|
||||
} -> EQEQ(arg0 = x /*as Float */.compareTo(other = y /*as Float */), arg1 = 0)
|
||||
true -> false
|
||||
}
|
||||
}
|
||||
|
||||
fun testFD(x: Any, y: Any): Boolean {
|
||||
return when {
|
||||
when {
|
||||
x is Float -> y is Double
|
||||
true -> false
|
||||
} -> EQEQ(arg0 = x /*as Float */.compareTo(other = y /*as Double */), arg1 = 0)
|
||||
true -> false
|
||||
}
|
||||
}
|
||||
|
||||
fun testDF(x: Any, y: Any): Boolean {
|
||||
return when {
|
||||
when {
|
||||
x is Double -> y is Float
|
||||
true -> false
|
||||
} -> EQEQ(arg0 = x /*as Double */.compareTo(other = y /*as Float */), arg1 = 0)
|
||||
true -> false
|
||||
}
|
||||
}
|
||||
|
||||
fun Float.test1fr(x: Float): Int {
|
||||
return <this>.compareTo(other = x)
|
||||
}
|
||||
|
||||
fun Float.test2fr(x: Any): Boolean {
|
||||
return when {
|
||||
x is Float -> EQEQ(arg0 = <this>.compareTo(other = x /*as Float */), arg1 = 0)
|
||||
true -> false
|
||||
}
|
||||
}
|
||||
|
||||
fun Float.test3fr(x: Any): Boolean {
|
||||
return when {
|
||||
x is Double -> EQEQ(arg0 = <this>.compareTo(other = x /*as Double */), arg1 = 0)
|
||||
true -> false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user