Remove ignore for several floating point tests
This commit is contained in:
committed by
Pavel Punegov
parent
ad8160ae83
commit
6b44b69ec7
@@ -1,5 +1,3 @@
|
||||
// IGNORE_BACKEND: NATIVE
|
||||
|
||||
data class Test(val z1: Double, val z2: Double?)
|
||||
|
||||
fun box(): String {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: NATIVE
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// IGNORE_BACKEND: JS, NATIVE
|
||||
// IGNORE_BACKEND: JS
|
||||
fun less1(a: Double, b: Double) = a.compareTo(b) == -1
|
||||
|
||||
fun less2(a: Double?, b: Double?) = a!!.compareTo(b!!) == -1
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// IGNORE_BACKEND: JS, NATIVE
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
fun equals1(a: Double, b: Double) = a.equals(b)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// IGNORE_BACKEND: JS, NATIVE
|
||||
// IGNORE_BACKEND: JS!
|
||||
|
||||
inline fun less(a: Comparable<Double>, b: Double): Boolean {
|
||||
return a < b
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// IGNORE_BACKEND: JS, NATIVE
|
||||
// IGNORE_BACKEND: JS
|
||||
fun box(): String {
|
||||
val plusZero: Double? = 0.0
|
||||
val minusZero: Double = -0.0
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// IGNORE_BACKEND: JS, NATIVE
|
||||
// IGNORE_BACKEND: JS
|
||||
fun box(): String {
|
||||
val zero: Any = 0.0
|
||||
val floatZero: Any = -0.0F
|
||||
|
||||
+5
-5
@@ -1,5 +1,5 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS, NATIVE
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// This test checks that our bytecode is consistent with javac bytecode
|
||||
|
||||
@@ -10,8 +10,8 @@ fun _assert(condition: Boolean) {
|
||||
fun _assertFalse(condition: Boolean) = _assert(!condition)
|
||||
|
||||
fun box(): String {
|
||||
var dnan = java.lang.Double.NaN
|
||||
if (System.nanoTime() < 0) dnan = 3.14 // To avoid possible compile-time const propagation
|
||||
var dnan = Double.NaN
|
||||
// if (System.nanoTime() < 0) dnan = 3.14 // To avoid possible compile-time const propagation
|
||||
|
||||
_assertFalse(0.0 < dnan)
|
||||
_assertFalse(0.0 > dnan)
|
||||
@@ -34,8 +34,8 @@ fun box(): String {
|
||||
_assert(dnan.compareTo(0.0) == 1)
|
||||
_assert(dnan.compareTo(dnan) == 0)
|
||||
|
||||
var fnan = java.lang.Float.NaN
|
||||
if (System.nanoTime() < 0) fnan = 3.14f
|
||||
var fnan = Float.NaN
|
||||
// if (System.nanoTime() < 0) fnan = 3.14f
|
||||
|
||||
_assertFalse(0.0f < fnan)
|
||||
_assertFalse(0.0f > fnan)
|
||||
|
||||
Reference in New Issue
Block a user