[K/N] Advance deprecation level of FP to lesser than Int types to ERROR #KT-30360
This commit is contained in:
@@ -2230,10 +2230,9 @@ task hash0(type: KonanLocalTest) {
|
||||
}
|
||||
|
||||
task ieee754(type: KonanLocalTest) {
|
||||
goldValue = "Infinity 2147483647 -1 -1\n" +
|
||||
goldValue = "Infinity 2147483647 -1\n" +
|
||||
"3.4028235E38\n" +
|
||||
"NAN2SHORT:: 0\n" +
|
||||
"MAX2SHORT:: -1\n" +
|
||||
"2147483647 -1\n" +
|
||||
"FLOAT:: Infinity INT:: 2147483647\n" +
|
||||
"FLOAT:: 1.7014117E38 INT:: 2147483647\n" +
|
||||
|
||||
@@ -10,17 +10,16 @@ import kotlin.test.*
|
||||
@Test fun runTest() {
|
||||
val v = Float.POSITIVE_INFINITY
|
||||
val i = v.toInt()
|
||||
println("$v $i ${v.toShort()} ${i.toShort()}")
|
||||
println("$v $i ${i.toShort()}")
|
||||
|
||||
val a = 42
|
||||
val b = Float.MAX_VALUE
|
||||
println("${a + b}")
|
||||
|
||||
val s = Float.NaN.toShort()
|
||||
val s = Float.NaN.toInt().toShort()
|
||||
println("NAN2SHORT:: $s")
|
||||
|
||||
val d: Float = Float.MAX_VALUE
|
||||
println("MAX2SHORT:: ${d.toShort()}")
|
||||
val d2i = d.toInt()
|
||||
println("$d2i ${d2i.toShort()}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user