Disable generation of 1.2 coroutine tests for JS_IR
Add directive DONT_TARGET_EXACT_BACKEND. This directive is needed to exclude JS_IR backned but keep "compatible" JS backend.
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
// !LANGUAGE: -ReleaseCoroutines -ExperimentalBuilderInference
|
||||
// IGNORE_BACKEND: JVM_IR, JS_IR
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
// DONT_TARGET_EXACT_BACKEND: JS_IR
|
||||
|
||||
import helpers.*
|
||||
import kotlin.coroutines.experimental.*
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
// !LANGUAGE: -ReleaseCoroutines -ExperimentalBuilderInference
|
||||
// IGNORE_BACKEND: JVM_IR, JS_IR
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
// DONT_TARGET_EXACT_BACKEND: JS_IR
|
||||
|
||||
import helpers.*
|
||||
import kotlin.coroutines.experimental.*
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
// !LANGUAGE: -ReleaseCoroutines -ExperimentalBuilderInference
|
||||
// IGNORE_BACKEND: JVM_IR, JS_IR
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
// DONT_TARGET_EXACT_BACKEND: JS_IR
|
||||
|
||||
import helpers.*
|
||||
import kotlin.coroutines.experimental.*
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// !LANGUAGE: -ReleaseCoroutines
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
// DONT_TARGET_EXACT_BACKEND: JS_IR
|
||||
|
||||
import helpers.*
|
||||
import kotlin.coroutines.experimental.*
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// !LANGUAGE: -ReleaseCoroutines
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
// DONT_TARGET_EXACT_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
import kotlin.coroutines.experimental.*
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// !LANGUAGE: -ReleaseCoroutines
|
||||
// WITH_COROUTINES
|
||||
// WITH_REFLECT
|
||||
// DONT_TARGET_EXACT_BACKEND: JS_IR
|
||||
|
||||
// IGNORE_BACKEND: NATIVE
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
import helpers.*
|
||||
|
||||
+1
-1
@@ -1,8 +1,8 @@
|
||||
// !LANGUAGE: -ReleaseCoroutines
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
// DONT_TARGET_EXACT_BACKEND: JS_IR
|
||||
|
||||
import helpers.*
|
||||
import kotlin.coroutines.experimental.*
|
||||
|
||||
Vendored
+1
@@ -4,6 +4,7 @@
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
// COMMON_COROUTINES_TEST
|
||||
// KJS_WITH_FULL_RUNTIME
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
import COROUTINES_PACKAGE.intrinsics.*
|
||||
|
||||
@@ -221,6 +221,10 @@ public final class InTextDirectivesUtils {
|
||||
public static boolean isCompatibleTarget(TargetBackend targetBackend, File file) {
|
||||
if (targetBackend == TargetBackend.ANY) return true;
|
||||
|
||||
List<String> doNotTarget = findLinesWithPrefixesRemoved(textWithDirectives(file), "// DONT_TARGET_EXACT_BACKEND: ");
|
||||
if (doNotTarget.contains(targetBackend.name()))
|
||||
return false;
|
||||
|
||||
List<String> backends = findLinesWithPrefixesRemoved(textWithDirectives(file), "// TARGET_BACKEND: ");
|
||||
return backends.isEmpty() || backends.contains(targetBackend.name()) || backends.contains(targetBackend.getCompatibleWith().name());
|
||||
}
|
||||
|
||||
-35
@@ -4669,31 +4669,16 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("asyncIteratorNullMerge_1_2.kt")
|
||||
public void testAsyncIteratorNullMerge_1_2() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/asyncIteratorNullMerge_1_2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("asyncIteratorNullMerge_1_3.kt")
|
||||
public void testAsyncIteratorNullMerge_1_3() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/asyncIteratorNullMerge_1_3.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("asyncIteratorToList_1_2.kt")
|
||||
public void testAsyncIteratorToList_1_2() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/asyncIteratorToList_1_2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("asyncIteratorToList_1_3.kt")
|
||||
public void testAsyncIteratorToList_1_3() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/asyncIteratorToList_1_3.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("asyncIterator_1_2.kt")
|
||||
public void testAsyncIterator_1_2() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/asyncIterator_1_2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("asyncIterator_1_3.kt")
|
||||
public void testAsyncIterator_1_3() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/asyncIterator_1_3.kt");
|
||||
@@ -4749,11 +4734,6 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/coroutines/createCoroutinesOnManualInstances.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("createCoroutinesOnManualInstances_1_2.kt")
|
||||
public void testCreateCoroutinesOnManualInstances_1_2() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/createCoroutinesOnManualInstances_1_2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("crossInlineWithCapturedOuterReceiver.kt")
|
||||
public void testCrossInlineWithCapturedOuterReceiver_1_3() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/crossInlineWithCapturedOuterReceiver.kt", "kotlin.coroutines");
|
||||
@@ -5192,11 +5172,6 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/controlFlow/ifStatement.kt", "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("kt22694_1_2.kt")
|
||||
public void testKt22694_1_2() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/controlFlow/kt22694_1_2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt22694_1_3.kt")
|
||||
public void testKt22694_1_3() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/controlFlow/kt22694_1_3.kt");
|
||||
@@ -5873,11 +5848,6 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
public void testAllFilesPresentInReflect() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/reflect"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("isSuspend12.kt")
|
||||
public void testIsSuspend12() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/reflect/isSuspend12.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/coroutines/stackUnwinding")
|
||||
@@ -5953,11 +5923,6 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/handleException.kt", "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("ifExpressionInsideCoroutine_1_2.kt")
|
||||
public void testIfExpressionInsideCoroutine_1_2() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/ifExpressionInsideCoroutine_1_2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ifExpressionInsideCoroutine_1_3.kt")
|
||||
public void testIfExpressionInsideCoroutine_1_3() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/ifExpressionInsideCoroutine_1_3.kt");
|
||||
|
||||
Reference in New Issue
Block a user