Fix coroutine test generator

This commit is contained in:
Roman Artemev
2018-06-15 20:16:50 +03:00
committed by Roman Artemev
parent f1a44ed1a4
commit c887b88ed9
18 changed files with 2597 additions and 5382 deletions
File diff suppressed because it is too large Load Diff
@@ -3201,188 +3201,162 @@ 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.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true);
} }
@TestMetadata("capturedVariables.kt") @TestMetadata("capturedVariables.kt")
public void testCapturedVariables_1_2() throws Exception { public void testCapturedVariables_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("capturedVariables.kt") @TestMetadata("capturedVariables.kt")
public void testCapturedVariables_1_3() throws Exception { public void testCapturedVariables_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt") @TestMetadata("crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt")
public void testCrossinlineSuspendLambdaInsideCrossinlineSuspendLambda_1_2() throws Exception { public void testCrossinlineSuspendLambdaInsideCrossinlineSuspendLambda_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt") @TestMetadata("crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt")
public void testCrossinlineSuspendLambdaInsideCrossinlineSuspendLambda_1_3() throws Exception { public void testCrossinlineSuspendLambdaInsideCrossinlineSuspendLambda_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt")
public void testInlineOrdinaryOfCrossinlineSuspend_1_2() throws Exception { public void testInlineOrdinaryOfCrossinlineSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt")
public void testInlineOrdinaryOfCrossinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfCrossinlineSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt")
public void testInlineOrdinaryOfNoinlineSuspend_1_2() throws Exception { public void testInlineOrdinaryOfNoinlineSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt")
public void testInlineOrdinaryOfNoinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfNoinlineSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendContinuation.kt") @TestMetadata("inlineSuspendContinuation.kt")
public void testInlineSuspendContinuation_1_2() throws Exception { public void testInlineSuspendContinuation_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendContinuation.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendContinuation.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendContinuation.kt") @TestMetadata("inlineSuspendContinuation.kt")
public void testInlineSuspendContinuation_1_3() throws Exception { public void testInlineSuspendContinuation_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendContinuation.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendContinuation.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt")
public void testInlineSuspendOfCrossinlineOrdinary_1_2() throws Exception { public void testInlineSuspendOfCrossinlineOrdinary_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt")
public void testInlineSuspendOfCrossinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfCrossinlineOrdinary_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt")
public void testInlineSuspendOfCrossinlineSuspend_1_2() throws Exception { public void testInlineSuspendOfCrossinlineSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt")
public void testInlineSuspendOfCrossinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfCrossinlineSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt")
public void testInlineSuspendOfNoinlineOrdinary_1_2() throws Exception { public void testInlineSuspendOfNoinlineOrdinary_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt")
public void testInlineSuspendOfNoinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfNoinlineOrdinary_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfNoinlineSuspend.kt") @TestMetadata("inlineSuspendOfNoinlineSuspend.kt")
public void testInlineSuspendOfNoinlineSuspend_1_2() throws Exception { public void testInlineSuspendOfNoinlineSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfNoinlineSuspend.kt") @TestMetadata("inlineSuspendOfNoinlineSuspend.kt")
public void testInlineSuspendOfNoinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfNoinlineSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfOrdinary.kt") @TestMetadata("inlineSuspendOfOrdinary.kt")
public void testInlineSuspendOfOrdinary_1_2() throws Exception { public void testInlineSuspendOfOrdinary_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfOrdinary.kt") @TestMetadata("inlineSuspendOfOrdinary.kt")
public void testInlineSuspendOfOrdinary_1_3() throws Exception { public void testInlineSuspendOfOrdinary_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfSuspend.kt") @TestMetadata("inlineSuspendOfSuspend.kt")
public void testInlineSuspendOfSuspend_1_2() throws Exception { public void testInlineSuspendOfSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfSuspend.kt") @TestMetadata("inlineSuspendOfSuspend.kt")
public void testInlineSuspendOfSuspend_1_3() throws Exception { public void testInlineSuspendOfSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("multipleLocals.kt") @TestMetadata("multipleLocals.kt")
public void testMultipleLocals_1_2() throws Exception { public void testMultipleLocals_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("multipleLocals.kt") @TestMetadata("multipleLocals.kt")
public void testMultipleLocals_1_3() throws Exception { public void testMultipleLocals_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("multipleSuspensionPoints.kt") @TestMetadata("multipleSuspensionPoints.kt")
public void testMultipleSuspensionPoints_1_2() throws Exception { public void testMultipleSuspensionPoints_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("multipleSuspensionPoints.kt") @TestMetadata("multipleSuspensionPoints.kt")
public void testMultipleSuspensionPoints_1_3() throws Exception { public void testMultipleSuspensionPoints_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("returnValue.kt") @TestMetadata("returnValue.kt")
public void testReturnValue_1_2() throws Exception { public void testReturnValue_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/returnValue.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/returnValue.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("returnValue.kt") @TestMetadata("returnValue.kt")
public void testReturnValue_1_3() throws Exception { public void testReturnValue_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/returnValue.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/returnValue.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("tryCatchStackTransform.kt") @TestMetadata("tryCatchStackTransform.kt")
public void testTryCatchStackTransform_1_2() throws Exception { public void testTryCatchStackTransform_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("tryCatchStackTransform.kt") @TestMetadata("tryCatchStackTransform.kt")
public void testTryCatchStackTransform_1_3() throws Exception { public void testTryCatchStackTransform_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("compiler/testData/codegen/boxInline/suspend/defaultParameter") @TestMetadata("compiler/testData/codegen/boxInline/suspend/defaultParameter")
@@ -3393,32 +3367,32 @@ 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.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/defaultParameter"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/defaultParameter"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true);
} }
@TestMetadata("defaultValueCrossinline.kt") @TestMetadata("defaultValueCrossinline.kt")
public void testDefaultValueCrossinline_1_2() throws Exception { public void testDefaultValueCrossinline_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("defaultValueCrossinline.kt") @TestMetadata("defaultValueCrossinline.kt")
public void testDefaultValueCrossinline_1_3() throws Exception { public void testDefaultValueCrossinline_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("defaultValueInline.kt") @TestMetadata("defaultValueInline.kt")
public void testDefaultValueInline_1_2() throws Exception { public void testDefaultValueInline_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("defaultValueInline.kt") @TestMetadata("defaultValueInline.kt")
public void testDefaultValueInline_1_3() throws Exception { public void testDefaultValueInline_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
} }
@@ -3453,104 +3427,92 @@ 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.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/receiver"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/receiver"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true);
} }
@TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt")
public void testInlineOrdinaryOfCrossinlineSuspend_1_2() throws Exception { public void testInlineOrdinaryOfCrossinlineSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt")
public void testInlineOrdinaryOfCrossinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfCrossinlineSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt")
public void testInlineOrdinaryOfNoinlineSuspend_1_2() throws Exception { public void testInlineOrdinaryOfNoinlineSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt")
public void testInlineOrdinaryOfNoinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfNoinlineSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt")
public void testInlineSuspendOfCrossinlineOrdinary_1_2() throws Exception { public void testInlineSuspendOfCrossinlineOrdinary_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt")
public void testInlineSuspendOfCrossinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfCrossinlineOrdinary_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt")
public void testInlineSuspendOfCrossinlineSuspend_1_2() throws Exception { public void testInlineSuspendOfCrossinlineSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt")
public void testInlineSuspendOfCrossinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfCrossinlineSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt")
public void testInlineSuspendOfNoinlineOrdinary_1_2() throws Exception { public void testInlineSuspendOfNoinlineOrdinary_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt")
public void testInlineSuspendOfNoinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfNoinlineOrdinary_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfNoinlineSuspend.kt") @TestMetadata("inlineSuspendOfNoinlineSuspend.kt")
public void testInlineSuspendOfNoinlineSuspend_1_2() throws Exception { public void testInlineSuspendOfNoinlineSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfNoinlineSuspend.kt") @TestMetadata("inlineSuspendOfNoinlineSuspend.kt")
public void testInlineSuspendOfNoinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfNoinlineSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfOrdinary.kt") @TestMetadata("inlineSuspendOfOrdinary.kt")
public void testInlineSuspendOfOrdinary_1_2() throws Exception { public void testInlineSuspendOfOrdinary_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfOrdinary.kt") @TestMetadata("inlineSuspendOfOrdinary.kt")
public void testInlineSuspendOfOrdinary_1_3() throws Exception { public void testInlineSuspendOfOrdinary_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfSuspend.kt") @TestMetadata("inlineSuspendOfSuspend.kt")
public void testInlineSuspendOfSuspend_1_2() throws Exception { public void testInlineSuspendOfSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfSuspend.kt") @TestMetadata("inlineSuspendOfSuspend.kt")
public void testInlineSuspendOfSuspend_1_3() throws Exception { public void testInlineSuspendOfSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
} }
@@ -3562,140 +3524,122 @@ 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.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/stateMachine"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/stateMachine"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true);
} }
@TestMetadata("innerLambdaInsideLambda.kt") @TestMetadata("innerLambdaInsideLambda.kt")
public void testInnerLambdaInsideLambda_1_2() throws Exception { public void testInnerLambdaInsideLambda_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("innerLambdaInsideLambda.kt") @TestMetadata("innerLambdaInsideLambda.kt")
public void testInnerLambdaInsideLambda_1_3() throws Exception { public void testInnerLambdaInsideLambda_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("innerLambdaWithoutCrossinline.kt") @TestMetadata("innerLambdaWithoutCrossinline.kt")
public void testInnerLambdaWithoutCrossinline_1_2() throws Exception { public void testInnerLambdaWithoutCrossinline_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("innerLambdaWithoutCrossinline.kt") @TestMetadata("innerLambdaWithoutCrossinline.kt")
public void testInnerLambdaWithoutCrossinline_1_3() throws Exception { public void testInnerLambdaWithoutCrossinline_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("innerLambda.kt") @TestMetadata("innerLambda.kt")
public void testInnerLambda_1_2() throws Exception { public void testInnerLambda_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("innerLambda.kt") @TestMetadata("innerLambda.kt")
public void testInnerLambda_1_3() throws Exception { public void testInnerLambda_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("innerMadnessCallSite.kt") @TestMetadata("innerMadnessCallSite.kt")
public void testInnerMadnessCallSite_1_2() throws Exception { public void testInnerMadnessCallSite_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("innerMadnessCallSite.kt") @TestMetadata("innerMadnessCallSite.kt")
public void testInnerMadnessCallSite_1_3() throws Exception { public void testInnerMadnessCallSite_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("innerMadness.kt") @TestMetadata("innerMadness.kt")
public void testInnerMadness_1_2() throws Exception { public void testInnerMadness_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("innerMadness.kt") @TestMetadata("innerMadness.kt")
public void testInnerMadness_1_3() throws Exception { public void testInnerMadness_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("innerObjectInsideInnerObject.kt") @TestMetadata("innerObjectInsideInnerObject.kt")
public void testInnerObjectInsideInnerObject_1_2() throws Exception { public void testInnerObjectInsideInnerObject_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("innerObjectInsideInnerObject.kt") @TestMetadata("innerObjectInsideInnerObject.kt")
public void testInnerObjectInsideInnerObject_1_3() throws Exception { public void testInnerObjectInsideInnerObject_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("innerObjectSeveralFunctions.kt") @TestMetadata("innerObjectSeveralFunctions.kt")
public void testInnerObjectSeveralFunctions_1_2() throws Exception { public void testInnerObjectSeveralFunctions_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("innerObjectSeveralFunctions.kt") @TestMetadata("innerObjectSeveralFunctions.kt")
public void testInnerObjectSeveralFunctions_1_3() throws Exception { public void testInnerObjectSeveralFunctions_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("innerObjectWithoutCapturingCrossinline.kt") @TestMetadata("innerObjectWithoutCapturingCrossinline.kt")
public void testInnerObjectWithoutCapturingCrossinline_1_2() throws Exception { public void testInnerObjectWithoutCapturingCrossinline_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("innerObjectWithoutCapturingCrossinline.kt") @TestMetadata("innerObjectWithoutCapturingCrossinline.kt")
public void testInnerObjectWithoutCapturingCrossinline_1_3() throws Exception { public void testInnerObjectWithoutCapturingCrossinline_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("innerObject.kt") @TestMetadata("innerObject.kt")
public void testInnerObject_1_2() throws Exception { public void testInnerObject_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("innerObject.kt") @TestMetadata("innerObject.kt")
public void testInnerObject_1_3() throws Exception { public void testInnerObject_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("normalInline.kt") @TestMetadata("normalInline.kt")
public void testNormalInline_1_2() throws Exception { public void testNormalInline_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("normalInline.kt") @TestMetadata("normalInline.kt")
public void testNormalInline_1_3() throws Exception { public void testNormalInline_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("numberOfSuspentions.kt") @TestMetadata("numberOfSuspentions.kt")
public void testNumberOfSuspentions_1_2() throws Exception { public void testNumberOfSuspentions_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("numberOfSuspentions.kt") @TestMetadata("numberOfSuspentions.kt")
public void testNumberOfSuspentions_1_3() throws Exception { public void testNumberOfSuspentions_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
} }
} }
@@ -3201,188 +3201,162 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC
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.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true);
} }
@TestMetadata("capturedVariables.kt") @TestMetadata("capturedVariables.kt")
public void testCapturedVariables_1_2() throws Exception { public void testCapturedVariables_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("capturedVariables.kt") @TestMetadata("capturedVariables.kt")
public void testCapturedVariables_1_3() throws Exception { public void testCapturedVariables_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt") @TestMetadata("crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt")
public void testCrossinlineSuspendLambdaInsideCrossinlineSuspendLambda_1_2() throws Exception { public void testCrossinlineSuspendLambdaInsideCrossinlineSuspendLambda_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt") @TestMetadata("crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt")
public void testCrossinlineSuspendLambdaInsideCrossinlineSuspendLambda_1_3() throws Exception { public void testCrossinlineSuspendLambdaInsideCrossinlineSuspendLambda_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt")
public void testInlineOrdinaryOfCrossinlineSuspend_1_2() throws Exception { public void testInlineOrdinaryOfCrossinlineSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt")
public void testInlineOrdinaryOfCrossinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfCrossinlineSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt")
public void testInlineOrdinaryOfNoinlineSuspend_1_2() throws Exception { public void testInlineOrdinaryOfNoinlineSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt")
public void testInlineOrdinaryOfNoinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfNoinlineSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendContinuation.kt") @TestMetadata("inlineSuspendContinuation.kt")
public void testInlineSuspendContinuation_1_2() throws Exception { public void testInlineSuspendContinuation_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendContinuation.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendContinuation.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendContinuation.kt") @TestMetadata("inlineSuspendContinuation.kt")
public void testInlineSuspendContinuation_1_3() throws Exception { public void testInlineSuspendContinuation_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendContinuation.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendContinuation.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt")
public void testInlineSuspendOfCrossinlineOrdinary_1_2() throws Exception { public void testInlineSuspendOfCrossinlineOrdinary_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt")
public void testInlineSuspendOfCrossinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfCrossinlineOrdinary_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt")
public void testInlineSuspendOfCrossinlineSuspend_1_2() throws Exception { public void testInlineSuspendOfCrossinlineSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt")
public void testInlineSuspendOfCrossinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfCrossinlineSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt")
public void testInlineSuspendOfNoinlineOrdinary_1_2() throws Exception { public void testInlineSuspendOfNoinlineOrdinary_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt")
public void testInlineSuspendOfNoinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfNoinlineOrdinary_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfNoinlineSuspend.kt") @TestMetadata("inlineSuspendOfNoinlineSuspend.kt")
public void testInlineSuspendOfNoinlineSuspend_1_2() throws Exception { public void testInlineSuspendOfNoinlineSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfNoinlineSuspend.kt") @TestMetadata("inlineSuspendOfNoinlineSuspend.kt")
public void testInlineSuspendOfNoinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfNoinlineSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfOrdinary.kt") @TestMetadata("inlineSuspendOfOrdinary.kt")
public void testInlineSuspendOfOrdinary_1_2() throws Exception { public void testInlineSuspendOfOrdinary_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfOrdinary.kt") @TestMetadata("inlineSuspendOfOrdinary.kt")
public void testInlineSuspendOfOrdinary_1_3() throws Exception { public void testInlineSuspendOfOrdinary_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfSuspend.kt") @TestMetadata("inlineSuspendOfSuspend.kt")
public void testInlineSuspendOfSuspend_1_2() throws Exception { public void testInlineSuspendOfSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfSuspend.kt") @TestMetadata("inlineSuspendOfSuspend.kt")
public void testInlineSuspendOfSuspend_1_3() throws Exception { public void testInlineSuspendOfSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("multipleLocals.kt") @TestMetadata("multipleLocals.kt")
public void testMultipleLocals_1_2() throws Exception { public void testMultipleLocals_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("multipleLocals.kt") @TestMetadata("multipleLocals.kt")
public void testMultipleLocals_1_3() throws Exception { public void testMultipleLocals_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("multipleSuspensionPoints.kt") @TestMetadata("multipleSuspensionPoints.kt")
public void testMultipleSuspensionPoints_1_2() throws Exception { public void testMultipleSuspensionPoints_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("multipleSuspensionPoints.kt") @TestMetadata("multipleSuspensionPoints.kt")
public void testMultipleSuspensionPoints_1_3() throws Exception { public void testMultipleSuspensionPoints_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("returnValue.kt") @TestMetadata("returnValue.kt")
public void testReturnValue_1_2() throws Exception { public void testReturnValue_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/returnValue.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/returnValue.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("returnValue.kt") @TestMetadata("returnValue.kt")
public void testReturnValue_1_3() throws Exception { public void testReturnValue_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/returnValue.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/returnValue.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("tryCatchStackTransform.kt") @TestMetadata("tryCatchStackTransform.kt")
public void testTryCatchStackTransform_1_2() throws Exception { public void testTryCatchStackTransform_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("tryCatchStackTransform.kt") @TestMetadata("tryCatchStackTransform.kt")
public void testTryCatchStackTransform_1_3() throws Exception { public void testTryCatchStackTransform_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("compiler/testData/codegen/boxInline/suspend/defaultParameter") @TestMetadata("compiler/testData/codegen/boxInline/suspend/defaultParameter")
@@ -3393,32 +3367,32 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC
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.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/defaultParameter"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/defaultParameter"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true);
} }
@TestMetadata("defaultValueCrossinline.kt") @TestMetadata("defaultValueCrossinline.kt")
public void testDefaultValueCrossinline_1_2() throws Exception { public void testDefaultValueCrossinline_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("defaultValueCrossinline.kt") @TestMetadata("defaultValueCrossinline.kt")
public void testDefaultValueCrossinline_1_3() throws Exception { public void testDefaultValueCrossinline_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("defaultValueInline.kt") @TestMetadata("defaultValueInline.kt")
public void testDefaultValueInline_1_2() throws Exception { public void testDefaultValueInline_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("defaultValueInline.kt") @TestMetadata("defaultValueInline.kt")
public void testDefaultValueInline_1_3() throws Exception { public void testDefaultValueInline_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
} }
@@ -3453,104 +3427,92 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC
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.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/receiver"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/receiver"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true);
} }
@TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt")
public void testInlineOrdinaryOfCrossinlineSuspend_1_2() throws Exception { public void testInlineOrdinaryOfCrossinlineSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt")
public void testInlineOrdinaryOfCrossinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfCrossinlineSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt")
public void testInlineOrdinaryOfNoinlineSuspend_1_2() throws Exception { public void testInlineOrdinaryOfNoinlineSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt")
public void testInlineOrdinaryOfNoinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfNoinlineSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt")
public void testInlineSuspendOfCrossinlineOrdinary_1_2() throws Exception { public void testInlineSuspendOfCrossinlineOrdinary_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt")
public void testInlineSuspendOfCrossinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfCrossinlineOrdinary_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt")
public void testInlineSuspendOfCrossinlineSuspend_1_2() throws Exception { public void testInlineSuspendOfCrossinlineSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt")
public void testInlineSuspendOfCrossinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfCrossinlineSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt")
public void testInlineSuspendOfNoinlineOrdinary_1_2() throws Exception { public void testInlineSuspendOfNoinlineOrdinary_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt")
public void testInlineSuspendOfNoinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfNoinlineOrdinary_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfNoinlineSuspend.kt") @TestMetadata("inlineSuspendOfNoinlineSuspend.kt")
public void testInlineSuspendOfNoinlineSuspend_1_2() throws Exception { public void testInlineSuspendOfNoinlineSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfNoinlineSuspend.kt") @TestMetadata("inlineSuspendOfNoinlineSuspend.kt")
public void testInlineSuspendOfNoinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfNoinlineSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfOrdinary.kt") @TestMetadata("inlineSuspendOfOrdinary.kt")
public void testInlineSuspendOfOrdinary_1_2() throws Exception { public void testInlineSuspendOfOrdinary_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfOrdinary.kt") @TestMetadata("inlineSuspendOfOrdinary.kt")
public void testInlineSuspendOfOrdinary_1_3() throws Exception { public void testInlineSuspendOfOrdinary_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfSuspend.kt") @TestMetadata("inlineSuspendOfSuspend.kt")
public void testInlineSuspendOfSuspend_1_2() throws Exception { public void testInlineSuspendOfSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfSuspend.kt") @TestMetadata("inlineSuspendOfSuspend.kt")
public void testInlineSuspendOfSuspend_1_3() throws Exception { public void testInlineSuspendOfSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
} }
@@ -3562,140 +3524,122 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC
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.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/stateMachine"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/stateMachine"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true);
} }
@TestMetadata("innerLambdaInsideLambda.kt") @TestMetadata("innerLambdaInsideLambda.kt")
public void testInnerLambdaInsideLambda_1_2() throws Exception { public void testInnerLambdaInsideLambda_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("innerLambdaInsideLambda.kt") @TestMetadata("innerLambdaInsideLambda.kt")
public void testInnerLambdaInsideLambda_1_3() throws Exception { public void testInnerLambdaInsideLambda_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("innerLambdaWithoutCrossinline.kt") @TestMetadata("innerLambdaWithoutCrossinline.kt")
public void testInnerLambdaWithoutCrossinline_1_2() throws Exception { public void testInnerLambdaWithoutCrossinline_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("innerLambdaWithoutCrossinline.kt") @TestMetadata("innerLambdaWithoutCrossinline.kt")
public void testInnerLambdaWithoutCrossinline_1_3() throws Exception { public void testInnerLambdaWithoutCrossinline_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("innerLambda.kt") @TestMetadata("innerLambda.kt")
public void testInnerLambda_1_2() throws Exception { public void testInnerLambda_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("innerLambda.kt") @TestMetadata("innerLambda.kt")
public void testInnerLambda_1_3() throws Exception { public void testInnerLambda_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("innerMadnessCallSite.kt") @TestMetadata("innerMadnessCallSite.kt")
public void testInnerMadnessCallSite_1_2() throws Exception { public void testInnerMadnessCallSite_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("innerMadnessCallSite.kt") @TestMetadata("innerMadnessCallSite.kt")
public void testInnerMadnessCallSite_1_3() throws Exception { public void testInnerMadnessCallSite_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("innerMadness.kt") @TestMetadata("innerMadness.kt")
public void testInnerMadness_1_2() throws Exception { public void testInnerMadness_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("innerMadness.kt") @TestMetadata("innerMadness.kt")
public void testInnerMadness_1_3() throws Exception { public void testInnerMadness_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("innerObjectInsideInnerObject.kt") @TestMetadata("innerObjectInsideInnerObject.kt")
public void testInnerObjectInsideInnerObject_1_2() throws Exception { public void testInnerObjectInsideInnerObject_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("innerObjectInsideInnerObject.kt") @TestMetadata("innerObjectInsideInnerObject.kt")
public void testInnerObjectInsideInnerObject_1_3() throws Exception { public void testInnerObjectInsideInnerObject_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("innerObjectSeveralFunctions.kt") @TestMetadata("innerObjectSeveralFunctions.kt")
public void testInnerObjectSeveralFunctions_1_2() throws Exception { public void testInnerObjectSeveralFunctions_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("innerObjectSeveralFunctions.kt") @TestMetadata("innerObjectSeveralFunctions.kt")
public void testInnerObjectSeveralFunctions_1_3() throws Exception { public void testInnerObjectSeveralFunctions_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("innerObjectWithoutCapturingCrossinline.kt") @TestMetadata("innerObjectWithoutCapturingCrossinline.kt")
public void testInnerObjectWithoutCapturingCrossinline_1_2() throws Exception { public void testInnerObjectWithoutCapturingCrossinline_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("innerObjectWithoutCapturingCrossinline.kt") @TestMetadata("innerObjectWithoutCapturingCrossinline.kt")
public void testInnerObjectWithoutCapturingCrossinline_1_3() throws Exception { public void testInnerObjectWithoutCapturingCrossinline_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("innerObject.kt") @TestMetadata("innerObject.kt")
public void testInnerObject_1_2() throws Exception { public void testInnerObject_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("innerObject.kt") @TestMetadata("innerObject.kt")
public void testInnerObject_1_3() throws Exception { public void testInnerObject_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("normalInline.kt") @TestMetadata("normalInline.kt")
public void testNormalInline_1_2() throws Exception { public void testNormalInline_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("normalInline.kt") @TestMetadata("normalInline.kt")
public void testNormalInline_1_3() throws Exception { public void testNormalInline_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("numberOfSuspentions.kt") @TestMetadata("numberOfSuspentions.kt")
public void testNumberOfSuspentions_1_2() throws Exception { public void testNumberOfSuspentions_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("numberOfSuspentions.kt") @TestMetadata("numberOfSuspentions.kt")
public void testNumberOfSuspentions_1_3() throws Exception { public void testNumberOfSuspentions_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
} }
} }
@@ -25,32 +25,32 @@ public class BlackBoxWithJava8CodegenTestGenerated extends AbstractBlackBoxCodeg
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.ANY, testDataFilePath);
}
public void testAllFilesPresentInBox() throws Exception { public void testAllFilesPresentInBox() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/box"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/box"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
} }
@TestMetadata("asyncException.kt") @TestMetadata("asyncException.kt")
public void testAsyncException_1_2() throws Exception { public void testAsyncException_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/asyncException.kt"); runTestWithPackageReplacement("compiler/testData/codegen/java8/box/asyncException.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("asyncException.kt") @TestMetadata("asyncException.kt")
public void testAsyncException_1_3() throws Exception { public void testAsyncException_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/asyncException.kt"); runTestWithPackageReplacement("compiler/testData/codegen/java8/box/asyncException.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("async.kt") @TestMetadata("async.kt")
public void testAsync_1_2() throws Exception { public void testAsync_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/async.kt"); runTestWithPackageReplacement("compiler/testData/codegen/java8/box/async.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("async.kt") @TestMetadata("async.kt")
public void testAsync_1_3() throws Exception { public void testAsync_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/async.kt"); runTestWithPackageReplacement("compiler/testData/codegen/java8/box/async.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("capturedSuperCall.kt") @TestMetadata("capturedSuperCall.kt")
@@ -1355,6 +1355,10 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, 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.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
} }
@@ -1396,14 +1400,12 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW
@TestMetadata("kt18292.kt") @TestMetadata("kt18292.kt")
public void testKt18292_1_2() throws Exception { public void testKt18292_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/kt18292.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/kt18292.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("kt18292.kt") @TestMetadata("kt18292.kt")
public void testKt18292_1_3() throws Exception { public void testKt18292_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/kt18292.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/kt18292.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("lambdaExpectedType.kt") @TestMetadata("lambdaExpectedType.kt")
@@ -1428,14 +1430,12 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW
@TestMetadata("noDefaultCoroutineImports.kt") @TestMetadata("noDefaultCoroutineImports.kt")
public void testNoDefaultCoroutineImports_1_2() throws Exception { public void testNoDefaultCoroutineImports_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/noDefaultCoroutineImports.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/noDefaultCoroutineImports.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("noDefaultCoroutineImports.kt") @TestMetadata("noDefaultCoroutineImports.kt")
public void testNoDefaultCoroutineImports_1_3() throws Exception { public void testNoDefaultCoroutineImports_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/noDefaultCoroutineImports.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/noDefaultCoroutineImports.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("nonLocalSuspension.kt") @TestMetadata("nonLocalSuspension.kt")
@@ -1465,14 +1465,12 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW
@TestMetadata("suspendApplicability.kt") @TestMetadata("suspendApplicability.kt")
public void testSuspendApplicability_1_2() throws Exception { public void testSuspendApplicability_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendApplicability.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendApplicability.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("suspendApplicability.kt") @TestMetadata("suspendApplicability.kt")
public void testSuspendApplicability_1_3() throws Exception { public void testSuspendApplicability_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendApplicability.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendApplicability.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("suspendConflictsWithNoSuspend.kt") @TestMetadata("suspendConflictsWithNoSuspend.kt")
@@ -1482,14 +1480,12 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW
@TestMetadata("suspendCoroutineOrReturn.kt") @TestMetadata("suspendCoroutineOrReturn.kt")
public void testSuspendCoroutineOrReturn_1_2() throws Exception { public void testSuspendCoroutineOrReturn_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendCoroutineOrReturn.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendCoroutineOrReturn.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("suspendCoroutineOrReturn.kt") @TestMetadata("suspendCoroutineOrReturn.kt")
public void testSuspendCoroutineOrReturn_1_3() throws Exception { public void testSuspendCoroutineOrReturn_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendCoroutineOrReturn.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendCoroutineOrReturn.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("suspendCoroutineUnavailableWithNewAPI.kt") @TestMetadata("suspendCoroutineUnavailableWithNewAPI.kt")
@@ -1504,14 +1500,12 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW
@TestMetadata("suspendCovarianJavaOverride.kt") @TestMetadata("suspendCovarianJavaOverride.kt")
public void testSuspendCovarianJavaOverride_1_2() throws Exception { public void testSuspendCovarianJavaOverride_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendCovarianJavaOverride.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendCovarianJavaOverride.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("suspendCovarianJavaOverride.kt") @TestMetadata("suspendCovarianJavaOverride.kt")
public void testSuspendCovarianJavaOverride_1_3() throws Exception { public void testSuspendCovarianJavaOverride_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendCovarianJavaOverride.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendCovarianJavaOverride.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("suspendDestructuring.kt") @TestMetadata("suspendDestructuring.kt")
@@ -1526,50 +1520,42 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW
@TestMetadata("suspendFunctions.kt") @TestMetadata("suspendFunctions.kt")
public void testSuspendFunctions_1_2() throws Exception { public void testSuspendFunctions_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctions.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctions.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("suspendFunctions.kt") @TestMetadata("suspendFunctions.kt")
public void testSuspendFunctions_1_3() throws Exception { public void testSuspendFunctions_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctions.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctions.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("suspendJavaImplementationFromDifferentClass.kt") @TestMetadata("suspendJavaImplementationFromDifferentClass.kt")
public void testSuspendJavaImplementationFromDifferentClass_1_2() throws Exception { public void testSuspendJavaImplementationFromDifferentClass_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendJavaImplementationFromDifferentClass.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendJavaImplementationFromDifferentClass.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("suspendJavaImplementationFromDifferentClass.kt") @TestMetadata("suspendJavaImplementationFromDifferentClass.kt")
public void testSuspendJavaImplementationFromDifferentClass_1_3() throws Exception { public void testSuspendJavaImplementationFromDifferentClass_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendJavaImplementationFromDifferentClass.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendJavaImplementationFromDifferentClass.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("suspendJavaOverrides.kt") @TestMetadata("suspendJavaOverrides.kt")
public void testSuspendJavaOverrides_1_2() throws Exception { public void testSuspendJavaOverrides_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendJavaOverrides.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendJavaOverrides.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("suspendJavaOverrides.kt") @TestMetadata("suspendJavaOverrides.kt")
public void testSuspendJavaOverrides_1_3() throws Exception { public void testSuspendJavaOverrides_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendJavaOverrides.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendJavaOverrides.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("suspendLambda.kt") @TestMetadata("suspendLambda.kt")
public void testSuspendLambda_1_2() throws Exception { public void testSuspendLambda_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendLambda.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendLambda.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("suspendLambda.kt") @TestMetadata("suspendLambda.kt")
public void testSuspendLambda_1_3() throws Exception { public void testSuspendLambda_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendLambda.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendLambda.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("suspendOverridability.kt") @TestMetadata("suspendOverridability.kt")
@@ -1698,152 +1684,132 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, 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.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
} }
@TestMetadata("inlineOrdinaryOfCrossinlineOrdinary.kt") @TestMetadata("inlineOrdinaryOfCrossinlineOrdinary.kt")
public void testInlineOrdinaryOfCrossinlineOrdinary_1_2() throws Exception { public void testInlineOrdinaryOfCrossinlineOrdinary_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfCrossinlineOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfCrossinlineOrdinary.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineOrdinaryOfCrossinlineOrdinary.kt") @TestMetadata("inlineOrdinaryOfCrossinlineOrdinary.kt")
public void testInlineOrdinaryOfCrossinlineOrdinary_1_3() throws Exception { public void testInlineOrdinaryOfCrossinlineOrdinary_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfCrossinlineOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfCrossinlineOrdinary.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt")
public void testInlineOrdinaryOfCrossinlineSuspend_1_2() throws Exception { public void testInlineOrdinaryOfCrossinlineSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfCrossinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfCrossinlineSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt")
public void testInlineOrdinaryOfCrossinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfCrossinlineSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfCrossinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfCrossinlineSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineOrdinaryOfNoinlineOrdinary.kt") @TestMetadata("inlineOrdinaryOfNoinlineOrdinary.kt")
public void testInlineOrdinaryOfNoinlineOrdinary_1_2() throws Exception { public void testInlineOrdinaryOfNoinlineOrdinary_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfNoinlineOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfNoinlineOrdinary.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineOrdinaryOfNoinlineOrdinary.kt") @TestMetadata("inlineOrdinaryOfNoinlineOrdinary.kt")
public void testInlineOrdinaryOfNoinlineOrdinary_1_3() throws Exception { public void testInlineOrdinaryOfNoinlineOrdinary_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfNoinlineOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfNoinlineOrdinary.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt")
public void testInlineOrdinaryOfNoinlineSuspend_1_2() throws Exception { public void testInlineOrdinaryOfNoinlineSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfNoinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfNoinlineSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt")
public void testInlineOrdinaryOfNoinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfNoinlineSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfNoinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfNoinlineSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineOrdinaryOfOrdinary.kt") @TestMetadata("inlineOrdinaryOfOrdinary.kt")
public void testInlineOrdinaryOfOrdinary_1_2() throws Exception { public void testInlineOrdinaryOfOrdinary_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfOrdinary.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineOrdinaryOfOrdinary.kt") @TestMetadata("inlineOrdinaryOfOrdinary.kt")
public void testInlineOrdinaryOfOrdinary_1_3() throws Exception { public void testInlineOrdinaryOfOrdinary_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfOrdinary.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineOrdinaryOfSuspend.kt") @TestMetadata("inlineOrdinaryOfSuspend.kt")
public void testInlineOrdinaryOfSuspend_1_2() throws Exception { public void testInlineOrdinaryOfSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfSuspend.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineOrdinaryOfSuspend.kt") @TestMetadata("inlineOrdinaryOfSuspend.kt")
public void testInlineOrdinaryOfSuspend_1_3() throws Exception { public void testInlineOrdinaryOfSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfSuspend.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt")
public void testInlineSuspendOfCrossinlineOrdinary_1_2() throws Exception { public void testInlineSuspendOfCrossinlineOrdinary_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfCrossinlineOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfCrossinlineOrdinary.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt")
public void testInlineSuspendOfCrossinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfCrossinlineOrdinary_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfCrossinlineOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfCrossinlineOrdinary.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt")
public void testInlineSuspendOfCrossinlineSuspend_1_2() throws Exception { public void testInlineSuspendOfCrossinlineSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfCrossinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfCrossinlineSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt")
public void testInlineSuspendOfCrossinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfCrossinlineSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfCrossinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfCrossinlineSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt")
public void testInlineSuspendOfNoinlineOrdinary_1_2() throws Exception { public void testInlineSuspendOfNoinlineOrdinary_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfNoinlineOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfNoinlineOrdinary.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt")
public void testInlineSuspendOfNoinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfNoinlineOrdinary_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfNoinlineOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfNoinlineOrdinary.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfNoinlineSuspend.kt") @TestMetadata("inlineSuspendOfNoinlineSuspend.kt")
public void testInlineSuspendOfNoinlineSuspend_1_2() throws Exception { public void testInlineSuspendOfNoinlineSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfNoinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfNoinlineSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfNoinlineSuspend.kt") @TestMetadata("inlineSuspendOfNoinlineSuspend.kt")
public void testInlineSuspendOfNoinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfNoinlineSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfNoinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfNoinlineSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfOrdinary.kt") @TestMetadata("inlineSuspendOfOrdinary.kt")
public void testInlineSuspendOfOrdinary_1_2() throws Exception { public void testInlineSuspendOfOrdinary_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfOrdinary.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfOrdinary.kt") @TestMetadata("inlineSuspendOfOrdinary.kt")
public void testInlineSuspendOfOrdinary_1_3() throws Exception { public void testInlineSuspendOfOrdinary_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfOrdinary.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfSuspend.kt") @TestMetadata("inlineSuspendOfSuspend.kt")
public void testInlineSuspendOfSuspend_1_2() throws Exception { public void testInlineSuspendOfSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfSuspend.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfSuspend.kt") @TestMetadata("inlineSuspendOfSuspend.kt")
public void testInlineSuspendOfSuspend_1_3() throws Exception { public void testInlineSuspendOfSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfSuspend.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
} }
@@ -1855,104 +1821,92 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, 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.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
} }
@TestMetadata("allMembersAllowed.kt") @TestMetadata("allMembersAllowed.kt")
public void testAllMembersAllowed_1_2() throws Exception { public void testAllMembersAllowed_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/allMembersAllowed.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/allMembersAllowed.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("allMembersAllowed.kt") @TestMetadata("allMembersAllowed.kt")
public void testAllMembersAllowed_1_3() throws Exception { public void testAllMembersAllowed_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/allMembersAllowed.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/allMembersAllowed.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("extensions.kt") @TestMetadata("extensions.kt")
public void testExtensions_1_2() throws Exception { public void testExtensions_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/extensions.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/extensions.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("extensions.kt") @TestMetadata("extensions.kt")
public void testExtensions_1_3() throws Exception { public void testExtensions_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/extensions.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/extensions.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("memberExtension.kt") @TestMetadata("memberExtension.kt")
public void testMemberExtension_1_2() throws Exception { public void testMemberExtension_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/memberExtension.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/memberExtension.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("memberExtension.kt") @TestMetadata("memberExtension.kt")
public void testMemberExtension_1_3() throws Exception { public void testMemberExtension_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/memberExtension.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/memberExtension.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("notRelatedFun.kt") @TestMetadata("notRelatedFun.kt")
public void testNotRelatedFun_1_2() throws Exception { public void testNotRelatedFun_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/notRelatedFun.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/notRelatedFun.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("notRelatedFun.kt") @TestMetadata("notRelatedFun.kt")
public void testNotRelatedFun_1_3() throws Exception { public void testNotRelatedFun_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/notRelatedFun.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/notRelatedFun.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("outerYield.kt") @TestMetadata("outerYield.kt")
public void testOuterYield_1_2() throws Exception { public void testOuterYield_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/outerYield.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/outerYield.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("outerYield.kt") @TestMetadata("outerYield.kt")
public void testOuterYield_1_3() throws Exception { public void testOuterYield_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/outerYield.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/outerYield.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("sameInstance.kt") @TestMetadata("sameInstance.kt")
public void testSameInstance_1_2() throws Exception { public void testSameInstance_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/sameInstance.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/sameInstance.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("sameInstance.kt") @TestMetadata("sameInstance.kt")
public void testSameInstance_1_3() throws Exception { public void testSameInstance_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/sameInstance.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/sameInstance.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("simpleForbidden.kt") @TestMetadata("simpleForbidden.kt")
public void testSimpleForbidden_1_2() throws Exception { public void testSimpleForbidden_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/simpleForbidden.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/simpleForbidden.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("simpleForbidden.kt") @TestMetadata("simpleForbidden.kt")
public void testSimpleForbidden_1_3() throws Exception { public void testSimpleForbidden_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/simpleForbidden.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/simpleForbidden.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("wrongEnclosingFunction.kt") @TestMetadata("wrongEnclosingFunction.kt")
public void testWrongEnclosingFunction_1_2() throws Exception { public void testWrongEnclosingFunction_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/wrongEnclosingFunction.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/wrongEnclosingFunction.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("wrongEnclosingFunction.kt") @TestMetadata("wrongEnclosingFunction.kt")
public void testWrongEnclosingFunction_1_3() throws Exception { public void testWrongEnclosingFunction_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/wrongEnclosingFunction.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/wrongEnclosingFunction.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
} }
@@ -2047,20 +2001,22 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, 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.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
} }
@TestMetadata("forbidden.kt") @TestMetadata("forbidden.kt")
public void testForbidden_1_2() throws Exception { public void testForbidden_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/forbidden.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/forbidden.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("forbidden.kt") @TestMetadata("forbidden.kt")
public void testForbidden_1_3() throws Exception { public void testForbidden_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/forbidden.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/forbidden.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("localFunctions.kt") @TestMetadata("localFunctions.kt")
@@ -2070,14 +2026,12 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW
@TestMetadata("nothingTypedSuspendFunction.kt") @TestMetadata("nothingTypedSuspendFunction.kt")
public void testNothingTypedSuspendFunction_1_2() throws Exception { public void testNothingTypedSuspendFunction_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/nothingTypedSuspendFunction.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/nothingTypedSuspendFunction.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("nothingTypedSuspendFunction.kt") @TestMetadata("nothingTypedSuspendFunction.kt")
public void testNothingTypedSuspendFunction_1_3() throws Exception { public void testNothingTypedSuspendFunction_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/nothingTypedSuspendFunction.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/nothingTypedSuspendFunction.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("recursive.kt") @TestMetadata("recursive.kt")
@@ -2087,26 +2041,22 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW
@TestMetadata("tryCatch.kt") @TestMetadata("tryCatch.kt")
public void testTryCatch_1_2() throws Exception { public void testTryCatch_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/tryCatch.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/tryCatch.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("tryCatch.kt") @TestMetadata("tryCatch.kt")
public void testTryCatch_1_3() throws Exception { public void testTryCatch_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/tryCatch.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/tryCatch.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("valid.kt") @TestMetadata("valid.kt")
public void testValid_1_2() throws Exception { public void testValid_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/valid.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/valid.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("valid.kt") @TestMetadata("valid.kt")
public void testValid_1_3() throws Exception { public void testValid_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/valid.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/valid.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
} }
} }
@@ -1355,6 +1355,10 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, 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.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
} }
@@ -1396,14 +1400,12 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno
@TestMetadata("kt18292.kt") @TestMetadata("kt18292.kt")
public void testKt18292_1_2() throws Exception { public void testKt18292_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/kt18292.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/kt18292.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("kt18292.kt") @TestMetadata("kt18292.kt")
public void testKt18292_1_3() throws Exception { public void testKt18292_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/kt18292.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/kt18292.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("lambdaExpectedType.kt") @TestMetadata("lambdaExpectedType.kt")
@@ -1428,14 +1430,12 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno
@TestMetadata("noDefaultCoroutineImports.kt") @TestMetadata("noDefaultCoroutineImports.kt")
public void testNoDefaultCoroutineImports_1_2() throws Exception { public void testNoDefaultCoroutineImports_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/noDefaultCoroutineImports.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/noDefaultCoroutineImports.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("noDefaultCoroutineImports.kt") @TestMetadata("noDefaultCoroutineImports.kt")
public void testNoDefaultCoroutineImports_1_3() throws Exception { public void testNoDefaultCoroutineImports_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/noDefaultCoroutineImports.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/noDefaultCoroutineImports.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("nonLocalSuspension.kt") @TestMetadata("nonLocalSuspension.kt")
@@ -1465,14 +1465,12 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno
@TestMetadata("suspendApplicability.kt") @TestMetadata("suspendApplicability.kt")
public void testSuspendApplicability_1_2() throws Exception { public void testSuspendApplicability_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendApplicability.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendApplicability.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("suspendApplicability.kt") @TestMetadata("suspendApplicability.kt")
public void testSuspendApplicability_1_3() throws Exception { public void testSuspendApplicability_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendApplicability.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendApplicability.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("suspendConflictsWithNoSuspend.kt") @TestMetadata("suspendConflictsWithNoSuspend.kt")
@@ -1482,14 +1480,12 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno
@TestMetadata("suspendCoroutineOrReturn.kt") @TestMetadata("suspendCoroutineOrReturn.kt")
public void testSuspendCoroutineOrReturn_1_2() throws Exception { public void testSuspendCoroutineOrReturn_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendCoroutineOrReturn.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendCoroutineOrReturn.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("suspendCoroutineOrReturn.kt") @TestMetadata("suspendCoroutineOrReturn.kt")
public void testSuspendCoroutineOrReturn_1_3() throws Exception { public void testSuspendCoroutineOrReturn_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendCoroutineOrReturn.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendCoroutineOrReturn.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("suspendCoroutineUnavailableWithNewAPI.kt") @TestMetadata("suspendCoroutineUnavailableWithNewAPI.kt")
@@ -1504,14 +1500,12 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno
@TestMetadata("suspendCovarianJavaOverride.kt") @TestMetadata("suspendCovarianJavaOverride.kt")
public void testSuspendCovarianJavaOverride_1_2() throws Exception { public void testSuspendCovarianJavaOverride_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendCovarianJavaOverride.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendCovarianJavaOverride.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("suspendCovarianJavaOverride.kt") @TestMetadata("suspendCovarianJavaOverride.kt")
public void testSuspendCovarianJavaOverride_1_3() throws Exception { public void testSuspendCovarianJavaOverride_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendCovarianJavaOverride.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendCovarianJavaOverride.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("suspendDestructuring.kt") @TestMetadata("suspendDestructuring.kt")
@@ -1526,50 +1520,42 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno
@TestMetadata("suspendFunctions.kt") @TestMetadata("suspendFunctions.kt")
public void testSuspendFunctions_1_2() throws Exception { public void testSuspendFunctions_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctions.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctions.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("suspendFunctions.kt") @TestMetadata("suspendFunctions.kt")
public void testSuspendFunctions_1_3() throws Exception { public void testSuspendFunctions_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctions.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctions.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("suspendJavaImplementationFromDifferentClass.kt") @TestMetadata("suspendJavaImplementationFromDifferentClass.kt")
public void testSuspendJavaImplementationFromDifferentClass_1_2() throws Exception { public void testSuspendJavaImplementationFromDifferentClass_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendJavaImplementationFromDifferentClass.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendJavaImplementationFromDifferentClass.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("suspendJavaImplementationFromDifferentClass.kt") @TestMetadata("suspendJavaImplementationFromDifferentClass.kt")
public void testSuspendJavaImplementationFromDifferentClass_1_3() throws Exception { public void testSuspendJavaImplementationFromDifferentClass_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendJavaImplementationFromDifferentClass.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendJavaImplementationFromDifferentClass.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("suspendJavaOverrides.kt") @TestMetadata("suspendJavaOverrides.kt")
public void testSuspendJavaOverrides_1_2() throws Exception { public void testSuspendJavaOverrides_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendJavaOverrides.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendJavaOverrides.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("suspendJavaOverrides.kt") @TestMetadata("suspendJavaOverrides.kt")
public void testSuspendJavaOverrides_1_3() throws Exception { public void testSuspendJavaOverrides_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendJavaOverrides.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendJavaOverrides.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("suspendLambda.kt") @TestMetadata("suspendLambda.kt")
public void testSuspendLambda_1_2() throws Exception { public void testSuspendLambda_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendLambda.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendLambda.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("suspendLambda.kt") @TestMetadata("suspendLambda.kt")
public void testSuspendLambda_1_3() throws Exception { public void testSuspendLambda_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendLambda.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendLambda.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("suspendOverridability.kt") @TestMetadata("suspendOverridability.kt")
@@ -1698,152 +1684,132 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, 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.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
} }
@TestMetadata("inlineOrdinaryOfCrossinlineOrdinary.kt") @TestMetadata("inlineOrdinaryOfCrossinlineOrdinary.kt")
public void testInlineOrdinaryOfCrossinlineOrdinary_1_2() throws Exception { public void testInlineOrdinaryOfCrossinlineOrdinary_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfCrossinlineOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfCrossinlineOrdinary.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineOrdinaryOfCrossinlineOrdinary.kt") @TestMetadata("inlineOrdinaryOfCrossinlineOrdinary.kt")
public void testInlineOrdinaryOfCrossinlineOrdinary_1_3() throws Exception { public void testInlineOrdinaryOfCrossinlineOrdinary_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfCrossinlineOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfCrossinlineOrdinary.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt")
public void testInlineOrdinaryOfCrossinlineSuspend_1_2() throws Exception { public void testInlineOrdinaryOfCrossinlineSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfCrossinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfCrossinlineSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt")
public void testInlineOrdinaryOfCrossinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfCrossinlineSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfCrossinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfCrossinlineSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineOrdinaryOfNoinlineOrdinary.kt") @TestMetadata("inlineOrdinaryOfNoinlineOrdinary.kt")
public void testInlineOrdinaryOfNoinlineOrdinary_1_2() throws Exception { public void testInlineOrdinaryOfNoinlineOrdinary_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfNoinlineOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfNoinlineOrdinary.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineOrdinaryOfNoinlineOrdinary.kt") @TestMetadata("inlineOrdinaryOfNoinlineOrdinary.kt")
public void testInlineOrdinaryOfNoinlineOrdinary_1_3() throws Exception { public void testInlineOrdinaryOfNoinlineOrdinary_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfNoinlineOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfNoinlineOrdinary.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt")
public void testInlineOrdinaryOfNoinlineSuspend_1_2() throws Exception { public void testInlineOrdinaryOfNoinlineSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfNoinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfNoinlineSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt")
public void testInlineOrdinaryOfNoinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfNoinlineSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfNoinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfNoinlineSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineOrdinaryOfOrdinary.kt") @TestMetadata("inlineOrdinaryOfOrdinary.kt")
public void testInlineOrdinaryOfOrdinary_1_2() throws Exception { public void testInlineOrdinaryOfOrdinary_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfOrdinary.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineOrdinaryOfOrdinary.kt") @TestMetadata("inlineOrdinaryOfOrdinary.kt")
public void testInlineOrdinaryOfOrdinary_1_3() throws Exception { public void testInlineOrdinaryOfOrdinary_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfOrdinary.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineOrdinaryOfSuspend.kt") @TestMetadata("inlineOrdinaryOfSuspend.kt")
public void testInlineOrdinaryOfSuspend_1_2() throws Exception { public void testInlineOrdinaryOfSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfSuspend.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineOrdinaryOfSuspend.kt") @TestMetadata("inlineOrdinaryOfSuspend.kt")
public void testInlineOrdinaryOfSuspend_1_3() throws Exception { public void testInlineOrdinaryOfSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfSuspend.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt")
public void testInlineSuspendOfCrossinlineOrdinary_1_2() throws Exception { public void testInlineSuspendOfCrossinlineOrdinary_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfCrossinlineOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfCrossinlineOrdinary.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt")
public void testInlineSuspendOfCrossinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfCrossinlineOrdinary_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfCrossinlineOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfCrossinlineOrdinary.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt")
public void testInlineSuspendOfCrossinlineSuspend_1_2() throws Exception { public void testInlineSuspendOfCrossinlineSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfCrossinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfCrossinlineSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt")
public void testInlineSuspendOfCrossinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfCrossinlineSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfCrossinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfCrossinlineSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt")
public void testInlineSuspendOfNoinlineOrdinary_1_2() throws Exception { public void testInlineSuspendOfNoinlineOrdinary_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfNoinlineOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfNoinlineOrdinary.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt")
public void testInlineSuspendOfNoinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfNoinlineOrdinary_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfNoinlineOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfNoinlineOrdinary.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfNoinlineSuspend.kt") @TestMetadata("inlineSuspendOfNoinlineSuspend.kt")
public void testInlineSuspendOfNoinlineSuspend_1_2() throws Exception { public void testInlineSuspendOfNoinlineSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfNoinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfNoinlineSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfNoinlineSuspend.kt") @TestMetadata("inlineSuspendOfNoinlineSuspend.kt")
public void testInlineSuspendOfNoinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfNoinlineSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfNoinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfNoinlineSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfOrdinary.kt") @TestMetadata("inlineSuspendOfOrdinary.kt")
public void testInlineSuspendOfOrdinary_1_2() throws Exception { public void testInlineSuspendOfOrdinary_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfOrdinary.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfOrdinary.kt") @TestMetadata("inlineSuspendOfOrdinary.kt")
public void testInlineSuspendOfOrdinary_1_3() throws Exception { public void testInlineSuspendOfOrdinary_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfOrdinary.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfSuspend.kt") @TestMetadata("inlineSuspendOfSuspend.kt")
public void testInlineSuspendOfSuspend_1_2() throws Exception { public void testInlineSuspendOfSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfSuspend.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfSuspend.kt") @TestMetadata("inlineSuspendOfSuspend.kt")
public void testInlineSuspendOfSuspend_1_3() throws Exception { public void testInlineSuspendOfSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfSuspend.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
} }
@@ -1855,104 +1821,92 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, 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.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
} }
@TestMetadata("allMembersAllowed.kt") @TestMetadata("allMembersAllowed.kt")
public void testAllMembersAllowed_1_2() throws Exception { public void testAllMembersAllowed_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/allMembersAllowed.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/allMembersAllowed.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("allMembersAllowed.kt") @TestMetadata("allMembersAllowed.kt")
public void testAllMembersAllowed_1_3() throws Exception { public void testAllMembersAllowed_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/allMembersAllowed.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/allMembersAllowed.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("extensions.kt") @TestMetadata("extensions.kt")
public void testExtensions_1_2() throws Exception { public void testExtensions_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/extensions.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/extensions.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("extensions.kt") @TestMetadata("extensions.kt")
public void testExtensions_1_3() throws Exception { public void testExtensions_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/extensions.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/extensions.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("memberExtension.kt") @TestMetadata("memberExtension.kt")
public void testMemberExtension_1_2() throws Exception { public void testMemberExtension_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/memberExtension.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/memberExtension.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("memberExtension.kt") @TestMetadata("memberExtension.kt")
public void testMemberExtension_1_3() throws Exception { public void testMemberExtension_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/memberExtension.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/memberExtension.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("notRelatedFun.kt") @TestMetadata("notRelatedFun.kt")
public void testNotRelatedFun_1_2() throws Exception { public void testNotRelatedFun_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/notRelatedFun.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/notRelatedFun.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("notRelatedFun.kt") @TestMetadata("notRelatedFun.kt")
public void testNotRelatedFun_1_3() throws Exception { public void testNotRelatedFun_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/notRelatedFun.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/notRelatedFun.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("outerYield.kt") @TestMetadata("outerYield.kt")
public void testOuterYield_1_2() throws Exception { public void testOuterYield_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/outerYield.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/outerYield.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("outerYield.kt") @TestMetadata("outerYield.kt")
public void testOuterYield_1_3() throws Exception { public void testOuterYield_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/outerYield.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/outerYield.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("sameInstance.kt") @TestMetadata("sameInstance.kt")
public void testSameInstance_1_2() throws Exception { public void testSameInstance_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/sameInstance.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/sameInstance.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("sameInstance.kt") @TestMetadata("sameInstance.kt")
public void testSameInstance_1_3() throws Exception { public void testSameInstance_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/sameInstance.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/sameInstance.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("simpleForbidden.kt") @TestMetadata("simpleForbidden.kt")
public void testSimpleForbidden_1_2() throws Exception { public void testSimpleForbidden_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/simpleForbidden.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/simpleForbidden.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("simpleForbidden.kt") @TestMetadata("simpleForbidden.kt")
public void testSimpleForbidden_1_3() throws Exception { public void testSimpleForbidden_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/simpleForbidden.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/simpleForbidden.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("wrongEnclosingFunction.kt") @TestMetadata("wrongEnclosingFunction.kt")
public void testWrongEnclosingFunction_1_2() throws Exception { public void testWrongEnclosingFunction_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/wrongEnclosingFunction.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/wrongEnclosingFunction.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("wrongEnclosingFunction.kt") @TestMetadata("wrongEnclosingFunction.kt")
public void testWrongEnclosingFunction_1_3() throws Exception { public void testWrongEnclosingFunction_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/wrongEnclosingFunction.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/wrongEnclosingFunction.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
} }
@@ -2047,20 +2001,22 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, 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.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
} }
@TestMetadata("forbidden.kt") @TestMetadata("forbidden.kt")
public void testForbidden_1_2() throws Exception { public void testForbidden_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/forbidden.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/forbidden.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("forbidden.kt") @TestMetadata("forbidden.kt")
public void testForbidden_1_3() throws Exception { public void testForbidden_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/forbidden.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/forbidden.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("localFunctions.kt") @TestMetadata("localFunctions.kt")
@@ -2070,14 +2026,12 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno
@TestMetadata("nothingTypedSuspendFunction.kt") @TestMetadata("nothingTypedSuspendFunction.kt")
public void testNothingTypedSuspendFunction_1_2() throws Exception { public void testNothingTypedSuspendFunction_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/nothingTypedSuspendFunction.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/nothingTypedSuspendFunction.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("nothingTypedSuspendFunction.kt") @TestMetadata("nothingTypedSuspendFunction.kt")
public void testNothingTypedSuspendFunction_1_3() throws Exception { public void testNothingTypedSuspendFunction_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/nothingTypedSuspendFunction.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/nothingTypedSuspendFunction.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("recursive.kt") @TestMetadata("recursive.kt")
@@ -2087,26 +2041,22 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno
@TestMetadata("tryCatch.kt") @TestMetadata("tryCatch.kt")
public void testTryCatch_1_2() throws Exception { public void testTryCatch_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/tryCatch.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/tryCatch.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("tryCatch.kt") @TestMetadata("tryCatch.kt")
public void testTryCatch_1_3() throws Exception { public void testTryCatch_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/tryCatch.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/tryCatch.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("valid.kt") @TestMetadata("valid.kt")
public void testValid_1_2() throws Exception { public void testValid_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/valid.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/valid.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("valid.kt") @TestMetadata("valid.kt")
public void testValid_1_3() throws Exception { public void testValid_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/valid.kt"); runTestWithPackageReplacement("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/valid.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
} }
} }
File diff suppressed because it is too large Load Diff
@@ -3201,188 +3201,162 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.ANY, testDataFilePath);
}
public void testAllFilesPresentInSuspend() throws Exception { public void testAllFilesPresentInSuspend() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
} }
@TestMetadata("capturedVariables.kt") @TestMetadata("capturedVariables.kt")
public void testCapturedVariables_1_2() throws Exception { public void testCapturedVariables_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("capturedVariables.kt") @TestMetadata("capturedVariables.kt")
public void testCapturedVariables_1_3() throws Exception { public void testCapturedVariables_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt") @TestMetadata("crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt")
public void testCrossinlineSuspendLambdaInsideCrossinlineSuspendLambda_1_2() throws Exception { public void testCrossinlineSuspendLambdaInsideCrossinlineSuspendLambda_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt") @TestMetadata("crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt")
public void testCrossinlineSuspendLambdaInsideCrossinlineSuspendLambda_1_3() throws Exception { public void testCrossinlineSuspendLambdaInsideCrossinlineSuspendLambda_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt")
public void testInlineOrdinaryOfCrossinlineSuspend_1_2() throws Exception { public void testInlineOrdinaryOfCrossinlineSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt")
public void testInlineOrdinaryOfCrossinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfCrossinlineSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt")
public void testInlineOrdinaryOfNoinlineSuspend_1_2() throws Exception { public void testInlineOrdinaryOfNoinlineSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt")
public void testInlineOrdinaryOfNoinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfNoinlineSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendContinuation.kt") @TestMetadata("inlineSuspendContinuation.kt")
public void testInlineSuspendContinuation_1_2() throws Exception { public void testInlineSuspendContinuation_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendContinuation.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendContinuation.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendContinuation.kt") @TestMetadata("inlineSuspendContinuation.kt")
public void testInlineSuspendContinuation_1_3() throws Exception { public void testInlineSuspendContinuation_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendContinuation.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendContinuation.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt")
public void testInlineSuspendOfCrossinlineOrdinary_1_2() throws Exception { public void testInlineSuspendOfCrossinlineOrdinary_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt")
public void testInlineSuspendOfCrossinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfCrossinlineOrdinary_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt")
public void testInlineSuspendOfCrossinlineSuspend_1_2() throws Exception { public void testInlineSuspendOfCrossinlineSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt")
public void testInlineSuspendOfCrossinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfCrossinlineSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt")
public void testInlineSuspendOfNoinlineOrdinary_1_2() throws Exception { public void testInlineSuspendOfNoinlineOrdinary_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt")
public void testInlineSuspendOfNoinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfNoinlineOrdinary_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfNoinlineSuspend.kt") @TestMetadata("inlineSuspendOfNoinlineSuspend.kt")
public void testInlineSuspendOfNoinlineSuspend_1_2() throws Exception { public void testInlineSuspendOfNoinlineSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfNoinlineSuspend.kt") @TestMetadata("inlineSuspendOfNoinlineSuspend.kt")
public void testInlineSuspendOfNoinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfNoinlineSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfOrdinary.kt") @TestMetadata("inlineSuspendOfOrdinary.kt")
public void testInlineSuspendOfOrdinary_1_2() throws Exception { public void testInlineSuspendOfOrdinary_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfOrdinary.kt") @TestMetadata("inlineSuspendOfOrdinary.kt")
public void testInlineSuspendOfOrdinary_1_3() throws Exception { public void testInlineSuspendOfOrdinary_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfSuspend.kt") @TestMetadata("inlineSuspendOfSuspend.kt")
public void testInlineSuspendOfSuspend_1_2() throws Exception { public void testInlineSuspendOfSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfSuspend.kt") @TestMetadata("inlineSuspendOfSuspend.kt")
public void testInlineSuspendOfSuspend_1_3() throws Exception { public void testInlineSuspendOfSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("multipleLocals.kt") @TestMetadata("multipleLocals.kt")
public void testMultipleLocals_1_2() throws Exception { public void testMultipleLocals_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("multipleLocals.kt") @TestMetadata("multipleLocals.kt")
public void testMultipleLocals_1_3() throws Exception { public void testMultipleLocals_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("multipleSuspensionPoints.kt") @TestMetadata("multipleSuspensionPoints.kt")
public void testMultipleSuspensionPoints_1_2() throws Exception { public void testMultipleSuspensionPoints_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("multipleSuspensionPoints.kt") @TestMetadata("multipleSuspensionPoints.kt")
public void testMultipleSuspensionPoints_1_3() throws Exception { public void testMultipleSuspensionPoints_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("returnValue.kt") @TestMetadata("returnValue.kt")
public void testReturnValue_1_2() throws Exception { public void testReturnValue_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/returnValue.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/returnValue.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("returnValue.kt") @TestMetadata("returnValue.kt")
public void testReturnValue_1_3() throws Exception { public void testReturnValue_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/returnValue.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/returnValue.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("tryCatchStackTransform.kt") @TestMetadata("tryCatchStackTransform.kt")
public void testTryCatchStackTransform_1_2() throws Exception { public void testTryCatchStackTransform_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("tryCatchStackTransform.kt") @TestMetadata("tryCatchStackTransform.kt")
public void testTryCatchStackTransform_1_3() throws Exception { public void testTryCatchStackTransform_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("compiler/testData/codegen/boxInline/suspend/defaultParameter") @TestMetadata("compiler/testData/codegen/boxInline/suspend/defaultParameter")
@@ -3393,32 +3367,32 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.ANY, testDataFilePath);
}
public void testAllFilesPresentInDefaultParameter() throws Exception { public void testAllFilesPresentInDefaultParameter() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/defaultParameter"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/defaultParameter"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
} }
@TestMetadata("defaultValueCrossinline.kt") @TestMetadata("defaultValueCrossinline.kt")
public void testDefaultValueCrossinline_1_2() throws Exception { public void testDefaultValueCrossinline_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("defaultValueCrossinline.kt") @TestMetadata("defaultValueCrossinline.kt")
public void testDefaultValueCrossinline_1_3() throws Exception { public void testDefaultValueCrossinline_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("defaultValueInline.kt") @TestMetadata("defaultValueInline.kt")
public void testDefaultValueInline_1_2() throws Exception { public void testDefaultValueInline_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("defaultValueInline.kt") @TestMetadata("defaultValueInline.kt")
public void testDefaultValueInline_1_3() throws Exception { public void testDefaultValueInline_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
} }
@@ -3453,104 +3427,92 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.ANY, testDataFilePath);
}
public void testAllFilesPresentInReceiver() throws Exception { public void testAllFilesPresentInReceiver() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/receiver"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/receiver"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
} }
@TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt")
public void testInlineOrdinaryOfCrossinlineSuspend_1_2() throws Exception { public void testInlineOrdinaryOfCrossinlineSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt")
public void testInlineOrdinaryOfCrossinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfCrossinlineSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt")
public void testInlineOrdinaryOfNoinlineSuspend_1_2() throws Exception { public void testInlineOrdinaryOfNoinlineSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt")
public void testInlineOrdinaryOfNoinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfNoinlineSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt")
public void testInlineSuspendOfCrossinlineOrdinary_1_2() throws Exception { public void testInlineSuspendOfCrossinlineOrdinary_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt")
public void testInlineSuspendOfCrossinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfCrossinlineOrdinary_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt")
public void testInlineSuspendOfCrossinlineSuspend_1_2() throws Exception { public void testInlineSuspendOfCrossinlineSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt")
public void testInlineSuspendOfCrossinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfCrossinlineSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt")
public void testInlineSuspendOfNoinlineOrdinary_1_2() throws Exception { public void testInlineSuspendOfNoinlineOrdinary_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt")
public void testInlineSuspendOfNoinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfNoinlineOrdinary_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfNoinlineSuspend.kt") @TestMetadata("inlineSuspendOfNoinlineSuspend.kt")
public void testInlineSuspendOfNoinlineSuspend_1_2() throws Exception { public void testInlineSuspendOfNoinlineSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfNoinlineSuspend.kt") @TestMetadata("inlineSuspendOfNoinlineSuspend.kt")
public void testInlineSuspendOfNoinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfNoinlineSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfOrdinary.kt") @TestMetadata("inlineSuspendOfOrdinary.kt")
public void testInlineSuspendOfOrdinary_1_2() throws Exception { public void testInlineSuspendOfOrdinary_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfOrdinary.kt") @TestMetadata("inlineSuspendOfOrdinary.kt")
public void testInlineSuspendOfOrdinary_1_3() throws Exception { public void testInlineSuspendOfOrdinary_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfSuspend.kt") @TestMetadata("inlineSuspendOfSuspend.kt")
public void testInlineSuspendOfSuspend_1_2() throws Exception { public void testInlineSuspendOfSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfSuspend.kt") @TestMetadata("inlineSuspendOfSuspend.kt")
public void testInlineSuspendOfSuspend_1_3() throws Exception { public void testInlineSuspendOfSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
} }
@@ -3562,140 +3524,122 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.ANY, testDataFilePath);
}
public void testAllFilesPresentInStateMachine() throws Exception { public void testAllFilesPresentInStateMachine() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/stateMachine"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/stateMachine"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
} }
@TestMetadata("innerLambdaInsideLambda.kt") @TestMetadata("innerLambdaInsideLambda.kt")
public void testInnerLambdaInsideLambda_1_2() throws Exception { public void testInnerLambdaInsideLambda_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("innerLambdaInsideLambda.kt") @TestMetadata("innerLambdaInsideLambda.kt")
public void testInnerLambdaInsideLambda_1_3() throws Exception { public void testInnerLambdaInsideLambda_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("innerLambdaWithoutCrossinline.kt") @TestMetadata("innerLambdaWithoutCrossinline.kt")
public void testInnerLambdaWithoutCrossinline_1_2() throws Exception { public void testInnerLambdaWithoutCrossinline_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("innerLambdaWithoutCrossinline.kt") @TestMetadata("innerLambdaWithoutCrossinline.kt")
public void testInnerLambdaWithoutCrossinline_1_3() throws Exception { public void testInnerLambdaWithoutCrossinline_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("innerLambda.kt") @TestMetadata("innerLambda.kt")
public void testInnerLambda_1_2() throws Exception { public void testInnerLambda_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("innerLambda.kt") @TestMetadata("innerLambda.kt")
public void testInnerLambda_1_3() throws Exception { public void testInnerLambda_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("innerMadnessCallSite.kt") @TestMetadata("innerMadnessCallSite.kt")
public void testInnerMadnessCallSite_1_2() throws Exception { public void testInnerMadnessCallSite_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("innerMadnessCallSite.kt") @TestMetadata("innerMadnessCallSite.kt")
public void testInnerMadnessCallSite_1_3() throws Exception { public void testInnerMadnessCallSite_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("innerMadness.kt") @TestMetadata("innerMadness.kt")
public void testInnerMadness_1_2() throws Exception { public void testInnerMadness_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("innerMadness.kt") @TestMetadata("innerMadness.kt")
public void testInnerMadness_1_3() throws Exception { public void testInnerMadness_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("innerObjectInsideInnerObject.kt") @TestMetadata("innerObjectInsideInnerObject.kt")
public void testInnerObjectInsideInnerObject_1_2() throws Exception { public void testInnerObjectInsideInnerObject_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("innerObjectInsideInnerObject.kt") @TestMetadata("innerObjectInsideInnerObject.kt")
public void testInnerObjectInsideInnerObject_1_3() throws Exception { public void testInnerObjectInsideInnerObject_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("innerObjectSeveralFunctions.kt") @TestMetadata("innerObjectSeveralFunctions.kt")
public void testInnerObjectSeveralFunctions_1_2() throws Exception { public void testInnerObjectSeveralFunctions_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("innerObjectSeveralFunctions.kt") @TestMetadata("innerObjectSeveralFunctions.kt")
public void testInnerObjectSeveralFunctions_1_3() throws Exception { public void testInnerObjectSeveralFunctions_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("innerObjectWithoutCapturingCrossinline.kt") @TestMetadata("innerObjectWithoutCapturingCrossinline.kt")
public void testInnerObjectWithoutCapturingCrossinline_1_2() throws Exception { public void testInnerObjectWithoutCapturingCrossinline_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("innerObjectWithoutCapturingCrossinline.kt") @TestMetadata("innerObjectWithoutCapturingCrossinline.kt")
public void testInnerObjectWithoutCapturingCrossinline_1_3() throws Exception { public void testInnerObjectWithoutCapturingCrossinline_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("innerObject.kt") @TestMetadata("innerObject.kt")
public void testInnerObject_1_2() throws Exception { public void testInnerObject_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("innerObject.kt") @TestMetadata("innerObject.kt")
public void testInnerObject_1_3() throws Exception { public void testInnerObject_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("normalInline.kt") @TestMetadata("normalInline.kt")
public void testNormalInline_1_2() throws Exception { public void testNormalInline_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("normalInline.kt") @TestMetadata("normalInline.kt")
public void testNormalInline_1_3() throws Exception { public void testNormalInline_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("numberOfSuspentions.kt") @TestMetadata("numberOfSuspentions.kt")
public void testNumberOfSuspentions_1_2() throws Exception { public void testNumberOfSuspentions_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("numberOfSuspentions.kt") @TestMetadata("numberOfSuspentions.kt")
public void testNumberOfSuspentions_1_3() throws Exception { public void testNumberOfSuspentions_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
} }
} }
@@ -25,6 +25,10 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest {
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.ANY, testDataFilePath);
}
public void testAllFilesPresentInBytecodeListing() throws Exception { public void testAllFilesPresentInBytecodeListing() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeListing"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeListing"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
} }
@@ -36,26 +40,22 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest {
@TestMetadata("coroutineContextIntrinsic.kt") @TestMetadata("coroutineContextIntrinsic.kt")
public void testCoroutineContextIntrinsic_1_2() throws Exception { public void testCoroutineContextIntrinsic_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/coroutineContextIntrinsic.kt"); runTestWithPackageReplacement("compiler/testData/codegen/bytecodeListing/coroutineContextIntrinsic.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("coroutineContextIntrinsic.kt") @TestMetadata("coroutineContextIntrinsic.kt")
public void testCoroutineContextIntrinsic_1_3() throws Exception { public void testCoroutineContextIntrinsic_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/coroutineContextIntrinsic.kt"); runTestWithPackageReplacement("compiler/testData/codegen/bytecodeListing/coroutineContextIntrinsic.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("coroutineFields.kt") @TestMetadata("coroutineFields.kt")
public void testCoroutineFields_1_2() throws Exception { public void testCoroutineFields_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/coroutineFields.kt"); runTestWithPackageReplacement("compiler/testData/codegen/bytecodeListing/coroutineFields.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("coroutineFields.kt") @TestMetadata("coroutineFields.kt")
public void testCoroutineFields_1_3() throws Exception { public void testCoroutineFields_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/coroutineFields.kt"); runTestWithPackageReplacement("compiler/testData/codegen/bytecodeListing/coroutineFields.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("defaultImpls.kt") @TestMetadata("defaultImpls.kt")
@@ -140,14 +140,12 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest {
@TestMetadata("oomInReturnUnit.kt") @TestMetadata("oomInReturnUnit.kt")
public void testOomInReturnUnit_1_2() throws Exception { public void testOomInReturnUnit_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/oomInReturnUnit.kt"); runTestWithPackageReplacement("compiler/testData/codegen/bytecodeListing/oomInReturnUnit.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("oomInReturnUnit.kt") @TestMetadata("oomInReturnUnit.kt")
public void testOomInReturnUnit_1_3() throws Exception { public void testOomInReturnUnit_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/oomInReturnUnit.kt"); runTestWithPackageReplacement("compiler/testData/codegen/bytecodeListing/oomInReturnUnit.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("privateSuspendFun.kt") @TestMetadata("privateSuspendFun.kt")
@@ -167,14 +165,12 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest {
@TestMetadata("suspendReifiedFun.kt") @TestMetadata("suspendReifiedFun.kt")
public void testSuspendReifiedFun_1_2() throws Exception { public void testSuspendReifiedFun_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/suspendReifiedFun.kt"); runTestWithPackageReplacement("compiler/testData/codegen/bytecodeListing/suspendReifiedFun.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("suspendReifiedFun.kt") @TestMetadata("suspendReifiedFun.kt")
public void testSuspendReifiedFun_1_3() throws Exception { public void testSuspendReifiedFun_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/suspendReifiedFun.kt"); runTestWithPackageReplacement("compiler/testData/codegen/bytecodeListing/suspendReifiedFun.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("compiler/testData/codegen/bytecodeListing/annotations") @TestMetadata("compiler/testData/codegen/bytecodeListing/annotations")
@@ -391,56 +387,52 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest {
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.ANY, testDataFilePath);
}
public void testAllFilesPresentInTailcall() throws Exception { public void testAllFilesPresentInTailcall() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/tailcall"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/tailcall"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
} }
@TestMetadata("tailCallIntrinsics.kt") @TestMetadata("tailCallIntrinsics.kt")
public void testTailCallIntrinsics_1_2() throws Exception { public void testTailCallIntrinsics_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/tailcall/tailCallIntrinsics.kt"); runTestWithPackageReplacement("compiler/testData/codegen/bytecodeListing/tailcall/tailCallIntrinsics.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("tailCallIntrinsics.kt") @TestMetadata("tailCallIntrinsics.kt")
public void testTailCallIntrinsics_1_3() throws Exception { public void testTailCallIntrinsics_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/tailcall/tailCallIntrinsics.kt"); runTestWithPackageReplacement("compiler/testData/codegen/bytecodeListing/tailcall/tailCallIntrinsics.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("tailSuspendUnitFun.kt") @TestMetadata("tailSuspendUnitFun.kt")
public void testTailSuspendUnitFun_1_2() throws Exception { public void testTailSuspendUnitFun_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/tailcall/tailSuspendUnitFun.kt"); runTestWithPackageReplacement("compiler/testData/codegen/bytecodeListing/tailcall/tailSuspendUnitFun.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("tailSuspendUnitFun.kt") @TestMetadata("tailSuspendUnitFun.kt")
public void testTailSuspendUnitFun_1_3() throws Exception { public void testTailSuspendUnitFun_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/tailcall/tailSuspendUnitFun.kt"); runTestWithPackageReplacement("compiler/testData/codegen/bytecodeListing/tailcall/tailSuspendUnitFun.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("tryCatchTailCall.kt") @TestMetadata("tryCatchTailCall.kt")
public void testTryCatchTailCall_1_2() throws Exception { public void testTryCatchTailCall_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/tailcall/tryCatchTailCall.kt"); runTestWithPackageReplacement("compiler/testData/codegen/bytecodeListing/tailcall/tryCatchTailCall.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("tryCatchTailCall.kt") @TestMetadata("tryCatchTailCall.kt")
public void testTryCatchTailCall_1_3() throws Exception { public void testTryCatchTailCall_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/tailcall/tryCatchTailCall.kt"); runTestWithPackageReplacement("compiler/testData/codegen/bytecodeListing/tailcall/tryCatchTailCall.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("unreachable.kt") @TestMetadata("unreachable.kt")
public void testUnreachable_1_2() throws Exception { public void testUnreachable_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/tailcall/unreachable.kt"); runTestWithPackageReplacement("compiler/testData/codegen/bytecodeListing/tailcall/unreachable.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("unreachable.kt") @TestMetadata("unreachable.kt")
public void testUnreachable_1_3() throws Exception { public void testUnreachable_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/tailcall/unreachable.kt"); runTestWithPackageReplacement("compiler/testData/codegen/bytecodeListing/tailcall/unreachable.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("whenUnit.kt") @TestMetadata("whenUnit.kt")
@@ -1044,56 +1044,52 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, 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.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/coroutines"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/coroutines"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
} }
@TestMetadata("doNotReassignContinuation.kt") @TestMetadata("doNotReassignContinuation.kt")
public void testDoNotReassignContinuation_1_2() throws Exception { public void testDoNotReassignContinuation_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/doNotReassignContinuation.kt"); runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/doNotReassignContinuation.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("doNotReassignContinuation.kt") @TestMetadata("doNotReassignContinuation.kt")
public void testDoNotReassignContinuation_1_3() throws Exception { public void testDoNotReassignContinuation_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/doNotReassignContinuation.kt"); runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/doNotReassignContinuation.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("returnUnitInLambda.kt") @TestMetadata("returnUnitInLambda.kt")
public void testReturnUnitInLambda_1_2() throws Exception { public void testReturnUnitInLambda_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/returnUnitInLambda.kt"); runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/returnUnitInLambda.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("returnUnitInLambda.kt") @TestMetadata("returnUnitInLambda.kt")
public void testReturnUnitInLambda_1_3() throws Exception { public void testReturnUnitInLambda_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/returnUnitInLambda.kt"); runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/returnUnitInLambda.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("varValueConflictsWithTableSameSort.kt") @TestMetadata("varValueConflictsWithTableSameSort.kt")
public void testVarValueConflictsWithTableSameSort_1_2() throws Exception { public void testVarValueConflictsWithTableSameSort_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/varValueConflictsWithTableSameSort.kt"); runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/varValueConflictsWithTableSameSort.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("varValueConflictsWithTableSameSort.kt") @TestMetadata("varValueConflictsWithTableSameSort.kt")
public void testVarValueConflictsWithTableSameSort_1_3() throws Exception { public void testVarValueConflictsWithTableSameSort_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/varValueConflictsWithTableSameSort.kt"); runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/varValueConflictsWithTableSameSort.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("varValueConflictsWithTable.kt") @TestMetadata("varValueConflictsWithTable.kt")
public void testVarValueConflictsWithTable_1_2() throws Exception { public void testVarValueConflictsWithTable_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/varValueConflictsWithTable.kt"); runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/varValueConflictsWithTable.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("varValueConflictsWithTable.kt") @TestMetadata("varValueConflictsWithTable.kt")
public void testVarValueConflictsWithTable_1_3() throws Exception { public void testVarValueConflictsWithTable_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/varValueConflictsWithTable.kt"); runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/varValueConflictsWithTable.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("compiler/testData/codegen/bytecodeText/coroutines/destructuringInLambda") @TestMetadata("compiler/testData/codegen/bytecodeText/coroutines/destructuringInLambda")
@@ -1122,128 +1118,112 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.ANY, testDataFilePath);
}
public void testAllFilesPresentInIntLikeVarSpilling() throws Exception { public void testAllFilesPresentInIntLikeVarSpilling() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
} }
@TestMetadata("complicatedMerge.kt") @TestMetadata("complicatedMerge.kt")
public void testComplicatedMerge_1_2() throws Exception { public void testComplicatedMerge_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/complicatedMerge.kt"); runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/complicatedMerge.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("complicatedMerge.kt") @TestMetadata("complicatedMerge.kt")
public void testComplicatedMerge_1_3() throws Exception { public void testComplicatedMerge_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/complicatedMerge.kt"); runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/complicatedMerge.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("i2bResult.kt") @TestMetadata("i2bResult.kt")
public void testI2bResult_1_2() throws Exception { public void testI2bResult_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/i2bResult.kt"); runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/i2bResult.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("i2bResult.kt") @TestMetadata("i2bResult.kt")
public void testI2bResult_1_3() throws Exception { public void testI2bResult_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/i2bResult.kt"); runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/i2bResult.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("loadFromBooleanArray.kt") @TestMetadata("loadFromBooleanArray.kt")
public void testLoadFromBooleanArray_1_2() throws Exception { public void testLoadFromBooleanArray_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/loadFromBooleanArray.kt"); runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/loadFromBooleanArray.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("loadFromBooleanArray.kt") @TestMetadata("loadFromBooleanArray.kt")
public void testLoadFromBooleanArray_1_3() throws Exception { public void testLoadFromBooleanArray_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/loadFromBooleanArray.kt"); runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/loadFromBooleanArray.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("loadFromByteArray.kt") @TestMetadata("loadFromByteArray.kt")
public void testLoadFromByteArray_1_2() throws Exception { public void testLoadFromByteArray_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/loadFromByteArray.kt"); runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/loadFromByteArray.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("loadFromByteArray.kt") @TestMetadata("loadFromByteArray.kt")
public void testLoadFromByteArray_1_3() throws Exception { public void testLoadFromByteArray_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/loadFromByteArray.kt"); runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/loadFromByteArray.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("noVariableInTable.kt") @TestMetadata("noVariableInTable.kt")
public void testNoVariableInTable_1_2() throws Exception { public void testNoVariableInTable_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/noVariableInTable.kt"); runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/noVariableInTable.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("noVariableInTable.kt") @TestMetadata("noVariableInTable.kt")
public void testNoVariableInTable_1_3() throws Exception { public void testNoVariableInTable_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/noVariableInTable.kt"); runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/noVariableInTable.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("sameIconst1ManyVars.kt") @TestMetadata("sameIconst1ManyVars.kt")
public void testSameIconst1ManyVars_1_2() throws Exception { public void testSameIconst1ManyVars_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/sameIconst1ManyVars.kt"); runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/sameIconst1ManyVars.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("sameIconst1ManyVars.kt") @TestMetadata("sameIconst1ManyVars.kt")
public void testSameIconst1ManyVars_1_3() throws Exception { public void testSameIconst1ManyVars_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/sameIconst1ManyVars.kt"); runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/sameIconst1ManyVars.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("usedInArrayStore.kt") @TestMetadata("usedInArrayStore.kt")
public void testUsedInArrayStore_1_2() throws Exception { public void testUsedInArrayStore_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInArrayStore.kt"); runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInArrayStore.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("usedInArrayStore.kt") @TestMetadata("usedInArrayStore.kt")
public void testUsedInArrayStore_1_3() throws Exception { public void testUsedInArrayStore_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInArrayStore.kt"); runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInArrayStore.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("usedInMethodCall.kt") @TestMetadata("usedInMethodCall.kt")
public void testUsedInMethodCall_1_2() throws Exception { public void testUsedInMethodCall_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInMethodCall.kt"); runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInMethodCall.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("usedInMethodCall.kt") @TestMetadata("usedInMethodCall.kt")
public void testUsedInMethodCall_1_3() throws Exception { public void testUsedInMethodCall_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInMethodCall.kt"); runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInMethodCall.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("usedInPutfield.kt") @TestMetadata("usedInPutfield.kt")
public void testUsedInPutfield_1_2() throws Exception { public void testUsedInPutfield_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInPutfield.kt"); runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInPutfield.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("usedInPutfield.kt") @TestMetadata("usedInPutfield.kt")
public void testUsedInPutfield_1_3() throws Exception { public void testUsedInPutfield_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInPutfield.kt"); runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInPutfield.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("usedInVarStore.kt") @TestMetadata("usedInVarStore.kt")
public void testUsedInVarStore_1_2() throws Exception { public void testUsedInVarStore_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInVarStore.kt"); runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInVarStore.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("usedInVarStore.kt") @TestMetadata("usedInVarStore.kt")
public void testUsedInVarStore_1_3() throws Exception { public void testUsedInVarStore_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInVarStore.kt"); runTestWithPackageReplacement("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInVarStore.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
} }
} }
@@ -3201,188 +3201,162 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.ANY, testDataFilePath);
}
public void testAllFilesPresentInSuspend() throws Exception { public void testAllFilesPresentInSuspend() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
} }
@TestMetadata("capturedVariables.kt") @TestMetadata("capturedVariables.kt")
public void testCapturedVariables_1_2() throws Exception { public void testCapturedVariables_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("capturedVariables.kt") @TestMetadata("capturedVariables.kt")
public void testCapturedVariables_1_3() throws Exception { public void testCapturedVariables_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt") @TestMetadata("crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt")
public void testCrossinlineSuspendLambdaInsideCrossinlineSuspendLambda_1_2() throws Exception { public void testCrossinlineSuspendLambdaInsideCrossinlineSuspendLambda_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt") @TestMetadata("crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt")
public void testCrossinlineSuspendLambdaInsideCrossinlineSuspendLambda_1_3() throws Exception { public void testCrossinlineSuspendLambdaInsideCrossinlineSuspendLambda_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt")
public void testInlineOrdinaryOfCrossinlineSuspend_1_2() throws Exception { public void testInlineOrdinaryOfCrossinlineSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt")
public void testInlineOrdinaryOfCrossinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfCrossinlineSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt")
public void testInlineOrdinaryOfNoinlineSuspend_1_2() throws Exception { public void testInlineOrdinaryOfNoinlineSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt")
public void testInlineOrdinaryOfNoinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfNoinlineSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendContinuation.kt") @TestMetadata("inlineSuspendContinuation.kt")
public void testInlineSuspendContinuation_1_2() throws Exception { public void testInlineSuspendContinuation_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendContinuation.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendContinuation.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendContinuation.kt") @TestMetadata("inlineSuspendContinuation.kt")
public void testInlineSuspendContinuation_1_3() throws Exception { public void testInlineSuspendContinuation_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendContinuation.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendContinuation.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt")
public void testInlineSuspendOfCrossinlineOrdinary_1_2() throws Exception { public void testInlineSuspendOfCrossinlineOrdinary_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt")
public void testInlineSuspendOfCrossinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfCrossinlineOrdinary_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt")
public void testInlineSuspendOfCrossinlineSuspend_1_2() throws Exception { public void testInlineSuspendOfCrossinlineSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt")
public void testInlineSuspendOfCrossinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfCrossinlineSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt")
public void testInlineSuspendOfNoinlineOrdinary_1_2() throws Exception { public void testInlineSuspendOfNoinlineOrdinary_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt")
public void testInlineSuspendOfNoinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfNoinlineOrdinary_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfNoinlineSuspend.kt") @TestMetadata("inlineSuspendOfNoinlineSuspend.kt")
public void testInlineSuspendOfNoinlineSuspend_1_2() throws Exception { public void testInlineSuspendOfNoinlineSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfNoinlineSuspend.kt") @TestMetadata("inlineSuspendOfNoinlineSuspend.kt")
public void testInlineSuspendOfNoinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfNoinlineSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfOrdinary.kt") @TestMetadata("inlineSuspendOfOrdinary.kt")
public void testInlineSuspendOfOrdinary_1_2() throws Exception { public void testInlineSuspendOfOrdinary_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfOrdinary.kt") @TestMetadata("inlineSuspendOfOrdinary.kt")
public void testInlineSuspendOfOrdinary_1_3() throws Exception { public void testInlineSuspendOfOrdinary_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfSuspend.kt") @TestMetadata("inlineSuspendOfSuspend.kt")
public void testInlineSuspendOfSuspend_1_2() throws Exception { public void testInlineSuspendOfSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfSuspend.kt") @TestMetadata("inlineSuspendOfSuspend.kt")
public void testInlineSuspendOfSuspend_1_3() throws Exception { public void testInlineSuspendOfSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("multipleLocals.kt") @TestMetadata("multipleLocals.kt")
public void testMultipleLocals_1_2() throws Exception { public void testMultipleLocals_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("multipleLocals.kt") @TestMetadata("multipleLocals.kt")
public void testMultipleLocals_1_3() throws Exception { public void testMultipleLocals_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("multipleSuspensionPoints.kt") @TestMetadata("multipleSuspensionPoints.kt")
public void testMultipleSuspensionPoints_1_2() throws Exception { public void testMultipleSuspensionPoints_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("multipleSuspensionPoints.kt") @TestMetadata("multipleSuspensionPoints.kt")
public void testMultipleSuspensionPoints_1_3() throws Exception { public void testMultipleSuspensionPoints_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("returnValue.kt") @TestMetadata("returnValue.kt")
public void testReturnValue_1_2() throws Exception { public void testReturnValue_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/returnValue.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/returnValue.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("returnValue.kt") @TestMetadata("returnValue.kt")
public void testReturnValue_1_3() throws Exception { public void testReturnValue_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/returnValue.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/returnValue.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("tryCatchStackTransform.kt") @TestMetadata("tryCatchStackTransform.kt")
public void testTryCatchStackTransform_1_2() throws Exception { public void testTryCatchStackTransform_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("tryCatchStackTransform.kt") @TestMetadata("tryCatchStackTransform.kt")
public void testTryCatchStackTransform_1_3() throws Exception { public void testTryCatchStackTransform_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("compiler/testData/codegen/boxInline/suspend/defaultParameter") @TestMetadata("compiler/testData/codegen/boxInline/suspend/defaultParameter")
@@ -3393,32 +3367,32 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.ANY, testDataFilePath);
}
public void testAllFilesPresentInDefaultParameter() throws Exception { public void testAllFilesPresentInDefaultParameter() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/defaultParameter"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/defaultParameter"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
} }
@TestMetadata("defaultValueCrossinline.kt") @TestMetadata("defaultValueCrossinline.kt")
public void testDefaultValueCrossinline_1_2() throws Exception { public void testDefaultValueCrossinline_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("defaultValueCrossinline.kt") @TestMetadata("defaultValueCrossinline.kt")
public void testDefaultValueCrossinline_1_3() throws Exception { public void testDefaultValueCrossinline_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("defaultValueInline.kt") @TestMetadata("defaultValueInline.kt")
public void testDefaultValueInline_1_2() throws Exception { public void testDefaultValueInline_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("defaultValueInline.kt") @TestMetadata("defaultValueInline.kt")
public void testDefaultValueInline_1_3() throws Exception { public void testDefaultValueInline_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
} }
@@ -3453,104 +3427,92 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.ANY, testDataFilePath);
}
public void testAllFilesPresentInReceiver() throws Exception { public void testAllFilesPresentInReceiver() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/receiver"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/receiver"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
} }
@TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt")
public void testInlineOrdinaryOfCrossinlineSuspend_1_2() throws Exception { public void testInlineOrdinaryOfCrossinlineSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt")
public void testInlineOrdinaryOfCrossinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfCrossinlineSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt")
public void testInlineOrdinaryOfNoinlineSuspend_1_2() throws Exception { public void testInlineOrdinaryOfNoinlineSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt")
public void testInlineOrdinaryOfNoinlineSuspend_1_3() throws Exception { public void testInlineOrdinaryOfNoinlineSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt")
public void testInlineSuspendOfCrossinlineOrdinary_1_2() throws Exception { public void testInlineSuspendOfCrossinlineOrdinary_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt")
public void testInlineSuspendOfCrossinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfCrossinlineOrdinary_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt")
public void testInlineSuspendOfCrossinlineSuspend_1_2() throws Exception { public void testInlineSuspendOfCrossinlineSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt")
public void testInlineSuspendOfCrossinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfCrossinlineSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt")
public void testInlineSuspendOfNoinlineOrdinary_1_2() throws Exception { public void testInlineSuspendOfNoinlineOrdinary_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt")
public void testInlineSuspendOfNoinlineOrdinary_1_3() throws Exception { public void testInlineSuspendOfNoinlineOrdinary_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfNoinlineSuspend.kt") @TestMetadata("inlineSuspendOfNoinlineSuspend.kt")
public void testInlineSuspendOfNoinlineSuspend_1_2() throws Exception { public void testInlineSuspendOfNoinlineSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfNoinlineSuspend.kt") @TestMetadata("inlineSuspendOfNoinlineSuspend.kt")
public void testInlineSuspendOfNoinlineSuspend_1_3() throws Exception { public void testInlineSuspendOfNoinlineSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfOrdinary.kt") @TestMetadata("inlineSuspendOfOrdinary.kt")
public void testInlineSuspendOfOrdinary_1_2() throws Exception { public void testInlineSuspendOfOrdinary_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfOrdinary.kt") @TestMetadata("inlineSuspendOfOrdinary.kt")
public void testInlineSuspendOfOrdinary_1_3() throws Exception { public void testInlineSuspendOfOrdinary_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("inlineSuspendOfSuspend.kt") @TestMetadata("inlineSuspendOfSuspend.kt")
public void testInlineSuspendOfSuspend_1_2() throws Exception { public void testInlineSuspendOfSuspend_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("inlineSuspendOfSuspend.kt") @TestMetadata("inlineSuspendOfSuspend.kt")
public void testInlineSuspendOfSuspend_1_3() throws Exception { public void testInlineSuspendOfSuspend_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
} }
@@ -3562,140 +3524,122 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
} }
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.ANY, testDataFilePath);
}
public void testAllFilesPresentInStateMachine() throws Exception { public void testAllFilesPresentInStateMachine() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/stateMachine"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/stateMachine"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
} }
@TestMetadata("innerLambdaInsideLambda.kt") @TestMetadata("innerLambdaInsideLambda.kt")
public void testInnerLambdaInsideLambda_1_2() throws Exception { public void testInnerLambdaInsideLambda_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("innerLambdaInsideLambda.kt") @TestMetadata("innerLambdaInsideLambda.kt")
public void testInnerLambdaInsideLambda_1_3() throws Exception { public void testInnerLambdaInsideLambda_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("innerLambdaWithoutCrossinline.kt") @TestMetadata("innerLambdaWithoutCrossinline.kt")
public void testInnerLambdaWithoutCrossinline_1_2() throws Exception { public void testInnerLambdaWithoutCrossinline_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("innerLambdaWithoutCrossinline.kt") @TestMetadata("innerLambdaWithoutCrossinline.kt")
public void testInnerLambdaWithoutCrossinline_1_3() throws Exception { public void testInnerLambdaWithoutCrossinline_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("innerLambda.kt") @TestMetadata("innerLambda.kt")
public void testInnerLambda_1_2() throws Exception { public void testInnerLambda_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("innerLambda.kt") @TestMetadata("innerLambda.kt")
public void testInnerLambda_1_3() throws Exception { public void testInnerLambda_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("innerMadnessCallSite.kt") @TestMetadata("innerMadnessCallSite.kt")
public void testInnerMadnessCallSite_1_2() throws Exception { public void testInnerMadnessCallSite_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("innerMadnessCallSite.kt") @TestMetadata("innerMadnessCallSite.kt")
public void testInnerMadnessCallSite_1_3() throws Exception { public void testInnerMadnessCallSite_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("innerMadness.kt") @TestMetadata("innerMadness.kt")
public void testInnerMadness_1_2() throws Exception { public void testInnerMadness_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("innerMadness.kt") @TestMetadata("innerMadness.kt")
public void testInnerMadness_1_3() throws Exception { public void testInnerMadness_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("innerObjectInsideInnerObject.kt") @TestMetadata("innerObjectInsideInnerObject.kt")
public void testInnerObjectInsideInnerObject_1_2() throws Exception { public void testInnerObjectInsideInnerObject_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("innerObjectInsideInnerObject.kt") @TestMetadata("innerObjectInsideInnerObject.kt")
public void testInnerObjectInsideInnerObject_1_3() throws Exception { public void testInnerObjectInsideInnerObject_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("innerObjectSeveralFunctions.kt") @TestMetadata("innerObjectSeveralFunctions.kt")
public void testInnerObjectSeveralFunctions_1_2() throws Exception { public void testInnerObjectSeveralFunctions_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("innerObjectSeveralFunctions.kt") @TestMetadata("innerObjectSeveralFunctions.kt")
public void testInnerObjectSeveralFunctions_1_3() throws Exception { public void testInnerObjectSeveralFunctions_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("innerObjectWithoutCapturingCrossinline.kt") @TestMetadata("innerObjectWithoutCapturingCrossinline.kt")
public void testInnerObjectWithoutCapturingCrossinline_1_2() throws Exception { public void testInnerObjectWithoutCapturingCrossinline_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("innerObjectWithoutCapturingCrossinline.kt") @TestMetadata("innerObjectWithoutCapturingCrossinline.kt")
public void testInnerObjectWithoutCapturingCrossinline_1_3() throws Exception { public void testInnerObjectWithoutCapturingCrossinline_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("innerObject.kt") @TestMetadata("innerObject.kt")
public void testInnerObject_1_2() throws Exception { public void testInnerObject_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("innerObject.kt") @TestMetadata("innerObject.kt")
public void testInnerObject_1_3() throws Exception { public void testInnerObject_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("normalInline.kt") @TestMetadata("normalInline.kt")
public void testNormalInline_1_2() throws Exception { public void testNormalInline_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("normalInline.kt") @TestMetadata("normalInline.kt")
public void testNormalInline_1_3() throws Exception { public void testNormalInline_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("numberOfSuspentions.kt") @TestMetadata("numberOfSuspentions.kt")
public void testNumberOfSuspentions_1_2() throws Exception { public void testNumberOfSuspentions_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("numberOfSuspentions.kt") @TestMetadata("numberOfSuspentions.kt")
public void testNumberOfSuspentions_1_3() throws Exception { public void testNumberOfSuspentions_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt"); runTestWithPackageReplacement("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
} }
} }
@@ -25,6 +25,10 @@ public class CompileKotlinAgainstKotlinTestGenerated extends AbstractCompileKotl
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, 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.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
} }
@@ -86,14 +90,12 @@ public class CompileKotlinAgainstKotlinTestGenerated extends AbstractCompileKotl
@TestMetadata("coroutinesBinary.kt") @TestMetadata("coroutinesBinary.kt")
public void testCoroutinesBinary_1_2() throws Exception { public void testCoroutinesBinary_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/coroutinesBinary.kt"); runTestWithPackageReplacement("compiler/testData/compileKotlinAgainstKotlin/coroutinesBinary.kt", "kotlin.coroutines.experimental");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
} }
@TestMetadata("coroutinesBinary.kt") @TestMetadata("coroutinesBinary.kt")
public void testCoroutinesBinary_1_3() throws Exception { public void testCoroutinesBinary_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/coroutinesBinary.kt"); runTestWithPackageReplacement("compiler/testData/compileKotlinAgainstKotlin/coroutinesBinary.kt", "kotlin.coroutines");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
} }
@TestMetadata("defaultConstructor.kt") @TestMetadata("defaultConstructor.kt")
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,31 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. 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
) : 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
p.println("KotlinTestUtils.$testRunnerMethodName(filePath -> $testMethodName(filePath, packageName), $className.$targetBackend, testDataFilePath);")
}
companion object {
const val METHOD_NAME = "runTestWithPackageReplacement"
}
}
@@ -137,7 +137,7 @@ public class SimpleTestClassModel implements TestClassModel {
if (testMethods == null) { if (testMethods == null) {
if (!rootFile.isDirectory()) { if (!rootFile.isDirectory()) {
if (CoroutinesKt.isCommonCoroutineTest(rootFile)) { if (CoroutinesKt.isCommonCoroutineTest(rootFile)) {
testMethods = CoroutinesKt.createCommonCoroutinesTestMethodModels(rootFile, rootFile, doTestMethodName, filenamePattern, testMethods = CoroutinesKt.createCommonCoroutinesTestMethodModels(rootFile, rootFile, filenamePattern,
checkFilenameStartsLowerCase, targetBackend, checkFilenameStartsLowerCase, targetBackend,
skipIgnored); skipIgnored);
} }
@@ -155,6 +155,9 @@ public class SimpleTestClassModel implements TestClassModel {
result.add(new TestAllFilesPresentMethodModel()); result.add(new TestAllFilesPresentMethodModel());
File[] listFiles = rootFile.listFiles(); File[] listFiles = rootFile.listFiles();
boolean hasCoroutines = false;
if (listFiles != null) { if (listFiles != null) {
for (File file : listFiles) { for (File file : listFiles) {
if (filenamePattern.matcher(file.getName()).matches()) { if (filenamePattern.matcher(file.getName()).matches()) {
@@ -164,7 +167,8 @@ public class SimpleTestClassModel implements TestClassModel {
} }
if (!file.isDirectory() && CoroutinesKt.isCommonCoroutineTest(file)) { if (!file.isDirectory() && CoroutinesKt.isCommonCoroutineTest(file)) {
result.addAll(CoroutinesKt.createCommonCoroutinesTestMethodModels(rootFile, file, doTestMethodName, hasCoroutines = true;
result.addAll(CoroutinesKt.createCommonCoroutinesTestMethodModels(rootFile, file,
filenamePattern, filenamePattern,
checkFilenameStartsLowerCase, checkFilenameStartsLowerCase,
targetBackend, skipIgnored)); targetBackend, skipIgnored));
@@ -176,6 +180,12 @@ public class SimpleTestClassModel implements TestClassModel {
} }
} }
} }
if (hasCoroutines) {
String methodName = doTestMethodName + "WithCoroutinesPackageReplacement";
result.add(new RunTestMethodWithPackageReplacementModel(targetBackend, methodName, testRunnerMethodName));
}
result.sort(BY_NAME); result.sort(BY_NAME);
testMethods = result; testMethods = result;
@@ -6,8 +6,8 @@
package org.jetbrains.kotlin.generators.util package org.jetbrains.kotlin.generators.util
import org.jetbrains.kotlin.generators.tests.generator.MethodModel 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.generators.tests.generator.SimpleTestMethodModel
import org.jetbrains.kotlin.test.InTextDirectivesUtils.isIgnoredTarget
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 +17,6 @@ import java.util.regex.Pattern
class CoroutinesTestModel( class CoroutinesTestModel(
rootDir: File, rootDir: File,
file: File, file: File,
private val doTestMethodName: String,
filenamePattern: Pattern, filenamePattern: Pattern,
checkFilenameStartsLowerCase: Boolean?, checkFilenameStartsLowerCase: Boolean?,
targetBackend: TargetBackend, targetBackend: TargetBackend,
@@ -36,26 +35,9 @@ class CoroutinesTestModel(
override fun generateBody(p: Printer) { override fun generateBody(p: Printer) {
val filePath = KotlinTestUtils.getFilePath(file) + if (file.isDirectory) "/" else "" val filePath = KotlinTestUtils.getFilePath(file) + if (file.isDirectory) "/" else ""
p.println("String fileName = KotlinTestUtils.navigationMetadata(\"", filePath, "\");")
if (isIgnoredTarget(targetBackend, file)) {
p.println("try {")
p.pushIndent()
}
val packageName = if (isLanguageVersion1_3) "kotlin.coroutines" else "kotlin.coroutines.experimental" val packageName = if (isLanguageVersion1_3) "kotlin.coroutines" else "kotlin.coroutines.experimental"
p.println(doTestMethodName + "WithCoroutinesPackageReplacement", "(fileName, \"$packageName\");")
if (isIgnoredTarget(targetBackend, file)) { p.println(RunTestMethodWithPackageReplacementModel.METHOD_NAME, "(\"$filePath\", \"$packageName\");")
p.popIndent()
p.println("}")
p.println("catch (Throwable ignore) {")
p.pushIndent()
p.println("return;")
p.popIndent()
p.println("}")
p.println("throw new AssertionError(\"Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.\");")
}
} }
} }
@@ -66,7 +48,6 @@ fun isCommonCoroutineTest(file: File): Boolean {
fun createCommonCoroutinesTestMethodModels( fun createCommonCoroutinesTestMethodModels(
rootDir: File, rootDir: File,
file: File, file: File,
doTestMethodName: String,
filenamePattern: Pattern, filenamePattern: Pattern,
checkFilenameStartsLowerCase: Boolean?, checkFilenameStartsLowerCase: Boolean?,
targetBackend: TargetBackend, targetBackend: TargetBackend,
@@ -77,7 +58,6 @@ fun createCommonCoroutinesTestMethodModels(
CoroutinesTestModel( CoroutinesTestModel(
rootDir, rootDir,
file, file,
doTestMethodName,
filenamePattern, filenamePattern,
checkFilenameStartsLowerCase, checkFilenameStartsLowerCase,
targetBackend, targetBackend,
@@ -90,7 +70,6 @@ fun createCommonCoroutinesTestMethodModels(
CoroutinesTestModel( CoroutinesTestModel(
rootDir, rootDir,
file, file,
doTestMethodName,
filenamePattern, filenamePattern,
checkFilenameStartsLowerCase, checkFilenameStartsLowerCase,
targetBackend, targetBackend,
@@ -100,7 +79,6 @@ fun createCommonCoroutinesTestMethodModels(
CoroutinesTestModel( CoroutinesTestModel(
rootDir, rootDir,
file, file,
doTestMethodName,
filenamePattern, filenamePattern,
checkFilenameStartsLowerCase, checkFilenameStartsLowerCase,
targetBackend, targetBackend,
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff