Add quickfix for adding CancellableException to @Throws suspend fun

This commit is contained in:
Svyatoslav Scherbina
2020-05-25 15:04:42 +03:00
parent 290a824107
commit b7a08494ae
14 changed files with 176 additions and 1 deletions
@@ -794,6 +794,39 @@ public class QuickFixMultiModuleTestGenerated extends AbstractQuickFixMultiModul
}
}
@TestMetadata("idea/testData/multiModuleQuickFix/fixNativeThrowsErrors")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class FixNativeThrowsErrors extends AbstractQuickFixMultiModuleTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
@TestMetadata("addCancellationException1")
public void testAddCancellationException1() throws Exception {
runTest("idea/testData/multiModuleQuickFix/fixNativeThrowsErrors/addCancellationException1/");
}
@TestMetadata("addCancellationException2")
public void testAddCancellationException2() throws Exception {
runTest("idea/testData/multiModuleQuickFix/fixNativeThrowsErrors/addCancellationException2/");
}
@TestMetadata("addCancellationException3")
public void testAddCancellationException3() throws Exception {
runTest("idea/testData/multiModuleQuickFix/fixNativeThrowsErrors/addCancellationException3/");
}
@TestMetadata("addCancellationException4")
public void testAddCancellationException4() throws Exception {
runTest("idea/testData/multiModuleQuickFix/fixNativeThrowsErrors/addCancellationException4/");
}
public void testAllFilesPresentInFixNativeThrowsErrors() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/multiModuleQuickFix/fixNativeThrowsErrors"), Pattern.compile("^([^\\.]+)$"), null, true);
}
}
@TestMetadata("idea/testData/multiModuleQuickFix/makeOverridenMemberOpen")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)