From 75328f26eaf7ec6b2651ec2d30d6bf52d5ad3bfd Mon Sep 17 00:00:00 2001 From: Svyatoslav Kuzmich Date: Fri, 25 Jan 2019 20:27:59 +0300 Subject: [PATCH] [JS IR BE] Add missing KJS_WITH_FULL_RUNTIME to some tests + ranges test generator --- compiler/testData/codegen/box/classes/kt508.kt | 3 ++- compiler/testData/codegen/box/controlStructures/kt513.kt | 1 + .../codegen/box/delegatedProperty/useKPropertyLater.kt | 1 + .../codegen/box/inlineClasses/hiddenConstructor/kt28855.kt | 3 ++- compiler/testData/codegen/box/inlineClasses/kt28405.kt | 1 + compiler/testData/codegen/box/operatorConventions/kt14227.kt | 2 +- .../box/ranges/contains/evaluationOrderForCollection.kt | 1 + .../codegen/box/ranges/expression/inexactDownToMinValue.kt | 1 + .../codegen/box/ranges/expression/inexactToMaxValue.kt | 1 + .../codegen/box/ranges/literal/inexactDownToMinValue.kt | 1 + .../testData/codegen/box/ranges/literal/inexactToMaxValue.kt | 1 + .../box/unsignedTypes/signedToUnsignedLiteralConversion.kt | 1 + .../codegen/box/unsignedTypes/varargsOfUnsignedTypes.kt | 1 + .../kotlin/generators/tests/GenerateRangesCodegenTestData.java | 2 ++ 14 files changed, 17 insertions(+), 3 deletions(-) diff --git a/compiler/testData/codegen/box/classes/kt508.kt b/compiler/testData/codegen/box/classes/kt508.kt index 7eaf2ec38f4..2f985304586 100644 --- a/compiler/testData/codegen/box/classes/kt508.kt +++ b/compiler/testData/codegen/box/classes/kt508.kt @@ -1,4 +1,5 @@ -// IGNORE_BACKEND: JS_IR +// KJS_WITH_FULL_RUNTIME + operator fun MutableMap.set(key : K, value : V) = put(key, value) fun box() : String { diff --git a/compiler/testData/codegen/box/controlStructures/kt513.kt b/compiler/testData/codegen/box/controlStructures/kt513.kt index aae399e549d..67f5a1ea692 100644 --- a/compiler/testData/codegen/box/controlStructures/kt513.kt +++ b/compiler/testData/codegen/box/controlStructures/kt513.kt @@ -1,5 +1,6 @@ // IGNORE_BACKEND: JS_IR // WITH_RUNTIME +// KJS_WITH_FULL_RUNTIME class A() { infix fun ArrayList.add3(el: T) = add(el) diff --git a/compiler/testData/codegen/box/delegatedProperty/useKPropertyLater.kt b/compiler/testData/codegen/box/delegatedProperty/useKPropertyLater.kt index 9513d17a6ed..c3819767f51 100644 --- a/compiler/testData/codegen/box/delegatedProperty/useKPropertyLater.kt +++ b/compiler/testData/codegen/box/delegatedProperty/useKPropertyLater.kt @@ -1,6 +1,7 @@ // IGNORE_BACKEND: JVM_IR // IGNORE_BACKEND: JS_IR // WITH_REFLECT +// KJS_WITH_FULL_RUNTIME import kotlin.reflect.* diff --git a/compiler/testData/codegen/box/inlineClasses/hiddenConstructor/kt28855.kt b/compiler/testData/codegen/box/inlineClasses/hiddenConstructor/kt28855.kt index 7251e4d41e0..6b9af3dbb57 100644 --- a/compiler/testData/codegen/box/inlineClasses/hiddenConstructor/kt28855.kt +++ b/compiler/testData/codegen/box/inlineClasses/hiddenConstructor/kt28855.kt @@ -1,6 +1,7 @@ // !LANGUAGE: +InlineClasses -// IGNORE_BACKEND: JS_IR, JVM_IR +// IGNORE_BACKEND: JVM_IR // WITH_RUNTIME +// KJS_WITH_FULL_RUNTIME class C(val x: T, vararg ys: UInt) { val y0 = ys[0] diff --git a/compiler/testData/codegen/box/inlineClasses/kt28405.kt b/compiler/testData/codegen/box/inlineClasses/kt28405.kt index 25c39c66e7a..267ab88e367 100644 --- a/compiler/testData/codegen/box/inlineClasses/kt28405.kt +++ b/compiler/testData/codegen/box/inlineClasses/kt28405.kt @@ -1,5 +1,6 @@ // !LANGUAGE: +InlineClasses // WITH_RUNTIME +// KJS_WITH_FULL_RUNTIME // IGNORE_BACKEND: JVM_IR, JS_IR import kotlin.test.* diff --git a/compiler/testData/codegen/box/operatorConventions/kt14227.kt b/compiler/testData/codegen/box/operatorConventions/kt14227.kt index 5a26f95ad07..8c2c4932d1a 100644 --- a/compiler/testData/codegen/box/operatorConventions/kt14227.kt +++ b/compiler/testData/codegen/box/operatorConventions/kt14227.kt @@ -1,5 +1,5 @@ -// IGNORE_BACKEND: JS_IR // WITH_RUNTIME +// KJS_WITH_FULL_RUNTIME import kotlin.test.* fun box(): String { diff --git a/compiler/testData/codegen/box/ranges/contains/evaluationOrderForCollection.kt b/compiler/testData/codegen/box/ranges/contains/evaluationOrderForCollection.kt index 97af2cc03d6..763b912cb3e 100644 --- a/compiler/testData/codegen/box/ranges/contains/evaluationOrderForCollection.kt +++ b/compiler/testData/codegen/box/ranges/contains/evaluationOrderForCollection.kt @@ -1,5 +1,6 @@ // IGNORE_BACKEND: JS_IR // WITH_RUNTIME +// KJS_WITH_FULL_RUNTIME var order = StringBuilder() diff --git a/compiler/testData/codegen/box/ranges/expression/inexactDownToMinValue.kt b/compiler/testData/codegen/box/ranges/expression/inexactDownToMinValue.kt index 821996b64af..5596aab4860 100644 --- a/compiler/testData/codegen/box/ranges/expression/inexactDownToMinValue.kt +++ b/compiler/testData/codegen/box/ranges/expression/inexactDownToMinValue.kt @@ -1,3 +1,4 @@ +// KJS_WITH_FULL_RUNTIME // TODO: muted automatically, investigate should it be ran for JVM_IR or not // IGNORE_BACKEND: JVM_IR diff --git a/compiler/testData/codegen/box/ranges/expression/inexactToMaxValue.kt b/compiler/testData/codegen/box/ranges/expression/inexactToMaxValue.kt index d89015b209b..f5a91d7b96d 100644 --- a/compiler/testData/codegen/box/ranges/expression/inexactToMaxValue.kt +++ b/compiler/testData/codegen/box/ranges/expression/inexactToMaxValue.kt @@ -1,3 +1,4 @@ +// KJS_WITH_FULL_RUNTIME // TODO: muted automatically, investigate should it be ran for JVM_IR or not // IGNORE_BACKEND: JVM_IR diff --git a/compiler/testData/codegen/box/ranges/literal/inexactDownToMinValue.kt b/compiler/testData/codegen/box/ranges/literal/inexactDownToMinValue.kt index eb4cee7bdfe..8d573774b8e 100644 --- a/compiler/testData/codegen/box/ranges/literal/inexactDownToMinValue.kt +++ b/compiler/testData/codegen/box/ranges/literal/inexactDownToMinValue.kt @@ -1,3 +1,4 @@ +// KJS_WITH_FULL_RUNTIME // TODO: muted automatically, investigate should it be ran for JVM_IR or not // IGNORE_BACKEND: JVM_IR diff --git a/compiler/testData/codegen/box/ranges/literal/inexactToMaxValue.kt b/compiler/testData/codegen/box/ranges/literal/inexactToMaxValue.kt index 82e19137b89..538786e9fba 100644 --- a/compiler/testData/codegen/box/ranges/literal/inexactToMaxValue.kt +++ b/compiler/testData/codegen/box/ranges/literal/inexactToMaxValue.kt @@ -1,3 +1,4 @@ +// KJS_WITH_FULL_RUNTIME // TODO: muted automatically, investigate should it be ran for JVM_IR or not // IGNORE_BACKEND: JVM_IR diff --git a/compiler/testData/codegen/box/unsignedTypes/signedToUnsignedLiteralConversion.kt b/compiler/testData/codegen/box/unsignedTypes/signedToUnsignedLiteralConversion.kt index 03a15afa885..bbd064cfcb5 100644 --- a/compiler/testData/codegen/box/unsignedTypes/signedToUnsignedLiteralConversion.kt +++ b/compiler/testData/codegen/box/unsignedTypes/signedToUnsignedLiteralConversion.kt @@ -1,4 +1,5 @@ // WITH_RUNTIME +// KJS_WITH_FULL_RUNTIME // IGNORE_BACKEND: JS_IR, JVM_IR @file:Suppress("SIGNED_CONSTANT_CONVERTED_TO_UNSIGNED") diff --git a/compiler/testData/codegen/box/unsignedTypes/varargsOfUnsignedTypes.kt b/compiler/testData/codegen/box/unsignedTypes/varargsOfUnsignedTypes.kt index 676e590ee4f..9fb01db42bf 100644 --- a/compiler/testData/codegen/box/unsignedTypes/varargsOfUnsignedTypes.kt +++ b/compiler/testData/codegen/box/unsignedTypes/varargsOfUnsignedTypes.kt @@ -1,5 +1,6 @@ // IGNORE_BACKEND: JVM_IR // WITH_RUNTIME +// KJS_WITH_FULL_RUNTIME // IGNORE_BACKEND: JS_IR fun uint(vararg us: UInt): UIntArray = us diff --git a/compiler/tests/org/jetbrains/kotlin/generators/tests/GenerateRangesCodegenTestData.java b/compiler/tests/org/jetbrains/kotlin/generators/tests/GenerateRangesCodegenTestData.java index 90ff9071dda..4aaa7c128cc 100644 --- a/compiler/tests/org/jetbrains/kotlin/generators/tests/GenerateRangesCodegenTestData.java +++ b/compiler/tests/org/jetbrains/kotlin/generators/tests/GenerateRangesCodegenTestData.java @@ -143,6 +143,8 @@ public class GenerateRangesCodegenTestData { throw new AssertionError(e); } + out.println("// KJS_WITH_FULL_RUNTIME"); + // Ranges are not supported in JVM_IR yet if (!WHITELISTED_FOR_JVM_IR_BACKEND.contains(file.getName())) { writeIgnoreBackendDirective(out, "JVM_IR");