[IR] update testdata: don't use "D" suffix on double constants

This commit is contained in:
Zalim Bashorov
2020-11-23 20:46:19 +03:00
committed by teamcityserver
parent 73771a3513
commit 57cb8f97e9
8 changed files with 26 additions and 22 deletions
+3 -2
View File
@@ -15,7 +15,7 @@ class A {
}
override operator fun get(): Double {
return 0.0D
return 0.0
}
}
@@ -34,7 +34,8 @@ class C : DoubleExpression {
}
override operator fun get(): Double {
return 0.0D
return 0.0
}
}
+2 -2
View File
@@ -15,7 +15,7 @@ class A {
}
override fun get(): Double {
return 0.0D
return 0.0
}
}
@@ -34,7 +34,7 @@ class C : DoubleExpression {
}
override fun get(): Double {
return 0.0D
return 0.0
}
}
@@ -2,7 +2,7 @@ fun testSimple(x: Double): Int {
return { // BLOCK
val tmp0_subject: Double = x
when {
ieee754equals(arg0 = tmp0_subject, arg1 = 0.0D) -> 0
ieee754equals(arg0 = tmp0_subject, arg1 = 0.0) -> 0
else -> 1
}
}
@@ -15,7 +15,7 @@ fun testSmartCastInWhenSubject(x: Any): Int {
return { // BLOCK
val tmp1_subject: Double = x /*as Double */
when {
ieee754equals(arg0 = tmp1_subject, arg1 = 0.0D) -> 0
ieee754equals(arg0 = tmp1_subject, arg1 = 0.0) -> 0
else -> 1
}
}
@@ -39,7 +39,7 @@ fun testSmartCastInWhenConditionInBranch(x: Any): Int {
val tmp3_subject: Any = x
when {
tmp3_subject !is Double -> -1
EQEQ(arg0 = tmp3_subject, arg1 = 0.0D) -> 0
EQEQ(arg0 = tmp3_subject, arg1 = 0.0) -> 0
else -> 1
}
}
@@ -77,3 +77,4 @@ fun testWithPrematureExitInConditionSubexpression(x: Any): Int {
}
}
}
@@ -2,7 +2,7 @@ fun testSimple(x: Double): Int {
return { // BLOCK
val tmp0_subject: Double = x
when {
ieee754equals(arg0 = tmp0_subject, arg1 = 0.0D) -> 0
ieee754equals(arg0 = tmp0_subject, arg1 = 0.0) -> 0
else -> 1
}
}
@@ -15,7 +15,7 @@ fun testSmartCastInWhenSubject(x: Any): Int {
return { // BLOCK
val tmp0_subject: Any = x
when {
ieee754equals(arg0 = tmp0_subject /*as Double */, arg1 = 0.0D) -> 0
ieee754equals(arg0 = tmp0_subject /*as Double */, arg1 = 0.0) -> 0
else -> 1
}
}
@@ -39,7 +39,7 @@ fun testSmartCastInWhenConditionInBranch(x: Any): Int {
val tmp0_subject: Any = x
when {
tmp0_subject is Double.not() -> -1
ieee754equals(arg0 = tmp0_subject /*as Double */, arg1 = 0.0D) -> 0
ieee754equals(arg0 = tmp0_subject /*as Double */, arg1 = 0.0) -> 0
else -> 1
}
}
@@ -31,11 +31,11 @@ val test8: Long
get
val test9: Double
field = 1.0D
field = 1.0
get
val test10: Double
field = 1.0D.unaryMinus()
field = 1.0.unaryMinus()
get
val test11: Float
@@ -65,3 +65,4 @@ val testI: Int
val testL: Long
field = 1L
get
+2 -2
View File
@@ -31,11 +31,11 @@ val test8: Long
get
val test9: Double
field = 1.0D
field = 1.0
get
val test10: Double
field = -1.0D
field = -1.0
get
val test11: Float
@@ -3,11 +3,11 @@ fun JavaClass.testPlatformEqualsPlatform(): Boolean {
}
fun JavaClass.testPlatformEqualsKotlin(): Boolean {
return <this>.null0().equals(other = 0.0D)
return <this>.null0().equals(other = 0.0)
}
fun JavaClass.testKotlinEqualsPlatform(): Boolean {
return 0.0D.equals(other = <this>.null0())
return 0.0.equals(other = <this>.null0())
}
fun JavaClass.testPlatformCompareToPlatform(): Int {
@@ -15,9 +15,10 @@ fun JavaClass.testPlatformCompareToPlatform(): Int {
}
fun JavaClass.testPlatformCompareToKotlin(): Int {
return <this>.null0().compareTo(other = 0.0D)
return <this>.null0().compareTo(other = 0.0)
}
fun JavaClass.testKotlinCompareToPlatform(): Int {
return 0.0D.compareTo(other = <this>.null0() /*!! Double */)
return 0.0.compareTo(other = <this>.null0() /*!! Double */)
}
@@ -3,11 +3,11 @@ fun JavaClass.testPlatformEqualsPlatform(): Boolean {
}
fun JavaClass.testPlatformEqualsKotlin(): Boolean {
return <this>.null0() /*!! Double */.equals(other = 0.0D)
return <this>.null0() /*!! Double */.equals(other = 0.0)
}
fun JavaClass.testKotlinEqualsPlatform(): Boolean {
return 0.0D.equals(other = <this>.null0())
return 0.0.equals(other = <this>.null0())
}
fun JavaClass.testPlatformCompareToPlatform(): Int {
@@ -15,10 +15,10 @@ fun JavaClass.testPlatformCompareToPlatform(): Int {
}
fun JavaClass.testPlatformCompareToKotlin(): Int {
return <this>.null0() /*!! Double */.compareTo(other = 0.0D)
return <this>.null0() /*!! Double */.compareTo(other = 0.0)
}
fun JavaClass.testKotlinCompareToPlatform(): Int {
return 0.0D.compareTo(other = <this>.null0() /*!! Double */)
return 0.0.compareTo(other = <this>.null0() /*!! Double */)
}