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,32 +25,32 @@ public class BlackBoxWithJava8CodegenTestGenerated extends AbstractBlackBoxCodeg
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 {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/box"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
}
@TestMetadata("asyncException.kt")
public void testAsyncException_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/asyncException.kt");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
runTestWithPackageReplacement("compiler/testData/codegen/java8/box/asyncException.kt", "kotlin.coroutines.experimental");
}
@TestMetadata("asyncException.kt")
public void testAsyncException_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/asyncException.kt");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
runTestWithPackageReplacement("compiler/testData/codegen/java8/box/asyncException.kt", "kotlin.coroutines");
}
@TestMetadata("async.kt")
public void testAsync_1_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/async.kt");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines.experimental");
runTestWithPackageReplacement("compiler/testData/codegen/java8/box/async.kt", "kotlin.coroutines.experimental");
}
@TestMetadata("async.kt")
public void testAsync_1_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/async.kt");
doTestWithCoroutinesPackageReplacement(fileName, "kotlin.coroutines");
runTestWithPackageReplacement("compiler/testData/codegen/java8/box/async.kt", "kotlin.coroutines");
}
@TestMetadata("capturedSuperCall.kt")