[kotlin] Improve test coverage for K2

^KTIJ-23928

GitOrigin-RevId: 1c2d8ff22ddfce1acd787a3b4b4b4f48afd6d132
This commit is contained in:
Andrey Cherkasov
2024-05-15 11:45:58 +00:00
committed by intellij-monorepo-bot
parent 9d35a21fc5
commit 3755acff68
2 changed files with 23 additions and 0 deletions
@@ -972,4 +972,22 @@ public abstract class HighLevelQuickFixMultiFileTestGenerated extends AbstractHi
runTest("../../../idea/tests/testData/quickfix/surroundWithNullCheck/javaReceiverNullabilityInvoke.test");
}
}
@RunWith(JUnit3RunnerWithInners.class)
@TestMetadata("../../../idea/tests/testData/quickfix/modifiers/addOpenToClassDeclaration")
public static class AddOpenToClassDeclaration extends AbstractHighLevelQuickFixMultiFileTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTestWithExtraFile, this, testDataFilePath);
}
@TestMetadata("finalJavaSupertype.before.Main.kt")
public void testFinalJavaSupertype() throws Exception {
runTest("../../../idea/tests/testData/quickfix/modifiers/addOpenToClassDeclaration/finalJavaSupertype.before.Main.kt");
}
@TestMetadata("finalJavaUpperBound.before.Main.kt")
public void testFinalJavaUpperBound() throws Exception {
runTest("../../../idea/tests/testData/quickfix/modifiers/addOpenToClassDeclaration/finalJavaUpperBound.before.Main.kt");
}
}
}
@@ -221,6 +221,11 @@ internal fun MutableTWorkspace.generateK2FixTests() {
pattern = pattern,
testMethodName = testMethodName,
)
model(
"$idea/quickfix/modifiers/addOpenToClassDeclaration",
pattern = pattern,
testMethodName = testMethodName,
)
}
testClass<AbstractHighLevelQuickFixMultiModuleTest> {