JS IR: mute codegen box tests automatically

This commit is contained in:
Anton Bannykh
2018-06-07 14:17:45 +03:00
parent 7e1713af44
commit 96355e2732
2384 changed files with 2384 additions and 0 deletions
+1
View File
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
fun box(): String {
val plusZero: Any = 0.0
val minusZero: Any = -0.0
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
val minus: Any = -0.0
fun box(): String {
@@ -1,4 +1,5 @@
// !LANGUAGE: +ProperIeee754Comparisons
// IGNORE_BACKEND: JS_IR
val minus: Any = -0.0
@@ -1,4 +1,5 @@
// !LANGUAGE: +ProperIeee754Comparisons
// IGNORE_BACKEND: JS_IR
fun less(x: Comparable<Float>, y: Float) = x is Float && x < y
fun less(x: Comparable<Double>, y: Double) = x is Double && x < y
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
fun box(): String {
if ((-0.0 as Comparable<Double>) >= 0.0) return "fail 0"
if ((-0.0F as Comparable<Float>) >= 0.0F) return "fail 1"
+1
View File
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
data class Test(val z1: Double, val z2: Double?)
fun box(): String {
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
fun box(): String {
if (0.toByte().compareTo(-0.0) != 1) return "fail 1.1"
if (0.toByte().compareTo(-0.0F) != 1) return "fail 1.2"
+1
View File
@@ -1,4 +1,5 @@
// !LANGUAGE: -ProperIeee754Comparisons
// IGNORE_BACKEND: JS_IR
fun equals1(a: Double, b: Double) = a == b
@@ -1,4 +1,5 @@
// !LANGUAGE: +ProperIeee754Comparisons
// IGNORE_BACKEND: JS_IR
fun equals1(a: Double, b: Double) = a == b
+1
View File
@@ -1,4 +1,5 @@
// !LANGUAGE: -ProperIeee754Comparisons
// IGNORE_BACKEND: JS_IR
fun equals1(a: Float, b: Float) = a == b
@@ -1,4 +1,5 @@
// !LANGUAGE: +ProperIeee754Comparisons
// IGNORE_BACKEND: JS_IR
fun equals1(a: Float, b: Float) = a == b
+1
View File
@@ -1,4 +1,5 @@
// !LANGUAGE: -ProperIeee754Comparisons
// IGNORE_BACKEND: JS_IR
// WITH_RUNTIME
import kotlin.test.*
@@ -1,4 +1,5 @@
// !LANGUAGE: +ProperIeee754Comparisons
// IGNORE_BACKEND: JS_IR
// WITH_RUNTIME
import kotlin.test.*
@@ -1,4 +1,5 @@
// !LANGUAGE: -ProperIeee754Comparisons
// IGNORE_BACKEND: JS_IR
fun equals1(a: Double, b: Double?) = a == b
@@ -1,4 +1,5 @@
// !LANGUAGE: +ProperIeee754Comparisons
// IGNORE_BACKEND: JS_IR
fun equals1(a: Double, b: Double?) = a == b
@@ -1,4 +1,5 @@
// !LANGUAGE: -ProperIeee754Comparisons
// IGNORE_BACKEND: JS_IR
fun equals1(a: Float, b: Float?) = a == b
@@ -1,4 +1,5 @@
// !LANGUAGE: +ProperIeee754Comparisons
// IGNORE_BACKEND: JS_IR
fun equals1(a: Float, b: Float?) = a == b
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
fun less1(a: Double, b: Double) = a.compareTo(b) == -1
fun less2(a: Double?, b: Double?) = a!!.compareTo(b!!) == -1
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
fun equals1(a: Double, b: Double) = a.equals(b)
fun equals2(a: Double?, b: Double?) = a!!.equals(b!!)
@@ -1,4 +1,5 @@
// !LANGUAGE: -ProperIeee754Comparisons
// IGNORE_BACKEND: JS_IR
fun greater1(a: Double, b: Double) = a > b
@@ -1,4 +1,5 @@
// !LANGUAGE: +ProperIeee754Comparisons
// IGNORE_BACKEND: JS_IR
fun greater1(a: Double, b: Double) = a > b
+1
View File
@@ -1,4 +1,5 @@
// !LANGUAGE: -ProperIeee754Comparisons
// IGNORE_BACKEND: JS_IR
fun greater1(a: Float, b: Float) = a > b
@@ -1,4 +1,5 @@
// !LANGUAGE: +ProperIeee754Comparisons
// IGNORE_BACKEND: JS_IR
fun greater1(a: Float, b: Float) = a > b
+1
View File
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
inline fun less(a: Comparable<Double>, b: Double): Boolean {
return a < b
}
+1
View File
@@ -1,4 +1,5 @@
// !LANGUAGE: -ProperIeee754Comparisons
// IGNORE_BACKEND: JS_IR
fun less1(a: Double, b: Double) = a < b
@@ -1,4 +1,5 @@
// !LANGUAGE: +ProperIeee754Comparisons
// IGNORE_BACKEND: JS_IR
fun less1(a: Double, b: Double) = a < b
+1
View File
@@ -1,4 +1,5 @@
// !LANGUAGE: -ProperIeee754Comparisons
// IGNORE_BACKEND: JS_IR
fun less1(a: Float, b: Float) = a < b
@@ -1,4 +1,5 @@
// !LANGUAGE: +ProperIeee754Comparisons
// IGNORE_BACKEND: JS_IR
fun less1(a: Float, b: Float) = a < b
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
fun box(): String {
val plusZero: Any? = 0.0
val minusZero: Any? = -0.0
+1
View File
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
fun box(): String {
val plusZero: Double? = 0.0
val minusZero: Double = -0.0
@@ -1,4 +1,5 @@
// !LANGUAGE: +ProperIeee754Comparisons
// IGNORE_BACKEND: JS_IR
fun testF(x: Any) =
when (x) {
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
fun box(): String {
val zero: Any = 0.0
val floatZero: Any = -0.0F
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
fun eqDI(x: Any?, y: Any?) = x is Double? && y is Int? && x == y
fun eqDL(x: Any?, y: Any?) = x is Double? && y is Long? && x == y
fun eqID(x: Any?, y: Any?) = x is Int? && y is Double? && x == y
@@ -1,4 +1,5 @@
// !LANGUAGE: +ProperIeee754Comparisons
// IGNORE_BACKEND: JS_IR
fun eqDI(x: Any?, y: Any?) = x is Double? && y is Int? && x == y
fun eqDL(x: Any?, y: Any?) = x is Double? && y is Long? && x == y
@@ -1,4 +1,5 @@
// !LANGUAGE: +ProperIeee754Comparisons
// IGNORE_BACKEND: JS_IR
fun ne(x: Any, y: Any) = x is Double && y is Float && x != y
fun lt(x: Any, y: Any) = x is Double && y is Float && x < y
@@ -1,4 +1,5 @@
// !LANGUAGE: +ProperIeee754Comparisons
// IGNORE_BACKEND: JS_IR
val minus: Any = -0.0
+1
View File
@@ -1,4 +1,5 @@
// !LANGUAGE: -ProperIeee754Comparisons
// IGNORE_BACKEND: JS_IR
fun box(): String {
val plusZero: Any = 0.0
+1
View File
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
// LANGUAGE_VERSION: 1.0
fun box(): String {
@@ -1,4 +1,5 @@
// !LANGUAGE: +ProperIeee754Comparisons
// IGNORE_BACKEND: JS_IR
fun box(): String {
val plusZero: Any = 0.0
@@ -1,4 +1,5 @@
// !LANGUAGE: -ProperIeee754Comparisons
// IGNORE_BACKEND: JS_IR
fun box(): String {
val plusZero: Any = 0.0
@@ -1,4 +1,5 @@
// !LANGUAGE: +ProperIeee754Comparisons
// IGNORE_BACKEND: JS_IR
fun box(): String {
val plusZero: Any = 0.0
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
fun box(): String {
val nullValue: Any? = null
val nullDouble: Double? = null
@@ -1,3 +1,4 @@
// IGNORE_BACKEND: JS_IR
// LANGUAGE_VERSION: 1.0
fun box(): String {
val nullValue: Any? = null
@@ -1,4 +1,5 @@
// !LANGUAGE: +ProperIeee754Comparisons
// IGNORE_BACKEND: JS_IR
fun box(): String {
val plusZero: Any = 0.0