From 70ef0e9431182ef84a83b5de71626cc3326b8864 Mon Sep 17 00:00:00 2001 From: Svyatoslav Kuzmich Date: Fri, 22 Mar 2019 19:06:45 +0300 Subject: [PATCH] Add '-ProperIeee754Comparisons' to some tests and disable them in JS_IR --- .../box/ieee754/smartCastToDifferentTypes.kt | 2 +- ...artCastToDifferentTypesWithNumericPromotion.kt | 2 +- compiler/testData/codegen/box/ieee754/when10.kt | 3 ++- .../ir/semantics/IrJsCodegenBoxTestGenerated.java | 15 --------------- 4 files changed, 4 insertions(+), 18 deletions(-) diff --git a/compiler/testData/codegen/box/ieee754/smartCastToDifferentTypes.kt b/compiler/testData/codegen/box/ieee754/smartCastToDifferentTypes.kt index d650d90c943..42e07668d22 100644 --- a/compiler/testData/codegen/box/ieee754/smartCastToDifferentTypes.kt +++ b/compiler/testData/codegen/box/ieee754/smartCastToDifferentTypes.kt @@ -1,7 +1,7 @@ // !LANGUAGE: -ProperIeee754Comparisons // IGNORE_BACKEND: JVM_IR // IGNORE_BACKEND: NATIVE -// IGNORE_BACKEND: JS_IR +// DONT_TARGET_EXACT_BACKEND: JS_IR fun box(): String { val zero: Any = 0.0 val floatZero: Any = -0.0F diff --git a/compiler/testData/codegen/box/ieee754/smartCastToDifferentTypesWithNumericPromotion.kt b/compiler/testData/codegen/box/ieee754/smartCastToDifferentTypesWithNumericPromotion.kt index 9d1a089492d..e5a7d3b68db 100644 --- a/compiler/testData/codegen/box/ieee754/smartCastToDifferentTypesWithNumericPromotion.kt +++ b/compiler/testData/codegen/box/ieee754/smartCastToDifferentTypesWithNumericPromotion.kt @@ -1,7 +1,7 @@ // !LANGUAGE: -ProperIeee754Comparisons // IGNORE_BACKEND: NATIVE // IGNORE_BACKEND: JVM_IR -// IGNORE_BACKEND: JS_IR +// DONT_TARGET_EXACT_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 diff --git a/compiler/testData/codegen/box/ieee754/when10.kt b/compiler/testData/codegen/box/ieee754/when10.kt index fe9646e1fbb..07248817dd9 100644 --- a/compiler/testData/codegen/box/ieee754/when10.kt +++ b/compiler/testData/codegen/box/ieee754/when10.kt @@ -1,8 +1,9 @@ +// !LANGUAGE: -ProperIeee754Comparisons // !API_VERSION: 1.0 // !LANGUAGE: -ProperIeee754Comparisons // IGNORE_BACKEND: NATIVE // IGNORE_BACKEND: JVM_IR -// IGNORE_BACKEND: JS_IR +// DONT_TARGET_EXACT_BACKEND: JS_IR fun box(): String { val plusZero: Any = 0.0 diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java index 71530dcc78b..911db978fce 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java @@ -9204,16 +9204,6 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/ieee754/smartCastOnWhenSubjectAfterCheckInBranch_properIeeeComparisons.kt"); } - @TestMetadata("smartCastToDifferentTypes.kt") - public void testSmartCastToDifferentTypes() throws Exception { - runTest("compiler/testData/codegen/box/ieee754/smartCastToDifferentTypes.kt"); - } - - @TestMetadata("smartCastToDifferentTypesWithNumericPromotion.kt") - public void testSmartCastToDifferentTypesWithNumericPromotion() throws Exception { - runTest("compiler/testData/codegen/box/ieee754/smartCastToDifferentTypesWithNumericPromotion.kt"); - } - @TestMetadata("smartCastToDifferentTypesWithNumericPromotion_properIeeeComparisons.kt") public void testSmartCastToDifferentTypesWithNumericPromotion_properIeeeComparisons() throws Exception { runTest("compiler/testData/codegen/box/ieee754/smartCastToDifferentTypesWithNumericPromotion_properIeeeComparisons.kt"); @@ -9229,11 +9219,6 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/ieee754/smartCastToDoubleAndComparableToDouble.kt"); } - @TestMetadata("when10.kt") - public void testWhen10() throws Exception { - runTest("compiler/testData/codegen/box/ieee754/when10.kt"); - } - @TestMetadata("when10_properIeeeComparisons.kt") public void testWhen10_properIeeeComparisons() throws Exception { runTest("compiler/testData/codegen/box/ieee754/when10_properIeeeComparisons.kt");