From c312fddb4595e7adfcd97afce4f001f70b41684c Mon Sep 17 00:00:00 2001 From: Dmitry Petrov Date: Tue, 19 Jun 2018 18:00:50 +0300 Subject: [PATCH] Ignore some 'when' subject variable tests in JS_IR be --- .../temporaryVarInWhenByStringIsDisposedProperly.kt | 3 ++- .../whenSubjectVariable/denseIntSwitchWithSubjectVariable.kt | 2 +- .../codegen/box/when/whenSubjectVariable/ieee754Equality.kt | 2 +- .../when/whenSubjectVariable/ieee754EqualityWithSmartCast.kt | 2 +- .../when/whenSubjectVariable/rangeCheckOnSubjectVariable.kt | 1 + .../whenSubjectVariable/sparseIntSwitchWithSubjectVariable.kt | 2 +- .../whenSubjectVariable/subjectExpressionIsEvaluatedOnce.kt | 2 +- .../codegen/box/when/whenSubjectVariable/whenByEnum.kt | 2 +- .../codegen/box/when/whenSubjectVariable/whenByNullableEnum.kt | 2 +- .../codegen/box/when/whenSubjectVariable/whenByString.kt | 2 +- 10 files changed, 11 insertions(+), 9 deletions(-) diff --git a/compiler/testData/codegen/box/when/stringOptimization/temporaryVarInWhenByStringIsDisposedProperly.kt b/compiler/testData/codegen/box/when/stringOptimization/temporaryVarInWhenByStringIsDisposedProperly.kt index 802657f9004..87e50a57db5 100644 --- a/compiler/testData/codegen/box/when/stringOptimization/temporaryVarInWhenByStringIsDisposedProperly.kt +++ b/compiler/testData/codegen/box/when/stringOptimization/temporaryVarInWhenByStringIsDisposedProperly.kt @@ -1,9 +1,10 @@ +// IGNORE_BACKEND: JS_IR // WITH_RUNTIME val String.name get() = this fun List.normalize(): List { - val list = ArrayList(this.size) + val list = ArrayList() for (str in this) { when (str.name) { "." -> {} diff --git a/compiler/testData/codegen/box/when/whenSubjectVariable/denseIntSwitchWithSubjectVariable.kt b/compiler/testData/codegen/box/when/whenSubjectVariable/denseIntSwitchWithSubjectVariable.kt index 7baeb408ad4..8b161b99c9d 100644 --- a/compiler/testData/codegen/box/when/whenSubjectVariable/denseIntSwitchWithSubjectVariable.kt +++ b/compiler/testData/codegen/box/when/whenSubjectVariable/denseIntSwitchWithSubjectVariable.kt @@ -1,6 +1,6 @@ // !LANGUAGE: +VariableDeclarationInWhenSubject // WITH_RUNTIME -// IGNORE_BACKEND: JS +// IGNORE_BACKEND: JS, JS_IR fun dense(x: Int): Int { return when (val xx = x) { diff --git a/compiler/testData/codegen/box/when/whenSubjectVariable/ieee754Equality.kt b/compiler/testData/codegen/box/when/whenSubjectVariable/ieee754Equality.kt index 860fbf9aa41..d4eae378c58 100644 --- a/compiler/testData/codegen/box/when/whenSubjectVariable/ieee754Equality.kt +++ b/compiler/testData/codegen/box/when/whenSubjectVariable/ieee754Equality.kt @@ -1,5 +1,5 @@ // !LANGUAGE: +VariableDeclarationInWhenSubject -// IGNORE_BACKEND: JS +// IGNORE_BACKEND: JS, JS_IR val dz = -0.0 val fz = -0.0f diff --git a/compiler/testData/codegen/box/when/whenSubjectVariable/ieee754EqualityWithSmartCast.kt b/compiler/testData/codegen/box/when/whenSubjectVariable/ieee754EqualityWithSmartCast.kt index 2dbaa088afd..183e2b6545b 100644 --- a/compiler/testData/codegen/box/when/whenSubjectVariable/ieee754EqualityWithSmartCast.kt +++ b/compiler/testData/codegen/box/when/whenSubjectVariable/ieee754EqualityWithSmartCast.kt @@ -1,5 +1,5 @@ // !LANGUAGE: +VariableDeclarationInWhenSubject +ProperIeee754Comparisons -// IGNORE_BACKEND: JS +// IGNORE_BACKEND: JS, JS_IR val az: Any = -0.0 val afz: Any = -0.0f diff --git a/compiler/testData/codegen/box/when/whenSubjectVariable/rangeCheckOnSubjectVariable.kt b/compiler/testData/codegen/box/when/whenSubjectVariable/rangeCheckOnSubjectVariable.kt index c093688f7d6..fc37fb3115b 100644 --- a/compiler/testData/codegen/box/when/whenSubjectVariable/rangeCheckOnSubjectVariable.kt +++ b/compiler/testData/codegen/box/when/whenSubjectVariable/rangeCheckOnSubjectVariable.kt @@ -1,4 +1,5 @@ // !LANGUAGE: +VariableDeclarationInWhenSubject +// IGNORE_BACKEND: JS_IR val x = 1 diff --git a/compiler/testData/codegen/box/when/whenSubjectVariable/sparseIntSwitchWithSubjectVariable.kt b/compiler/testData/codegen/box/when/whenSubjectVariable/sparseIntSwitchWithSubjectVariable.kt index 4c010f55401..4bc4aaa5bb0 100644 --- a/compiler/testData/codegen/box/when/whenSubjectVariable/sparseIntSwitchWithSubjectVariable.kt +++ b/compiler/testData/codegen/box/when/whenSubjectVariable/sparseIntSwitchWithSubjectVariable.kt @@ -1,6 +1,6 @@ // !LANGUAGE: +VariableDeclarationInWhenSubject // WITH_RUNTIME -// IGNORE_BACKEND: JS +// IGNORE_BACKEND: JS, JS_IR fun sparse(x: Int): Int { return when (val xx = (x % 4) * 100) { diff --git a/compiler/testData/codegen/box/when/whenSubjectVariable/subjectExpressionIsEvaluatedOnce.kt b/compiler/testData/codegen/box/when/whenSubjectVariable/subjectExpressionIsEvaluatedOnce.kt index 0da0c54b834..2f4d0444658 100644 --- a/compiler/testData/codegen/box/when/whenSubjectVariable/subjectExpressionIsEvaluatedOnce.kt +++ b/compiler/testData/codegen/box/when/whenSubjectVariable/subjectExpressionIsEvaluatedOnce.kt @@ -1,5 +1,5 @@ // !LANGUAGE: +VariableDeclarationInWhenSubject -// IGNORE_BACKEND: JS +// IGNORE_BACKEND: JS, JS_IR var effectCount = 0 diff --git a/compiler/testData/codegen/box/when/whenSubjectVariable/whenByEnum.kt b/compiler/testData/codegen/box/when/whenSubjectVariable/whenByEnum.kt index c2505a84c58..cad3744fcbb 100644 --- a/compiler/testData/codegen/box/when/whenSubjectVariable/whenByEnum.kt +++ b/compiler/testData/codegen/box/when/whenSubjectVariable/whenByEnum.kt @@ -1,6 +1,6 @@ // !LANGUAGE: +VariableDeclarationInWhenSubject // WITH_RUNTIME -// IGNORE_BACKEND: JS +// IGNORE_BACKEND: JS, JS_IR import kotlin.test.assertEquals diff --git a/compiler/testData/codegen/box/when/whenSubjectVariable/whenByNullableEnum.kt b/compiler/testData/codegen/box/when/whenSubjectVariable/whenByNullableEnum.kt index ef80be6e748..7777a4888e2 100644 --- a/compiler/testData/codegen/box/when/whenSubjectVariable/whenByNullableEnum.kt +++ b/compiler/testData/codegen/box/when/whenSubjectVariable/whenByNullableEnum.kt @@ -1,6 +1,6 @@ // !LANGUAGE: +VariableDeclarationInWhenSubject // WITH_RUNTIME -// IGNORE_BACKEND: JS +// IGNORE_BACKEND: JS, JS_IR import kotlin.test.assertEquals diff --git a/compiler/testData/codegen/box/when/whenSubjectVariable/whenByString.kt b/compiler/testData/codegen/box/when/whenSubjectVariable/whenByString.kt index 5d1a1a14044..49c80122e12 100644 --- a/compiler/testData/codegen/box/when/whenSubjectVariable/whenByString.kt +++ b/compiler/testData/codegen/box/when/whenSubjectVariable/whenByString.kt @@ -1,6 +1,6 @@ // !LANGUAGE: +VariableDeclarationInWhenSubject // WITH_RUNTIME -// IGNORE_BACKEND: JS +// IGNORE_BACKEND: JS, JS_IR import kotlin.test.assertEquals