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
@@ -25,6 +25,10 @@ public class CompileKotlinAgainstKotlinTestGenerated extends AbstractCompileKotl
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 {
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")
public void testCoroutinesBinary_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/coroutinesBinary.kt");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
runTestWithPackageReplacement("compiler/testData/compileKotlinAgainstKotlin/coroutinesBinary.kt", "kotlin.coroutines.experimental");
}
@TestMetadata("coroutinesBinary.kt")
public void testCoroutinesBinary_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/coroutinesBinary.kt");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
runTestWithPackageReplacement("compiler/testData/compileKotlinAgainstKotlin/coroutinesBinary.kt", "kotlin.coroutines");
}
@TestMetadata("defaultConstructor.kt")