[TEST] Drop generating tests for coroutines of Kotlin 1.2

This commit is contained in:
Dmitriy Novozhilov
2020-12-01 17:26:15 +03:00
committed by TeamCityServer
parent 0389589d83
commit 8c4b7ad1e1
36 changed files with 5902 additions and 10854 deletions
@@ -8,7 +8,6 @@ package org.jetbrains.kotlin.fir;
import com.intellij.testFramework.TestDataPath; import com.intellij.testFramework.TestDataPath;
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
import org.jetbrains.kotlin.test.KotlinTestUtils; import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.TargetBackend;
import org.jetbrains.kotlin.test.TestMetadata; import org.jetbrains.kotlin.test.TestMetadata;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@@ -1659,10 +1658,6 @@ public class FirOldFrontendDiagnosticsTestWithStdlibGenerated extends AbstractFi
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.ANY, testDataFilePath);
}
public void testAllFilesPresentInCoroutines() throws Exception { public void testAllFilesPresentInCoroutines() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
} }
@@ -1788,8 +1783,8 @@ public class FirOldFrontendDiagnosticsTestWithStdlibGenerated extends AbstractFi
} }
@TestMetadata("noDefaultCoroutineImports.kt") @TestMetadata("noDefaultCoroutineImports.kt")
public void testNoDefaultCoroutineImports_1_3() throws Exception { public void testNoDefaultCoroutineImports() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/noDefaultCoroutineImports.kt", "kotlin.coroutines"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/noDefaultCoroutineImports.kt");
} }
@TestMetadata("nonLocalSuspension.kt") @TestMetadata("nonLocalSuspension.kt")
@@ -1818,8 +1813,8 @@ public class FirOldFrontendDiagnosticsTestWithStdlibGenerated extends AbstractFi
} }
@TestMetadata("suspendApplicability.kt") @TestMetadata("suspendApplicability.kt")
public void testSuspendApplicability_1_3() throws Exception { public void testSuspendApplicability() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendApplicability.kt", "kotlin.coroutines"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendApplicability.kt");
} }
@TestMetadata("suspendConflictsWithNoSuspend.kt") @TestMetadata("suspendConflictsWithNoSuspend.kt")
@@ -1848,8 +1843,8 @@ public class FirOldFrontendDiagnosticsTestWithStdlibGenerated extends AbstractFi
} }
@TestMetadata("suspendCovarianJavaOverride.kt") @TestMetadata("suspendCovarianJavaOverride.kt")
public void testSuspendCovarianJavaOverride_1_3() throws Exception { public void testSuspendCovarianJavaOverride() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendCovarianJavaOverride.kt", "kotlin.coroutines"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendCovarianJavaOverride.kt");
} }
@TestMetadata("suspendDestructuring.kt") @TestMetadata("suspendDestructuring.kt")
@@ -1868,23 +1863,23 @@ public class FirOldFrontendDiagnosticsTestWithStdlibGenerated extends AbstractFi
} }
@TestMetadata("suspendFunctions.kt") @TestMetadata("suspendFunctions.kt")
public void testSuspendFunctions_1_3() throws Exception { public void testSuspendFunctions() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctions.kt", "kotlin.coroutines"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctions.kt");
} }
@TestMetadata("suspendJavaImplementationFromDifferentClass.kt") @TestMetadata("suspendJavaImplementationFromDifferentClass.kt")
public void testSuspendJavaImplementationFromDifferentClass_1_3() throws Exception { public void testSuspendJavaImplementationFromDifferentClass() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendJavaImplementationFromDifferentClass.kt", "kotlin.coroutines"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendJavaImplementationFromDifferentClass.kt");
} }
@TestMetadata("suspendJavaOverrides.kt") @TestMetadata("suspendJavaOverrides.kt")
public void testSuspendJavaOverrides_1_3() throws Exception { public void testSuspendJavaOverrides() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendJavaOverrides.kt", "kotlin.coroutines"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendJavaOverrides.kt");
} }
@TestMetadata("suspendLambda.kt") @TestMetadata("suspendLambda.kt")
public void testSuspendLambda_1_3() throws Exception { public void testSuspendLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendLambda.kt", "kotlin.coroutines"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendLambda.kt");
} }
@TestMetadata("suspendOverridability.kt") @TestMetadata("suspendOverridability.kt")
@@ -1945,10 +1940,6 @@ public class FirOldFrontendDiagnosticsTestWithStdlibGenerated extends AbstractFi
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.ANY, testDataFilePath);
}
public void testAllFilesPresentInCallableReference() throws Exception { public void testAllFilesPresentInCallableReference() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/callableReference"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/callableReference"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
} }
@@ -1964,8 +1955,8 @@ public class FirOldFrontendDiagnosticsTestWithStdlibGenerated extends AbstractFi
} }
@TestMetadata("property.kt") @TestMetadata("property.kt")
public void testProperty_1_3() throws Exception { public void testProperty() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/callableReference/property.kt", "kotlin.coroutines"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/callableReference/property.kt");
} }
@TestMetadata("suspendConversionForCallableReferences.kt") @TestMetadata("suspendConversionForCallableReferences.kt")
@@ -2265,72 +2256,68 @@ public class FirOldFrontendDiagnosticsTestWithStdlibGenerated extends AbstractFi
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.ANY, testDataFilePath);
}
public void testAllFilesPresentInInlineCrossinline() throws Exception { public void testAllFilesPresentInInlineCrossinline() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
} }
@TestMetadata("inlineOrdinaryOfCrossinlineOrdinary.kt") @TestMetadata("inlineOrdinaryOfCrossinlineOrdinary.kt")
public void testInlineOrdinaryOfCrossinlineOrdinary_1_3() throws Exception { public void testInlineOrdinaryOfCrossinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfCrossinlineOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfCrossinlineOrdinary.kt");
} }
@TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt")
public void testInlineOrdinaryOfCrossinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfCrossinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfCrossinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfCrossinlineSuspend.kt");
} }
@TestMetadata("inlineOrdinaryOfNoinlineOrdinary.kt") @TestMetadata("inlineOrdinaryOfNoinlineOrdinary.kt")
public void testInlineOrdinaryOfNoinlineOrdinary_1_3() throws Exception { public void testInlineOrdinaryOfNoinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfNoinlineOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfNoinlineOrdinary.kt");
} }
@TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt")
public void testInlineOrdinaryOfNoinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfNoinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfNoinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfNoinlineSuspend.kt");
} }
@TestMetadata("inlineOrdinaryOfOrdinary.kt") @TestMetadata("inlineOrdinaryOfOrdinary.kt")
public void testInlineOrdinaryOfOrdinary_1_3() throws Exception { public void testInlineOrdinaryOfOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfOrdinary.kt");
} }
@TestMetadata("inlineOrdinaryOfSuspend.kt") @TestMetadata("inlineOrdinaryOfSuspend.kt")
public void testInlineOrdinaryOfSuspend_1_3() throws Exception { public void testInlineOrdinaryOfSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfSuspend.kt");
} }
@TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt")
public void testInlineSuspendOfCrossinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfCrossinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfCrossinlineOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfCrossinlineOrdinary.kt");
} }
@TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt")
public void testInlineSuspendOfCrossinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfCrossinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfCrossinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfCrossinlineSuspend.kt");
} }
@TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt")
public void testInlineSuspendOfNoinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfNoinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfNoinlineOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfNoinlineOrdinary.kt");
} }
@TestMetadata("inlineSuspendOfNoinlineSuspend.kt") @TestMetadata("inlineSuspendOfNoinlineSuspend.kt")
public void testInlineSuspendOfNoinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfNoinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfNoinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfNoinlineSuspend.kt");
} }
@TestMetadata("inlineSuspendOfOrdinary.kt") @TestMetadata("inlineSuspendOfOrdinary.kt")
public void testInlineSuspendOfOrdinary_1_3() throws Exception { public void testInlineSuspendOfOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfOrdinary.kt");
} }
@TestMetadata("inlineSuspendOfSuspend.kt") @TestMetadata("inlineSuspendOfSuspend.kt")
public void testInlineSuspendOfSuspend_1_3() throws Exception { public void testInlineSuspendOfSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfSuspend.kt");
} }
} }
@@ -2370,32 +2357,28 @@ public class FirOldFrontendDiagnosticsTestWithStdlibGenerated extends AbstractFi
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.ANY, testDataFilePath);
}
public void testAllFilesPresentInRestrictSuspension() throws Exception { public void testAllFilesPresentInRestrictSuspension() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
} }
@TestMetadata("allMembersAllowed.kt") @TestMetadata("allMembersAllowed.kt")
public void testAllMembersAllowed_1_3() throws Exception { public void testAllMembersAllowed() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/allMembersAllowed.kt", "kotlin.coroutines"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/allMembersAllowed.kt");
} }
@TestMetadata("extensions.kt") @TestMetadata("extensions.kt")
public void testExtensions_1_3() throws Exception { public void testExtensions() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/extensions.kt", "kotlin.coroutines"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/extensions.kt");
} }
@TestMetadata("memberExtension.kt") @TestMetadata("memberExtension.kt")
public void testMemberExtension_1_3() throws Exception { public void testMemberExtension() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/memberExtension.kt", "kotlin.coroutines"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/memberExtension.kt");
} }
@TestMetadata("notRelatedFun.kt") @TestMetadata("notRelatedFun.kt")
public void testNotRelatedFun_1_3() throws Exception { public void testNotRelatedFun() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/notRelatedFun.kt", "kotlin.coroutines"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/notRelatedFun.kt");
} }
@TestMetadata("outerYield_1_2.kt") @TestMetadata("outerYield_1_2.kt")
@@ -2409,18 +2392,18 @@ public class FirOldFrontendDiagnosticsTestWithStdlibGenerated extends AbstractFi
} }
@TestMetadata("sameInstance.kt") @TestMetadata("sameInstance.kt")
public void testSameInstance_1_3() throws Exception { public void testSameInstance() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/sameInstance.kt", "kotlin.coroutines"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/sameInstance.kt");
} }
@TestMetadata("simpleForbidden.kt") @TestMetadata("simpleForbidden.kt")
public void testSimpleForbidden_1_3() throws Exception { public void testSimpleForbidden() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/simpleForbidden.kt", "kotlin.coroutines"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/simpleForbidden.kt");
} }
@TestMetadata("wrongEnclosingFunction.kt") @TestMetadata("wrongEnclosingFunction.kt")
public void testWrongEnclosingFunction_1_3() throws Exception { public void testWrongEnclosingFunction() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/wrongEnclosingFunction.kt", "kotlin.coroutines"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/wrongEnclosingFunction.kt");
} }
} }
@@ -2515,17 +2498,13 @@ public class FirOldFrontendDiagnosticsTestWithStdlibGenerated extends AbstractFi
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.ANY, testDataFilePath);
}
public void testAllFilesPresentInTailCalls() throws Exception { public void testAllFilesPresentInTailCalls() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
} }
@TestMetadata("forbidden.kt") @TestMetadata("forbidden.kt")
public void testForbidden_1_3() throws Exception { public void testForbidden() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/forbidden.kt", "kotlin.coroutines"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/forbidden.kt");
} }
@TestMetadata("localFunctions.kt") @TestMetadata("localFunctions.kt")
@@ -2549,13 +2528,13 @@ public class FirOldFrontendDiagnosticsTestWithStdlibGenerated extends AbstractFi
} }
@TestMetadata("tryCatch.kt") @TestMetadata("tryCatch.kt")
public void testTryCatch_1_3() throws Exception { public void testTryCatch() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/tryCatch.kt", "kotlin.coroutines"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/tryCatch.kt");
} }
@TestMetadata("valid.kt") @TestMetadata("valid.kt")
public void testValid_1_3() throws Exception { public void testValid() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/valid.kt", "kotlin.coroutines"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/valid.kt");
} }
} }
} }
@@ -25,10 +25,6 @@ public class FirCompileKotlinAgainstKotlinTestGenerated extends AbstractFirCompi
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: ");
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: ");
}
public void testAllFilesPresentInCompileKotlinAgainstKotlin() throws Exception { public void testAllFilesPresentInCompileKotlinAgainstKotlin() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
} }
@@ -99,8 +95,8 @@ public class FirCompileKotlinAgainstKotlinTestGenerated extends AbstractFirCompi
} }
@TestMetadata("coroutinesBinary.kt") @TestMetadata("coroutinesBinary.kt")
public void testCoroutinesBinary_1_3() throws Exception { public void testCoroutinesBinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/compileKotlinAgainstKotlin/coroutinesBinary.kt", "kotlin.coroutines"); runTest("compiler/testData/compileKotlinAgainstKotlin/coroutinesBinary.kt");
} }
@TestMetadata("defaultConstructor.kt") @TestMetadata("defaultConstructor.kt")
File diff suppressed because it is too large Load Diff
@@ -3967,22 +3967,18 @@ public class FirBlackBoxInlineCodegenTestGenerated extends AbstractFirBlackBoxIn
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: ");
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: ");
}
public void testAllFilesPresentInSuspend() throws Exception { public void testAllFilesPresentInSuspend() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
} }
@TestMetadata("capturedVariables.kt") @TestMetadata("capturedVariables.kt")
public void testCapturedVariables_1_3() throws Exception { public void testCapturedVariables() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt");
} }
@TestMetadata("crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt") @TestMetadata("crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt")
public void testCrossinlineSuspendLambdaInsideCrossinlineSuspendLambda_1_3() throws Exception { public void testCrossinlineSuspendLambdaInsideCrossinlineSuspendLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt");
} }
@TestMetadata("debugMetadataCrossinline.kt") @TestMetadata("debugMetadataCrossinline.kt")
@@ -3991,18 +3987,18 @@ public class FirBlackBoxInlineCodegenTestGenerated extends AbstractFirBlackBoxIn
} }
@TestMetadata("delegatedProperties.kt") @TestMetadata("delegatedProperties.kt")
public void testDelegatedProperties_1_3() throws Exception { public void testDelegatedProperties() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/delegatedProperties.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/delegatedProperties.kt");
} }
@TestMetadata("doubleRegenerationWithNonSuspendingLambda.kt") @TestMetadata("doubleRegenerationWithNonSuspendingLambda.kt")
public void testDoubleRegenerationWithNonSuspendingLambda_1_3() throws Exception { public void testDoubleRegenerationWithNonSuspendingLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/doubleRegenerationWithNonSuspendingLambda.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/doubleRegenerationWithNonSuspendingLambda.kt");
} }
@TestMetadata("enclodingMethod.kt") @TestMetadata("enclodingMethod.kt")
public void testEnclodingMethod_1_3() throws Exception { public void testEnclodingMethod() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/enclodingMethod.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/enclodingMethod.kt");
} }
@TestMetadata("fileNameInMetadata.kt") @TestMetadata("fileNameInMetadata.kt")
@@ -4011,18 +4007,18 @@ public class FirBlackBoxInlineCodegenTestGenerated extends AbstractFirBlackBoxIn
} }
@TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt")
public void testInlineOrdinaryOfCrossinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfCrossinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt");
} }
@TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt")
public void testInlineOrdinaryOfNoinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfNoinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt");
} }
@TestMetadata("inlineSuspendContinuation.kt") @TestMetadata("inlineSuspendContinuation.kt")
public void testInlineSuspendContinuation_1_3() throws Exception { public void testInlineSuspendContinuation() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendContinuation.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendContinuation.kt");
} }
@TestMetadata("inlineSuspendInMultifileClass.kt") @TestMetadata("inlineSuspendInMultifileClass.kt")
@@ -4031,38 +4027,38 @@ public class FirBlackBoxInlineCodegenTestGenerated extends AbstractFirBlackBoxIn
} }
@TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt")
public void testInlineSuspendOfCrossinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfCrossinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt");
} }
@TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt")
public void testInlineSuspendOfCrossinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfCrossinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt");
} }
@TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt")
public void testInlineSuspendOfNoinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfNoinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt");
} }
@TestMetadata("inlineSuspendOfNoinlineSuspend.kt") @TestMetadata("inlineSuspendOfNoinlineSuspend.kt")
public void testInlineSuspendOfNoinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfNoinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt");
} }
@TestMetadata("inlineSuspendOfOrdinary.kt") @TestMetadata("inlineSuspendOfOrdinary.kt")
public void testInlineSuspendOfOrdinary_1_3() throws Exception { public void testInlineSuspendOfOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt");
} }
@TestMetadata("inlineSuspendOfSuspend.kt") @TestMetadata("inlineSuspendOfSuspend.kt")
public void testInlineSuspendOfSuspend_1_3() throws Exception { public void testInlineSuspendOfSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt");
} }
@TestMetadata("jvmName.kt") @TestMetadata("jvmName.kt")
public void testJvmName_1_3() throws Exception { public void testJvmName() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/jvmName.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/jvmName.kt");
} }
@TestMetadata("kt26658.kt") @TestMetadata("kt26658.kt")
@@ -4071,18 +4067,18 @@ public class FirBlackBoxInlineCodegenTestGenerated extends AbstractFirBlackBoxIn
} }
@TestMetadata("maxStackWithCrossinline.kt") @TestMetadata("maxStackWithCrossinline.kt")
public void testMaxStackWithCrossinline_1_3() throws Exception { public void testMaxStackWithCrossinline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/maxStackWithCrossinline.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/maxStackWithCrossinline.kt");
} }
@TestMetadata("multipleLocals.kt") @TestMetadata("multipleLocals.kt")
public void testMultipleLocals_1_3() throws Exception { public void testMultipleLocals() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt");
} }
@TestMetadata("multipleSuspensionPoints.kt") @TestMetadata("multipleSuspensionPoints.kt")
public void testMultipleSuspensionPoints_1_3() throws Exception { public void testMultipleSuspensionPoints() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt");
} }
@TestMetadata("nestedMethodWith2XParameter.kt") @TestMetadata("nestedMethodWith2XParameter.kt")
@@ -4096,23 +4092,23 @@ public class FirBlackBoxInlineCodegenTestGenerated extends AbstractFirBlackBoxIn
} }
@TestMetadata("nonSuspendCrossinline.kt") @TestMetadata("nonSuspendCrossinline.kt")
public void testNonSuspendCrossinline_1_3() throws Exception { public void testNonSuspendCrossinline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/nonSuspendCrossinline.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/nonSuspendCrossinline.kt");
} }
@TestMetadata("returnValue.kt") @TestMetadata("returnValue.kt")
public void testReturnValue_1_3() throws Exception { public void testReturnValue() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/returnValue.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/returnValue.kt");
} }
@TestMetadata("tryCatchReceiver.kt") @TestMetadata("tryCatchReceiver.kt")
public void testTryCatchReceiver_1_3() throws Exception { public void testTryCatchReceiver() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/tryCatchReceiver.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/tryCatchReceiver.kt");
} }
@TestMetadata("tryCatchStackTransform.kt") @TestMetadata("tryCatchStackTransform.kt")
public void testTryCatchStackTransform_1_3() throws Exception { public void testTryCatchStackTransform() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt");
} }
@TestMetadata("twiceRegeneratedAnonymousObject.kt") @TestMetadata("twiceRegeneratedAnonymousObject.kt")
@@ -4171,17 +4167,13 @@ public class FirBlackBoxInlineCodegenTestGenerated extends AbstractFirBlackBoxIn
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: ");
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: ");
}
public void testAllFilesPresentInDefaultParameter() throws Exception { public void testAllFilesPresentInDefaultParameter() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/defaultParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/defaultParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
} }
@TestMetadata("defaultValueCrossinline.kt") @TestMetadata("defaultValueCrossinline.kt")
public void testDefaultValueCrossinline_1_3() throws Exception { public void testDefaultValueCrossinline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt");
} }
@TestMetadata("defaultValueInClass.kt") @TestMetadata("defaultValueInClass.kt")
@@ -4189,14 +4181,14 @@ public class FirBlackBoxInlineCodegenTestGenerated extends AbstractFirBlackBoxIn
runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInClass.kt"); runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInClass.kt");
} }
@TestMetadata("defaultValueInlineFromMultiFileFacade.kt") @TestMetadata("defaultValueInline.kt")
public void testDefaultValueInlineFromMultiFileFacade_1_3() throws Exception { public void testDefaultValueInline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInlineFromMultiFileFacade.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt");
} }
@TestMetadata("defaultValueInline.kt") @TestMetadata("defaultValueInlineFromMultiFileFacade.kt")
public void testDefaultValueInline_1_3() throws Exception { public void testDefaultValueInlineFromMultiFileFacade() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInlineFromMultiFileFacade.kt");
} }
} }
@@ -4264,52 +4256,48 @@ public class FirBlackBoxInlineCodegenTestGenerated extends AbstractFirBlackBoxIn
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: ");
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: ");
}
public void testAllFilesPresentInReceiver() throws Exception { public void testAllFilesPresentInReceiver() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/receiver"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/receiver"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
} }
@TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt")
public void testInlineOrdinaryOfCrossinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfCrossinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt");
} }
@TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt")
public void testInlineOrdinaryOfNoinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfNoinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt");
} }
@TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt")
public void testInlineSuspendOfCrossinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfCrossinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt");
} }
@TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt")
public void testInlineSuspendOfCrossinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfCrossinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt");
} }
@TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt")
public void testInlineSuspendOfNoinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfNoinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt");
} }
@TestMetadata("inlineSuspendOfNoinlineSuspend.kt") @TestMetadata("inlineSuspendOfNoinlineSuspend.kt")
public void testInlineSuspendOfNoinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfNoinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt");
} }
@TestMetadata("inlineSuspendOfOrdinary.kt") @TestMetadata("inlineSuspendOfOrdinary.kt")
public void testInlineSuspendOfOrdinary_1_3() throws Exception { public void testInlineSuspendOfOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt");
} }
@TestMetadata("inlineSuspendOfSuspend.kt") @TestMetadata("inlineSuspendOfSuspend.kt")
public void testInlineSuspendOfSuspend_1_3() throws Exception { public void testInlineSuspendOfSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt");
} }
} }
@@ -4321,77 +4309,73 @@ public class FirBlackBoxInlineCodegenTestGenerated extends AbstractFirBlackBoxIn
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: ");
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: ");
}
public void testAllFilesPresentInStateMachine() throws Exception { public void testAllFilesPresentInStateMachine() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/stateMachine"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/stateMachine"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
} }
@TestMetadata("crossingCoroutineBoundaries.kt") @TestMetadata("crossingCoroutineBoundaries.kt")
public void testCrossingCoroutineBoundaries_1_3() throws Exception { public void testCrossingCoroutineBoundaries() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/crossingCoroutineBoundaries.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/crossingCoroutineBoundaries.kt");
} }
@TestMetadata("independentInline.kt") @TestMetadata("independentInline.kt")
public void testIndependentInline_1_3() throws Exception { public void testIndependentInline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/independentInline.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/independentInline.kt");
}
@TestMetadata("innerLambdaInsideLambda.kt")
public void testInnerLambdaInsideLambda_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt", "kotlin.coroutines");
}
@TestMetadata("innerLambdaWithoutCrossinline.kt")
public void testInnerLambdaWithoutCrossinline_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt", "kotlin.coroutines");
} }
@TestMetadata("innerLambda.kt") @TestMetadata("innerLambda.kt")
public void testInnerLambda_1_3() throws Exception { public void testInnerLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt");
} }
@TestMetadata("innerMadnessCallSite.kt") @TestMetadata("innerLambdaInsideLambda.kt")
public void testInnerMadnessCallSite_1_3() throws Exception { public void testInnerLambdaInsideLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt");
}
@TestMetadata("innerLambdaWithoutCrossinline.kt")
public void testInnerLambdaWithoutCrossinline() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt");
} }
@TestMetadata("innerMadness.kt") @TestMetadata("innerMadness.kt")
public void testInnerMadness_1_3() throws Exception { public void testInnerMadness() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt");
} }
@TestMetadata("innerObjectInsideInnerObject.kt") @TestMetadata("innerMadnessCallSite.kt")
public void testInnerObjectInsideInnerObject_1_3() throws Exception { public void testInnerMadnessCallSite() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt");
}
@TestMetadata("innerObjectRetransformation.kt")
public void testInnerObjectRetransformation_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectRetransformation.kt", "kotlin.coroutines");
}
@TestMetadata("innerObjectSeveralFunctions.kt")
public void testInnerObjectSeveralFunctions_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt", "kotlin.coroutines");
}
@TestMetadata("innerObjectWithoutCapturingCrossinline.kt")
public void testInnerObjectWithoutCapturingCrossinline_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt", "kotlin.coroutines");
} }
@TestMetadata("innerObject.kt") @TestMetadata("innerObject.kt")
public void testInnerObject_1_3() throws Exception { public void testInnerObject() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt");
}
@TestMetadata("innerObjectInsideInnerObject.kt")
public void testInnerObjectInsideInnerObject() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt");
}
@TestMetadata("innerObjectRetransformation.kt")
public void testInnerObjectRetransformation() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectRetransformation.kt");
}
@TestMetadata("innerObjectSeveralFunctions.kt")
public void testInnerObjectSeveralFunctions() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt");
}
@TestMetadata("innerObjectWithoutCapturingCrossinline.kt")
public void testInnerObjectWithoutCapturingCrossinline() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt");
} }
@TestMetadata("insideObject.kt") @TestMetadata("insideObject.kt")
public void testInsideObject_1_3() throws Exception { public void testInsideObject() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/insideObject.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/insideObject.kt");
} }
@TestMetadata("lambdaTransformation.kt") @TestMetadata("lambdaTransformation.kt")
@@ -4400,43 +4384,43 @@ public class FirBlackBoxInlineCodegenTestGenerated extends AbstractFirBlackBoxIn
} }
@TestMetadata("normalInline.kt") @TestMetadata("normalInline.kt")
public void testNormalInline_1_3() throws Exception { public void testNormalInline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt");
} }
@TestMetadata("numberOfSuspentions.kt") @TestMetadata("numberOfSuspentions.kt")
public void testNumberOfSuspentions_1_3() throws Exception { public void testNumberOfSuspentions() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt");
} }
@TestMetadata("objectInsideLambdas.kt") @TestMetadata("objectInsideLambdas.kt")
public void testObjectInsideLambdas_1_3() throws Exception { public void testObjectInsideLambdas() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/objectInsideLambdas.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/objectInsideLambdas.kt");
} }
@TestMetadata("oneInlineTwoCaptures.kt") @TestMetadata("oneInlineTwoCaptures.kt")
public void testOneInlineTwoCaptures_1_3() throws Exception { public void testOneInlineTwoCaptures() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/oneInlineTwoCaptures.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/oneInlineTwoCaptures.kt");
} }
@TestMetadata("passLambda.kt") @TestMetadata("passLambda.kt")
public void testPassLambda_1_3() throws Exception { public void testPassLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/passLambda.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/passLambda.kt");
}
@TestMetadata("passParameterLambda.kt")
public void testPassParameterLambda_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameterLambda.kt", "kotlin.coroutines");
} }
@TestMetadata("passParameter.kt") @TestMetadata("passParameter.kt")
public void testPassParameter_1_3() throws Exception { public void testPassParameter() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameter.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameter.kt");
}
@TestMetadata("passParameterLambda.kt")
public void testPassParameterLambda() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameterLambda.kt");
} }
@TestMetadata("unreachableSuspendMarker.kt") @TestMetadata("unreachableSuspendMarker.kt")
public void testUnreachableSuspendMarker_1_3() throws Exception { public void testUnreachableSuspendMarker() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/unreachableSuspendMarker.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/unreachableSuspendMarker.kt");
} }
} }
} }
@@ -1413,10 +1413,6 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest {
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: ");
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: ");
}
public void testAllFilesPresentInCoroutines() throws Exception { public void testAllFilesPresentInCoroutines() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/coroutines"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/coroutines"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
} }
@@ -1447,8 +1443,8 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest {
} }
@TestMetadata("returnUnitInLambda.kt") @TestMetadata("returnUnitInLambda.kt")
public void testReturnUnitInLambda_1_3() throws Exception { public void testReturnUnitInLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/returnUnitInLambda.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/bytecodeText/coroutines/returnUnitInLambda.kt");
} }
@TestMetadata("suspendMain.kt") @TestMetadata("suspendMain.kt")
@@ -1626,62 +1622,58 @@ public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest {
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: ");
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: ");
}
public void testAllFilesPresentInIntLikeVarSpilling() throws Exception { public void testAllFilesPresentInIntLikeVarSpilling() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
} }
@TestMetadata("complicatedMerge.kt") @TestMetadata("complicatedMerge.kt")
public void testComplicatedMerge_1_3() throws Exception { public void testComplicatedMerge() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/complicatedMerge.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/complicatedMerge.kt");
} }
@TestMetadata("i2bResult.kt") @TestMetadata("i2bResult.kt")
public void testI2bResult_1_3() throws Exception { public void testI2bResult() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/i2bResult.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/i2bResult.kt");
} }
@TestMetadata("loadFromBooleanArray.kt") @TestMetadata("loadFromBooleanArray.kt")
public void testLoadFromBooleanArray_1_3() throws Exception { public void testLoadFromBooleanArray() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/loadFromBooleanArray.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/loadFromBooleanArray.kt");
} }
@TestMetadata("loadFromByteArray.kt") @TestMetadata("loadFromByteArray.kt")
public void testLoadFromByteArray_1_3() throws Exception { public void testLoadFromByteArray() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/loadFromByteArray.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/loadFromByteArray.kt");
} }
@TestMetadata("noVariableInTable.kt") @TestMetadata("noVariableInTable.kt")
public void testNoVariableInTable_1_3() throws Exception { public void testNoVariableInTable() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/noVariableInTable.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/noVariableInTable.kt");
} }
@TestMetadata("sameIconst1ManyVars.kt") @TestMetadata("sameIconst1ManyVars.kt")
public void testSameIconst1ManyVars_1_3() throws Exception { public void testSameIconst1ManyVars() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/sameIconst1ManyVars.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/sameIconst1ManyVars.kt");
} }
@TestMetadata("usedInArrayStore.kt") @TestMetadata("usedInArrayStore.kt")
public void testUsedInArrayStore_1_3() throws Exception { public void testUsedInArrayStore() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInArrayStore.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInArrayStore.kt");
} }
@TestMetadata("usedInMethodCall.kt") @TestMetadata("usedInMethodCall.kt")
public void testUsedInMethodCall_1_3() throws Exception { public void testUsedInMethodCall() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInMethodCall.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInMethodCall.kt");
} }
@TestMetadata("usedInPutfield.kt") @TestMetadata("usedInPutfield.kt")
public void testUsedInPutfield_1_3() throws Exception { public void testUsedInPutfield() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInPutfield.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInPutfield.kt");
} }
@TestMetadata("usedInVarStore.kt") @TestMetadata("usedInVarStore.kt")
public void testUsedInVarStore_1_3() throws Exception { public void testUsedInVarStore() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInVarStore.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInVarStore.kt");
} }
} }
@@ -8,7 +8,6 @@ package org.jetbrains.kotlin.checkers;
import com.intellij.testFramework.TestDataPath; import com.intellij.testFramework.TestDataPath;
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
import org.jetbrains.kotlin.test.KotlinTestUtils; import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.TargetBackend;
import org.jetbrains.kotlin.test.TestMetadata; import org.jetbrains.kotlin.test.TestMetadata;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@@ -1659,10 +1658,6 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.ANY, testDataFilePath);
}
public void testAllFilesPresentInCoroutines() throws Exception { public void testAllFilesPresentInCoroutines() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
} }
@@ -1788,13 +1783,8 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW
} }
@TestMetadata("noDefaultCoroutineImports.kt") @TestMetadata("noDefaultCoroutineImports.kt")
public void testNoDefaultCoroutineImports_1_2() throws Exception { public void testNoDefaultCoroutineImports() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/noDefaultCoroutineImports.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/noDefaultCoroutineImports.kt");
}
@TestMetadata("noDefaultCoroutineImports.kt")
public void testNoDefaultCoroutineImports_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/noDefaultCoroutineImports.kt", "kotlin.coroutines");
} }
@TestMetadata("nonLocalSuspension.kt") @TestMetadata("nonLocalSuspension.kt")
@@ -1823,13 +1813,8 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW
} }
@TestMetadata("suspendApplicability.kt") @TestMetadata("suspendApplicability.kt")
public void testSuspendApplicability_1_2() throws Exception { public void testSuspendApplicability() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendApplicability.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendApplicability.kt");
}
@TestMetadata("suspendApplicability.kt")
public void testSuspendApplicability_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendApplicability.kt", "kotlin.coroutines");
} }
@TestMetadata("suspendConflictsWithNoSuspend.kt") @TestMetadata("suspendConflictsWithNoSuspend.kt")
@@ -1858,13 +1843,8 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW
} }
@TestMetadata("suspendCovarianJavaOverride.kt") @TestMetadata("suspendCovarianJavaOverride.kt")
public void testSuspendCovarianJavaOverride_1_2() throws Exception { public void testSuspendCovarianJavaOverride() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendCovarianJavaOverride.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendCovarianJavaOverride.kt");
}
@TestMetadata("suspendCovarianJavaOverride.kt")
public void testSuspendCovarianJavaOverride_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendCovarianJavaOverride.kt", "kotlin.coroutines");
} }
@TestMetadata("suspendDestructuring.kt") @TestMetadata("suspendDestructuring.kt")
@@ -1883,43 +1863,23 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW
} }
@TestMetadata("suspendFunctions.kt") @TestMetadata("suspendFunctions.kt")
public void testSuspendFunctions_1_2() throws Exception { public void testSuspendFunctions() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctions.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctions.kt");
}
@TestMetadata("suspendFunctions.kt")
public void testSuspendFunctions_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctions.kt", "kotlin.coroutines");
} }
@TestMetadata("suspendJavaImplementationFromDifferentClass.kt") @TestMetadata("suspendJavaImplementationFromDifferentClass.kt")
public void testSuspendJavaImplementationFromDifferentClass_1_2() throws Exception { public void testSuspendJavaImplementationFromDifferentClass() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendJavaImplementationFromDifferentClass.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendJavaImplementationFromDifferentClass.kt");
}
@TestMetadata("suspendJavaImplementationFromDifferentClass.kt")
public void testSuspendJavaImplementationFromDifferentClass_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendJavaImplementationFromDifferentClass.kt", "kotlin.coroutines");
} }
@TestMetadata("suspendJavaOverrides.kt") @TestMetadata("suspendJavaOverrides.kt")
public void testSuspendJavaOverrides_1_2() throws Exception { public void testSuspendJavaOverrides() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendJavaOverrides.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendJavaOverrides.kt");
}
@TestMetadata("suspendJavaOverrides.kt")
public void testSuspendJavaOverrides_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendJavaOverrides.kt", "kotlin.coroutines");
} }
@TestMetadata("suspendLambda.kt") @TestMetadata("suspendLambda.kt")
public void testSuspendLambda_1_2() throws Exception { public void testSuspendLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendLambda.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendLambda.kt");
}
@TestMetadata("suspendLambda.kt")
public void testSuspendLambda_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendLambda.kt", "kotlin.coroutines");
} }
@TestMetadata("suspendOverridability.kt") @TestMetadata("suspendOverridability.kt")
@@ -1980,10 +1940,6 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.ANY, testDataFilePath);
}
public void testAllFilesPresentInCallableReference() throws Exception { public void testAllFilesPresentInCallableReference() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/callableReference"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/callableReference"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
} }
@@ -1999,13 +1955,8 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW
} }
@TestMetadata("property.kt") @TestMetadata("property.kt")
public void testProperty_1_2() throws Exception { public void testProperty() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/callableReference/property.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/callableReference/property.kt");
}
@TestMetadata("property.kt")
public void testProperty_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/callableReference/property.kt", "kotlin.coroutines");
} }
@TestMetadata("suspendConversionForCallableReferences.kt") @TestMetadata("suspendConversionForCallableReferences.kt")
@@ -2305,132 +2256,68 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.ANY, testDataFilePath);
}
public void testAllFilesPresentInInlineCrossinline() throws Exception { public void testAllFilesPresentInInlineCrossinline() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
} }
@TestMetadata("inlineOrdinaryOfCrossinlineOrdinary.kt") @TestMetadata("inlineOrdinaryOfCrossinlineOrdinary.kt")
public void testInlineOrdinaryOfCrossinlineOrdinary_1_2() throws Exception { public void testInlineOrdinaryOfCrossinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfCrossinlineOrdinary.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfCrossinlineOrdinary.kt");
}
@TestMetadata("inlineOrdinaryOfCrossinlineOrdinary.kt")
public void testInlineOrdinaryOfCrossinlineOrdinary_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfCrossinlineOrdinary.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt")
public void testInlineOrdinaryOfCrossinlineSuspend_1_2() throws Exception { public void testInlineOrdinaryOfCrossinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfCrossinlineSuspend.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfCrossinlineSuspend.kt");
}
@TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt")
public void testInlineOrdinaryOfCrossinlineSuspend_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfCrossinlineSuspend.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineOrdinaryOfNoinlineOrdinary.kt") @TestMetadata("inlineOrdinaryOfNoinlineOrdinary.kt")
public void testInlineOrdinaryOfNoinlineOrdinary_1_2() throws Exception { public void testInlineOrdinaryOfNoinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfNoinlineOrdinary.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfNoinlineOrdinary.kt");
}
@TestMetadata("inlineOrdinaryOfNoinlineOrdinary.kt")
public void testInlineOrdinaryOfNoinlineOrdinary_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfNoinlineOrdinary.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt")
public void testInlineOrdinaryOfNoinlineSuspend_1_2() throws Exception { public void testInlineOrdinaryOfNoinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfNoinlineSuspend.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfNoinlineSuspend.kt");
}
@TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt")
public void testInlineOrdinaryOfNoinlineSuspend_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfNoinlineSuspend.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineOrdinaryOfOrdinary.kt") @TestMetadata("inlineOrdinaryOfOrdinary.kt")
public void testInlineOrdinaryOfOrdinary_1_2() throws Exception { public void testInlineOrdinaryOfOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfOrdinary.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfOrdinary.kt");
}
@TestMetadata("inlineOrdinaryOfOrdinary.kt")
public void testInlineOrdinaryOfOrdinary_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfOrdinary.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineOrdinaryOfSuspend.kt") @TestMetadata("inlineOrdinaryOfSuspend.kt")
public void testInlineOrdinaryOfSuspend_1_2() throws Exception { public void testInlineOrdinaryOfSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfSuspend.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfSuspend.kt");
}
@TestMetadata("inlineOrdinaryOfSuspend.kt")
public void testInlineOrdinaryOfSuspend_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfSuspend.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt")
public void testInlineSuspendOfCrossinlineOrdinary_1_2() throws Exception { public void testInlineSuspendOfCrossinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfCrossinlineOrdinary.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfCrossinlineOrdinary.kt");
}
@TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt")
public void testInlineSuspendOfCrossinlineOrdinary_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfCrossinlineOrdinary.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt")
public void testInlineSuspendOfCrossinlineSuspend_1_2() throws Exception { public void testInlineSuspendOfCrossinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfCrossinlineSuspend.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfCrossinlineSuspend.kt");
}
@TestMetadata("inlineSuspendOfCrossinlineSuspend.kt")
public void testInlineSuspendOfCrossinlineSuspend_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfCrossinlineSuspend.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt")
public void testInlineSuspendOfNoinlineOrdinary_1_2() throws Exception { public void testInlineSuspendOfNoinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfNoinlineOrdinary.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfNoinlineOrdinary.kt");
}
@TestMetadata("inlineSuspendOfNoinlineOrdinary.kt")
public void testInlineSuspendOfNoinlineOrdinary_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfNoinlineOrdinary.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfNoinlineSuspend.kt") @TestMetadata("inlineSuspendOfNoinlineSuspend.kt")
public void testInlineSuspendOfNoinlineSuspend_1_2() throws Exception { public void testInlineSuspendOfNoinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfNoinlineSuspend.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfNoinlineSuspend.kt");
}
@TestMetadata("inlineSuspendOfNoinlineSuspend.kt")
public void testInlineSuspendOfNoinlineSuspend_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfNoinlineSuspend.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfOrdinary.kt") @TestMetadata("inlineSuspendOfOrdinary.kt")
public void testInlineSuspendOfOrdinary_1_2() throws Exception { public void testInlineSuspendOfOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfOrdinary.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfOrdinary.kt");
}
@TestMetadata("inlineSuspendOfOrdinary.kt")
public void testInlineSuspendOfOrdinary_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfOrdinary.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfSuspend.kt") @TestMetadata("inlineSuspendOfSuspend.kt")
public void testInlineSuspendOfSuspend_1_2() throws Exception { public void testInlineSuspendOfSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfSuspend.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfSuspend.kt");
}
@TestMetadata("inlineSuspendOfSuspend.kt")
public void testInlineSuspendOfSuspend_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfSuspend.kt", "kotlin.coroutines");
} }
} }
@@ -2470,52 +2357,28 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.ANY, testDataFilePath);
}
public void testAllFilesPresentInRestrictSuspension() throws Exception { public void testAllFilesPresentInRestrictSuspension() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
} }
@TestMetadata("allMembersAllowed.kt") @TestMetadata("allMembersAllowed.kt")
public void testAllMembersAllowed_1_2() throws Exception { public void testAllMembersAllowed() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/allMembersAllowed.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/allMembersAllowed.kt");
}
@TestMetadata("allMembersAllowed.kt")
public void testAllMembersAllowed_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/allMembersAllowed.kt", "kotlin.coroutines");
} }
@TestMetadata("extensions.kt") @TestMetadata("extensions.kt")
public void testExtensions_1_2() throws Exception { public void testExtensions() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/extensions.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/extensions.kt");
}
@TestMetadata("extensions.kt")
public void testExtensions_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/extensions.kt", "kotlin.coroutines");
} }
@TestMetadata("memberExtension.kt") @TestMetadata("memberExtension.kt")
public void testMemberExtension_1_2() throws Exception { public void testMemberExtension() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/memberExtension.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/memberExtension.kt");
}
@TestMetadata("memberExtension.kt")
public void testMemberExtension_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/memberExtension.kt", "kotlin.coroutines");
} }
@TestMetadata("notRelatedFun.kt") @TestMetadata("notRelatedFun.kt")
public void testNotRelatedFun_1_2() throws Exception { public void testNotRelatedFun() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/notRelatedFun.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/notRelatedFun.kt");
}
@TestMetadata("notRelatedFun.kt")
public void testNotRelatedFun_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/notRelatedFun.kt", "kotlin.coroutines");
} }
@TestMetadata("outerYield_1_2.kt") @TestMetadata("outerYield_1_2.kt")
@@ -2529,33 +2392,18 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW
} }
@TestMetadata("sameInstance.kt") @TestMetadata("sameInstance.kt")
public void testSameInstance_1_2() throws Exception { public void testSameInstance() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/sameInstance.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/sameInstance.kt");
}
@TestMetadata("sameInstance.kt")
public void testSameInstance_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/sameInstance.kt", "kotlin.coroutines");
} }
@TestMetadata("simpleForbidden.kt") @TestMetadata("simpleForbidden.kt")
public void testSimpleForbidden_1_2() throws Exception { public void testSimpleForbidden() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/simpleForbidden.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/simpleForbidden.kt");
}
@TestMetadata("simpleForbidden.kt")
public void testSimpleForbidden_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/simpleForbidden.kt", "kotlin.coroutines");
} }
@TestMetadata("wrongEnclosingFunction.kt") @TestMetadata("wrongEnclosingFunction.kt")
public void testWrongEnclosingFunction_1_2() throws Exception { public void testWrongEnclosingFunction() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/wrongEnclosingFunction.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/wrongEnclosingFunction.kt");
}
@TestMetadata("wrongEnclosingFunction.kt")
public void testWrongEnclosingFunction_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/wrongEnclosingFunction.kt", "kotlin.coroutines");
} }
} }
@@ -2650,22 +2498,13 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.ANY, testDataFilePath);
}
public void testAllFilesPresentInTailCalls() throws Exception { public void testAllFilesPresentInTailCalls() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
} }
@TestMetadata("forbidden.kt") @TestMetadata("forbidden.kt")
public void testForbidden_1_2() throws Exception { public void testForbidden() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/forbidden.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/forbidden.kt");
}
@TestMetadata("forbidden.kt")
public void testForbidden_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/forbidden.kt", "kotlin.coroutines");
} }
@TestMetadata("localFunctions.kt") @TestMetadata("localFunctions.kt")
@@ -2689,23 +2528,13 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW
} }
@TestMetadata("tryCatch.kt") @TestMetadata("tryCatch.kt")
public void testTryCatch_1_2() throws Exception { public void testTryCatch() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/tryCatch.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/tryCatch.kt");
}
@TestMetadata("tryCatch.kt")
public void testTryCatch_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/tryCatch.kt", "kotlin.coroutines");
} }
@TestMetadata("valid.kt") @TestMetadata("valid.kt")
public void testValid_1_2() throws Exception { public void testValid() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/valid.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/valid.kt");
}
@TestMetadata("valid.kt")
public void testValid_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/valid.kt", "kotlin.coroutines");
} }
} }
} }
@@ -8,7 +8,6 @@ package org.jetbrains.kotlin.checkers.javac;
import com.intellij.testFramework.TestDataPath; import com.intellij.testFramework.TestDataPath;
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
import org.jetbrains.kotlin.test.KotlinTestUtils; import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.TargetBackend;
import org.jetbrains.kotlin.test.TestMetadata; import org.jetbrains.kotlin.test.TestMetadata;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@@ -1659,10 +1658,6 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.ANY, testDataFilePath);
}
public void testAllFilesPresentInCoroutines() throws Exception { public void testAllFilesPresentInCoroutines() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
} }
@@ -1788,13 +1783,8 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno
} }
@TestMetadata("noDefaultCoroutineImports.kt") @TestMetadata("noDefaultCoroutineImports.kt")
public void testNoDefaultCoroutineImports_1_2() throws Exception { public void testNoDefaultCoroutineImports() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/noDefaultCoroutineImports.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/noDefaultCoroutineImports.kt");
}
@TestMetadata("noDefaultCoroutineImports.kt")
public void testNoDefaultCoroutineImports_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/noDefaultCoroutineImports.kt", "kotlin.coroutines");
} }
@TestMetadata("nonLocalSuspension.kt") @TestMetadata("nonLocalSuspension.kt")
@@ -1823,13 +1813,8 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno
} }
@TestMetadata("suspendApplicability.kt") @TestMetadata("suspendApplicability.kt")
public void testSuspendApplicability_1_2() throws Exception { public void testSuspendApplicability() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendApplicability.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendApplicability.kt");
}
@TestMetadata("suspendApplicability.kt")
public void testSuspendApplicability_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendApplicability.kt", "kotlin.coroutines");
} }
@TestMetadata("suspendConflictsWithNoSuspend.kt") @TestMetadata("suspendConflictsWithNoSuspend.kt")
@@ -1858,13 +1843,8 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno
} }
@TestMetadata("suspendCovarianJavaOverride.kt") @TestMetadata("suspendCovarianJavaOverride.kt")
public void testSuspendCovarianJavaOverride_1_2() throws Exception { public void testSuspendCovarianJavaOverride() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendCovarianJavaOverride.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendCovarianJavaOverride.kt");
}
@TestMetadata("suspendCovarianJavaOverride.kt")
public void testSuspendCovarianJavaOverride_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendCovarianJavaOverride.kt", "kotlin.coroutines");
} }
@TestMetadata("suspendDestructuring.kt") @TestMetadata("suspendDestructuring.kt")
@@ -1883,43 +1863,23 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno
} }
@TestMetadata("suspendFunctions.kt") @TestMetadata("suspendFunctions.kt")
public void testSuspendFunctions_1_2() throws Exception { public void testSuspendFunctions() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctions.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctions.kt");
}
@TestMetadata("suspendFunctions.kt")
public void testSuspendFunctions_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctions.kt", "kotlin.coroutines");
} }
@TestMetadata("suspendJavaImplementationFromDifferentClass.kt") @TestMetadata("suspendJavaImplementationFromDifferentClass.kt")
public void testSuspendJavaImplementationFromDifferentClass_1_2() throws Exception { public void testSuspendJavaImplementationFromDifferentClass() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendJavaImplementationFromDifferentClass.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendJavaImplementationFromDifferentClass.kt");
}
@TestMetadata("suspendJavaImplementationFromDifferentClass.kt")
public void testSuspendJavaImplementationFromDifferentClass_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendJavaImplementationFromDifferentClass.kt", "kotlin.coroutines");
} }
@TestMetadata("suspendJavaOverrides.kt") @TestMetadata("suspendJavaOverrides.kt")
public void testSuspendJavaOverrides_1_2() throws Exception { public void testSuspendJavaOverrides() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendJavaOverrides.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendJavaOverrides.kt");
}
@TestMetadata("suspendJavaOverrides.kt")
public void testSuspendJavaOverrides_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendJavaOverrides.kt", "kotlin.coroutines");
} }
@TestMetadata("suspendLambda.kt") @TestMetadata("suspendLambda.kt")
public void testSuspendLambda_1_2() throws Exception { public void testSuspendLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendLambda.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendLambda.kt");
}
@TestMetadata("suspendLambda.kt")
public void testSuspendLambda_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendLambda.kt", "kotlin.coroutines");
} }
@TestMetadata("suspendOverridability.kt") @TestMetadata("suspendOverridability.kt")
@@ -1980,10 +1940,6 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.ANY, testDataFilePath);
}
public void testAllFilesPresentInCallableReference() throws Exception { public void testAllFilesPresentInCallableReference() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/callableReference"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/callableReference"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
} }
@@ -1999,13 +1955,8 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno
} }
@TestMetadata("property.kt") @TestMetadata("property.kt")
public void testProperty_1_2() throws Exception { public void testProperty() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/callableReference/property.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/callableReference/property.kt");
}
@TestMetadata("property.kt")
public void testProperty_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/callableReference/property.kt", "kotlin.coroutines");
} }
@TestMetadata("suspendConversionForCallableReferences.kt") @TestMetadata("suspendConversionForCallableReferences.kt")
@@ -2305,132 +2256,68 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.ANY, testDataFilePath);
}
public void testAllFilesPresentInInlineCrossinline() throws Exception { public void testAllFilesPresentInInlineCrossinline() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
} }
@TestMetadata("inlineOrdinaryOfCrossinlineOrdinary.kt") @TestMetadata("inlineOrdinaryOfCrossinlineOrdinary.kt")
public void testInlineOrdinaryOfCrossinlineOrdinary_1_2() throws Exception { public void testInlineOrdinaryOfCrossinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfCrossinlineOrdinary.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfCrossinlineOrdinary.kt");
}
@TestMetadata("inlineOrdinaryOfCrossinlineOrdinary.kt")
public void testInlineOrdinaryOfCrossinlineOrdinary_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfCrossinlineOrdinary.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt")
public void testInlineOrdinaryOfCrossinlineSuspend_1_2() throws Exception { public void testInlineOrdinaryOfCrossinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfCrossinlineSuspend.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfCrossinlineSuspend.kt");
}
@TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt")
public void testInlineOrdinaryOfCrossinlineSuspend_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfCrossinlineSuspend.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineOrdinaryOfNoinlineOrdinary.kt") @TestMetadata("inlineOrdinaryOfNoinlineOrdinary.kt")
public void testInlineOrdinaryOfNoinlineOrdinary_1_2() throws Exception { public void testInlineOrdinaryOfNoinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfNoinlineOrdinary.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfNoinlineOrdinary.kt");
}
@TestMetadata("inlineOrdinaryOfNoinlineOrdinary.kt")
public void testInlineOrdinaryOfNoinlineOrdinary_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfNoinlineOrdinary.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt")
public void testInlineOrdinaryOfNoinlineSuspend_1_2() throws Exception { public void testInlineOrdinaryOfNoinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfNoinlineSuspend.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfNoinlineSuspend.kt");
}
@TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt")
public void testInlineOrdinaryOfNoinlineSuspend_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfNoinlineSuspend.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineOrdinaryOfOrdinary.kt") @TestMetadata("inlineOrdinaryOfOrdinary.kt")
public void testInlineOrdinaryOfOrdinary_1_2() throws Exception { public void testInlineOrdinaryOfOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfOrdinary.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfOrdinary.kt");
}
@TestMetadata("inlineOrdinaryOfOrdinary.kt")
public void testInlineOrdinaryOfOrdinary_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfOrdinary.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineOrdinaryOfSuspend.kt") @TestMetadata("inlineOrdinaryOfSuspend.kt")
public void testInlineOrdinaryOfSuspend_1_2() throws Exception { public void testInlineOrdinaryOfSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfSuspend.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfSuspend.kt");
}
@TestMetadata("inlineOrdinaryOfSuspend.kt")
public void testInlineOrdinaryOfSuspend_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfSuspend.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt")
public void testInlineSuspendOfCrossinlineOrdinary_1_2() throws Exception { public void testInlineSuspendOfCrossinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfCrossinlineOrdinary.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfCrossinlineOrdinary.kt");
}
@TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt")
public void testInlineSuspendOfCrossinlineOrdinary_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfCrossinlineOrdinary.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt")
public void testInlineSuspendOfCrossinlineSuspend_1_2() throws Exception { public void testInlineSuspendOfCrossinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfCrossinlineSuspend.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfCrossinlineSuspend.kt");
}
@TestMetadata("inlineSuspendOfCrossinlineSuspend.kt")
public void testInlineSuspendOfCrossinlineSuspend_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfCrossinlineSuspend.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt")
public void testInlineSuspendOfNoinlineOrdinary_1_2() throws Exception { public void testInlineSuspendOfNoinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfNoinlineOrdinary.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfNoinlineOrdinary.kt");
}
@TestMetadata("inlineSuspendOfNoinlineOrdinary.kt")
public void testInlineSuspendOfNoinlineOrdinary_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfNoinlineOrdinary.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfNoinlineSuspend.kt") @TestMetadata("inlineSuspendOfNoinlineSuspend.kt")
public void testInlineSuspendOfNoinlineSuspend_1_2() throws Exception { public void testInlineSuspendOfNoinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfNoinlineSuspend.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfNoinlineSuspend.kt");
}
@TestMetadata("inlineSuspendOfNoinlineSuspend.kt")
public void testInlineSuspendOfNoinlineSuspend_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfNoinlineSuspend.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfOrdinary.kt") @TestMetadata("inlineSuspendOfOrdinary.kt")
public void testInlineSuspendOfOrdinary_1_2() throws Exception { public void testInlineSuspendOfOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfOrdinary.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfOrdinary.kt");
}
@TestMetadata("inlineSuspendOfOrdinary.kt")
public void testInlineSuspendOfOrdinary_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfOrdinary.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfSuspend.kt") @TestMetadata("inlineSuspendOfSuspend.kt")
public void testInlineSuspendOfSuspend_1_2() throws Exception { public void testInlineSuspendOfSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfSuspend.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfSuspend.kt");
}
@TestMetadata("inlineSuspendOfSuspend.kt")
public void testInlineSuspendOfSuspend_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfSuspend.kt", "kotlin.coroutines");
} }
} }
@@ -2470,52 +2357,28 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.ANY, testDataFilePath);
}
public void testAllFilesPresentInRestrictSuspension() throws Exception { public void testAllFilesPresentInRestrictSuspension() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
} }
@TestMetadata("allMembersAllowed.kt") @TestMetadata("allMembersAllowed.kt")
public void testAllMembersAllowed_1_2() throws Exception { public void testAllMembersAllowed() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/allMembersAllowed.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/allMembersAllowed.kt");
}
@TestMetadata("allMembersAllowed.kt")
public void testAllMembersAllowed_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/allMembersAllowed.kt", "kotlin.coroutines");
} }
@TestMetadata("extensions.kt") @TestMetadata("extensions.kt")
public void testExtensions_1_2() throws Exception { public void testExtensions() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/extensions.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/extensions.kt");
}
@TestMetadata("extensions.kt")
public void testExtensions_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/extensions.kt", "kotlin.coroutines");
} }
@TestMetadata("memberExtension.kt") @TestMetadata("memberExtension.kt")
public void testMemberExtension_1_2() throws Exception { public void testMemberExtension() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/memberExtension.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/memberExtension.kt");
}
@TestMetadata("memberExtension.kt")
public void testMemberExtension_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/memberExtension.kt", "kotlin.coroutines");
} }
@TestMetadata("notRelatedFun.kt") @TestMetadata("notRelatedFun.kt")
public void testNotRelatedFun_1_2() throws Exception { public void testNotRelatedFun() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/notRelatedFun.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/notRelatedFun.kt");
}
@TestMetadata("notRelatedFun.kt")
public void testNotRelatedFun_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/notRelatedFun.kt", "kotlin.coroutines");
} }
@TestMetadata("outerYield_1_2.kt") @TestMetadata("outerYield_1_2.kt")
@@ -2529,33 +2392,18 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno
} }
@TestMetadata("sameInstance.kt") @TestMetadata("sameInstance.kt")
public void testSameInstance_1_2() throws Exception { public void testSameInstance() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/sameInstance.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/sameInstance.kt");
}
@TestMetadata("sameInstance.kt")
public void testSameInstance_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/sameInstance.kt", "kotlin.coroutines");
} }
@TestMetadata("simpleForbidden.kt") @TestMetadata("simpleForbidden.kt")
public void testSimpleForbidden_1_2() throws Exception { public void testSimpleForbidden() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/simpleForbidden.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/simpleForbidden.kt");
}
@TestMetadata("simpleForbidden.kt")
public void testSimpleForbidden_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/simpleForbidden.kt", "kotlin.coroutines");
} }
@TestMetadata("wrongEnclosingFunction.kt") @TestMetadata("wrongEnclosingFunction.kt")
public void testWrongEnclosingFunction_1_2() throws Exception { public void testWrongEnclosingFunction() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/wrongEnclosingFunction.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/wrongEnclosingFunction.kt");
}
@TestMetadata("wrongEnclosingFunction.kt")
public void testWrongEnclosingFunction_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/wrongEnclosingFunction.kt", "kotlin.coroutines");
} }
} }
@@ -2650,22 +2498,13 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.ANY, testDataFilePath);
}
public void testAllFilesPresentInTailCalls() throws Exception { public void testAllFilesPresentInTailCalls() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
} }
@TestMetadata("forbidden.kt") @TestMetadata("forbidden.kt")
public void testForbidden_1_2() throws Exception { public void testForbidden() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/forbidden.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/forbidden.kt");
}
@TestMetadata("forbidden.kt")
public void testForbidden_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/forbidden.kt", "kotlin.coroutines");
} }
@TestMetadata("localFunctions.kt") @TestMetadata("localFunctions.kt")
@@ -2689,23 +2528,13 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno
} }
@TestMetadata("tryCatch.kt") @TestMetadata("tryCatch.kt")
public void testTryCatch_1_2() throws Exception { public void testTryCatch() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/tryCatch.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/tryCatch.kt");
}
@TestMetadata("tryCatch.kt")
public void testTryCatch_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/tryCatch.kt", "kotlin.coroutines");
} }
@TestMetadata("valid.kt") @TestMetadata("valid.kt")
public void testValid_1_2() throws Exception { public void testValid() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/valid.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/valid.kt");
}
@TestMetadata("valid.kt")
public void testValid_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/valid.kt", "kotlin.coroutines");
} }
} }
} }
File diff suppressed because it is too large Load Diff
@@ -3967,32 +3967,18 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInSuspend() throws Exception { public void testAllFilesPresentInSuspend() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
} }
@TestMetadata("capturedVariables.kt") @TestMetadata("capturedVariables.kt")
public void testCapturedVariables_1_2() throws Exception { public void testCapturedVariables() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt");
}
@TestMetadata("capturedVariables.kt")
public void testCapturedVariables_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt", "kotlin.coroutines");
} }
@TestMetadata("crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt") @TestMetadata("crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt")
public void testCrossinlineSuspendLambdaInsideCrossinlineSuspendLambda_1_2() throws Exception { public void testCrossinlineSuspendLambdaInsideCrossinlineSuspendLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt");
}
@TestMetadata("crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt")
public void testCrossinlineSuspendLambdaInsideCrossinlineSuspendLambda_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt", "kotlin.coroutines");
} }
@TestMetadata("debugMetadataCrossinline.kt") @TestMetadata("debugMetadataCrossinline.kt")
@@ -4001,33 +3987,18 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
} }
@TestMetadata("delegatedProperties.kt") @TestMetadata("delegatedProperties.kt")
public void testDelegatedProperties_1_2() throws Exception { public void testDelegatedProperties() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/delegatedProperties.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/delegatedProperties.kt");
}
@TestMetadata("delegatedProperties.kt")
public void testDelegatedProperties_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/delegatedProperties.kt", "kotlin.coroutines");
} }
@TestMetadata("doubleRegenerationWithNonSuspendingLambda.kt") @TestMetadata("doubleRegenerationWithNonSuspendingLambda.kt")
public void testDoubleRegenerationWithNonSuspendingLambda_1_2() throws Exception { public void testDoubleRegenerationWithNonSuspendingLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/doubleRegenerationWithNonSuspendingLambda.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/doubleRegenerationWithNonSuspendingLambda.kt");
}
@TestMetadata("doubleRegenerationWithNonSuspendingLambda.kt")
public void testDoubleRegenerationWithNonSuspendingLambda_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/doubleRegenerationWithNonSuspendingLambda.kt", "kotlin.coroutines");
} }
@TestMetadata("enclodingMethod.kt") @TestMetadata("enclodingMethod.kt")
public void testEnclodingMethod_1_2() throws Exception { public void testEnclodingMethod() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/enclodingMethod.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/enclodingMethod.kt");
}
@TestMetadata("enclodingMethod.kt")
public void testEnclodingMethod_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/enclodingMethod.kt", "kotlin.coroutines");
} }
@TestMetadata("fileNameInMetadata.kt") @TestMetadata("fileNameInMetadata.kt")
@@ -4036,33 +4007,18 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
} }
@TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt")
public void testInlineOrdinaryOfCrossinlineSuspend_1_2() throws Exception { public void testInlineOrdinaryOfCrossinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt");
}
@TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt")
public void testInlineOrdinaryOfCrossinlineSuspend_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt")
public void testInlineOrdinaryOfNoinlineSuspend_1_2() throws Exception { public void testInlineOrdinaryOfNoinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt");
}
@TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt")
public void testInlineOrdinaryOfNoinlineSuspend_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendContinuation.kt") @TestMetadata("inlineSuspendContinuation.kt")
public void testInlineSuspendContinuation_1_2() throws Exception { public void testInlineSuspendContinuation() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendContinuation.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendContinuation.kt");
}
@TestMetadata("inlineSuspendContinuation.kt")
public void testInlineSuspendContinuation_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendContinuation.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendInMultifileClass.kt") @TestMetadata("inlineSuspendInMultifileClass.kt")
@@ -4071,73 +4027,38 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
} }
@TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt")
public void testInlineSuspendOfCrossinlineOrdinary_1_2() throws Exception { public void testInlineSuspendOfCrossinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt");
}
@TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt")
public void testInlineSuspendOfCrossinlineOrdinary_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt")
public void testInlineSuspendOfCrossinlineSuspend_1_2() throws Exception { public void testInlineSuspendOfCrossinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt");
}
@TestMetadata("inlineSuspendOfCrossinlineSuspend.kt")
public void testInlineSuspendOfCrossinlineSuspend_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt")
public void testInlineSuspendOfNoinlineOrdinary_1_2() throws Exception { public void testInlineSuspendOfNoinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt");
}
@TestMetadata("inlineSuspendOfNoinlineOrdinary.kt")
public void testInlineSuspendOfNoinlineOrdinary_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfNoinlineSuspend.kt") @TestMetadata("inlineSuspendOfNoinlineSuspend.kt")
public void testInlineSuspendOfNoinlineSuspend_1_2() throws Exception { public void testInlineSuspendOfNoinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt");
}
@TestMetadata("inlineSuspendOfNoinlineSuspend.kt")
public void testInlineSuspendOfNoinlineSuspend_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfOrdinary.kt") @TestMetadata("inlineSuspendOfOrdinary.kt")
public void testInlineSuspendOfOrdinary_1_2() throws Exception { public void testInlineSuspendOfOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt");
}
@TestMetadata("inlineSuspendOfOrdinary.kt")
public void testInlineSuspendOfOrdinary_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfSuspend.kt") @TestMetadata("inlineSuspendOfSuspend.kt")
public void testInlineSuspendOfSuspend_1_2() throws Exception { public void testInlineSuspendOfSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt");
}
@TestMetadata("inlineSuspendOfSuspend.kt")
public void testInlineSuspendOfSuspend_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt", "kotlin.coroutines");
} }
@TestMetadata("jvmName.kt") @TestMetadata("jvmName.kt")
public void testJvmName_1_2() throws Exception { public void testJvmName() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/jvmName.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/jvmName.kt");
}
@TestMetadata("jvmName.kt")
public void testJvmName_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/jvmName.kt", "kotlin.coroutines");
} }
@TestMetadata("kt26658.kt") @TestMetadata("kt26658.kt")
@@ -4146,33 +4067,18 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
} }
@TestMetadata("maxStackWithCrossinline.kt") @TestMetadata("maxStackWithCrossinline.kt")
public void testMaxStackWithCrossinline_1_2() throws Exception { public void testMaxStackWithCrossinline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/maxStackWithCrossinline.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/maxStackWithCrossinline.kt");
}
@TestMetadata("maxStackWithCrossinline.kt")
public void testMaxStackWithCrossinline_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/maxStackWithCrossinline.kt", "kotlin.coroutines");
} }
@TestMetadata("multipleLocals.kt") @TestMetadata("multipleLocals.kt")
public void testMultipleLocals_1_2() throws Exception { public void testMultipleLocals() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt");
}
@TestMetadata("multipleLocals.kt")
public void testMultipleLocals_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt", "kotlin.coroutines");
} }
@TestMetadata("multipleSuspensionPoints.kt") @TestMetadata("multipleSuspensionPoints.kt")
public void testMultipleSuspensionPoints_1_2() throws Exception { public void testMultipleSuspensionPoints() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt");
}
@TestMetadata("multipleSuspensionPoints.kt")
public void testMultipleSuspensionPoints_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt", "kotlin.coroutines");
} }
@TestMetadata("nestedMethodWith2XParameter.kt") @TestMetadata("nestedMethodWith2XParameter.kt")
@@ -4186,43 +4092,23 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
} }
@TestMetadata("nonSuspendCrossinline.kt") @TestMetadata("nonSuspendCrossinline.kt")
public void testNonSuspendCrossinline_1_2() throws Exception { public void testNonSuspendCrossinline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/nonSuspendCrossinline.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/nonSuspendCrossinline.kt");
}
@TestMetadata("nonSuspendCrossinline.kt")
public void testNonSuspendCrossinline_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/nonSuspendCrossinline.kt", "kotlin.coroutines");
} }
@TestMetadata("returnValue.kt") @TestMetadata("returnValue.kt")
public void testReturnValue_1_2() throws Exception { public void testReturnValue() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/returnValue.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/returnValue.kt");
}
@TestMetadata("returnValue.kt")
public void testReturnValue_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/returnValue.kt", "kotlin.coroutines");
} }
@TestMetadata("tryCatchReceiver.kt") @TestMetadata("tryCatchReceiver.kt")
public void testTryCatchReceiver_1_2() throws Exception { public void testTryCatchReceiver() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/tryCatchReceiver.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/tryCatchReceiver.kt");
}
@TestMetadata("tryCatchReceiver.kt")
public void testTryCatchReceiver_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/tryCatchReceiver.kt", "kotlin.coroutines");
} }
@TestMetadata("tryCatchStackTransform.kt") @TestMetadata("tryCatchStackTransform.kt")
public void testTryCatchStackTransform_1_2() throws Exception { public void testTryCatchStackTransform() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt");
}
@TestMetadata("tryCatchStackTransform.kt")
public void testTryCatchStackTransform_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt", "kotlin.coroutines");
} }
@TestMetadata("twiceRegeneratedAnonymousObject.kt") @TestMetadata("twiceRegeneratedAnonymousObject.kt")
@@ -4281,22 +4167,13 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInDefaultParameter() throws Exception { public void testAllFilesPresentInDefaultParameter() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/defaultParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/defaultParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
} }
@TestMetadata("defaultValueCrossinline.kt") @TestMetadata("defaultValueCrossinline.kt")
public void testDefaultValueCrossinline_1_2() throws Exception { public void testDefaultValueCrossinline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt");
}
@TestMetadata("defaultValueCrossinline.kt")
public void testDefaultValueCrossinline_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt", "kotlin.coroutines");
} }
@TestMetadata("defaultValueInClass.kt") @TestMetadata("defaultValueInClass.kt")
@@ -4304,24 +4181,14 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInClass.kt"); runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInClass.kt");
} }
@TestMetadata("defaultValueInlineFromMultiFileFacade.kt") @TestMetadata("defaultValueInline.kt")
public void testDefaultValueInlineFromMultiFileFacade_1_2() throws Exception { public void testDefaultValueInline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInlineFromMultiFileFacade.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt");
} }
@TestMetadata("defaultValueInlineFromMultiFileFacade.kt") @TestMetadata("defaultValueInlineFromMultiFileFacade.kt")
public void testDefaultValueInlineFromMultiFileFacade_1_3() throws Exception { public void testDefaultValueInlineFromMultiFileFacade() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInlineFromMultiFileFacade.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInlineFromMultiFileFacade.kt");
}
@TestMetadata("defaultValueInline.kt")
public void testDefaultValueInline_1_2() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt", "kotlin.coroutines.experimental");
}
@TestMetadata("defaultValueInline.kt")
public void testDefaultValueInline_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt", "kotlin.coroutines");
} }
} }
@@ -4389,92 +4256,48 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInReceiver() throws Exception { public void testAllFilesPresentInReceiver() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/receiver"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/receiver"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
} }
@TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt")
public void testInlineOrdinaryOfCrossinlineSuspend_1_2() throws Exception { public void testInlineOrdinaryOfCrossinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt");
}
@TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt")
public void testInlineOrdinaryOfCrossinlineSuspend_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt")
public void testInlineOrdinaryOfNoinlineSuspend_1_2() throws Exception { public void testInlineOrdinaryOfNoinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt");
}
@TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt")
public void testInlineOrdinaryOfNoinlineSuspend_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt")
public void testInlineSuspendOfCrossinlineOrdinary_1_2() throws Exception { public void testInlineSuspendOfCrossinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt");
}
@TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt")
public void testInlineSuspendOfCrossinlineOrdinary_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt")
public void testInlineSuspendOfCrossinlineSuspend_1_2() throws Exception { public void testInlineSuspendOfCrossinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt");
}
@TestMetadata("inlineSuspendOfCrossinlineSuspend.kt")
public void testInlineSuspendOfCrossinlineSuspend_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt")
public void testInlineSuspendOfNoinlineOrdinary_1_2() throws Exception { public void testInlineSuspendOfNoinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt");
}
@TestMetadata("inlineSuspendOfNoinlineOrdinary.kt")
public void testInlineSuspendOfNoinlineOrdinary_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfNoinlineSuspend.kt") @TestMetadata("inlineSuspendOfNoinlineSuspend.kt")
public void testInlineSuspendOfNoinlineSuspend_1_2() throws Exception { public void testInlineSuspendOfNoinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt");
}
@TestMetadata("inlineSuspendOfNoinlineSuspend.kt")
public void testInlineSuspendOfNoinlineSuspend_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfOrdinary.kt") @TestMetadata("inlineSuspendOfOrdinary.kt")
public void testInlineSuspendOfOrdinary_1_2() throws Exception { public void testInlineSuspendOfOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt");
}
@TestMetadata("inlineSuspendOfOrdinary.kt")
public void testInlineSuspendOfOrdinary_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfSuspend.kt") @TestMetadata("inlineSuspendOfSuspend.kt")
public void testInlineSuspendOfSuspend_1_2() throws Exception { public void testInlineSuspendOfSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt");
}
@TestMetadata("inlineSuspendOfSuspend.kt")
public void testInlineSuspendOfSuspend_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt", "kotlin.coroutines");
} }
} }
@@ -4486,142 +4309,73 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInStateMachine() throws Exception { public void testAllFilesPresentInStateMachine() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/stateMachine"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/stateMachine"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
} }
@TestMetadata("crossingCoroutineBoundaries.kt") @TestMetadata("crossingCoroutineBoundaries.kt")
public void testCrossingCoroutineBoundaries_1_2() throws Exception { public void testCrossingCoroutineBoundaries() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/crossingCoroutineBoundaries.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/crossingCoroutineBoundaries.kt");
}
@TestMetadata("crossingCoroutineBoundaries.kt")
public void testCrossingCoroutineBoundaries_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/crossingCoroutineBoundaries.kt", "kotlin.coroutines");
} }
@TestMetadata("independentInline.kt") @TestMetadata("independentInline.kt")
public void testIndependentInline_1_2() throws Exception { public void testIndependentInline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/independentInline.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/independentInline.kt");
}
@TestMetadata("independentInline.kt")
public void testIndependentInline_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/independentInline.kt", "kotlin.coroutines");
}
@TestMetadata("innerLambdaInsideLambda.kt")
public void testInnerLambdaInsideLambda_1_2() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt", "kotlin.coroutines.experimental");
}
@TestMetadata("innerLambdaInsideLambda.kt")
public void testInnerLambdaInsideLambda_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt", "kotlin.coroutines");
}
@TestMetadata("innerLambdaWithoutCrossinline.kt")
public void testInnerLambdaWithoutCrossinline_1_2() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt", "kotlin.coroutines.experimental");
}
@TestMetadata("innerLambdaWithoutCrossinline.kt")
public void testInnerLambdaWithoutCrossinline_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt", "kotlin.coroutines");
} }
@TestMetadata("innerLambda.kt") @TestMetadata("innerLambda.kt")
public void testInnerLambda_1_2() throws Exception { public void testInnerLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt");
} }
@TestMetadata("innerLambda.kt") @TestMetadata("innerLambdaInsideLambda.kt")
public void testInnerLambda_1_3() throws Exception { public void testInnerLambdaInsideLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt");
} }
@TestMetadata("innerMadnessCallSite.kt") @TestMetadata("innerLambdaWithoutCrossinline.kt")
public void testInnerMadnessCallSite_1_2() throws Exception { public void testInnerLambdaWithoutCrossinline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt");
}
@TestMetadata("innerMadnessCallSite.kt")
public void testInnerMadnessCallSite_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt", "kotlin.coroutines");
} }
@TestMetadata("innerMadness.kt") @TestMetadata("innerMadness.kt")
public void testInnerMadness_1_2() throws Exception { public void testInnerMadness() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt");
} }
@TestMetadata("innerMadness.kt") @TestMetadata("innerMadnessCallSite.kt")
public void testInnerMadness_1_3() throws Exception { public void testInnerMadnessCallSite() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt");
}
@TestMetadata("innerObjectInsideInnerObject.kt")
public void testInnerObjectInsideInnerObject_1_2() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt", "kotlin.coroutines.experimental");
}
@TestMetadata("innerObjectInsideInnerObject.kt")
public void testInnerObjectInsideInnerObject_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt", "kotlin.coroutines");
}
@TestMetadata("innerObjectRetransformation.kt")
public void testInnerObjectRetransformation_1_2() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectRetransformation.kt", "kotlin.coroutines.experimental");
}
@TestMetadata("innerObjectRetransformation.kt")
public void testInnerObjectRetransformation_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectRetransformation.kt", "kotlin.coroutines");
}
@TestMetadata("innerObjectSeveralFunctions.kt")
public void testInnerObjectSeveralFunctions_1_2() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt", "kotlin.coroutines.experimental");
}
@TestMetadata("innerObjectSeveralFunctions.kt")
public void testInnerObjectSeveralFunctions_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt", "kotlin.coroutines");
}
@TestMetadata("innerObjectWithoutCapturingCrossinline.kt")
public void testInnerObjectWithoutCapturingCrossinline_1_2() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt", "kotlin.coroutines.experimental");
}
@TestMetadata("innerObjectWithoutCapturingCrossinline.kt")
public void testInnerObjectWithoutCapturingCrossinline_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt", "kotlin.coroutines");
} }
@TestMetadata("innerObject.kt") @TestMetadata("innerObject.kt")
public void testInnerObject_1_2() throws Exception { public void testInnerObject() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt");
} }
@TestMetadata("innerObject.kt") @TestMetadata("innerObjectInsideInnerObject.kt")
public void testInnerObject_1_3() throws Exception { public void testInnerObjectInsideInnerObject() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt");
}
@TestMetadata("innerObjectRetransformation.kt")
public void testInnerObjectRetransformation() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectRetransformation.kt");
}
@TestMetadata("innerObjectSeveralFunctions.kt")
public void testInnerObjectSeveralFunctions() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt");
}
@TestMetadata("innerObjectWithoutCapturingCrossinline.kt")
public void testInnerObjectWithoutCapturingCrossinline() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt");
} }
@TestMetadata("insideObject.kt") @TestMetadata("insideObject.kt")
public void testInsideObject_1_2() throws Exception { public void testInsideObject() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/insideObject.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/insideObject.kt");
}
@TestMetadata("insideObject.kt")
public void testInsideObject_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/insideObject.kt", "kotlin.coroutines");
} }
@TestMetadata("lambdaTransformation.kt") @TestMetadata("lambdaTransformation.kt")
@@ -4630,83 +4384,43 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
} }
@TestMetadata("normalInline.kt") @TestMetadata("normalInline.kt")
public void testNormalInline_1_2() throws Exception { public void testNormalInline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt");
}
@TestMetadata("normalInline.kt")
public void testNormalInline_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt", "kotlin.coroutines");
} }
@TestMetadata("numberOfSuspentions.kt") @TestMetadata("numberOfSuspentions.kt")
public void testNumberOfSuspentions_1_2() throws Exception { public void testNumberOfSuspentions() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt");
}
@TestMetadata("numberOfSuspentions.kt")
public void testNumberOfSuspentions_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt", "kotlin.coroutines");
} }
@TestMetadata("objectInsideLambdas.kt") @TestMetadata("objectInsideLambdas.kt")
public void testObjectInsideLambdas_1_2() throws Exception { public void testObjectInsideLambdas() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/objectInsideLambdas.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/objectInsideLambdas.kt");
}
@TestMetadata("objectInsideLambdas.kt")
public void testObjectInsideLambdas_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/objectInsideLambdas.kt", "kotlin.coroutines");
} }
@TestMetadata("oneInlineTwoCaptures.kt") @TestMetadata("oneInlineTwoCaptures.kt")
public void testOneInlineTwoCaptures_1_2() throws Exception { public void testOneInlineTwoCaptures() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/oneInlineTwoCaptures.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/oneInlineTwoCaptures.kt");
}
@TestMetadata("oneInlineTwoCaptures.kt")
public void testOneInlineTwoCaptures_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/oneInlineTwoCaptures.kt", "kotlin.coroutines");
} }
@TestMetadata("passLambda.kt") @TestMetadata("passLambda.kt")
public void testPassLambda_1_2() throws Exception { public void testPassLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/passLambda.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/passLambda.kt");
}
@TestMetadata("passLambda.kt")
public void testPassLambda_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/passLambda.kt", "kotlin.coroutines");
}
@TestMetadata("passParameterLambda.kt")
public void testPassParameterLambda_1_2() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameterLambda.kt", "kotlin.coroutines.experimental");
}
@TestMetadata("passParameterLambda.kt")
public void testPassParameterLambda_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameterLambda.kt", "kotlin.coroutines");
} }
@TestMetadata("passParameter.kt") @TestMetadata("passParameter.kt")
public void testPassParameter_1_2() throws Exception { public void testPassParameter() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameter.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameter.kt");
} }
@TestMetadata("passParameter.kt") @TestMetadata("passParameterLambda.kt")
public void testPassParameter_1_3() throws Exception { public void testPassParameterLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameter.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameterLambda.kt");
} }
@TestMetadata("unreachableSuspendMarker.kt") @TestMetadata("unreachableSuspendMarker.kt")
public void testUnreachableSuspendMarker_1_2() throws Exception { public void testUnreachableSuspendMarker() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/unreachableSuspendMarker.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/unreachableSuspendMarker.kt");
}
@TestMetadata("unreachableSuspendMarker.kt")
public void testUnreachableSuspendMarker_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/unreachableSuspendMarker.kt", "kotlin.coroutines");
} }
} }
} }
@@ -674,52 +674,28 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInCoroutines() throws Exception { public void testAllFilesPresentInCoroutines() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/coroutines"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/coroutines"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
} }
@TestMetadata("coroutineContextIntrinsic.kt") @TestMetadata("coroutineContextIntrinsic.kt")
public void testCoroutineContextIntrinsic_1_2() throws Exception { public void testCoroutineContextIntrinsic() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeListing/coroutines/coroutineContextIntrinsic.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/bytecodeListing/coroutines/coroutineContextIntrinsic.kt");
}
@TestMetadata("coroutineContextIntrinsic.kt")
public void testCoroutineContextIntrinsic_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeListing/coroutines/coroutineContextIntrinsic.kt", "kotlin.coroutines");
} }
@TestMetadata("coroutineFields.kt") @TestMetadata("coroutineFields.kt")
public void testCoroutineFields_1_2() throws Exception { public void testCoroutineFields() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeListing/coroutines/coroutineFields.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/bytecodeListing/coroutines/coroutineFields.kt");
}
@TestMetadata("coroutineFields.kt")
public void testCoroutineFields_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeListing/coroutines/coroutineFields.kt", "kotlin.coroutines");
} }
@TestMetadata("oomInReturnUnit.kt") @TestMetadata("oomInReturnUnit.kt")
public void testOomInReturnUnit_1_2() throws Exception { public void testOomInReturnUnit() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeListing/coroutines/oomInReturnUnit.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/bytecodeListing/coroutines/oomInReturnUnit.kt");
}
@TestMetadata("oomInReturnUnit.kt")
public void testOomInReturnUnit_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeListing/coroutines/oomInReturnUnit.kt", "kotlin.coroutines");
} }
@TestMetadata("privateAccessor.kt") @TestMetadata("privateAccessor.kt")
public void testPrivateAccessor_1_2() throws Exception { public void testPrivateAccessor() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeListing/coroutines/privateAccessor.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/bytecodeListing/coroutines/privateAccessor.kt");
}
@TestMetadata("privateAccessor.kt")
public void testPrivateAccessor_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeListing/coroutines/privateAccessor.kt", "kotlin.coroutines");
} }
@TestMetadata("privateSuspendFun.kt") @TestMetadata("privateSuspendFun.kt")
@@ -733,23 +709,13 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest {
} }
@TestMetadata("suspendReifiedFun.kt") @TestMetadata("suspendReifiedFun.kt")
public void testSuspendReifiedFun_1_2() throws Exception { public void testSuspendReifiedFun() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeListing/coroutines/suspendReifiedFun.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/bytecodeListing/coroutines/suspendReifiedFun.kt");
}
@TestMetadata("suspendReifiedFun.kt")
public void testSuspendReifiedFun_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeListing/coroutines/suspendReifiedFun.kt", "kotlin.coroutines");
} }
@TestMetadata("tcoContinuation.kt") @TestMetadata("tcoContinuation.kt")
public void testTcoContinuation_1_2() throws Exception { public void testTcoContinuation() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeListing/coroutines/tcoContinuation.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/bytecodeListing/coroutines/tcoContinuation.kt");
}
@TestMetadata("tcoContinuation.kt")
public void testTcoContinuation_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeListing/coroutines/tcoContinuation.kt", "kotlin.coroutines");
} }
@TestMetadata("compiler/testData/codegen/bytecodeListing/coroutines/spilling") @TestMetadata("compiler/testData/codegen/bytecodeListing/coroutines/spilling")
@@ -1403,10 +1403,6 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInCoroutines() throws Exception { public void testAllFilesPresentInCoroutines() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/coroutines"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/coroutines"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
} }
@@ -1437,13 +1433,8 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
} }
@TestMetadata("returnUnitInLambda.kt") @TestMetadata("returnUnitInLambda.kt")
public void testReturnUnitInLambda_1_2() throws Exception { public void testReturnUnitInLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/returnUnitInLambda.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/bytecodeText/coroutines/returnUnitInLambda.kt");
}
@TestMetadata("returnUnitInLambda.kt")
public void testReturnUnitInLambda_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/returnUnitInLambda.kt", "kotlin.coroutines");
} }
@TestMetadata("suspendMain.kt") @TestMetadata("suspendMain.kt")
@@ -1621,112 +1612,58 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInIntLikeVarSpilling() throws Exception { public void testAllFilesPresentInIntLikeVarSpilling() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
} }
@TestMetadata("complicatedMerge.kt") @TestMetadata("complicatedMerge.kt")
public void testComplicatedMerge_1_2() throws Exception { public void testComplicatedMerge() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/complicatedMerge.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/complicatedMerge.kt");
}
@TestMetadata("complicatedMerge.kt")
public void testComplicatedMerge_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/complicatedMerge.kt", "kotlin.coroutines");
} }
@TestMetadata("i2bResult.kt") @TestMetadata("i2bResult.kt")
public void testI2bResult_1_2() throws Exception { public void testI2bResult() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/i2bResult.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/i2bResult.kt");
}
@TestMetadata("i2bResult.kt")
public void testI2bResult_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/i2bResult.kt", "kotlin.coroutines");
} }
@TestMetadata("loadFromBooleanArray.kt") @TestMetadata("loadFromBooleanArray.kt")
public void testLoadFromBooleanArray_1_2() throws Exception { public void testLoadFromBooleanArray() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/loadFromBooleanArray.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/loadFromBooleanArray.kt");
}
@TestMetadata("loadFromBooleanArray.kt")
public void testLoadFromBooleanArray_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/loadFromBooleanArray.kt", "kotlin.coroutines");
} }
@TestMetadata("loadFromByteArray.kt") @TestMetadata("loadFromByteArray.kt")
public void testLoadFromByteArray_1_2() throws Exception { public void testLoadFromByteArray() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/loadFromByteArray.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/loadFromByteArray.kt");
}
@TestMetadata("loadFromByteArray.kt")
public void testLoadFromByteArray_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/loadFromByteArray.kt", "kotlin.coroutines");
} }
@TestMetadata("noVariableInTable.kt") @TestMetadata("noVariableInTable.kt")
public void testNoVariableInTable_1_2() throws Exception { public void testNoVariableInTable() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/noVariableInTable.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/noVariableInTable.kt");
}
@TestMetadata("noVariableInTable.kt")
public void testNoVariableInTable_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/noVariableInTable.kt", "kotlin.coroutines");
} }
@TestMetadata("sameIconst1ManyVars.kt") @TestMetadata("sameIconst1ManyVars.kt")
public void testSameIconst1ManyVars_1_2() throws Exception { public void testSameIconst1ManyVars() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/sameIconst1ManyVars.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/sameIconst1ManyVars.kt");
}
@TestMetadata("sameIconst1ManyVars.kt")
public void testSameIconst1ManyVars_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/sameIconst1ManyVars.kt", "kotlin.coroutines");
} }
@TestMetadata("usedInArrayStore.kt") @TestMetadata("usedInArrayStore.kt")
public void testUsedInArrayStore_1_2() throws Exception { public void testUsedInArrayStore() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInArrayStore.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInArrayStore.kt");
}
@TestMetadata("usedInArrayStore.kt")
public void testUsedInArrayStore_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInArrayStore.kt", "kotlin.coroutines");
} }
@TestMetadata("usedInMethodCall.kt") @TestMetadata("usedInMethodCall.kt")
public void testUsedInMethodCall_1_2() throws Exception { public void testUsedInMethodCall() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInMethodCall.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInMethodCall.kt");
}
@TestMetadata("usedInMethodCall.kt")
public void testUsedInMethodCall_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInMethodCall.kt", "kotlin.coroutines");
} }
@TestMetadata("usedInPutfield.kt") @TestMetadata("usedInPutfield.kt")
public void testUsedInPutfield_1_2() throws Exception { public void testUsedInPutfield() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInPutfield.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInPutfield.kt");
}
@TestMetadata("usedInPutfield.kt")
public void testUsedInPutfield_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInPutfield.kt", "kotlin.coroutines");
} }
@TestMetadata("usedInVarStore.kt") @TestMetadata("usedInVarStore.kt")
public void testUsedInVarStore_1_2() throws Exception { public void testUsedInVarStore() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInVarStore.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInVarStore.kt");
}
@TestMetadata("usedInVarStore.kt")
public void testUsedInVarStore_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInVarStore.kt", "kotlin.coroutines");
} }
} }
@@ -3967,32 +3967,18 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: ");
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: ");
}
public void testAllFilesPresentInSuspend() throws Exception { public void testAllFilesPresentInSuspend() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
} }
@TestMetadata("capturedVariables.kt") @TestMetadata("capturedVariables.kt")
public void testCapturedVariables_1_2() throws Exception { public void testCapturedVariables() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt");
}
@TestMetadata("capturedVariables.kt")
public void testCapturedVariables_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt", "kotlin.coroutines");
} }
@TestMetadata("crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt") @TestMetadata("crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt")
public void testCrossinlineSuspendLambdaInsideCrossinlineSuspendLambda_1_2() throws Exception { public void testCrossinlineSuspendLambdaInsideCrossinlineSuspendLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt");
}
@TestMetadata("crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt")
public void testCrossinlineSuspendLambdaInsideCrossinlineSuspendLambda_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt", "kotlin.coroutines");
} }
@TestMetadata("debugMetadataCrossinline.kt") @TestMetadata("debugMetadataCrossinline.kt")
@@ -4001,33 +3987,18 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi
} }
@TestMetadata("delegatedProperties.kt") @TestMetadata("delegatedProperties.kt")
public void testDelegatedProperties_1_2() throws Exception { public void testDelegatedProperties() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/delegatedProperties.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/delegatedProperties.kt");
}
@TestMetadata("delegatedProperties.kt")
public void testDelegatedProperties_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/delegatedProperties.kt", "kotlin.coroutines");
} }
@TestMetadata("doubleRegenerationWithNonSuspendingLambda.kt") @TestMetadata("doubleRegenerationWithNonSuspendingLambda.kt")
public void testDoubleRegenerationWithNonSuspendingLambda_1_2() throws Exception { public void testDoubleRegenerationWithNonSuspendingLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/doubleRegenerationWithNonSuspendingLambda.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/doubleRegenerationWithNonSuspendingLambda.kt");
}
@TestMetadata("doubleRegenerationWithNonSuspendingLambda.kt")
public void testDoubleRegenerationWithNonSuspendingLambda_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/doubleRegenerationWithNonSuspendingLambda.kt", "kotlin.coroutines");
} }
@TestMetadata("enclodingMethod.kt") @TestMetadata("enclodingMethod.kt")
public void testEnclodingMethod_1_2() throws Exception { public void testEnclodingMethod() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/enclodingMethod.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/enclodingMethod.kt");
}
@TestMetadata("enclodingMethod.kt")
public void testEnclodingMethod_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/enclodingMethod.kt", "kotlin.coroutines");
} }
@TestMetadata("fileNameInMetadata.kt") @TestMetadata("fileNameInMetadata.kt")
@@ -4036,33 +4007,18 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi
} }
@TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt")
public void testInlineOrdinaryOfCrossinlineSuspend_1_2() throws Exception { public void testInlineOrdinaryOfCrossinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt");
}
@TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt")
public void testInlineOrdinaryOfCrossinlineSuspend_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt")
public void testInlineOrdinaryOfNoinlineSuspend_1_2() throws Exception { public void testInlineOrdinaryOfNoinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt");
}
@TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt")
public void testInlineOrdinaryOfNoinlineSuspend_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendContinuation.kt") @TestMetadata("inlineSuspendContinuation.kt")
public void testInlineSuspendContinuation_1_2() throws Exception { public void testInlineSuspendContinuation() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendContinuation.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendContinuation.kt");
}
@TestMetadata("inlineSuspendContinuation.kt")
public void testInlineSuspendContinuation_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendContinuation.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendInMultifileClass.kt") @TestMetadata("inlineSuspendInMultifileClass.kt")
@@ -4071,73 +4027,38 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi
} }
@TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt")
public void testInlineSuspendOfCrossinlineOrdinary_1_2() throws Exception { public void testInlineSuspendOfCrossinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt");
}
@TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt")
public void testInlineSuspendOfCrossinlineOrdinary_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt")
public void testInlineSuspendOfCrossinlineSuspend_1_2() throws Exception { public void testInlineSuspendOfCrossinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt");
}
@TestMetadata("inlineSuspendOfCrossinlineSuspend.kt")
public void testInlineSuspendOfCrossinlineSuspend_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt")
public void testInlineSuspendOfNoinlineOrdinary_1_2() throws Exception { public void testInlineSuspendOfNoinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt");
}
@TestMetadata("inlineSuspendOfNoinlineOrdinary.kt")
public void testInlineSuspendOfNoinlineOrdinary_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfNoinlineSuspend.kt") @TestMetadata("inlineSuspendOfNoinlineSuspend.kt")
public void testInlineSuspendOfNoinlineSuspend_1_2() throws Exception { public void testInlineSuspendOfNoinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt");
}
@TestMetadata("inlineSuspendOfNoinlineSuspend.kt")
public void testInlineSuspendOfNoinlineSuspend_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfOrdinary.kt") @TestMetadata("inlineSuspendOfOrdinary.kt")
public void testInlineSuspendOfOrdinary_1_2() throws Exception { public void testInlineSuspendOfOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt");
}
@TestMetadata("inlineSuspendOfOrdinary.kt")
public void testInlineSuspendOfOrdinary_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfSuspend.kt") @TestMetadata("inlineSuspendOfSuspend.kt")
public void testInlineSuspendOfSuspend_1_2() throws Exception { public void testInlineSuspendOfSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt");
}
@TestMetadata("inlineSuspendOfSuspend.kt")
public void testInlineSuspendOfSuspend_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt", "kotlin.coroutines");
} }
@TestMetadata("jvmName.kt") @TestMetadata("jvmName.kt")
public void testJvmName_1_2() throws Exception { public void testJvmName() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/jvmName.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/jvmName.kt");
}
@TestMetadata("jvmName.kt")
public void testJvmName_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/jvmName.kt", "kotlin.coroutines");
} }
@TestMetadata("kt26658.kt") @TestMetadata("kt26658.kt")
@@ -4146,33 +4067,18 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi
} }
@TestMetadata("maxStackWithCrossinline.kt") @TestMetadata("maxStackWithCrossinline.kt")
public void testMaxStackWithCrossinline_1_2() throws Exception { public void testMaxStackWithCrossinline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/maxStackWithCrossinline.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/maxStackWithCrossinline.kt");
}
@TestMetadata("maxStackWithCrossinline.kt")
public void testMaxStackWithCrossinline_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/maxStackWithCrossinline.kt", "kotlin.coroutines");
} }
@TestMetadata("multipleLocals.kt") @TestMetadata("multipleLocals.kt")
public void testMultipleLocals_1_2() throws Exception { public void testMultipleLocals() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt");
}
@TestMetadata("multipleLocals.kt")
public void testMultipleLocals_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt", "kotlin.coroutines");
} }
@TestMetadata("multipleSuspensionPoints.kt") @TestMetadata("multipleSuspensionPoints.kt")
public void testMultipleSuspensionPoints_1_2() throws Exception { public void testMultipleSuspensionPoints() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt");
}
@TestMetadata("multipleSuspensionPoints.kt")
public void testMultipleSuspensionPoints_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt", "kotlin.coroutines");
} }
@TestMetadata("nestedMethodWith2XParameter.kt") @TestMetadata("nestedMethodWith2XParameter.kt")
@@ -4186,43 +4092,23 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi
} }
@TestMetadata("nonSuspendCrossinline.kt") @TestMetadata("nonSuspendCrossinline.kt")
public void testNonSuspendCrossinline_1_2() throws Exception { public void testNonSuspendCrossinline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/nonSuspendCrossinline.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/nonSuspendCrossinline.kt");
}
@TestMetadata("nonSuspendCrossinline.kt")
public void testNonSuspendCrossinline_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/nonSuspendCrossinline.kt", "kotlin.coroutines");
} }
@TestMetadata("returnValue.kt") @TestMetadata("returnValue.kt")
public void testReturnValue_1_2() throws Exception { public void testReturnValue() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/returnValue.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/returnValue.kt");
}
@TestMetadata("returnValue.kt")
public void testReturnValue_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/returnValue.kt", "kotlin.coroutines");
} }
@TestMetadata("tryCatchReceiver.kt") @TestMetadata("tryCatchReceiver.kt")
public void testTryCatchReceiver_1_2() throws Exception { public void testTryCatchReceiver() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/tryCatchReceiver.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/tryCatchReceiver.kt");
}
@TestMetadata("tryCatchReceiver.kt")
public void testTryCatchReceiver_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/tryCatchReceiver.kt", "kotlin.coroutines");
} }
@TestMetadata("tryCatchStackTransform.kt") @TestMetadata("tryCatchStackTransform.kt")
public void testTryCatchStackTransform_1_2() throws Exception { public void testTryCatchStackTransform() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt");
}
@TestMetadata("tryCatchStackTransform.kt")
public void testTryCatchStackTransform_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt", "kotlin.coroutines");
} }
@TestMetadata("twiceRegeneratedAnonymousObject.kt") @TestMetadata("twiceRegeneratedAnonymousObject.kt")
@@ -4281,22 +4167,13 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: ");
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: ");
}
public void testAllFilesPresentInDefaultParameter() throws Exception { public void testAllFilesPresentInDefaultParameter() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/defaultParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/defaultParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
} }
@TestMetadata("defaultValueCrossinline.kt") @TestMetadata("defaultValueCrossinline.kt")
public void testDefaultValueCrossinline_1_2() throws Exception { public void testDefaultValueCrossinline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt");
}
@TestMetadata("defaultValueCrossinline.kt")
public void testDefaultValueCrossinline_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt", "kotlin.coroutines");
} }
@TestMetadata("defaultValueInClass.kt") @TestMetadata("defaultValueInClass.kt")
@@ -4304,24 +4181,14 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi
runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInClass.kt"); runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInClass.kt");
} }
@TestMetadata("defaultValueInlineFromMultiFileFacade.kt") @TestMetadata("defaultValueInline.kt")
public void testDefaultValueInlineFromMultiFileFacade_1_2() throws Exception { public void testDefaultValueInline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInlineFromMultiFileFacade.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt");
} }
@TestMetadata("defaultValueInlineFromMultiFileFacade.kt") @TestMetadata("defaultValueInlineFromMultiFileFacade.kt")
public void testDefaultValueInlineFromMultiFileFacade_1_3() throws Exception { public void testDefaultValueInlineFromMultiFileFacade() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInlineFromMultiFileFacade.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInlineFromMultiFileFacade.kt");
}
@TestMetadata("defaultValueInline.kt")
public void testDefaultValueInline_1_2() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt", "kotlin.coroutines.experimental");
}
@TestMetadata("defaultValueInline.kt")
public void testDefaultValueInline_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt", "kotlin.coroutines");
} }
} }
@@ -4389,92 +4256,48 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: ");
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: ");
}
public void testAllFilesPresentInReceiver() throws Exception { public void testAllFilesPresentInReceiver() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/receiver"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/receiver"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
} }
@TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt")
public void testInlineOrdinaryOfCrossinlineSuspend_1_2() throws Exception { public void testInlineOrdinaryOfCrossinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt");
}
@TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt")
public void testInlineOrdinaryOfCrossinlineSuspend_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt")
public void testInlineOrdinaryOfNoinlineSuspend_1_2() throws Exception { public void testInlineOrdinaryOfNoinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt");
}
@TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt")
public void testInlineOrdinaryOfNoinlineSuspend_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt")
public void testInlineSuspendOfCrossinlineOrdinary_1_2() throws Exception { public void testInlineSuspendOfCrossinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt");
}
@TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt")
public void testInlineSuspendOfCrossinlineOrdinary_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt")
public void testInlineSuspendOfCrossinlineSuspend_1_2() throws Exception { public void testInlineSuspendOfCrossinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt");
}
@TestMetadata("inlineSuspendOfCrossinlineSuspend.kt")
public void testInlineSuspendOfCrossinlineSuspend_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt")
public void testInlineSuspendOfNoinlineOrdinary_1_2() throws Exception { public void testInlineSuspendOfNoinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt");
}
@TestMetadata("inlineSuspendOfNoinlineOrdinary.kt")
public void testInlineSuspendOfNoinlineOrdinary_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfNoinlineSuspend.kt") @TestMetadata("inlineSuspendOfNoinlineSuspend.kt")
public void testInlineSuspendOfNoinlineSuspend_1_2() throws Exception { public void testInlineSuspendOfNoinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt");
}
@TestMetadata("inlineSuspendOfNoinlineSuspend.kt")
public void testInlineSuspendOfNoinlineSuspend_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfOrdinary.kt") @TestMetadata("inlineSuspendOfOrdinary.kt")
public void testInlineSuspendOfOrdinary_1_2() throws Exception { public void testInlineSuspendOfOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt");
}
@TestMetadata("inlineSuspendOfOrdinary.kt")
public void testInlineSuspendOfOrdinary_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt", "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfSuspend.kt") @TestMetadata("inlineSuspendOfSuspend.kt")
public void testInlineSuspendOfSuspend_1_2() throws Exception { public void testInlineSuspendOfSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt");
}
@TestMetadata("inlineSuspendOfSuspend.kt")
public void testInlineSuspendOfSuspend_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt", "kotlin.coroutines");
} }
} }
@@ -4486,142 +4309,73 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: ");
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: ");
}
public void testAllFilesPresentInStateMachine() throws Exception { public void testAllFilesPresentInStateMachine() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/stateMachine"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/stateMachine"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
} }
@TestMetadata("crossingCoroutineBoundaries.kt") @TestMetadata("crossingCoroutineBoundaries.kt")
public void testCrossingCoroutineBoundaries_1_2() throws Exception { public void testCrossingCoroutineBoundaries() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/crossingCoroutineBoundaries.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/crossingCoroutineBoundaries.kt");
}
@TestMetadata("crossingCoroutineBoundaries.kt")
public void testCrossingCoroutineBoundaries_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/crossingCoroutineBoundaries.kt", "kotlin.coroutines");
} }
@TestMetadata("independentInline.kt") @TestMetadata("independentInline.kt")
public void testIndependentInline_1_2() throws Exception { public void testIndependentInline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/independentInline.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/independentInline.kt");
}
@TestMetadata("independentInline.kt")
public void testIndependentInline_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/independentInline.kt", "kotlin.coroutines");
}
@TestMetadata("innerLambdaInsideLambda.kt")
public void testInnerLambdaInsideLambda_1_2() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt", "kotlin.coroutines.experimental");
}
@TestMetadata("innerLambdaInsideLambda.kt")
public void testInnerLambdaInsideLambda_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt", "kotlin.coroutines");
}
@TestMetadata("innerLambdaWithoutCrossinline.kt")
public void testInnerLambdaWithoutCrossinline_1_2() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt", "kotlin.coroutines.experimental");
}
@TestMetadata("innerLambdaWithoutCrossinline.kt")
public void testInnerLambdaWithoutCrossinline_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt", "kotlin.coroutines");
} }
@TestMetadata("innerLambda.kt") @TestMetadata("innerLambda.kt")
public void testInnerLambda_1_2() throws Exception { public void testInnerLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt");
} }
@TestMetadata("innerLambda.kt") @TestMetadata("innerLambdaInsideLambda.kt")
public void testInnerLambda_1_3() throws Exception { public void testInnerLambdaInsideLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt");
} }
@TestMetadata("innerMadnessCallSite.kt") @TestMetadata("innerLambdaWithoutCrossinline.kt")
public void testInnerMadnessCallSite_1_2() throws Exception { public void testInnerLambdaWithoutCrossinline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt");
}
@TestMetadata("innerMadnessCallSite.kt")
public void testInnerMadnessCallSite_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt", "kotlin.coroutines");
} }
@TestMetadata("innerMadness.kt") @TestMetadata("innerMadness.kt")
public void testInnerMadness_1_2() throws Exception { public void testInnerMadness() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt");
} }
@TestMetadata("innerMadness.kt") @TestMetadata("innerMadnessCallSite.kt")
public void testInnerMadness_1_3() throws Exception { public void testInnerMadnessCallSite() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt");
}
@TestMetadata("innerObjectInsideInnerObject.kt")
public void testInnerObjectInsideInnerObject_1_2() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt", "kotlin.coroutines.experimental");
}
@TestMetadata("innerObjectInsideInnerObject.kt")
public void testInnerObjectInsideInnerObject_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt", "kotlin.coroutines");
}
@TestMetadata("innerObjectRetransformation.kt")
public void testInnerObjectRetransformation_1_2() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectRetransformation.kt", "kotlin.coroutines.experimental");
}
@TestMetadata("innerObjectRetransformation.kt")
public void testInnerObjectRetransformation_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectRetransformation.kt", "kotlin.coroutines");
}
@TestMetadata("innerObjectSeveralFunctions.kt")
public void testInnerObjectSeveralFunctions_1_2() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt", "kotlin.coroutines.experimental");
}
@TestMetadata("innerObjectSeveralFunctions.kt")
public void testInnerObjectSeveralFunctions_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt", "kotlin.coroutines");
}
@TestMetadata("innerObjectWithoutCapturingCrossinline.kt")
public void testInnerObjectWithoutCapturingCrossinline_1_2() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt", "kotlin.coroutines.experimental");
}
@TestMetadata("innerObjectWithoutCapturingCrossinline.kt")
public void testInnerObjectWithoutCapturingCrossinline_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt", "kotlin.coroutines");
} }
@TestMetadata("innerObject.kt") @TestMetadata("innerObject.kt")
public void testInnerObject_1_2() throws Exception { public void testInnerObject() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt");
} }
@TestMetadata("innerObject.kt") @TestMetadata("innerObjectInsideInnerObject.kt")
public void testInnerObject_1_3() throws Exception { public void testInnerObjectInsideInnerObject() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt");
}
@TestMetadata("innerObjectRetransformation.kt")
public void testInnerObjectRetransformation() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectRetransformation.kt");
}
@TestMetadata("innerObjectSeveralFunctions.kt")
public void testInnerObjectSeveralFunctions() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt");
}
@TestMetadata("innerObjectWithoutCapturingCrossinline.kt")
public void testInnerObjectWithoutCapturingCrossinline() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt");
} }
@TestMetadata("insideObject.kt") @TestMetadata("insideObject.kt")
public void testInsideObject_1_2() throws Exception { public void testInsideObject() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/insideObject.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/insideObject.kt");
}
@TestMetadata("insideObject.kt")
public void testInsideObject_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/insideObject.kt", "kotlin.coroutines");
} }
@TestMetadata("lambdaTransformation.kt") @TestMetadata("lambdaTransformation.kt")
@@ -4630,83 +4384,43 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi
} }
@TestMetadata("normalInline.kt") @TestMetadata("normalInline.kt")
public void testNormalInline_1_2() throws Exception { public void testNormalInline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt");
}
@TestMetadata("normalInline.kt")
public void testNormalInline_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt", "kotlin.coroutines");
} }
@TestMetadata("numberOfSuspentions.kt") @TestMetadata("numberOfSuspentions.kt")
public void testNumberOfSuspentions_1_2() throws Exception { public void testNumberOfSuspentions() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt");
}
@TestMetadata("numberOfSuspentions.kt")
public void testNumberOfSuspentions_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt", "kotlin.coroutines");
} }
@TestMetadata("objectInsideLambdas.kt") @TestMetadata("objectInsideLambdas.kt")
public void testObjectInsideLambdas_1_2() throws Exception { public void testObjectInsideLambdas() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/objectInsideLambdas.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/objectInsideLambdas.kt");
}
@TestMetadata("objectInsideLambdas.kt")
public void testObjectInsideLambdas_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/objectInsideLambdas.kt", "kotlin.coroutines");
} }
@TestMetadata("oneInlineTwoCaptures.kt") @TestMetadata("oneInlineTwoCaptures.kt")
public void testOneInlineTwoCaptures_1_2() throws Exception { public void testOneInlineTwoCaptures() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/oneInlineTwoCaptures.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/oneInlineTwoCaptures.kt");
}
@TestMetadata("oneInlineTwoCaptures.kt")
public void testOneInlineTwoCaptures_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/oneInlineTwoCaptures.kt", "kotlin.coroutines");
} }
@TestMetadata("passLambda.kt") @TestMetadata("passLambda.kt")
public void testPassLambda_1_2() throws Exception { public void testPassLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/passLambda.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/passLambda.kt");
}
@TestMetadata("passLambda.kt")
public void testPassLambda_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/passLambda.kt", "kotlin.coroutines");
}
@TestMetadata("passParameterLambda.kt")
public void testPassParameterLambda_1_2() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameterLambda.kt", "kotlin.coroutines.experimental");
}
@TestMetadata("passParameterLambda.kt")
public void testPassParameterLambda_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameterLambda.kt", "kotlin.coroutines");
} }
@TestMetadata("passParameter.kt") @TestMetadata("passParameter.kt")
public void testPassParameter_1_2() throws Exception { public void testPassParameter() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameter.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameter.kt");
} }
@TestMetadata("passParameter.kt") @TestMetadata("passParameterLambda.kt")
public void testPassParameter_1_3() throws Exception { public void testPassParameterLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameter.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameterLambda.kt");
} }
@TestMetadata("unreachableSuspendMarker.kt") @TestMetadata("unreachableSuspendMarker.kt")
public void testUnreachableSuspendMarker_1_2() throws Exception { public void testUnreachableSuspendMarker() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/unreachableSuspendMarker.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/unreachableSuspendMarker.kt");
}
@TestMetadata("unreachableSuspendMarker.kt")
public void testUnreachableSuspendMarker_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/unreachableSuspendMarker.kt", "kotlin.coroutines");
} }
} }
} }
@@ -8,7 +8,6 @@ package org.jetbrains.kotlin.codegen;
import com.intellij.testFramework.TestDataPath; import com.intellij.testFramework.TestDataPath;
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
import org.jetbrains.kotlin.test.KotlinTestUtils; import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.TargetBackend;
import org.jetbrains.kotlin.test.TestMetadata; import org.jetbrains.kotlin.test.TestMetadata;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@@ -25,10 +24,6 @@ public class CompileKotlinAgainstKotlinTestGenerated extends AbstractCompileKotl
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.ANY, testDataFilePath);
}
public void testAllFilesPresentInCompileKotlinAgainstKotlin() throws Exception { public void testAllFilesPresentInCompileKotlinAgainstKotlin() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin"), Pattern.compile("^(.+)\\.kt$"), null, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin"), Pattern.compile("^(.+)\\.kt$"), null, true);
} }
@@ -99,13 +94,8 @@ public class CompileKotlinAgainstKotlinTestGenerated extends AbstractCompileKotl
} }
@TestMetadata("coroutinesBinary.kt") @TestMetadata("coroutinesBinary.kt")
public void testCoroutinesBinary_1_2() throws Exception { public void testCoroutinesBinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/compileKotlinAgainstKotlin/coroutinesBinary.kt", "kotlin.coroutines.experimental"); runTest("compiler/testData/compileKotlinAgainstKotlin/coroutinesBinary.kt");
}
@TestMetadata("coroutinesBinary.kt")
public void testCoroutinesBinary_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/compileKotlinAgainstKotlin/coroutinesBinary.kt", "kotlin.coroutines");
} }
@TestMetadata("defaultConstructor.kt") @TestMetadata("defaultConstructor.kt")
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -3967,22 +3967,18 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM_IR, testDataFilePath);
}
public void testAllFilesPresentInSuspend() throws Exception { public void testAllFilesPresentInSuspend() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
} }
@TestMetadata("capturedVariables.kt") @TestMetadata("capturedVariables.kt")
public void testCapturedVariables_1_3() throws Exception { public void testCapturedVariables() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt");
} }
@TestMetadata("crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt") @TestMetadata("crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt")
public void testCrossinlineSuspendLambdaInsideCrossinlineSuspendLambda_1_3() throws Exception { public void testCrossinlineSuspendLambdaInsideCrossinlineSuspendLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt");
} }
@TestMetadata("debugMetadataCrossinline.kt") @TestMetadata("debugMetadataCrossinline.kt")
@@ -3991,18 +3987,18 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli
} }
@TestMetadata("delegatedProperties.kt") @TestMetadata("delegatedProperties.kt")
public void testDelegatedProperties_1_3() throws Exception { public void testDelegatedProperties() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/delegatedProperties.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/delegatedProperties.kt");
} }
@TestMetadata("doubleRegenerationWithNonSuspendingLambda.kt") @TestMetadata("doubleRegenerationWithNonSuspendingLambda.kt")
public void testDoubleRegenerationWithNonSuspendingLambda_1_3() throws Exception { public void testDoubleRegenerationWithNonSuspendingLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/doubleRegenerationWithNonSuspendingLambda.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/doubleRegenerationWithNonSuspendingLambda.kt");
} }
@TestMetadata("enclodingMethod.kt") @TestMetadata("enclodingMethod.kt")
public void testEnclodingMethod_1_3() throws Exception { public void testEnclodingMethod() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/enclodingMethod.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/enclodingMethod.kt");
} }
@TestMetadata("fileNameInMetadata.kt") @TestMetadata("fileNameInMetadata.kt")
@@ -4011,18 +4007,18 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli
} }
@TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt")
public void testInlineOrdinaryOfCrossinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfCrossinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt");
} }
@TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt")
public void testInlineOrdinaryOfNoinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfNoinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt");
} }
@TestMetadata("inlineSuspendContinuation.kt") @TestMetadata("inlineSuspendContinuation.kt")
public void testInlineSuspendContinuation_1_3() throws Exception { public void testInlineSuspendContinuation() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendContinuation.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendContinuation.kt");
} }
@TestMetadata("inlineSuspendInMultifileClass.kt") @TestMetadata("inlineSuspendInMultifileClass.kt")
@@ -4031,38 +4027,38 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli
} }
@TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt")
public void testInlineSuspendOfCrossinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfCrossinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt");
} }
@TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt")
public void testInlineSuspendOfCrossinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfCrossinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt");
} }
@TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt")
public void testInlineSuspendOfNoinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfNoinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt");
} }
@TestMetadata("inlineSuspendOfNoinlineSuspend.kt") @TestMetadata("inlineSuspendOfNoinlineSuspend.kt")
public void testInlineSuspendOfNoinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfNoinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt");
} }
@TestMetadata("inlineSuspendOfOrdinary.kt") @TestMetadata("inlineSuspendOfOrdinary.kt")
public void testInlineSuspendOfOrdinary_1_3() throws Exception { public void testInlineSuspendOfOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt");
} }
@TestMetadata("inlineSuspendOfSuspend.kt") @TestMetadata("inlineSuspendOfSuspend.kt")
public void testInlineSuspendOfSuspend_1_3() throws Exception { public void testInlineSuspendOfSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt");
} }
@TestMetadata("jvmName.kt") @TestMetadata("jvmName.kt")
public void testJvmName_1_3() throws Exception { public void testJvmName() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/jvmName.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/jvmName.kt");
} }
@TestMetadata("kt26658.kt") @TestMetadata("kt26658.kt")
@@ -4071,18 +4067,18 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli
} }
@TestMetadata("maxStackWithCrossinline.kt") @TestMetadata("maxStackWithCrossinline.kt")
public void testMaxStackWithCrossinline_1_3() throws Exception { public void testMaxStackWithCrossinline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/maxStackWithCrossinline.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/maxStackWithCrossinline.kt");
} }
@TestMetadata("multipleLocals.kt") @TestMetadata("multipleLocals.kt")
public void testMultipleLocals_1_3() throws Exception { public void testMultipleLocals() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt");
} }
@TestMetadata("multipleSuspensionPoints.kt") @TestMetadata("multipleSuspensionPoints.kt")
public void testMultipleSuspensionPoints_1_3() throws Exception { public void testMultipleSuspensionPoints() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt");
} }
@TestMetadata("nestedMethodWith2XParameter.kt") @TestMetadata("nestedMethodWith2XParameter.kt")
@@ -4096,23 +4092,23 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli
} }
@TestMetadata("nonSuspendCrossinline.kt") @TestMetadata("nonSuspendCrossinline.kt")
public void testNonSuspendCrossinline_1_3() throws Exception { public void testNonSuspendCrossinline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/nonSuspendCrossinline.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/nonSuspendCrossinline.kt");
} }
@TestMetadata("returnValue.kt") @TestMetadata("returnValue.kt")
public void testReturnValue_1_3() throws Exception { public void testReturnValue() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/returnValue.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/returnValue.kt");
} }
@TestMetadata("tryCatchReceiver.kt") @TestMetadata("tryCatchReceiver.kt")
public void testTryCatchReceiver_1_3() throws Exception { public void testTryCatchReceiver() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/tryCatchReceiver.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/tryCatchReceiver.kt");
} }
@TestMetadata("tryCatchStackTransform.kt") @TestMetadata("tryCatchStackTransform.kt")
public void testTryCatchStackTransform_1_3() throws Exception { public void testTryCatchStackTransform() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt");
} }
@TestMetadata("twiceRegeneratedAnonymousObject.kt") @TestMetadata("twiceRegeneratedAnonymousObject.kt")
@@ -4171,17 +4167,13 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM_IR, testDataFilePath);
}
public void testAllFilesPresentInDefaultParameter() throws Exception { public void testAllFilesPresentInDefaultParameter() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/defaultParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/defaultParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
} }
@TestMetadata("defaultValueCrossinline.kt") @TestMetadata("defaultValueCrossinline.kt")
public void testDefaultValueCrossinline_1_3() throws Exception { public void testDefaultValueCrossinline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt");
} }
@TestMetadata("defaultValueInClass.kt") @TestMetadata("defaultValueInClass.kt")
@@ -4189,14 +4181,14 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli
runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInClass.kt"); runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInClass.kt");
} }
@TestMetadata("defaultValueInlineFromMultiFileFacade.kt") @TestMetadata("defaultValueInline.kt")
public void testDefaultValueInlineFromMultiFileFacade_1_3() throws Exception { public void testDefaultValueInline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInlineFromMultiFileFacade.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt");
} }
@TestMetadata("defaultValueInline.kt") @TestMetadata("defaultValueInlineFromMultiFileFacade.kt")
public void testDefaultValueInline_1_3() throws Exception { public void testDefaultValueInlineFromMultiFileFacade() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInlineFromMultiFileFacade.kt");
} }
} }
@@ -4264,52 +4256,48 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM_IR, testDataFilePath);
}
public void testAllFilesPresentInReceiver() throws Exception { public void testAllFilesPresentInReceiver() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/receiver"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/receiver"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
} }
@TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt")
public void testInlineOrdinaryOfCrossinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfCrossinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt");
} }
@TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt")
public void testInlineOrdinaryOfNoinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfNoinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt");
} }
@TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt")
public void testInlineSuspendOfCrossinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfCrossinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt");
} }
@TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt")
public void testInlineSuspendOfCrossinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfCrossinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt");
} }
@TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt")
public void testInlineSuspendOfNoinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfNoinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt");
} }
@TestMetadata("inlineSuspendOfNoinlineSuspend.kt") @TestMetadata("inlineSuspendOfNoinlineSuspend.kt")
public void testInlineSuspendOfNoinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfNoinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt");
} }
@TestMetadata("inlineSuspendOfOrdinary.kt") @TestMetadata("inlineSuspendOfOrdinary.kt")
public void testInlineSuspendOfOrdinary_1_3() throws Exception { public void testInlineSuspendOfOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt");
} }
@TestMetadata("inlineSuspendOfSuspend.kt") @TestMetadata("inlineSuspendOfSuspend.kt")
public void testInlineSuspendOfSuspend_1_3() throws Exception { public void testInlineSuspendOfSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt");
} }
} }
@@ -4321,77 +4309,73 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM_IR, testDataFilePath);
}
public void testAllFilesPresentInStateMachine() throws Exception { public void testAllFilesPresentInStateMachine() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/stateMachine"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/stateMachine"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
} }
@TestMetadata("crossingCoroutineBoundaries.kt") @TestMetadata("crossingCoroutineBoundaries.kt")
public void testCrossingCoroutineBoundaries_1_3() throws Exception { public void testCrossingCoroutineBoundaries() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/crossingCoroutineBoundaries.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/crossingCoroutineBoundaries.kt");
} }
@TestMetadata("independentInline.kt") @TestMetadata("independentInline.kt")
public void testIndependentInline_1_3() throws Exception { public void testIndependentInline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/independentInline.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/independentInline.kt");
}
@TestMetadata("innerLambdaInsideLambda.kt")
public void testInnerLambdaInsideLambda_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt", "kotlin.coroutines");
}
@TestMetadata("innerLambdaWithoutCrossinline.kt")
public void testInnerLambdaWithoutCrossinline_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt", "kotlin.coroutines");
} }
@TestMetadata("innerLambda.kt") @TestMetadata("innerLambda.kt")
public void testInnerLambda_1_3() throws Exception { public void testInnerLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt");
} }
@TestMetadata("innerMadnessCallSite.kt") @TestMetadata("innerLambdaInsideLambda.kt")
public void testInnerMadnessCallSite_1_3() throws Exception { public void testInnerLambdaInsideLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt");
}
@TestMetadata("innerLambdaWithoutCrossinline.kt")
public void testInnerLambdaWithoutCrossinline() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt");
} }
@TestMetadata("innerMadness.kt") @TestMetadata("innerMadness.kt")
public void testInnerMadness_1_3() throws Exception { public void testInnerMadness() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt");
} }
@TestMetadata("innerObjectInsideInnerObject.kt") @TestMetadata("innerMadnessCallSite.kt")
public void testInnerObjectInsideInnerObject_1_3() throws Exception { public void testInnerMadnessCallSite() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt");
}
@TestMetadata("innerObjectRetransformation.kt")
public void testInnerObjectRetransformation_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectRetransformation.kt", "kotlin.coroutines");
}
@TestMetadata("innerObjectSeveralFunctions.kt")
public void testInnerObjectSeveralFunctions_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt", "kotlin.coroutines");
}
@TestMetadata("innerObjectWithoutCapturingCrossinline.kt")
public void testInnerObjectWithoutCapturingCrossinline_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt", "kotlin.coroutines");
} }
@TestMetadata("innerObject.kt") @TestMetadata("innerObject.kt")
public void testInnerObject_1_3() throws Exception { public void testInnerObject() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt");
}
@TestMetadata("innerObjectInsideInnerObject.kt")
public void testInnerObjectInsideInnerObject() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt");
}
@TestMetadata("innerObjectRetransformation.kt")
public void testInnerObjectRetransformation() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectRetransformation.kt");
}
@TestMetadata("innerObjectSeveralFunctions.kt")
public void testInnerObjectSeveralFunctions() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt");
}
@TestMetadata("innerObjectWithoutCapturingCrossinline.kt")
public void testInnerObjectWithoutCapturingCrossinline() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt");
} }
@TestMetadata("insideObject.kt") @TestMetadata("insideObject.kt")
public void testInsideObject_1_3() throws Exception { public void testInsideObject() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/insideObject.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/insideObject.kt");
} }
@TestMetadata("lambdaTransformation.kt") @TestMetadata("lambdaTransformation.kt")
@@ -4400,43 +4384,43 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli
} }
@TestMetadata("normalInline.kt") @TestMetadata("normalInline.kt")
public void testNormalInline_1_3() throws Exception { public void testNormalInline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt");
} }
@TestMetadata("numberOfSuspentions.kt") @TestMetadata("numberOfSuspentions.kt")
public void testNumberOfSuspentions_1_3() throws Exception { public void testNumberOfSuspentions() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt");
} }
@TestMetadata("objectInsideLambdas.kt") @TestMetadata("objectInsideLambdas.kt")
public void testObjectInsideLambdas_1_3() throws Exception { public void testObjectInsideLambdas() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/objectInsideLambdas.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/objectInsideLambdas.kt");
} }
@TestMetadata("oneInlineTwoCaptures.kt") @TestMetadata("oneInlineTwoCaptures.kt")
public void testOneInlineTwoCaptures_1_3() throws Exception { public void testOneInlineTwoCaptures() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/oneInlineTwoCaptures.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/oneInlineTwoCaptures.kt");
} }
@TestMetadata("passLambda.kt") @TestMetadata("passLambda.kt")
public void testPassLambda_1_3() throws Exception { public void testPassLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/passLambda.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/passLambda.kt");
}
@TestMetadata("passParameterLambda.kt")
public void testPassParameterLambda_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameterLambda.kt", "kotlin.coroutines");
} }
@TestMetadata("passParameter.kt") @TestMetadata("passParameter.kt")
public void testPassParameter_1_3() throws Exception { public void testPassParameter() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameter.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameter.kt");
}
@TestMetadata("passParameterLambda.kt")
public void testPassParameterLambda() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameterLambda.kt");
} }
@TestMetadata("unreachableSuspendMarker.kt") @TestMetadata("unreachableSuspendMarker.kt")
public void testUnreachableSuspendMarker_1_3() throws Exception { public void testUnreachableSuspendMarker() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/unreachableSuspendMarker.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/unreachableSuspendMarker.kt");
} }
} }
} }
@@ -674,32 +674,28 @@ public class IrBytecodeListingTestGenerated extends AbstractIrBytecodeListingTes
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM_IR, testDataFilePath);
}
public void testAllFilesPresentInCoroutines() throws Exception { public void testAllFilesPresentInCoroutines() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/coroutines"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/coroutines"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
} }
@TestMetadata("coroutineContextIntrinsic.kt") @TestMetadata("coroutineContextIntrinsic.kt")
public void testCoroutineContextIntrinsic_1_3() throws Exception { public void testCoroutineContextIntrinsic() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeListing/coroutines/coroutineContextIntrinsic.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/bytecodeListing/coroutines/coroutineContextIntrinsic.kt");
} }
@TestMetadata("coroutineFields.kt") @TestMetadata("coroutineFields.kt")
public void testCoroutineFields_1_3() throws Exception { public void testCoroutineFields() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeListing/coroutines/coroutineFields.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/bytecodeListing/coroutines/coroutineFields.kt");
} }
@TestMetadata("oomInReturnUnit.kt") @TestMetadata("oomInReturnUnit.kt")
public void testOomInReturnUnit_1_3() throws Exception { public void testOomInReturnUnit() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeListing/coroutines/oomInReturnUnit.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/bytecodeListing/coroutines/oomInReturnUnit.kt");
} }
@TestMetadata("privateAccessor.kt") @TestMetadata("privateAccessor.kt")
public void testPrivateAccessor_1_3() throws Exception { public void testPrivateAccessor() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeListing/coroutines/privateAccessor.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/bytecodeListing/coroutines/privateAccessor.kt");
} }
@TestMetadata("privateSuspendFun.kt") @TestMetadata("privateSuspendFun.kt")
@@ -713,13 +709,13 @@ public class IrBytecodeListingTestGenerated extends AbstractIrBytecodeListingTes
} }
@TestMetadata("suspendReifiedFun.kt") @TestMetadata("suspendReifiedFun.kt")
public void testSuspendReifiedFun_1_3() throws Exception { public void testSuspendReifiedFun() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeListing/coroutines/suspendReifiedFun.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/bytecodeListing/coroutines/suspendReifiedFun.kt");
} }
@TestMetadata("tcoContinuation.kt") @TestMetadata("tcoContinuation.kt")
public void testTcoContinuation_1_3() throws Exception { public void testTcoContinuation() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeListing/coroutines/tcoContinuation.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/bytecodeListing/coroutines/tcoContinuation.kt");
} }
@TestMetadata("compiler/testData/codegen/bytecodeListing/coroutines/spilling") @TestMetadata("compiler/testData/codegen/bytecodeListing/coroutines/spilling")
@@ -1413,10 +1413,6 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM_IR, testDataFilePath);
}
public void testAllFilesPresentInCoroutines() throws Exception { public void testAllFilesPresentInCoroutines() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/coroutines"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/coroutines"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
} }
@@ -1447,8 +1443,8 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest {
} }
@TestMetadata("returnUnitInLambda.kt") @TestMetadata("returnUnitInLambda.kt")
public void testReturnUnitInLambda_1_3() throws Exception { public void testReturnUnitInLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/returnUnitInLambda.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/bytecodeText/coroutines/returnUnitInLambda.kt");
} }
@TestMetadata("suspendMain.kt") @TestMetadata("suspendMain.kt")
@@ -1626,62 +1622,58 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM_IR, testDataFilePath);
}
public void testAllFilesPresentInIntLikeVarSpilling() throws Exception { public void testAllFilesPresentInIntLikeVarSpilling() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
} }
@TestMetadata("complicatedMerge.kt") @TestMetadata("complicatedMerge.kt")
public void testComplicatedMerge_1_3() throws Exception { public void testComplicatedMerge() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/complicatedMerge.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/complicatedMerge.kt");
} }
@TestMetadata("i2bResult.kt") @TestMetadata("i2bResult.kt")
public void testI2bResult_1_3() throws Exception { public void testI2bResult() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/i2bResult.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/i2bResult.kt");
} }
@TestMetadata("loadFromBooleanArray.kt") @TestMetadata("loadFromBooleanArray.kt")
public void testLoadFromBooleanArray_1_3() throws Exception { public void testLoadFromBooleanArray() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/loadFromBooleanArray.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/loadFromBooleanArray.kt");
} }
@TestMetadata("loadFromByteArray.kt") @TestMetadata("loadFromByteArray.kt")
public void testLoadFromByteArray_1_3() throws Exception { public void testLoadFromByteArray() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/loadFromByteArray.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/loadFromByteArray.kt");
} }
@TestMetadata("noVariableInTable.kt") @TestMetadata("noVariableInTable.kt")
public void testNoVariableInTable_1_3() throws Exception { public void testNoVariableInTable() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/noVariableInTable.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/noVariableInTable.kt");
} }
@TestMetadata("sameIconst1ManyVars.kt") @TestMetadata("sameIconst1ManyVars.kt")
public void testSameIconst1ManyVars_1_3() throws Exception { public void testSameIconst1ManyVars() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/sameIconst1ManyVars.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/sameIconst1ManyVars.kt");
} }
@TestMetadata("usedInArrayStore.kt") @TestMetadata("usedInArrayStore.kt")
public void testUsedInArrayStore_1_3() throws Exception { public void testUsedInArrayStore() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInArrayStore.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInArrayStore.kt");
} }
@TestMetadata("usedInMethodCall.kt") @TestMetadata("usedInMethodCall.kt")
public void testUsedInMethodCall_1_3() throws Exception { public void testUsedInMethodCall() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInMethodCall.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInMethodCall.kt");
} }
@TestMetadata("usedInPutfield.kt") @TestMetadata("usedInPutfield.kt")
public void testUsedInPutfield_1_3() throws Exception { public void testUsedInPutfield() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInPutfield.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInPutfield.kt");
} }
@TestMetadata("usedInVarStore.kt") @TestMetadata("usedInVarStore.kt")
public void testUsedInVarStore_1_3() throws Exception { public void testUsedInVarStore() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInVarStore.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInVarStore.kt");
} }
} }
@@ -3967,22 +3967,18 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: ");
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: ");
}
public void testAllFilesPresentInSuspend() throws Exception { public void testAllFilesPresentInSuspend() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
} }
@TestMetadata("capturedVariables.kt") @TestMetadata("capturedVariables.kt")
public void testCapturedVariables_1_3() throws Exception { public void testCapturedVariables() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt");
} }
@TestMetadata("crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt") @TestMetadata("crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt")
public void testCrossinlineSuspendLambdaInsideCrossinlineSuspendLambda_1_3() throws Exception { public void testCrossinlineSuspendLambdaInsideCrossinlineSuspendLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt");
} }
@TestMetadata("debugMetadataCrossinline.kt") @TestMetadata("debugMetadataCrossinline.kt")
@@ -3991,18 +3987,18 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC
} }
@TestMetadata("delegatedProperties.kt") @TestMetadata("delegatedProperties.kt")
public void testDelegatedProperties_1_3() throws Exception { public void testDelegatedProperties() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/delegatedProperties.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/delegatedProperties.kt");
} }
@TestMetadata("doubleRegenerationWithNonSuspendingLambda.kt") @TestMetadata("doubleRegenerationWithNonSuspendingLambda.kt")
public void testDoubleRegenerationWithNonSuspendingLambda_1_3() throws Exception { public void testDoubleRegenerationWithNonSuspendingLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/doubleRegenerationWithNonSuspendingLambda.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/doubleRegenerationWithNonSuspendingLambda.kt");
} }
@TestMetadata("enclodingMethod.kt") @TestMetadata("enclodingMethod.kt")
public void testEnclodingMethod_1_3() throws Exception { public void testEnclodingMethod() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/enclodingMethod.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/enclodingMethod.kt");
} }
@TestMetadata("fileNameInMetadata.kt") @TestMetadata("fileNameInMetadata.kt")
@@ -4011,18 +4007,18 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC
} }
@TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt")
public void testInlineOrdinaryOfCrossinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfCrossinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt");
} }
@TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt")
public void testInlineOrdinaryOfNoinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfNoinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt");
} }
@TestMetadata("inlineSuspendContinuation.kt") @TestMetadata("inlineSuspendContinuation.kt")
public void testInlineSuspendContinuation_1_3() throws Exception { public void testInlineSuspendContinuation() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendContinuation.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendContinuation.kt");
} }
@TestMetadata("inlineSuspendInMultifileClass.kt") @TestMetadata("inlineSuspendInMultifileClass.kt")
@@ -4031,38 +4027,38 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC
} }
@TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt")
public void testInlineSuspendOfCrossinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfCrossinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt");
} }
@TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt")
public void testInlineSuspendOfCrossinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfCrossinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt");
} }
@TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt")
public void testInlineSuspendOfNoinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfNoinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt");
} }
@TestMetadata("inlineSuspendOfNoinlineSuspend.kt") @TestMetadata("inlineSuspendOfNoinlineSuspend.kt")
public void testInlineSuspendOfNoinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfNoinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt");
} }
@TestMetadata("inlineSuspendOfOrdinary.kt") @TestMetadata("inlineSuspendOfOrdinary.kt")
public void testInlineSuspendOfOrdinary_1_3() throws Exception { public void testInlineSuspendOfOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt");
} }
@TestMetadata("inlineSuspendOfSuspend.kt") @TestMetadata("inlineSuspendOfSuspend.kt")
public void testInlineSuspendOfSuspend_1_3() throws Exception { public void testInlineSuspendOfSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt");
} }
@TestMetadata("jvmName.kt") @TestMetadata("jvmName.kt")
public void testJvmName_1_3() throws Exception { public void testJvmName() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/jvmName.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/jvmName.kt");
} }
@TestMetadata("kt26658.kt") @TestMetadata("kt26658.kt")
@@ -4071,18 +4067,18 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC
} }
@TestMetadata("maxStackWithCrossinline.kt") @TestMetadata("maxStackWithCrossinline.kt")
public void testMaxStackWithCrossinline_1_3() throws Exception { public void testMaxStackWithCrossinline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/maxStackWithCrossinline.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/maxStackWithCrossinline.kt");
} }
@TestMetadata("multipleLocals.kt") @TestMetadata("multipleLocals.kt")
public void testMultipleLocals_1_3() throws Exception { public void testMultipleLocals() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt");
} }
@TestMetadata("multipleSuspensionPoints.kt") @TestMetadata("multipleSuspensionPoints.kt")
public void testMultipleSuspensionPoints_1_3() throws Exception { public void testMultipleSuspensionPoints() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt");
} }
@TestMetadata("nestedMethodWith2XParameter.kt") @TestMetadata("nestedMethodWith2XParameter.kt")
@@ -4096,23 +4092,23 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC
} }
@TestMetadata("nonSuspendCrossinline.kt") @TestMetadata("nonSuspendCrossinline.kt")
public void testNonSuspendCrossinline_1_3() throws Exception { public void testNonSuspendCrossinline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/nonSuspendCrossinline.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/nonSuspendCrossinline.kt");
} }
@TestMetadata("returnValue.kt") @TestMetadata("returnValue.kt")
public void testReturnValue_1_3() throws Exception { public void testReturnValue() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/returnValue.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/returnValue.kt");
} }
@TestMetadata("tryCatchReceiver.kt") @TestMetadata("tryCatchReceiver.kt")
public void testTryCatchReceiver_1_3() throws Exception { public void testTryCatchReceiver() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/tryCatchReceiver.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/tryCatchReceiver.kt");
} }
@TestMetadata("tryCatchStackTransform.kt") @TestMetadata("tryCatchStackTransform.kt")
public void testTryCatchStackTransform_1_3() throws Exception { public void testTryCatchStackTransform() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt");
} }
@TestMetadata("twiceRegeneratedAnonymousObject.kt") @TestMetadata("twiceRegeneratedAnonymousObject.kt")
@@ -4171,17 +4167,13 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: ");
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: ");
}
public void testAllFilesPresentInDefaultParameter() throws Exception { public void testAllFilesPresentInDefaultParameter() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/defaultParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/defaultParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
} }
@TestMetadata("defaultValueCrossinline.kt") @TestMetadata("defaultValueCrossinline.kt")
public void testDefaultValueCrossinline_1_3() throws Exception { public void testDefaultValueCrossinline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt");
} }
@TestMetadata("defaultValueInClass.kt") @TestMetadata("defaultValueInClass.kt")
@@ -4189,14 +4181,14 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC
runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInClass.kt"); runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInClass.kt");
} }
@TestMetadata("defaultValueInlineFromMultiFileFacade.kt") @TestMetadata("defaultValueInline.kt")
public void testDefaultValueInlineFromMultiFileFacade_1_3() throws Exception { public void testDefaultValueInline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInlineFromMultiFileFacade.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt");
} }
@TestMetadata("defaultValueInline.kt") @TestMetadata("defaultValueInlineFromMultiFileFacade.kt")
public void testDefaultValueInline_1_3() throws Exception { public void testDefaultValueInlineFromMultiFileFacade() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInlineFromMultiFileFacade.kt");
} }
} }
@@ -4264,52 +4256,48 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: ");
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: ");
}
public void testAllFilesPresentInReceiver() throws Exception { public void testAllFilesPresentInReceiver() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/receiver"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/receiver"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
} }
@TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt")
public void testInlineOrdinaryOfCrossinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfCrossinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt");
} }
@TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt")
public void testInlineOrdinaryOfNoinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfNoinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt");
} }
@TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt")
public void testInlineSuspendOfCrossinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfCrossinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt");
} }
@TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt")
public void testInlineSuspendOfCrossinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfCrossinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt");
} }
@TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt")
public void testInlineSuspendOfNoinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfNoinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt");
} }
@TestMetadata("inlineSuspendOfNoinlineSuspend.kt") @TestMetadata("inlineSuspendOfNoinlineSuspend.kt")
public void testInlineSuspendOfNoinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfNoinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt");
} }
@TestMetadata("inlineSuspendOfOrdinary.kt") @TestMetadata("inlineSuspendOfOrdinary.kt")
public void testInlineSuspendOfOrdinary_1_3() throws Exception { public void testInlineSuspendOfOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt");
} }
@TestMetadata("inlineSuspendOfSuspend.kt") @TestMetadata("inlineSuspendOfSuspend.kt")
public void testInlineSuspendOfSuspend_1_3() throws Exception { public void testInlineSuspendOfSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt");
} }
} }
@@ -4321,77 +4309,73 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: ");
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: ");
}
public void testAllFilesPresentInStateMachine() throws Exception { public void testAllFilesPresentInStateMachine() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/stateMachine"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/stateMachine"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
} }
@TestMetadata("crossingCoroutineBoundaries.kt") @TestMetadata("crossingCoroutineBoundaries.kt")
public void testCrossingCoroutineBoundaries_1_3() throws Exception { public void testCrossingCoroutineBoundaries() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/crossingCoroutineBoundaries.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/crossingCoroutineBoundaries.kt");
} }
@TestMetadata("independentInline.kt") @TestMetadata("independentInline.kt")
public void testIndependentInline_1_3() throws Exception { public void testIndependentInline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/independentInline.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/independentInline.kt");
}
@TestMetadata("innerLambdaInsideLambda.kt")
public void testInnerLambdaInsideLambda_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt", "kotlin.coroutines");
}
@TestMetadata("innerLambdaWithoutCrossinline.kt")
public void testInnerLambdaWithoutCrossinline_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt", "kotlin.coroutines");
} }
@TestMetadata("innerLambda.kt") @TestMetadata("innerLambda.kt")
public void testInnerLambda_1_3() throws Exception { public void testInnerLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt");
} }
@TestMetadata("innerMadnessCallSite.kt") @TestMetadata("innerLambdaInsideLambda.kt")
public void testInnerMadnessCallSite_1_3() throws Exception { public void testInnerLambdaInsideLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt");
}
@TestMetadata("innerLambdaWithoutCrossinline.kt")
public void testInnerLambdaWithoutCrossinline() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt");
} }
@TestMetadata("innerMadness.kt") @TestMetadata("innerMadness.kt")
public void testInnerMadness_1_3() throws Exception { public void testInnerMadness() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt");
} }
@TestMetadata("innerObjectInsideInnerObject.kt") @TestMetadata("innerMadnessCallSite.kt")
public void testInnerObjectInsideInnerObject_1_3() throws Exception { public void testInnerMadnessCallSite() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt");
}
@TestMetadata("innerObjectRetransformation.kt")
public void testInnerObjectRetransformation_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectRetransformation.kt", "kotlin.coroutines");
}
@TestMetadata("innerObjectSeveralFunctions.kt")
public void testInnerObjectSeveralFunctions_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt", "kotlin.coroutines");
}
@TestMetadata("innerObjectWithoutCapturingCrossinline.kt")
public void testInnerObjectWithoutCapturingCrossinline_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt", "kotlin.coroutines");
} }
@TestMetadata("innerObject.kt") @TestMetadata("innerObject.kt")
public void testInnerObject_1_3() throws Exception { public void testInnerObject() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt");
}
@TestMetadata("innerObjectInsideInnerObject.kt")
public void testInnerObjectInsideInnerObject() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt");
}
@TestMetadata("innerObjectRetransformation.kt")
public void testInnerObjectRetransformation() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectRetransformation.kt");
}
@TestMetadata("innerObjectSeveralFunctions.kt")
public void testInnerObjectSeveralFunctions() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt");
}
@TestMetadata("innerObjectWithoutCapturingCrossinline.kt")
public void testInnerObjectWithoutCapturingCrossinline() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt");
} }
@TestMetadata("insideObject.kt") @TestMetadata("insideObject.kt")
public void testInsideObject_1_3() throws Exception { public void testInsideObject() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/insideObject.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/insideObject.kt");
} }
@TestMetadata("lambdaTransformation.kt") @TestMetadata("lambdaTransformation.kt")
@@ -4400,43 +4384,43 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC
} }
@TestMetadata("normalInline.kt") @TestMetadata("normalInline.kt")
public void testNormalInline_1_3() throws Exception { public void testNormalInline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt");
} }
@TestMetadata("numberOfSuspentions.kt") @TestMetadata("numberOfSuspentions.kt")
public void testNumberOfSuspentions_1_3() throws Exception { public void testNumberOfSuspentions() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt");
} }
@TestMetadata("objectInsideLambdas.kt") @TestMetadata("objectInsideLambdas.kt")
public void testObjectInsideLambdas_1_3() throws Exception { public void testObjectInsideLambdas() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/objectInsideLambdas.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/objectInsideLambdas.kt");
} }
@TestMetadata("oneInlineTwoCaptures.kt") @TestMetadata("oneInlineTwoCaptures.kt")
public void testOneInlineTwoCaptures_1_3() throws Exception { public void testOneInlineTwoCaptures() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/oneInlineTwoCaptures.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/oneInlineTwoCaptures.kt");
} }
@TestMetadata("passLambda.kt") @TestMetadata("passLambda.kt")
public void testPassLambda_1_3() throws Exception { public void testPassLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/passLambda.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/passLambda.kt");
}
@TestMetadata("passParameterLambda.kt")
public void testPassParameterLambda_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameterLambda.kt", "kotlin.coroutines");
} }
@TestMetadata("passParameter.kt") @TestMetadata("passParameter.kt")
public void testPassParameter_1_3() throws Exception { public void testPassParameter() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameter.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameter.kt");
}
@TestMetadata("passParameterLambda.kt")
public void testPassParameterLambda() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameterLambda.kt");
} }
@TestMetadata("unreachableSuspendMarker.kt") @TestMetadata("unreachableSuspendMarker.kt")
public void testUnreachableSuspendMarker_1_3() throws Exception { public void testUnreachableSuspendMarker() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/unreachableSuspendMarker.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/unreachableSuspendMarker.kt");
} }
} }
} }
@@ -25,10 +25,6 @@ public class IrCompileKotlinAgainstKotlinTestGenerated extends AbstractIrCompile
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM_IR, testDataFilePath);
}
public void testAllFilesPresentInCompileKotlinAgainstKotlin() throws Exception { public void testAllFilesPresentInCompileKotlinAgainstKotlin() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
} }
@@ -99,8 +95,8 @@ public class IrCompileKotlinAgainstKotlinTestGenerated extends AbstractIrCompile
} }
@TestMetadata("coroutinesBinary.kt") @TestMetadata("coroutinesBinary.kt")
public void testCoroutinesBinary_1_3() throws Exception { public void testCoroutinesBinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/compileKotlinAgainstKotlin/coroutinesBinary.kt", "kotlin.coroutines"); runTest("compiler/testData/compileKotlinAgainstKotlin/coroutinesBinary.kt");
} }
@TestMetadata("defaultConstructor.kt") @TestMetadata("defaultConstructor.kt")
@@ -3967,22 +3967,18 @@ public class JvmIrAgainstOldBoxInlineTestGenerated extends AbstractJvmIrAgainstO
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: ");
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: ");
}
public void testAllFilesPresentInSuspend() throws Exception { public void testAllFilesPresentInSuspend() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true);
} }
@TestMetadata("capturedVariables.kt") @TestMetadata("capturedVariables.kt")
public void testCapturedVariables_1_3() throws Exception { public void testCapturedVariables() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt");
} }
@TestMetadata("crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt") @TestMetadata("crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt")
public void testCrossinlineSuspendLambdaInsideCrossinlineSuspendLambda_1_3() throws Exception { public void testCrossinlineSuspendLambdaInsideCrossinlineSuspendLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt");
} }
@TestMetadata("debugMetadataCrossinline.kt") @TestMetadata("debugMetadataCrossinline.kt")
@@ -3991,18 +3987,18 @@ public class JvmIrAgainstOldBoxInlineTestGenerated extends AbstractJvmIrAgainstO
} }
@TestMetadata("delegatedProperties.kt") @TestMetadata("delegatedProperties.kt")
public void testDelegatedProperties_1_3() throws Exception { public void testDelegatedProperties() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/delegatedProperties.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/delegatedProperties.kt");
} }
@TestMetadata("doubleRegenerationWithNonSuspendingLambda.kt") @TestMetadata("doubleRegenerationWithNonSuspendingLambda.kt")
public void testDoubleRegenerationWithNonSuspendingLambda_1_3() throws Exception { public void testDoubleRegenerationWithNonSuspendingLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/doubleRegenerationWithNonSuspendingLambda.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/doubleRegenerationWithNonSuspendingLambda.kt");
} }
@TestMetadata("enclodingMethod.kt") @TestMetadata("enclodingMethod.kt")
public void testEnclodingMethod_1_3() throws Exception { public void testEnclodingMethod() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/enclodingMethod.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/enclodingMethod.kt");
} }
@TestMetadata("fileNameInMetadata.kt") @TestMetadata("fileNameInMetadata.kt")
@@ -4011,18 +4007,18 @@ public class JvmIrAgainstOldBoxInlineTestGenerated extends AbstractJvmIrAgainstO
} }
@TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt")
public void testInlineOrdinaryOfCrossinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfCrossinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt");
} }
@TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt")
public void testInlineOrdinaryOfNoinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfNoinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt");
} }
@TestMetadata("inlineSuspendContinuation.kt") @TestMetadata("inlineSuspendContinuation.kt")
public void testInlineSuspendContinuation_1_3() throws Exception { public void testInlineSuspendContinuation() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendContinuation.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendContinuation.kt");
} }
@TestMetadata("inlineSuspendInMultifileClass.kt") @TestMetadata("inlineSuspendInMultifileClass.kt")
@@ -4031,38 +4027,38 @@ public class JvmIrAgainstOldBoxInlineTestGenerated extends AbstractJvmIrAgainstO
} }
@TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt")
public void testInlineSuspendOfCrossinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfCrossinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt");
} }
@TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt")
public void testInlineSuspendOfCrossinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfCrossinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt");
} }
@TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt")
public void testInlineSuspendOfNoinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfNoinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt");
} }
@TestMetadata("inlineSuspendOfNoinlineSuspend.kt") @TestMetadata("inlineSuspendOfNoinlineSuspend.kt")
public void testInlineSuspendOfNoinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfNoinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt");
} }
@TestMetadata("inlineSuspendOfOrdinary.kt") @TestMetadata("inlineSuspendOfOrdinary.kt")
public void testInlineSuspendOfOrdinary_1_3() throws Exception { public void testInlineSuspendOfOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt");
} }
@TestMetadata("inlineSuspendOfSuspend.kt") @TestMetadata("inlineSuspendOfSuspend.kt")
public void testInlineSuspendOfSuspend_1_3() throws Exception { public void testInlineSuspendOfSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt");
} }
@TestMetadata("jvmName.kt") @TestMetadata("jvmName.kt")
public void testJvmName_1_3() throws Exception { public void testJvmName() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/jvmName.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/jvmName.kt");
} }
@TestMetadata("kt26658.kt") @TestMetadata("kt26658.kt")
@@ -4071,18 +4067,18 @@ public class JvmIrAgainstOldBoxInlineTestGenerated extends AbstractJvmIrAgainstO
} }
@TestMetadata("maxStackWithCrossinline.kt") @TestMetadata("maxStackWithCrossinline.kt")
public void testMaxStackWithCrossinline_1_3() throws Exception { public void testMaxStackWithCrossinline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/maxStackWithCrossinline.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/maxStackWithCrossinline.kt");
} }
@TestMetadata("multipleLocals.kt") @TestMetadata("multipleLocals.kt")
public void testMultipleLocals_1_3() throws Exception { public void testMultipleLocals() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt");
} }
@TestMetadata("multipleSuspensionPoints.kt") @TestMetadata("multipleSuspensionPoints.kt")
public void testMultipleSuspensionPoints_1_3() throws Exception { public void testMultipleSuspensionPoints() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt");
} }
@TestMetadata("nestedMethodWith2XParameter.kt") @TestMetadata("nestedMethodWith2XParameter.kt")
@@ -4096,23 +4092,23 @@ public class JvmIrAgainstOldBoxInlineTestGenerated extends AbstractJvmIrAgainstO
} }
@TestMetadata("nonSuspendCrossinline.kt") @TestMetadata("nonSuspendCrossinline.kt")
public void testNonSuspendCrossinline_1_3() throws Exception { public void testNonSuspendCrossinline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/nonSuspendCrossinline.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/nonSuspendCrossinline.kt");
} }
@TestMetadata("returnValue.kt") @TestMetadata("returnValue.kt")
public void testReturnValue_1_3() throws Exception { public void testReturnValue() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/returnValue.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/returnValue.kt");
} }
@TestMetadata("tryCatchReceiver.kt") @TestMetadata("tryCatchReceiver.kt")
public void testTryCatchReceiver_1_3() throws Exception { public void testTryCatchReceiver() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/tryCatchReceiver.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/tryCatchReceiver.kt");
} }
@TestMetadata("tryCatchStackTransform.kt") @TestMetadata("tryCatchStackTransform.kt")
public void testTryCatchStackTransform_1_3() throws Exception { public void testTryCatchStackTransform() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt");
} }
@TestMetadata("twiceRegeneratedAnonymousObject.kt") @TestMetadata("twiceRegeneratedAnonymousObject.kt")
@@ -4171,17 +4167,13 @@ public class JvmIrAgainstOldBoxInlineTestGenerated extends AbstractJvmIrAgainstO
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: ");
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: ");
}
public void testAllFilesPresentInDefaultParameter() throws Exception { public void testAllFilesPresentInDefaultParameter() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/defaultParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/defaultParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true);
} }
@TestMetadata("defaultValueCrossinline.kt") @TestMetadata("defaultValueCrossinline.kt")
public void testDefaultValueCrossinline_1_3() throws Exception { public void testDefaultValueCrossinline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt");
} }
@TestMetadata("defaultValueInClass.kt") @TestMetadata("defaultValueInClass.kt")
@@ -4189,14 +4181,14 @@ public class JvmIrAgainstOldBoxInlineTestGenerated extends AbstractJvmIrAgainstO
runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInClass.kt"); runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInClass.kt");
} }
@TestMetadata("defaultValueInlineFromMultiFileFacade.kt") @TestMetadata("defaultValueInline.kt")
public void testDefaultValueInlineFromMultiFileFacade_1_3() throws Exception { public void testDefaultValueInline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInlineFromMultiFileFacade.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt");
} }
@TestMetadata("defaultValueInline.kt") @TestMetadata("defaultValueInlineFromMultiFileFacade.kt")
public void testDefaultValueInline_1_3() throws Exception { public void testDefaultValueInlineFromMultiFileFacade() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInlineFromMultiFileFacade.kt");
} }
} }
@@ -4264,52 +4256,48 @@ public class JvmIrAgainstOldBoxInlineTestGenerated extends AbstractJvmIrAgainstO
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: ");
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: ");
}
public void testAllFilesPresentInReceiver() throws Exception { public void testAllFilesPresentInReceiver() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/receiver"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/receiver"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true);
} }
@TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt")
public void testInlineOrdinaryOfCrossinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfCrossinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt");
} }
@TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt")
public void testInlineOrdinaryOfNoinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfNoinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt");
} }
@TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt")
public void testInlineSuspendOfCrossinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfCrossinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt");
} }
@TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt")
public void testInlineSuspendOfCrossinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfCrossinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt");
} }
@TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt")
public void testInlineSuspendOfNoinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfNoinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt");
} }
@TestMetadata("inlineSuspendOfNoinlineSuspend.kt") @TestMetadata("inlineSuspendOfNoinlineSuspend.kt")
public void testInlineSuspendOfNoinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfNoinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt");
} }
@TestMetadata("inlineSuspendOfOrdinary.kt") @TestMetadata("inlineSuspendOfOrdinary.kt")
public void testInlineSuspendOfOrdinary_1_3() throws Exception { public void testInlineSuspendOfOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt");
} }
@TestMetadata("inlineSuspendOfSuspend.kt") @TestMetadata("inlineSuspendOfSuspend.kt")
public void testInlineSuspendOfSuspend_1_3() throws Exception { public void testInlineSuspendOfSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt");
} }
} }
@@ -4321,77 +4309,73 @@ public class JvmIrAgainstOldBoxInlineTestGenerated extends AbstractJvmIrAgainstO
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: ");
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: ");
}
public void testAllFilesPresentInStateMachine() throws Exception { public void testAllFilesPresentInStateMachine() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/stateMachine"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/stateMachine"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true);
} }
@TestMetadata("crossingCoroutineBoundaries.kt") @TestMetadata("crossingCoroutineBoundaries.kt")
public void testCrossingCoroutineBoundaries_1_3() throws Exception { public void testCrossingCoroutineBoundaries() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/crossingCoroutineBoundaries.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/crossingCoroutineBoundaries.kt");
} }
@TestMetadata("independentInline.kt") @TestMetadata("independentInline.kt")
public void testIndependentInline_1_3() throws Exception { public void testIndependentInline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/independentInline.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/independentInline.kt");
}
@TestMetadata("innerLambdaInsideLambda.kt")
public void testInnerLambdaInsideLambda_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt", "kotlin.coroutines");
}
@TestMetadata("innerLambdaWithoutCrossinline.kt")
public void testInnerLambdaWithoutCrossinline_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt", "kotlin.coroutines");
} }
@TestMetadata("innerLambda.kt") @TestMetadata("innerLambda.kt")
public void testInnerLambda_1_3() throws Exception { public void testInnerLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt");
} }
@TestMetadata("innerMadnessCallSite.kt") @TestMetadata("innerLambdaInsideLambda.kt")
public void testInnerMadnessCallSite_1_3() throws Exception { public void testInnerLambdaInsideLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt");
}
@TestMetadata("innerLambdaWithoutCrossinline.kt")
public void testInnerLambdaWithoutCrossinline() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt");
} }
@TestMetadata("innerMadness.kt") @TestMetadata("innerMadness.kt")
public void testInnerMadness_1_3() throws Exception { public void testInnerMadness() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt");
} }
@TestMetadata("innerObjectInsideInnerObject.kt") @TestMetadata("innerMadnessCallSite.kt")
public void testInnerObjectInsideInnerObject_1_3() throws Exception { public void testInnerMadnessCallSite() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt");
}
@TestMetadata("innerObjectRetransformation.kt")
public void testInnerObjectRetransformation_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectRetransformation.kt", "kotlin.coroutines");
}
@TestMetadata("innerObjectSeveralFunctions.kt")
public void testInnerObjectSeveralFunctions_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt", "kotlin.coroutines");
}
@TestMetadata("innerObjectWithoutCapturingCrossinline.kt")
public void testInnerObjectWithoutCapturingCrossinline_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt", "kotlin.coroutines");
} }
@TestMetadata("innerObject.kt") @TestMetadata("innerObject.kt")
public void testInnerObject_1_3() throws Exception { public void testInnerObject() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt");
}
@TestMetadata("innerObjectInsideInnerObject.kt")
public void testInnerObjectInsideInnerObject() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt");
}
@TestMetadata("innerObjectRetransformation.kt")
public void testInnerObjectRetransformation() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectRetransformation.kt");
}
@TestMetadata("innerObjectSeveralFunctions.kt")
public void testInnerObjectSeveralFunctions() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt");
}
@TestMetadata("innerObjectWithoutCapturingCrossinline.kt")
public void testInnerObjectWithoutCapturingCrossinline() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt");
} }
@TestMetadata("insideObject.kt") @TestMetadata("insideObject.kt")
public void testInsideObject_1_3() throws Exception { public void testInsideObject() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/insideObject.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/insideObject.kt");
} }
@TestMetadata("lambdaTransformation.kt") @TestMetadata("lambdaTransformation.kt")
@@ -4400,43 +4384,43 @@ public class JvmIrAgainstOldBoxInlineTestGenerated extends AbstractJvmIrAgainstO
} }
@TestMetadata("normalInline.kt") @TestMetadata("normalInline.kt")
public void testNormalInline_1_3() throws Exception { public void testNormalInline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt");
} }
@TestMetadata("numberOfSuspentions.kt") @TestMetadata("numberOfSuspentions.kt")
public void testNumberOfSuspentions_1_3() throws Exception { public void testNumberOfSuspentions() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt");
} }
@TestMetadata("objectInsideLambdas.kt") @TestMetadata("objectInsideLambdas.kt")
public void testObjectInsideLambdas_1_3() throws Exception { public void testObjectInsideLambdas() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/objectInsideLambdas.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/objectInsideLambdas.kt");
} }
@TestMetadata("oneInlineTwoCaptures.kt") @TestMetadata("oneInlineTwoCaptures.kt")
public void testOneInlineTwoCaptures_1_3() throws Exception { public void testOneInlineTwoCaptures() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/oneInlineTwoCaptures.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/oneInlineTwoCaptures.kt");
} }
@TestMetadata("passLambda.kt") @TestMetadata("passLambda.kt")
public void testPassLambda_1_3() throws Exception { public void testPassLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/passLambda.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/passLambda.kt");
}
@TestMetadata("passParameterLambda.kt")
public void testPassParameterLambda_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameterLambda.kt", "kotlin.coroutines");
} }
@TestMetadata("passParameter.kt") @TestMetadata("passParameter.kt")
public void testPassParameter_1_3() throws Exception { public void testPassParameter() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameter.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameter.kt");
}
@TestMetadata("passParameterLambda.kt")
public void testPassParameterLambda() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameterLambda.kt");
} }
@TestMetadata("unreachableSuspendMarker.kt") @TestMetadata("unreachableSuspendMarker.kt")
public void testUnreachableSuspendMarker_1_3() throws Exception { public void testUnreachableSuspendMarker() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/unreachableSuspendMarker.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/unreachableSuspendMarker.kt");
} }
} }
} }
@@ -25,10 +25,6 @@ public class JvmIrAgainstOldBoxTestGenerated extends AbstractJvmIrAgainstOldBoxT
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath); KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, testDataFilePath);
}
public void testAllFilesPresentInCompileKotlinAgainstKotlin() throws Exception { public void testAllFilesPresentInCompileKotlinAgainstKotlin() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true);
} }
@@ -99,8 +95,8 @@ public class JvmIrAgainstOldBoxTestGenerated extends AbstractJvmIrAgainstOldBoxT
} }
@TestMetadata("coroutinesBinary.kt") @TestMetadata("coroutinesBinary.kt")
public void testCoroutinesBinary_1_3() throws Exception { public void testCoroutinesBinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/compileKotlinAgainstKotlin/coroutinesBinary.kt", "kotlin.coroutines"); runTest("compiler/testData/compileKotlinAgainstKotlin/coroutinesBinary.kt");
} }
@TestMetadata("defaultConstructor.kt") @TestMetadata("defaultConstructor.kt")
@@ -3967,22 +3967,18 @@ public class JvmOldAgainstIrBoxInlineTestGenerated extends AbstractJvmOldAgainst
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: ");
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: ");
}
public void testAllFilesPresentInSuspend() throws Exception { public void testAllFilesPresentInSuspend() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true);
} }
@TestMetadata("capturedVariables.kt") @TestMetadata("capturedVariables.kt")
public void testCapturedVariables_1_3() throws Exception { public void testCapturedVariables() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt");
} }
@TestMetadata("crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt") @TestMetadata("crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt")
public void testCrossinlineSuspendLambdaInsideCrossinlineSuspendLambda_1_3() throws Exception { public void testCrossinlineSuspendLambdaInsideCrossinlineSuspendLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt");
} }
@TestMetadata("debugMetadataCrossinline.kt") @TestMetadata("debugMetadataCrossinline.kt")
@@ -3991,18 +3987,18 @@ public class JvmOldAgainstIrBoxInlineTestGenerated extends AbstractJvmOldAgainst
} }
@TestMetadata("delegatedProperties.kt") @TestMetadata("delegatedProperties.kt")
public void testDelegatedProperties_1_3() throws Exception { public void testDelegatedProperties() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/delegatedProperties.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/delegatedProperties.kt");
} }
@TestMetadata("doubleRegenerationWithNonSuspendingLambda.kt") @TestMetadata("doubleRegenerationWithNonSuspendingLambda.kt")
public void testDoubleRegenerationWithNonSuspendingLambda_1_3() throws Exception { public void testDoubleRegenerationWithNonSuspendingLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/doubleRegenerationWithNonSuspendingLambda.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/doubleRegenerationWithNonSuspendingLambda.kt");
} }
@TestMetadata("enclodingMethod.kt") @TestMetadata("enclodingMethod.kt")
public void testEnclodingMethod_1_3() throws Exception { public void testEnclodingMethod() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/enclodingMethod.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/enclodingMethod.kt");
} }
@TestMetadata("fileNameInMetadata.kt") @TestMetadata("fileNameInMetadata.kt")
@@ -4011,18 +4007,18 @@ public class JvmOldAgainstIrBoxInlineTestGenerated extends AbstractJvmOldAgainst
} }
@TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt")
public void testInlineOrdinaryOfCrossinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfCrossinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt");
} }
@TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt")
public void testInlineOrdinaryOfNoinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfNoinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt");
} }
@TestMetadata("inlineSuspendContinuation.kt") @TestMetadata("inlineSuspendContinuation.kt")
public void testInlineSuspendContinuation_1_3() throws Exception { public void testInlineSuspendContinuation() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendContinuation.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendContinuation.kt");
} }
@TestMetadata("inlineSuspendInMultifileClass.kt") @TestMetadata("inlineSuspendInMultifileClass.kt")
@@ -4031,38 +4027,38 @@ public class JvmOldAgainstIrBoxInlineTestGenerated extends AbstractJvmOldAgainst
} }
@TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt")
public void testInlineSuspendOfCrossinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfCrossinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt");
} }
@TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt")
public void testInlineSuspendOfCrossinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfCrossinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt");
} }
@TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt")
public void testInlineSuspendOfNoinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfNoinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt");
} }
@TestMetadata("inlineSuspendOfNoinlineSuspend.kt") @TestMetadata("inlineSuspendOfNoinlineSuspend.kt")
public void testInlineSuspendOfNoinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfNoinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt");
} }
@TestMetadata("inlineSuspendOfOrdinary.kt") @TestMetadata("inlineSuspendOfOrdinary.kt")
public void testInlineSuspendOfOrdinary_1_3() throws Exception { public void testInlineSuspendOfOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt");
} }
@TestMetadata("inlineSuspendOfSuspend.kt") @TestMetadata("inlineSuspendOfSuspend.kt")
public void testInlineSuspendOfSuspend_1_3() throws Exception { public void testInlineSuspendOfSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt");
} }
@TestMetadata("jvmName.kt") @TestMetadata("jvmName.kt")
public void testJvmName_1_3() throws Exception { public void testJvmName() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/jvmName.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/jvmName.kt");
} }
@TestMetadata("kt26658.kt") @TestMetadata("kt26658.kt")
@@ -4071,18 +4067,18 @@ public class JvmOldAgainstIrBoxInlineTestGenerated extends AbstractJvmOldAgainst
} }
@TestMetadata("maxStackWithCrossinline.kt") @TestMetadata("maxStackWithCrossinline.kt")
public void testMaxStackWithCrossinline_1_3() throws Exception { public void testMaxStackWithCrossinline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/maxStackWithCrossinline.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/maxStackWithCrossinline.kt");
} }
@TestMetadata("multipleLocals.kt") @TestMetadata("multipleLocals.kt")
public void testMultipleLocals_1_3() throws Exception { public void testMultipleLocals() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt");
} }
@TestMetadata("multipleSuspensionPoints.kt") @TestMetadata("multipleSuspensionPoints.kt")
public void testMultipleSuspensionPoints_1_3() throws Exception { public void testMultipleSuspensionPoints() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt");
} }
@TestMetadata("nestedMethodWith2XParameter.kt") @TestMetadata("nestedMethodWith2XParameter.kt")
@@ -4096,23 +4092,23 @@ public class JvmOldAgainstIrBoxInlineTestGenerated extends AbstractJvmOldAgainst
} }
@TestMetadata("nonSuspendCrossinline.kt") @TestMetadata("nonSuspendCrossinline.kt")
public void testNonSuspendCrossinline_1_3() throws Exception { public void testNonSuspendCrossinline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/nonSuspendCrossinline.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/nonSuspendCrossinline.kt");
} }
@TestMetadata("returnValue.kt") @TestMetadata("returnValue.kt")
public void testReturnValue_1_3() throws Exception { public void testReturnValue() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/returnValue.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/returnValue.kt");
} }
@TestMetadata("tryCatchReceiver.kt") @TestMetadata("tryCatchReceiver.kt")
public void testTryCatchReceiver_1_3() throws Exception { public void testTryCatchReceiver() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/tryCatchReceiver.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/tryCatchReceiver.kt");
} }
@TestMetadata("tryCatchStackTransform.kt") @TestMetadata("tryCatchStackTransform.kt")
public void testTryCatchStackTransform_1_3() throws Exception { public void testTryCatchStackTransform() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt");
} }
@TestMetadata("twiceRegeneratedAnonymousObject.kt") @TestMetadata("twiceRegeneratedAnonymousObject.kt")
@@ -4171,17 +4167,13 @@ public class JvmOldAgainstIrBoxInlineTestGenerated extends AbstractJvmOldAgainst
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: ");
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: ");
}
public void testAllFilesPresentInDefaultParameter() throws Exception { public void testAllFilesPresentInDefaultParameter() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/defaultParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/defaultParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true);
} }
@TestMetadata("defaultValueCrossinline.kt") @TestMetadata("defaultValueCrossinline.kt")
public void testDefaultValueCrossinline_1_3() throws Exception { public void testDefaultValueCrossinline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt");
} }
@TestMetadata("defaultValueInClass.kt") @TestMetadata("defaultValueInClass.kt")
@@ -4189,14 +4181,14 @@ public class JvmOldAgainstIrBoxInlineTestGenerated extends AbstractJvmOldAgainst
runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInClass.kt"); runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInClass.kt");
} }
@TestMetadata("defaultValueInlineFromMultiFileFacade.kt") @TestMetadata("defaultValueInline.kt")
public void testDefaultValueInlineFromMultiFileFacade_1_3() throws Exception { public void testDefaultValueInline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInlineFromMultiFileFacade.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt");
} }
@TestMetadata("defaultValueInline.kt") @TestMetadata("defaultValueInlineFromMultiFileFacade.kt")
public void testDefaultValueInline_1_3() throws Exception { public void testDefaultValueInlineFromMultiFileFacade() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInlineFromMultiFileFacade.kt");
} }
} }
@@ -4264,52 +4256,48 @@ public class JvmOldAgainstIrBoxInlineTestGenerated extends AbstractJvmOldAgainst
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: ");
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: ");
}
public void testAllFilesPresentInReceiver() throws Exception { public void testAllFilesPresentInReceiver() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/receiver"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/receiver"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true);
} }
@TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt")
public void testInlineOrdinaryOfCrossinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfCrossinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt");
} }
@TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt")
public void testInlineOrdinaryOfNoinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfNoinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt");
} }
@TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt")
public void testInlineSuspendOfCrossinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfCrossinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt");
} }
@TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt")
public void testInlineSuspendOfCrossinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfCrossinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt");
} }
@TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt")
public void testInlineSuspendOfNoinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfNoinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt");
} }
@TestMetadata("inlineSuspendOfNoinlineSuspend.kt") @TestMetadata("inlineSuspendOfNoinlineSuspend.kt")
public void testInlineSuspendOfNoinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfNoinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt");
} }
@TestMetadata("inlineSuspendOfOrdinary.kt") @TestMetadata("inlineSuspendOfOrdinary.kt")
public void testInlineSuspendOfOrdinary_1_3() throws Exception { public void testInlineSuspendOfOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt");
} }
@TestMetadata("inlineSuspendOfSuspend.kt") @TestMetadata("inlineSuspendOfSuspend.kt")
public void testInlineSuspendOfSuspend_1_3() throws Exception { public void testInlineSuspendOfSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt");
} }
} }
@@ -4321,77 +4309,73 @@ public class JvmOldAgainstIrBoxInlineTestGenerated extends AbstractJvmOldAgainst
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: ");
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: ");
}
public void testAllFilesPresentInStateMachine() throws Exception { public void testAllFilesPresentInStateMachine() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/stateMachine"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/stateMachine"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true);
} }
@TestMetadata("crossingCoroutineBoundaries.kt") @TestMetadata("crossingCoroutineBoundaries.kt")
public void testCrossingCoroutineBoundaries_1_3() throws Exception { public void testCrossingCoroutineBoundaries() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/crossingCoroutineBoundaries.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/crossingCoroutineBoundaries.kt");
} }
@TestMetadata("independentInline.kt") @TestMetadata("independentInline.kt")
public void testIndependentInline_1_3() throws Exception { public void testIndependentInline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/independentInline.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/independentInline.kt");
}
@TestMetadata("innerLambdaInsideLambda.kt")
public void testInnerLambdaInsideLambda_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt", "kotlin.coroutines");
}
@TestMetadata("innerLambdaWithoutCrossinline.kt")
public void testInnerLambdaWithoutCrossinline_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt", "kotlin.coroutines");
} }
@TestMetadata("innerLambda.kt") @TestMetadata("innerLambda.kt")
public void testInnerLambda_1_3() throws Exception { public void testInnerLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt");
} }
@TestMetadata("innerMadnessCallSite.kt") @TestMetadata("innerLambdaInsideLambda.kt")
public void testInnerMadnessCallSite_1_3() throws Exception { public void testInnerLambdaInsideLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt");
}
@TestMetadata("innerLambdaWithoutCrossinline.kt")
public void testInnerLambdaWithoutCrossinline() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt");
} }
@TestMetadata("innerMadness.kt") @TestMetadata("innerMadness.kt")
public void testInnerMadness_1_3() throws Exception { public void testInnerMadness() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt");
} }
@TestMetadata("innerObjectInsideInnerObject.kt") @TestMetadata("innerMadnessCallSite.kt")
public void testInnerObjectInsideInnerObject_1_3() throws Exception { public void testInnerMadnessCallSite() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt");
}
@TestMetadata("innerObjectRetransformation.kt")
public void testInnerObjectRetransformation_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectRetransformation.kt", "kotlin.coroutines");
}
@TestMetadata("innerObjectSeveralFunctions.kt")
public void testInnerObjectSeveralFunctions_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt", "kotlin.coroutines");
}
@TestMetadata("innerObjectWithoutCapturingCrossinline.kt")
public void testInnerObjectWithoutCapturingCrossinline_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt", "kotlin.coroutines");
} }
@TestMetadata("innerObject.kt") @TestMetadata("innerObject.kt")
public void testInnerObject_1_3() throws Exception { public void testInnerObject() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt");
}
@TestMetadata("innerObjectInsideInnerObject.kt")
public void testInnerObjectInsideInnerObject() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt");
}
@TestMetadata("innerObjectRetransformation.kt")
public void testInnerObjectRetransformation() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectRetransformation.kt");
}
@TestMetadata("innerObjectSeveralFunctions.kt")
public void testInnerObjectSeveralFunctions() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt");
}
@TestMetadata("innerObjectWithoutCapturingCrossinline.kt")
public void testInnerObjectWithoutCapturingCrossinline() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt");
} }
@TestMetadata("insideObject.kt") @TestMetadata("insideObject.kt")
public void testInsideObject_1_3() throws Exception { public void testInsideObject() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/insideObject.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/insideObject.kt");
} }
@TestMetadata("lambdaTransformation.kt") @TestMetadata("lambdaTransformation.kt")
@@ -4400,43 +4384,43 @@ public class JvmOldAgainstIrBoxInlineTestGenerated extends AbstractJvmOldAgainst
} }
@TestMetadata("normalInline.kt") @TestMetadata("normalInline.kt")
public void testNormalInline_1_3() throws Exception { public void testNormalInline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt");
} }
@TestMetadata("numberOfSuspentions.kt") @TestMetadata("numberOfSuspentions.kt")
public void testNumberOfSuspentions_1_3() throws Exception { public void testNumberOfSuspentions() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt");
} }
@TestMetadata("objectInsideLambdas.kt") @TestMetadata("objectInsideLambdas.kt")
public void testObjectInsideLambdas_1_3() throws Exception { public void testObjectInsideLambdas() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/objectInsideLambdas.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/objectInsideLambdas.kt");
} }
@TestMetadata("oneInlineTwoCaptures.kt") @TestMetadata("oneInlineTwoCaptures.kt")
public void testOneInlineTwoCaptures_1_3() throws Exception { public void testOneInlineTwoCaptures() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/oneInlineTwoCaptures.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/oneInlineTwoCaptures.kt");
} }
@TestMetadata("passLambda.kt") @TestMetadata("passLambda.kt")
public void testPassLambda_1_3() throws Exception { public void testPassLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/passLambda.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/passLambda.kt");
}
@TestMetadata("passParameterLambda.kt")
public void testPassParameterLambda_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameterLambda.kt", "kotlin.coroutines");
} }
@TestMetadata("passParameter.kt") @TestMetadata("passParameter.kt")
public void testPassParameter_1_3() throws Exception { public void testPassParameter() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameter.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameter.kt");
}
@TestMetadata("passParameterLambda.kt")
public void testPassParameterLambda() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameterLambda.kt");
} }
@TestMetadata("unreachableSuspendMarker.kt") @TestMetadata("unreachableSuspendMarker.kt")
public void testUnreachableSuspendMarker_1_3() throws Exception { public void testUnreachableSuspendMarker() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/unreachableSuspendMarker.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/unreachableSuspendMarker.kt");
} }
} }
} }
@@ -25,10 +25,6 @@ public class JvmOldAgainstIrBoxTestGenerated extends AbstractJvmOldAgainstIrBoxT
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath); KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, testDataFilePath);
}
public void testAllFilesPresentInCompileKotlinAgainstKotlin() throws Exception { public void testAllFilesPresentInCompileKotlinAgainstKotlin() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true);
} }
@@ -99,8 +95,8 @@ public class JvmOldAgainstIrBoxTestGenerated extends AbstractJvmOldAgainstIrBoxT
} }
@TestMetadata("coroutinesBinary.kt") @TestMetadata("coroutinesBinary.kt")
public void testCoroutinesBinary_1_3() throws Exception { public void testCoroutinesBinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/compileKotlinAgainstKotlin/coroutinesBinary.kt", "kotlin.coroutines"); runTest("compiler/testData/compileKotlinAgainstKotlin/coroutinesBinary.kt");
} }
@TestMetadata("defaultConstructor.kt") @TestMetadata("defaultConstructor.kt")
@@ -509,8 +509,7 @@ fun main(args: Array<String>) {
testClass<AbstractJvmOldAgainstIrBoxTest> { testClass<AbstractJvmOldAgainstIrBoxTest> {
model( model(
"compileKotlinAgainstKotlin", "compileKotlinAgainstKotlin",
targetBackend = TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, targetBackend = TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR
skipTestsForExperimentalCoroutines = true
) )
} }
@@ -634,8 +633,7 @@ fun main(args: Array<String>) {
testClass<AbstractJvmOldAgainstIrBoxInlineTest> { testClass<AbstractJvmOldAgainstIrBoxInlineTest> {
model( model(
"codegen/boxInline", "codegen/boxInline",
targetBackend = TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, targetBackend = TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR
skipTestsForExperimentalCoroutines = true
) )
} }
} }
@@ -713,8 +711,7 @@ fun main(args: Array<String>) {
testClass<AbstractFirOldFrontendDiagnosticsTestWithStdlib> { testClass<AbstractFirOldFrontendDiagnosticsTestWithStdlib> {
model( model(
"diagnostics/testsWithStdLib", "diagnostics/testsWithStdLib",
excludedPattern = excludedFirTestdataPattern, excludedPattern = excludedFirTestdataPattern
skipTestsForExperimentalCoroutines = true
) )
} }
} }
@@ -1,39 +0,0 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.generators.tests.generator
import org.jetbrains.kotlin.test.TargetBackend
import org.jetbrains.kotlin.utils.Printer
class RunTestMethodWithPackageReplacementModel(
private val targetBackend: TargetBackend,
private val testMethodName: String,
private val testRunnerMethodName: String,
private val additionalRunnerArguments: List<String>
) : MethodModel {
override val name = METHOD_NAME
override val dataString: String? = null
override fun generateSignature(p: Printer) {
p.print("private void $name(String testDataFilePath, String packageName) throws Exception")
}
override fun generateBody(p: Printer) {
val className = TargetBackend::class.java.simpleName
val additionalArguments = if (additionalRunnerArguments.isNotEmpty())
additionalRunnerArguments.joinToString(separator = ", ", prefix = ", ")
else ""
p.println("KotlinTestUtils.$testRunnerMethodName(filePath -> $testMethodName(filePath, packageName), $className.$targetBackend, testDataFilePath$additionalArguments);")
}
override fun imports(): Collection<Class<*>> {
return super.imports() + setOf(TargetBackend::class.java)
}
companion object {
const val METHOD_NAME = "runTestWithPackageReplacement"
}
}
@@ -9,7 +9,6 @@ import com.intellij.openapi.util.io.FileUtil;
import com.intellij.openapi.util.text.StringUtil; import com.intellij.openapi.util.text.StringUtil;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.Nullable;
import org.jetbrains.kotlin.generators.util.CoroutinesKt;
import org.jetbrains.kotlin.test.KotlinTestUtils; import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.TargetBackend; import org.jetbrains.kotlin.test.TargetBackend;
import org.jetbrains.kotlin.utils.Printer; import org.jetbrains.kotlin.utils.Printer;
@@ -17,7 +16,6 @@ import org.jetbrains.kotlin.utils.Printer;
import java.io.File; import java.io.File;
import java.util.*; import java.util.*;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import java.util.stream.Collectors;
public class SimpleTestClassModel extends TestClassModel { public class SimpleTestClassModel extends TestClassModel {
private static final Comparator<TestEntityModel> BY_NAME = Comparator.comparing(TestEntityModel::getName); private static final Comparator<TestEntityModel> BY_NAME = Comparator.comparing(TestEntityModel::getName);
@@ -53,8 +51,6 @@ public class SimpleTestClassModel extends TestClassModel {
private final String testRunnerMethodName; private final String testRunnerMethodName;
private final List<String> additionalRunnerArguments; private final List<String> additionalRunnerArguments;
private boolean skipTestsForExperimentalCoroutines;
public SimpleTestClassModel( public SimpleTestClassModel(
@NotNull File rootFile, @NotNull File rootFile,
boolean recursive, boolean recursive,
@@ -70,8 +66,7 @@ public class SimpleTestClassModel extends TestClassModel {
String testRunnerMethodName, String testRunnerMethodName,
List<String> additionalRunnerArguments, List<String> additionalRunnerArguments,
Integer deep, Integer deep,
@NotNull Collection<AnnotationModel> annotations, @NotNull Collection<AnnotationModel> annotations
boolean skipTestsForExperimentalCoroutines
) { ) {
this.rootFile = rootFile; this.rootFile = rootFile;
this.recursive = recursive; this.recursive = recursive;
@@ -88,7 +83,6 @@ public class SimpleTestClassModel extends TestClassModel {
this.additionalRunnerArguments = additionalRunnerArguments; this.additionalRunnerArguments = additionalRunnerArguments;
this.deep = deep; this.deep = deep;
this.annotations = annotations; this.annotations = annotations;
this.skipTestsForExperimentalCoroutines = skipTestsForExperimentalCoroutines;
} }
@NotNull @NotNull
@@ -108,8 +102,8 @@ public class SimpleTestClassModel extends TestClassModel {
children.add(new SimpleTestClassModel( children.add(new SimpleTestClassModel(
file, true, excludeParentDirs, filenamePattern, excludePattern, checkFilenameStartsLowerCase, file, true, excludeParentDirs, filenamePattern, excludePattern, checkFilenameStartsLowerCase,
doTestMethodName, innerTestClassName, targetBackend, excludesStripOneDirectory(file.getName()), doTestMethodName, innerTestClassName, targetBackend, excludesStripOneDirectory(file.getName()),
skipIgnored, testRunnerMethodName, additionalRunnerArguments, deep != null ? deep - 1 : null, annotations, skipIgnored, testRunnerMethodName, additionalRunnerArguments, deep != null ? deep - 1 : null, annotations
skipTestsForExperimentalCoroutines) )
); );
} }
@@ -158,16 +152,9 @@ public class SimpleTestClassModel extends TestClassModel {
public Collection<MethodModel> getMethods() { public Collection<MethodModel> getMethods() {
if (testMethods == null) { if (testMethods == null) {
if (!rootFile.isDirectory()) { if (!rootFile.isDirectory()) {
if (CoroutinesKt.isCommonCoroutineTest(rootFile)) { testMethods = Collections.singletonList(new SimpleTestMethodModel(
testMethods = CoroutinesKt.createCommonCoroutinesTestMethodModels(rootFile, rootFile, filenamePattern, rootFile, rootFile, filenamePattern, checkFilenameStartsLowerCase, targetBackend, skipIgnored
checkFilenameStartsLowerCase, targetBackend, ));
skipIgnored, skipTestsForExperimentalCoroutines);
}
else {
testMethods = Collections.singletonList(new SimpleTestMethodModel(
rootFile, rootFile, filenamePattern, checkFilenameStartsLowerCase, targetBackend, skipIgnored
));
}
} }
else { else {
List<MethodModel> result = new ArrayList<>(); List<MethodModel> result = new ArrayList<>();
@@ -178,8 +165,6 @@ public class SimpleTestClassModel extends TestClassModel {
File[] listFiles = rootFile.listFiles(); File[] listFiles = rootFile.listFiles();
boolean hasCoroutines = false;
if (listFiles != null && (deep == null || deep == 0)) { if (listFiles != null && (deep == null || deep == 0)) {
for (File file : listFiles) { for (File file : listFiles) {
boolean excluded = excludePattern != null && excludePattern.matcher(file.getName()).matches(); boolean excluded = excludePattern != null && excludePattern.matcher(file.getName()).matches();
@@ -188,28 +173,11 @@ public class SimpleTestClassModel extends TestClassModel {
if (file.isDirectory() && excludeParentDirs && dirHasSubDirs(file)) { if (file.isDirectory() && excludeParentDirs && dirHasSubDirs(file)) {
continue; continue;
} }
result.add(new SimpleTestMethodModel(rootFile, file, filenamePattern, checkFilenameStartsLowerCase, targetBackend, skipIgnored));
if (!file.isDirectory() && CoroutinesKt.isCommonCoroutineTest(file)) {
hasCoroutines = true;
result.addAll(CoroutinesKt.createCommonCoroutinesTestMethodModels(rootFile, file,
filenamePattern,
checkFilenameStartsLowerCase,
targetBackend, skipIgnored,
skipTestsForExperimentalCoroutines));
}
else {
result.add(new SimpleTestMethodModel(rootFile, file, filenamePattern,
checkFilenameStartsLowerCase, targetBackend, skipIgnored));
}
} }
} }
} }
if (hasCoroutines) {
String methodName = doTestMethodName + "WithCoroutinesPackageReplacement";
result.add(new RunTestMethodWithPackageReplacementModel(targetBackend, methodName, testRunnerMethodName, additionalRunnerArguments));
}
result.sort(BY_NAME); result.sort(BY_NAME);
testMethods = result; testMethods = result;
@@ -66,8 +66,7 @@ class TestGroup(
excludeDirs: List<String> = listOf(), excludeDirs: List<String> = listOf(),
filenameStartsLowerCase: Boolean? = null, filenameStartsLowerCase: Boolean? = null,
skipIgnored: Boolean = false, skipIgnored: Boolean = false,
deep: Int? = null, deep: Int? = null
skipTestsForExperimentalCoroutines: Boolean = false
) { ) {
val rootFile = File("$testDataRoot/$relativeRootPath") val rootFile = File("$testDataRoot/$relativeRootPath")
val compiledPattern = Pattern.compile(pattern) val compiledPattern = Pattern.compile(pattern)
@@ -84,8 +83,7 @@ class TestGroup(
SimpleTestClassModel( SimpleTestClassModel(
rootFile, recursive, excludeParentDirs, rootFile, recursive, excludeParentDirs,
compiledPattern, compiledExcludedPattern, filenameStartsLowerCase, testMethod, className, compiledPattern, compiledExcludedPattern, filenameStartsLowerCase, testMethod, className,
targetBackend, excludeDirs, skipIgnored, testRunnerMethodName, additionalRunnerArguments, deep, annotations, targetBackend, excludeDirs, skipIgnored, testRunnerMethodName, additionalRunnerArguments, deep, annotations
skipTestsForExperimentalCoroutines
) )
} }
) )
@@ -1,96 +0,0 @@
/*
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.generators.util
import org.jetbrains.kotlin.generators.tests.generator.MethodModel
import org.jetbrains.kotlin.generators.tests.generator.RunTestMethodWithPackageReplacementModel
import org.jetbrains.kotlin.generators.tests.generator.SimpleTestMethodModel
import org.jetbrains.kotlin.test.InTextDirectivesUtils
import org.jetbrains.kotlin.test.KotlinTestUtils
import org.jetbrains.kotlin.test.TargetBackend
import org.jetbrains.kotlin.utils.Printer
import java.io.File
import java.util.regex.Pattern
class CoroutinesTestModel(
rootDir: File,
file: File,
filenamePattern: Pattern,
checkFilenameStartsLowerCase: Boolean?,
targetBackend: TargetBackend,
skipIgnored: Boolean,
private val isLanguageVersion1_3: Boolean
) : SimpleTestMethodModel(
rootDir,
file,
filenamePattern,
checkFilenameStartsLowerCase,
targetBackend,
skipIgnored
) {
override val name: String
get() = super.name + if (isLanguageVersion1_3) "_1_3" else "_1_2"
override fun generateBody(p: Printer) {
val filePath = KotlinTestUtils.getFilePath(file) + if (file.isDirectory) "/" else ""
val packageName = if (isLanguageVersion1_3) "kotlin.coroutines" else "kotlin.coroutines.experimental"
p.println(RunTestMethodWithPackageReplacementModel.METHOD_NAME, "(\"$filePath\", \"$packageName\");")
}
}
fun isCommonCoroutineTest(file: File): Boolean {
return InTextDirectivesUtils.isDirectiveDefined(file.readText(), "COMMON_COROUTINES_TEST")
}
fun createCommonCoroutinesTestMethodModels(
rootDir: File,
file: File,
filenamePattern: Pattern,
checkFilenameStartsLowerCase: Boolean?,
targetBackend: TargetBackend,
skipIgnored: Boolean,
skipExperimental: Boolean
): Collection<MethodModel> {
return if (targetBackend.isIR || targetBackend == TargetBackend.JS)
listOf(
CoroutinesTestModel(
rootDir,
file,
filenamePattern,
checkFilenameStartsLowerCase,
targetBackend,
skipIgnored,
true
)
)
else {
mutableListOf(
CoroutinesTestModel(
rootDir,
file,
filenamePattern,
checkFilenameStartsLowerCase,
targetBackend,
skipIgnored,
true
)
).apply {
if (!skipExperimental) {
this += CoroutinesTestModel(
rootDir,
file,
filenamePattern,
checkFilenameStartsLowerCase,
targetBackend,
skipIgnored,
false
)
}
}
}
}
File diff suppressed because it is too large Load Diff
@@ -3557,72 +3557,68 @@ public class IrJsCodegenInlineES6TestGenerated extends AbstractIrJsCodegenInline
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath); KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest0(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JS_IR_ES6, testDataFilePath);
}
public void testAllFilesPresentInSuspend() throws Exception { public void testAllFilesPresentInSuspend() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
} }
@TestMetadata("capturedVariables.kt") @TestMetadata("capturedVariables.kt")
public void testCapturedVariables_1_3() throws Exception { public void testCapturedVariables() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt");
} }
@TestMetadata("crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt") @TestMetadata("crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt")
public void testCrossinlineSuspendLambdaInsideCrossinlineSuspendLambda_1_3() throws Exception { public void testCrossinlineSuspendLambdaInsideCrossinlineSuspendLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt");
} }
@TestMetadata("delegatedProperties.kt") @TestMetadata("delegatedProperties.kt")
public void testDelegatedProperties_1_3() throws Exception { public void testDelegatedProperties() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/delegatedProperties.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/delegatedProperties.kt");
} }
@TestMetadata("doubleRegenerationWithNonSuspendingLambda.kt") @TestMetadata("doubleRegenerationWithNonSuspendingLambda.kt")
public void testDoubleRegenerationWithNonSuspendingLambda_1_3() throws Exception { public void testDoubleRegenerationWithNonSuspendingLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/doubleRegenerationWithNonSuspendingLambda.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/doubleRegenerationWithNonSuspendingLambda.kt");
} }
@TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt")
public void testInlineOrdinaryOfCrossinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfCrossinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt");
} }
@TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt")
public void testInlineOrdinaryOfNoinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfNoinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt");
} }
@TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt")
public void testInlineSuspendOfCrossinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfCrossinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt");
} }
@TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt")
public void testInlineSuspendOfCrossinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfCrossinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt");
} }
@TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt")
public void testInlineSuspendOfNoinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfNoinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt");
} }
@TestMetadata("inlineSuspendOfNoinlineSuspend.kt") @TestMetadata("inlineSuspendOfNoinlineSuspend.kt")
public void testInlineSuspendOfNoinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfNoinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt");
} }
@TestMetadata("inlineSuspendOfOrdinary.kt") @TestMetadata("inlineSuspendOfOrdinary.kt")
public void testInlineSuspendOfOrdinary_1_3() throws Exception { public void testInlineSuspendOfOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt");
} }
@TestMetadata("inlineSuspendOfSuspend.kt") @TestMetadata("inlineSuspendOfSuspend.kt")
public void testInlineSuspendOfSuspend_1_3() throws Exception { public void testInlineSuspendOfSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt");
} }
@TestMetadata("kt26658.kt") @TestMetadata("kt26658.kt")
@@ -3631,18 +3627,18 @@ public class IrJsCodegenInlineES6TestGenerated extends AbstractIrJsCodegenInline
} }
@TestMetadata("maxStackWithCrossinline.kt") @TestMetadata("maxStackWithCrossinline.kt")
public void testMaxStackWithCrossinline_1_3() throws Exception { public void testMaxStackWithCrossinline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/maxStackWithCrossinline.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/maxStackWithCrossinline.kt");
} }
@TestMetadata("multipleLocals.kt") @TestMetadata("multipleLocals.kt")
public void testMultipleLocals_1_3() throws Exception { public void testMultipleLocals() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt");
} }
@TestMetadata("multipleSuspensionPoints.kt") @TestMetadata("multipleSuspensionPoints.kt")
public void testMultipleSuspensionPoints_1_3() throws Exception { public void testMultipleSuspensionPoints() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt");
} }
@TestMetadata("nonLocalReturn.kt") @TestMetadata("nonLocalReturn.kt")
@@ -3651,23 +3647,23 @@ public class IrJsCodegenInlineES6TestGenerated extends AbstractIrJsCodegenInline
} }
@TestMetadata("nonSuspendCrossinline.kt") @TestMetadata("nonSuspendCrossinline.kt")
public void testNonSuspendCrossinline_1_3() throws Exception { public void testNonSuspendCrossinline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/nonSuspendCrossinline.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/nonSuspendCrossinline.kt");
} }
@TestMetadata("returnValue.kt") @TestMetadata("returnValue.kt")
public void testReturnValue_1_3() throws Exception { public void testReturnValue() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/returnValue.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/returnValue.kt");
} }
@TestMetadata("tryCatchReceiver.kt") @TestMetadata("tryCatchReceiver.kt")
public void testTryCatchReceiver_1_3() throws Exception { public void testTryCatchReceiver() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/tryCatchReceiver.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/tryCatchReceiver.kt");
} }
@TestMetadata("tryCatchStackTransform.kt") @TestMetadata("tryCatchStackTransform.kt")
public void testTryCatchStackTransform_1_3() throws Exception { public void testTryCatchStackTransform() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt");
} }
@TestMetadata("twiceRegeneratedAnonymousObject.kt") @TestMetadata("twiceRegeneratedAnonymousObject.kt")
@@ -3726,17 +3722,13 @@ public class IrJsCodegenInlineES6TestGenerated extends AbstractIrJsCodegenInline
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath); KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest0(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JS_IR_ES6, testDataFilePath);
}
public void testAllFilesPresentInDefaultParameter() throws Exception { public void testAllFilesPresentInDefaultParameter() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/defaultParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/defaultParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
} }
@TestMetadata("defaultValueCrossinline.kt") @TestMetadata("defaultValueCrossinline.kt")
public void testDefaultValueCrossinline_1_3() throws Exception { public void testDefaultValueCrossinline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt");
} }
@TestMetadata("defaultValueInClass.kt") @TestMetadata("defaultValueInClass.kt")
@@ -3744,14 +3736,14 @@ public class IrJsCodegenInlineES6TestGenerated extends AbstractIrJsCodegenInline
runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInClass.kt"); runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInClass.kt");
} }
@TestMetadata("defaultValueInlineFromMultiFileFacade.kt") @TestMetadata("defaultValueInline.kt")
public void testDefaultValueInlineFromMultiFileFacade_1_3() throws Exception { public void testDefaultValueInline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInlineFromMultiFileFacade.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt");
} }
@TestMetadata("defaultValueInline.kt") @TestMetadata("defaultValueInlineFromMultiFileFacade.kt")
public void testDefaultValueInline_1_3() throws Exception { public void testDefaultValueInlineFromMultiFileFacade() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInlineFromMultiFileFacade.kt");
} }
} }
@@ -3809,52 +3801,48 @@ public class IrJsCodegenInlineES6TestGenerated extends AbstractIrJsCodegenInline
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath); KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest0(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JS_IR_ES6, testDataFilePath);
}
public void testAllFilesPresentInReceiver() throws Exception { public void testAllFilesPresentInReceiver() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/receiver"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/receiver"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
} }
@TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt")
public void testInlineOrdinaryOfCrossinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfCrossinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt");
} }
@TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt")
public void testInlineOrdinaryOfNoinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfNoinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt");
} }
@TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt")
public void testInlineSuspendOfCrossinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfCrossinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt");
} }
@TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt")
public void testInlineSuspendOfCrossinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfCrossinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt");
} }
@TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt")
public void testInlineSuspendOfNoinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfNoinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt");
} }
@TestMetadata("inlineSuspendOfNoinlineSuspend.kt") @TestMetadata("inlineSuspendOfNoinlineSuspend.kt")
public void testInlineSuspendOfNoinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfNoinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt");
} }
@TestMetadata("inlineSuspendOfOrdinary.kt") @TestMetadata("inlineSuspendOfOrdinary.kt")
public void testInlineSuspendOfOrdinary_1_3() throws Exception { public void testInlineSuspendOfOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt");
} }
@TestMetadata("inlineSuspendOfSuspend.kt") @TestMetadata("inlineSuspendOfSuspend.kt")
public void testInlineSuspendOfSuspend_1_3() throws Exception { public void testInlineSuspendOfSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt");
} }
} }
@@ -3866,77 +3854,73 @@ public class IrJsCodegenInlineES6TestGenerated extends AbstractIrJsCodegenInline
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath); KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest0(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JS_IR_ES6, testDataFilePath);
}
public void testAllFilesPresentInStateMachine() throws Exception { public void testAllFilesPresentInStateMachine() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/stateMachine"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/stateMachine"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
} }
@TestMetadata("crossingCoroutineBoundaries.kt") @TestMetadata("crossingCoroutineBoundaries.kt")
public void testCrossingCoroutineBoundaries_1_3() throws Exception { public void testCrossingCoroutineBoundaries() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/crossingCoroutineBoundaries.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/crossingCoroutineBoundaries.kt");
} }
@TestMetadata("independentInline.kt") @TestMetadata("independentInline.kt")
public void testIndependentInline_1_3() throws Exception { public void testIndependentInline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/independentInline.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/independentInline.kt");
}
@TestMetadata("innerLambdaInsideLambda.kt")
public void testInnerLambdaInsideLambda_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt", "kotlin.coroutines");
}
@TestMetadata("innerLambdaWithoutCrossinline.kt")
public void testInnerLambdaWithoutCrossinline_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt", "kotlin.coroutines");
} }
@TestMetadata("innerLambda.kt") @TestMetadata("innerLambda.kt")
public void testInnerLambda_1_3() throws Exception { public void testInnerLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt");
} }
@TestMetadata("innerMadnessCallSite.kt") @TestMetadata("innerLambdaInsideLambda.kt")
public void testInnerMadnessCallSite_1_3() throws Exception { public void testInnerLambdaInsideLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt");
}
@TestMetadata("innerLambdaWithoutCrossinline.kt")
public void testInnerLambdaWithoutCrossinline() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt");
} }
@TestMetadata("innerMadness.kt") @TestMetadata("innerMadness.kt")
public void testInnerMadness_1_3() throws Exception { public void testInnerMadness() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt");
} }
@TestMetadata("innerObjectInsideInnerObject.kt") @TestMetadata("innerMadnessCallSite.kt")
public void testInnerObjectInsideInnerObject_1_3() throws Exception { public void testInnerMadnessCallSite() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt");
}
@TestMetadata("innerObjectRetransformation.kt")
public void testInnerObjectRetransformation_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectRetransformation.kt", "kotlin.coroutines");
}
@TestMetadata("innerObjectSeveralFunctions.kt")
public void testInnerObjectSeveralFunctions_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt", "kotlin.coroutines");
}
@TestMetadata("innerObjectWithoutCapturingCrossinline.kt")
public void testInnerObjectWithoutCapturingCrossinline_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt", "kotlin.coroutines");
} }
@TestMetadata("innerObject.kt") @TestMetadata("innerObject.kt")
public void testInnerObject_1_3() throws Exception { public void testInnerObject() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt");
}
@TestMetadata("innerObjectInsideInnerObject.kt")
public void testInnerObjectInsideInnerObject() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt");
}
@TestMetadata("innerObjectRetransformation.kt")
public void testInnerObjectRetransformation() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectRetransformation.kt");
}
@TestMetadata("innerObjectSeveralFunctions.kt")
public void testInnerObjectSeveralFunctions() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt");
}
@TestMetadata("innerObjectWithoutCapturingCrossinline.kt")
public void testInnerObjectWithoutCapturingCrossinline() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt");
} }
@TestMetadata("insideObject.kt") @TestMetadata("insideObject.kt")
public void testInsideObject_1_3() throws Exception { public void testInsideObject() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/insideObject.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/insideObject.kt");
} }
@TestMetadata("lambdaTransformation.kt") @TestMetadata("lambdaTransformation.kt")
@@ -3945,43 +3929,43 @@ public class IrJsCodegenInlineES6TestGenerated extends AbstractIrJsCodegenInline
} }
@TestMetadata("normalInline.kt") @TestMetadata("normalInline.kt")
public void testNormalInline_1_3() throws Exception { public void testNormalInline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt");
} }
@TestMetadata("numberOfSuspentions.kt") @TestMetadata("numberOfSuspentions.kt")
public void testNumberOfSuspentions_1_3() throws Exception { public void testNumberOfSuspentions() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt");
} }
@TestMetadata("objectInsideLambdas.kt") @TestMetadata("objectInsideLambdas.kt")
public void testObjectInsideLambdas_1_3() throws Exception { public void testObjectInsideLambdas() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/objectInsideLambdas.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/objectInsideLambdas.kt");
} }
@TestMetadata("oneInlineTwoCaptures.kt") @TestMetadata("oneInlineTwoCaptures.kt")
public void testOneInlineTwoCaptures_1_3() throws Exception { public void testOneInlineTwoCaptures() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/oneInlineTwoCaptures.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/oneInlineTwoCaptures.kt");
} }
@TestMetadata("passLambda.kt") @TestMetadata("passLambda.kt")
public void testPassLambda_1_3() throws Exception { public void testPassLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/passLambda.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/passLambda.kt");
}
@TestMetadata("passParameterLambda.kt")
public void testPassParameterLambda_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameterLambda.kt", "kotlin.coroutines");
} }
@TestMetadata("passParameter.kt") @TestMetadata("passParameter.kt")
public void testPassParameter_1_3() throws Exception { public void testPassParameter() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameter.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameter.kt");
}
@TestMetadata("passParameterLambda.kt")
public void testPassParameterLambda() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameterLambda.kt");
} }
@TestMetadata("unreachableSuspendMarker.kt") @TestMetadata("unreachableSuspendMarker.kt")
public void testUnreachableSuspendMarker_1_3() throws Exception { public void testUnreachableSuspendMarker() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/unreachableSuspendMarker.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/unreachableSuspendMarker.kt");
} }
} }
} }
File diff suppressed because it is too large Load Diff
@@ -3557,72 +3557,68 @@ public class IrJsCodegenInlineTestGenerated extends AbstractIrJsCodegenInlineTes
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest0(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JS_IR, testDataFilePath);
}
public void testAllFilesPresentInSuspend() throws Exception { public void testAllFilesPresentInSuspend() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
} }
@TestMetadata("capturedVariables.kt") @TestMetadata("capturedVariables.kt")
public void testCapturedVariables_1_3() throws Exception { public void testCapturedVariables() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt");
} }
@TestMetadata("crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt") @TestMetadata("crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt")
public void testCrossinlineSuspendLambdaInsideCrossinlineSuspendLambda_1_3() throws Exception { public void testCrossinlineSuspendLambdaInsideCrossinlineSuspendLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt");
} }
@TestMetadata("delegatedProperties.kt") @TestMetadata("delegatedProperties.kt")
public void testDelegatedProperties_1_3() throws Exception { public void testDelegatedProperties() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/delegatedProperties.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/delegatedProperties.kt");
} }
@TestMetadata("doubleRegenerationWithNonSuspendingLambda.kt") @TestMetadata("doubleRegenerationWithNonSuspendingLambda.kt")
public void testDoubleRegenerationWithNonSuspendingLambda_1_3() throws Exception { public void testDoubleRegenerationWithNonSuspendingLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/doubleRegenerationWithNonSuspendingLambda.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/doubleRegenerationWithNonSuspendingLambda.kt");
} }
@TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt")
public void testInlineOrdinaryOfCrossinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfCrossinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt");
} }
@TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt")
public void testInlineOrdinaryOfNoinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfNoinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt");
} }
@TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt")
public void testInlineSuspendOfCrossinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfCrossinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt");
} }
@TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt")
public void testInlineSuspendOfCrossinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfCrossinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt");
} }
@TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt")
public void testInlineSuspendOfNoinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfNoinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt");
} }
@TestMetadata("inlineSuspendOfNoinlineSuspend.kt") @TestMetadata("inlineSuspendOfNoinlineSuspend.kt")
public void testInlineSuspendOfNoinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfNoinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt");
} }
@TestMetadata("inlineSuspendOfOrdinary.kt") @TestMetadata("inlineSuspendOfOrdinary.kt")
public void testInlineSuspendOfOrdinary_1_3() throws Exception { public void testInlineSuspendOfOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt");
} }
@TestMetadata("inlineSuspendOfSuspend.kt") @TestMetadata("inlineSuspendOfSuspend.kt")
public void testInlineSuspendOfSuspend_1_3() throws Exception { public void testInlineSuspendOfSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt");
} }
@TestMetadata("kt26658.kt") @TestMetadata("kt26658.kt")
@@ -3631,18 +3627,18 @@ public class IrJsCodegenInlineTestGenerated extends AbstractIrJsCodegenInlineTes
} }
@TestMetadata("maxStackWithCrossinline.kt") @TestMetadata("maxStackWithCrossinline.kt")
public void testMaxStackWithCrossinline_1_3() throws Exception { public void testMaxStackWithCrossinline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/maxStackWithCrossinline.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/maxStackWithCrossinline.kt");
} }
@TestMetadata("multipleLocals.kt") @TestMetadata("multipleLocals.kt")
public void testMultipleLocals_1_3() throws Exception { public void testMultipleLocals() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt");
} }
@TestMetadata("multipleSuspensionPoints.kt") @TestMetadata("multipleSuspensionPoints.kt")
public void testMultipleSuspensionPoints_1_3() throws Exception { public void testMultipleSuspensionPoints() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt");
} }
@TestMetadata("nonLocalReturn.kt") @TestMetadata("nonLocalReturn.kt")
@@ -3651,23 +3647,23 @@ public class IrJsCodegenInlineTestGenerated extends AbstractIrJsCodegenInlineTes
} }
@TestMetadata("nonSuspendCrossinline.kt") @TestMetadata("nonSuspendCrossinline.kt")
public void testNonSuspendCrossinline_1_3() throws Exception { public void testNonSuspendCrossinline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/nonSuspendCrossinline.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/nonSuspendCrossinline.kt");
} }
@TestMetadata("returnValue.kt") @TestMetadata("returnValue.kt")
public void testReturnValue_1_3() throws Exception { public void testReturnValue() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/returnValue.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/returnValue.kt");
} }
@TestMetadata("tryCatchReceiver.kt") @TestMetadata("tryCatchReceiver.kt")
public void testTryCatchReceiver_1_3() throws Exception { public void testTryCatchReceiver() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/tryCatchReceiver.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/tryCatchReceiver.kt");
} }
@TestMetadata("tryCatchStackTransform.kt") @TestMetadata("tryCatchStackTransform.kt")
public void testTryCatchStackTransform_1_3() throws Exception { public void testTryCatchStackTransform() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt");
} }
@TestMetadata("twiceRegeneratedAnonymousObject.kt") @TestMetadata("twiceRegeneratedAnonymousObject.kt")
@@ -3726,17 +3722,13 @@ public class IrJsCodegenInlineTestGenerated extends AbstractIrJsCodegenInlineTes
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest0(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JS_IR, testDataFilePath);
}
public void testAllFilesPresentInDefaultParameter() throws Exception { public void testAllFilesPresentInDefaultParameter() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/defaultParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/defaultParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
} }
@TestMetadata("defaultValueCrossinline.kt") @TestMetadata("defaultValueCrossinline.kt")
public void testDefaultValueCrossinline_1_3() throws Exception { public void testDefaultValueCrossinline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt");
} }
@TestMetadata("defaultValueInClass.kt") @TestMetadata("defaultValueInClass.kt")
@@ -3744,14 +3736,14 @@ public class IrJsCodegenInlineTestGenerated extends AbstractIrJsCodegenInlineTes
runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInClass.kt"); runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInClass.kt");
} }
@TestMetadata("defaultValueInlineFromMultiFileFacade.kt") @TestMetadata("defaultValueInline.kt")
public void testDefaultValueInlineFromMultiFileFacade_1_3() throws Exception { public void testDefaultValueInline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInlineFromMultiFileFacade.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt");
} }
@TestMetadata("defaultValueInline.kt") @TestMetadata("defaultValueInlineFromMultiFileFacade.kt")
public void testDefaultValueInline_1_3() throws Exception { public void testDefaultValueInlineFromMultiFileFacade() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInlineFromMultiFileFacade.kt");
} }
} }
@@ -3809,52 +3801,48 @@ public class IrJsCodegenInlineTestGenerated extends AbstractIrJsCodegenInlineTes
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest0(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JS_IR, testDataFilePath);
}
public void testAllFilesPresentInReceiver() throws Exception { public void testAllFilesPresentInReceiver() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/receiver"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/receiver"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
} }
@TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt")
public void testInlineOrdinaryOfCrossinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfCrossinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt");
} }
@TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt")
public void testInlineOrdinaryOfNoinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfNoinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt");
} }
@TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt")
public void testInlineSuspendOfCrossinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfCrossinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt");
} }
@TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt")
public void testInlineSuspendOfCrossinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfCrossinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt");
} }
@TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt")
public void testInlineSuspendOfNoinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfNoinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt");
} }
@TestMetadata("inlineSuspendOfNoinlineSuspend.kt") @TestMetadata("inlineSuspendOfNoinlineSuspend.kt")
public void testInlineSuspendOfNoinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfNoinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt");
} }
@TestMetadata("inlineSuspendOfOrdinary.kt") @TestMetadata("inlineSuspendOfOrdinary.kt")
public void testInlineSuspendOfOrdinary_1_3() throws Exception { public void testInlineSuspendOfOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt");
} }
@TestMetadata("inlineSuspendOfSuspend.kt") @TestMetadata("inlineSuspendOfSuspend.kt")
public void testInlineSuspendOfSuspend_1_3() throws Exception { public void testInlineSuspendOfSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt");
} }
} }
@@ -3866,77 +3854,73 @@ public class IrJsCodegenInlineTestGenerated extends AbstractIrJsCodegenInlineTes
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest0(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JS_IR, testDataFilePath);
}
public void testAllFilesPresentInStateMachine() throws Exception { public void testAllFilesPresentInStateMachine() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/stateMachine"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/stateMachine"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
} }
@TestMetadata("crossingCoroutineBoundaries.kt") @TestMetadata("crossingCoroutineBoundaries.kt")
public void testCrossingCoroutineBoundaries_1_3() throws Exception { public void testCrossingCoroutineBoundaries() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/crossingCoroutineBoundaries.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/crossingCoroutineBoundaries.kt");
} }
@TestMetadata("independentInline.kt") @TestMetadata("independentInline.kt")
public void testIndependentInline_1_3() throws Exception { public void testIndependentInline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/independentInline.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/independentInline.kt");
}
@TestMetadata("innerLambdaInsideLambda.kt")
public void testInnerLambdaInsideLambda_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt", "kotlin.coroutines");
}
@TestMetadata("innerLambdaWithoutCrossinline.kt")
public void testInnerLambdaWithoutCrossinline_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt", "kotlin.coroutines");
} }
@TestMetadata("innerLambda.kt") @TestMetadata("innerLambda.kt")
public void testInnerLambda_1_3() throws Exception { public void testInnerLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt");
} }
@TestMetadata("innerMadnessCallSite.kt") @TestMetadata("innerLambdaInsideLambda.kt")
public void testInnerMadnessCallSite_1_3() throws Exception { public void testInnerLambdaInsideLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt");
}
@TestMetadata("innerLambdaWithoutCrossinline.kt")
public void testInnerLambdaWithoutCrossinline() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt");
} }
@TestMetadata("innerMadness.kt") @TestMetadata("innerMadness.kt")
public void testInnerMadness_1_3() throws Exception { public void testInnerMadness() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt");
} }
@TestMetadata("innerObjectInsideInnerObject.kt") @TestMetadata("innerMadnessCallSite.kt")
public void testInnerObjectInsideInnerObject_1_3() throws Exception { public void testInnerMadnessCallSite() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt");
}
@TestMetadata("innerObjectRetransformation.kt")
public void testInnerObjectRetransformation_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectRetransformation.kt", "kotlin.coroutines");
}
@TestMetadata("innerObjectSeveralFunctions.kt")
public void testInnerObjectSeveralFunctions_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt", "kotlin.coroutines");
}
@TestMetadata("innerObjectWithoutCapturingCrossinline.kt")
public void testInnerObjectWithoutCapturingCrossinline_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt", "kotlin.coroutines");
} }
@TestMetadata("innerObject.kt") @TestMetadata("innerObject.kt")
public void testInnerObject_1_3() throws Exception { public void testInnerObject() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt");
}
@TestMetadata("innerObjectInsideInnerObject.kt")
public void testInnerObjectInsideInnerObject() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt");
}
@TestMetadata("innerObjectRetransformation.kt")
public void testInnerObjectRetransformation() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectRetransformation.kt");
}
@TestMetadata("innerObjectSeveralFunctions.kt")
public void testInnerObjectSeveralFunctions() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt");
}
@TestMetadata("innerObjectWithoutCapturingCrossinline.kt")
public void testInnerObjectWithoutCapturingCrossinline() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt");
} }
@TestMetadata("insideObject.kt") @TestMetadata("insideObject.kt")
public void testInsideObject_1_3() throws Exception { public void testInsideObject() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/insideObject.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/insideObject.kt");
} }
@TestMetadata("lambdaTransformation.kt") @TestMetadata("lambdaTransformation.kt")
@@ -3945,43 +3929,43 @@ public class IrJsCodegenInlineTestGenerated extends AbstractIrJsCodegenInlineTes
} }
@TestMetadata("normalInline.kt") @TestMetadata("normalInline.kt")
public void testNormalInline_1_3() throws Exception { public void testNormalInline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt");
} }
@TestMetadata("numberOfSuspentions.kt") @TestMetadata("numberOfSuspentions.kt")
public void testNumberOfSuspentions_1_3() throws Exception { public void testNumberOfSuspentions() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt");
} }
@TestMetadata("objectInsideLambdas.kt") @TestMetadata("objectInsideLambdas.kt")
public void testObjectInsideLambdas_1_3() throws Exception { public void testObjectInsideLambdas() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/objectInsideLambdas.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/objectInsideLambdas.kt");
} }
@TestMetadata("oneInlineTwoCaptures.kt") @TestMetadata("oneInlineTwoCaptures.kt")
public void testOneInlineTwoCaptures_1_3() throws Exception { public void testOneInlineTwoCaptures() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/oneInlineTwoCaptures.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/oneInlineTwoCaptures.kt");
} }
@TestMetadata("passLambda.kt") @TestMetadata("passLambda.kt")
public void testPassLambda_1_3() throws Exception { public void testPassLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/passLambda.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/passLambda.kt");
}
@TestMetadata("passParameterLambda.kt")
public void testPassParameterLambda_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameterLambda.kt", "kotlin.coroutines");
} }
@TestMetadata("passParameter.kt") @TestMetadata("passParameter.kt")
public void testPassParameter_1_3() throws Exception { public void testPassParameter() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameter.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameter.kt");
}
@TestMetadata("passParameterLambda.kt")
public void testPassParameterLambda() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameterLambda.kt");
} }
@TestMetadata("unreachableSuspendMarker.kt") @TestMetadata("unreachableSuspendMarker.kt")
public void testUnreachableSuspendMarker_1_3() throws Exception { public void testUnreachableSuspendMarker() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/unreachableSuspendMarker.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/unreachableSuspendMarker.kt");
} }
} }
} }
File diff suppressed because it is too large Load Diff
@@ -3557,72 +3557,68 @@ public class JsCodegenInlineTestGenerated extends AbstractJsCodegenInlineTest {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest0(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JS, testDataFilePath);
}
public void testAllFilesPresentInSuspend() throws Exception { public void testAllFilesPresentInSuspend() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
} }
@TestMetadata("capturedVariables.kt") @TestMetadata("capturedVariables.kt")
public void testCapturedVariables_1_3() throws Exception { public void testCapturedVariables() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt");
} }
@TestMetadata("crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt") @TestMetadata("crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt")
public void testCrossinlineSuspendLambdaInsideCrossinlineSuspendLambda_1_3() throws Exception { public void testCrossinlineSuspendLambdaInsideCrossinlineSuspendLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt");
} }
@TestMetadata("delegatedProperties.kt") @TestMetadata("delegatedProperties.kt")
public void testDelegatedProperties_1_3() throws Exception { public void testDelegatedProperties() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/delegatedProperties.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/delegatedProperties.kt");
} }
@TestMetadata("doubleRegenerationWithNonSuspendingLambda.kt") @TestMetadata("doubleRegenerationWithNonSuspendingLambda.kt")
public void testDoubleRegenerationWithNonSuspendingLambda_1_3() throws Exception { public void testDoubleRegenerationWithNonSuspendingLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/doubleRegenerationWithNonSuspendingLambda.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/doubleRegenerationWithNonSuspendingLambda.kt");
} }
@TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt")
public void testInlineOrdinaryOfCrossinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfCrossinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt");
} }
@TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt")
public void testInlineOrdinaryOfNoinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfNoinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt");
} }
@TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt")
public void testInlineSuspendOfCrossinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfCrossinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt");
} }
@TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt")
public void testInlineSuspendOfCrossinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfCrossinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt");
} }
@TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt")
public void testInlineSuspendOfNoinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfNoinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt");
} }
@TestMetadata("inlineSuspendOfNoinlineSuspend.kt") @TestMetadata("inlineSuspendOfNoinlineSuspend.kt")
public void testInlineSuspendOfNoinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfNoinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt");
} }
@TestMetadata("inlineSuspendOfOrdinary.kt") @TestMetadata("inlineSuspendOfOrdinary.kt")
public void testInlineSuspendOfOrdinary_1_3() throws Exception { public void testInlineSuspendOfOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt");
} }
@TestMetadata("inlineSuspendOfSuspend.kt") @TestMetadata("inlineSuspendOfSuspend.kt")
public void testInlineSuspendOfSuspend_1_3() throws Exception { public void testInlineSuspendOfSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt");
} }
@TestMetadata("kt26658.kt") @TestMetadata("kt26658.kt")
@@ -3631,18 +3627,18 @@ public class JsCodegenInlineTestGenerated extends AbstractJsCodegenInlineTest {
} }
@TestMetadata("maxStackWithCrossinline.kt") @TestMetadata("maxStackWithCrossinline.kt")
public void testMaxStackWithCrossinline_1_3() throws Exception { public void testMaxStackWithCrossinline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/maxStackWithCrossinline.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/maxStackWithCrossinline.kt");
} }
@TestMetadata("multipleLocals.kt") @TestMetadata("multipleLocals.kt")
public void testMultipleLocals_1_3() throws Exception { public void testMultipleLocals() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt");
} }
@TestMetadata("multipleSuspensionPoints.kt") @TestMetadata("multipleSuspensionPoints.kt")
public void testMultipleSuspensionPoints_1_3() throws Exception { public void testMultipleSuspensionPoints() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt");
} }
@TestMetadata("nonLocalReturn.kt") @TestMetadata("nonLocalReturn.kt")
@@ -3651,23 +3647,23 @@ public class JsCodegenInlineTestGenerated extends AbstractJsCodegenInlineTest {
} }
@TestMetadata("nonSuspendCrossinline.kt") @TestMetadata("nonSuspendCrossinline.kt")
public void testNonSuspendCrossinline_1_3() throws Exception { public void testNonSuspendCrossinline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/nonSuspendCrossinline.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/nonSuspendCrossinline.kt");
} }
@TestMetadata("returnValue.kt") @TestMetadata("returnValue.kt")
public void testReturnValue_1_3() throws Exception { public void testReturnValue() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/returnValue.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/returnValue.kt");
} }
@TestMetadata("tryCatchReceiver.kt") @TestMetadata("tryCatchReceiver.kt")
public void testTryCatchReceiver_1_3() throws Exception { public void testTryCatchReceiver() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/tryCatchReceiver.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/tryCatchReceiver.kt");
} }
@TestMetadata("tryCatchStackTransform.kt") @TestMetadata("tryCatchStackTransform.kt")
public void testTryCatchStackTransform_1_3() throws Exception { public void testTryCatchStackTransform() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt");
} }
@TestMetadata("twiceRegeneratedAnonymousObject.kt") @TestMetadata("twiceRegeneratedAnonymousObject.kt")
@@ -3726,17 +3722,13 @@ public class JsCodegenInlineTestGenerated extends AbstractJsCodegenInlineTest {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest0(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JS, testDataFilePath);
}
public void testAllFilesPresentInDefaultParameter() throws Exception { public void testAllFilesPresentInDefaultParameter() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/defaultParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/defaultParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
} }
@TestMetadata("defaultValueCrossinline.kt") @TestMetadata("defaultValueCrossinline.kt")
public void testDefaultValueCrossinline_1_3() throws Exception { public void testDefaultValueCrossinline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt");
} }
@TestMetadata("defaultValueInClass.kt") @TestMetadata("defaultValueInClass.kt")
@@ -3744,14 +3736,14 @@ public class JsCodegenInlineTestGenerated extends AbstractJsCodegenInlineTest {
runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInClass.kt"); runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInClass.kt");
} }
@TestMetadata("defaultValueInlineFromMultiFileFacade.kt") @TestMetadata("defaultValueInline.kt")
public void testDefaultValueInlineFromMultiFileFacade_1_3() throws Exception { public void testDefaultValueInline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInlineFromMultiFileFacade.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt");
} }
@TestMetadata("defaultValueInline.kt") @TestMetadata("defaultValueInlineFromMultiFileFacade.kt")
public void testDefaultValueInline_1_3() throws Exception { public void testDefaultValueInlineFromMultiFileFacade() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInlineFromMultiFileFacade.kt");
} }
} }
@@ -3809,52 +3801,48 @@ public class JsCodegenInlineTestGenerated extends AbstractJsCodegenInlineTest {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest0(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JS, testDataFilePath);
}
public void testAllFilesPresentInReceiver() throws Exception { public void testAllFilesPresentInReceiver() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/receiver"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/receiver"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
} }
@TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt")
public void testInlineOrdinaryOfCrossinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfCrossinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt");
} }
@TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt")
public void testInlineOrdinaryOfNoinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfNoinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt");
} }
@TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt")
public void testInlineSuspendOfCrossinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfCrossinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt");
} }
@TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt")
public void testInlineSuspendOfCrossinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfCrossinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt");
} }
@TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt")
public void testInlineSuspendOfNoinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfNoinlineOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt");
} }
@TestMetadata("inlineSuspendOfNoinlineSuspend.kt") @TestMetadata("inlineSuspendOfNoinlineSuspend.kt")
public void testInlineSuspendOfNoinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfNoinlineSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt");
} }
@TestMetadata("inlineSuspendOfOrdinary.kt") @TestMetadata("inlineSuspendOfOrdinary.kt")
public void testInlineSuspendOfOrdinary_1_3() throws Exception { public void testInlineSuspendOfOrdinary() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt");
} }
@TestMetadata("inlineSuspendOfSuspend.kt") @TestMetadata("inlineSuspendOfSuspend.kt")
public void testInlineSuspendOfSuspend_1_3() throws Exception { public void testInlineSuspendOfSuspend() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt");
} }
} }
@@ -3866,77 +3854,73 @@ public class JsCodegenInlineTestGenerated extends AbstractJsCodegenInlineTest {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest0(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JS, testDataFilePath);
}
public void testAllFilesPresentInStateMachine() throws Exception { public void testAllFilesPresentInStateMachine() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/stateMachine"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/stateMachine"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
} }
@TestMetadata("crossingCoroutineBoundaries.kt") @TestMetadata("crossingCoroutineBoundaries.kt")
public void testCrossingCoroutineBoundaries_1_3() throws Exception { public void testCrossingCoroutineBoundaries() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/crossingCoroutineBoundaries.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/crossingCoroutineBoundaries.kt");
} }
@TestMetadata("independentInline.kt") @TestMetadata("independentInline.kt")
public void testIndependentInline_1_3() throws Exception { public void testIndependentInline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/independentInline.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/independentInline.kt");
}
@TestMetadata("innerLambdaInsideLambda.kt")
public void testInnerLambdaInsideLambda_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt", "kotlin.coroutines");
}
@TestMetadata("innerLambdaWithoutCrossinline.kt")
public void testInnerLambdaWithoutCrossinline_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt", "kotlin.coroutines");
} }
@TestMetadata("innerLambda.kt") @TestMetadata("innerLambda.kt")
public void testInnerLambda_1_3() throws Exception { public void testInnerLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt");
} }
@TestMetadata("innerMadnessCallSite.kt") @TestMetadata("innerLambdaInsideLambda.kt")
public void testInnerMadnessCallSite_1_3() throws Exception { public void testInnerLambdaInsideLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt");
}
@TestMetadata("innerLambdaWithoutCrossinline.kt")
public void testInnerLambdaWithoutCrossinline() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt");
} }
@TestMetadata("innerMadness.kt") @TestMetadata("innerMadness.kt")
public void testInnerMadness_1_3() throws Exception { public void testInnerMadness() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt");
} }
@TestMetadata("innerObjectInsideInnerObject.kt") @TestMetadata("innerMadnessCallSite.kt")
public void testInnerObjectInsideInnerObject_1_3() throws Exception { public void testInnerMadnessCallSite() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt");
}
@TestMetadata("innerObjectRetransformation.kt")
public void testInnerObjectRetransformation_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectRetransformation.kt", "kotlin.coroutines");
}
@TestMetadata("innerObjectSeveralFunctions.kt")
public void testInnerObjectSeveralFunctions_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt", "kotlin.coroutines");
}
@TestMetadata("innerObjectWithoutCapturingCrossinline.kt")
public void testInnerObjectWithoutCapturingCrossinline_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt", "kotlin.coroutines");
} }
@TestMetadata("innerObject.kt") @TestMetadata("innerObject.kt")
public void testInnerObject_1_3() throws Exception { public void testInnerObject() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt");
}
@TestMetadata("innerObjectInsideInnerObject.kt")
public void testInnerObjectInsideInnerObject() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt");
}
@TestMetadata("innerObjectRetransformation.kt")
public void testInnerObjectRetransformation() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectRetransformation.kt");
}
@TestMetadata("innerObjectSeveralFunctions.kt")
public void testInnerObjectSeveralFunctions() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt");
}
@TestMetadata("innerObjectWithoutCapturingCrossinline.kt")
public void testInnerObjectWithoutCapturingCrossinline() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt");
} }
@TestMetadata("insideObject.kt") @TestMetadata("insideObject.kt")
public void testInsideObject_1_3() throws Exception { public void testInsideObject() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/insideObject.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/insideObject.kt");
} }
@TestMetadata("lambdaTransformation.kt") @TestMetadata("lambdaTransformation.kt")
@@ -3945,43 +3929,43 @@ public class JsCodegenInlineTestGenerated extends AbstractJsCodegenInlineTest {
} }
@TestMetadata("normalInline.kt") @TestMetadata("normalInline.kt")
public void testNormalInline_1_3() throws Exception { public void testNormalInline() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt");
} }
@TestMetadata("numberOfSuspentions.kt") @TestMetadata("numberOfSuspentions.kt")
public void testNumberOfSuspentions_1_3() throws Exception { public void testNumberOfSuspentions() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt");
} }
@TestMetadata("objectInsideLambdas.kt") @TestMetadata("objectInsideLambdas.kt")
public void testObjectInsideLambdas_1_3() throws Exception { public void testObjectInsideLambdas() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/objectInsideLambdas.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/objectInsideLambdas.kt");
} }
@TestMetadata("oneInlineTwoCaptures.kt") @TestMetadata("oneInlineTwoCaptures.kt")
public void testOneInlineTwoCaptures_1_3() throws Exception { public void testOneInlineTwoCaptures() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/oneInlineTwoCaptures.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/oneInlineTwoCaptures.kt");
} }
@TestMetadata("passLambda.kt") @TestMetadata("passLambda.kt")
public void testPassLambda_1_3() throws Exception { public void testPassLambda() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/passLambda.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/passLambda.kt");
}
@TestMetadata("passParameterLambda.kt")
public void testPassParameterLambda_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameterLambda.kt", "kotlin.coroutines");
} }
@TestMetadata("passParameter.kt") @TestMetadata("passParameter.kt")
public void testPassParameter_1_3() throws Exception { public void testPassParameter() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameter.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameter.kt");
}
@TestMetadata("passParameterLambda.kt")
public void testPassParameterLambda() throws Exception {
runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/passParameterLambda.kt");
} }
@TestMetadata("unreachableSuspendMarker.kt") @TestMetadata("unreachableSuspendMarker.kt")
public void testUnreachableSuspendMarker_1_3() throws Exception { public void testUnreachableSuspendMarker() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/unreachableSuspendMarker.kt", "kotlin.coroutines"); runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/unreachableSuspendMarker.kt");
} }
} }
} }
@@ -594,10 +594,6 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath); KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest0(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.WASM, testDataFilePath);
}
public void testAllFilesPresentInJvm() throws Exception { public void testAllFilesPresentInJvm() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/assert/jvm"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/assert/jvm"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
} }
@@ -2861,10 +2857,6 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath); KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest0(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.WASM, testDataFilePath);
}
public void testAllFilesPresentInCapturedVarsOptimization() throws Exception { public void testAllFilesPresentInCapturedVarsOptimization() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/closures/capturedVarsOptimization"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/closures/capturedVarsOptimization"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
} }