mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
add some more test data with Java interop for UnusedSymbolInspection
GitOrigin-RevId: 66b71ce5d53c7224867a6892f27e76fa5bb5452d
This commit is contained in:
committed by
intellij-monorepo-bot
parent
3c00b58ff1
commit
24a31725d9
+26
@@ -73,6 +73,19 @@ public abstract class K2MultiFileLocalInspectionTestGenerated extends AbstractK2
|
||||
}
|
||||
}
|
||||
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
@TestMetadata("../../../idea/tests/testData/multiFileLocalInspections/unusedSymbol/jvmField")
|
||||
public static class JvmField extends AbstractK2MultiFileLocalInspectionTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
@TestMetadata("jvmFieldTest.test")
|
||||
public void testJvmFieldTest() throws Exception {
|
||||
runTest("../../../idea/tests/testData/multiFileLocalInspections/unusedSymbol/jvmField/jvmFieldTest.test");
|
||||
}
|
||||
}
|
||||
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
@TestMetadata("../../../idea/tests/testData/multiFileLocalInspections/unusedSymbol/propertyWithJvmNameAnnotation")
|
||||
public static class PropertyWithJvmNameAnnotation extends AbstractK2MultiFileLocalInspectionTest {
|
||||
@@ -85,6 +98,19 @@ public abstract class K2MultiFileLocalInspectionTestGenerated extends AbstractK2
|
||||
runTest("../../../idea/tests/testData/multiFileLocalInspections/unusedSymbol/propertyWithJvmNameAnnotation/propertyWithJvmNameAnnotation.test");
|
||||
}
|
||||
}
|
||||
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
@TestMetadata("../../../idea/tests/testData/multiFileLocalInspections/unusedSymbol/topLevelFunctionWithJvmName")
|
||||
public static class TopLevelFunctionWithJvmName extends AbstractK2MultiFileLocalInspectionTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelFunctionWithJvmName.test")
|
||||
public void testTopLevelFunctionWithJvmName() throws Exception {
|
||||
runTest("../../../idea/tests/testData/multiFileLocalInspections/unusedSymbol/topLevelFunctionWithJvmName/topLevelFunctionWithJvmName.test");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
+10
@@ -133,11 +133,21 @@ public class MultiFileLocalInspectionTestGenerated extends AbstractMultiFileLoca
|
||||
runTest("testData/multiFileLocalInspections/unusedSymbol/internalConstructorUsedInJava/internalConstructorUsedInJava.test");
|
||||
}
|
||||
|
||||
@TestMetadata("unusedSymbol/jvmField/jvmFieldTest.test")
|
||||
public void testUnusedSymbol_jvmField_JvmFieldTest() throws Exception {
|
||||
runTest("testData/multiFileLocalInspections/unusedSymbol/jvmField/jvmFieldTest.test");
|
||||
}
|
||||
|
||||
@TestMetadata("unusedSymbol/propertyWithJvmNameAnnotation/propertyWithJvmNameAnnotation.test")
|
||||
public void testUnusedSymbol_propertyWithJvmNameAnnotation_PropertyWithJvmNameAnnotation() throws Exception {
|
||||
runTest("testData/multiFileLocalInspections/unusedSymbol/propertyWithJvmNameAnnotation/propertyWithJvmNameAnnotation.test");
|
||||
}
|
||||
|
||||
@TestMetadata("unusedSymbol/topLevelFunctionWithJvmName/topLevelFunctionWithJvmName.test")
|
||||
public void testUnusedSymbol_topLevelFunctionWithJvmName_TopLevelFunctionWithJvmName() throws Exception {
|
||||
runTest("testData/multiFileLocalInspections/unusedSymbol/topLevelFunctionWithJvmName/topLevelFunctionWithJvmName.test");
|
||||
}
|
||||
|
||||
@TestMetadata("usePropertyAccessSyntax/excludedCustomAccessor/excludedCustomAccessor.test")
|
||||
public void testUsePropertyAccessSyntax_excludedCustomAccessor_ExcludedCustomAccessor() throws Exception {
|
||||
runTest("testData/multiFileLocalInspections/usePropertyAccessSyntax/excludedCustomAccessor/excludedCustomAccessor.test");
|
||||
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
public class User {
|
||||
public String getID(ForJavaClass user) {
|
||||
return user.ID;}
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
class ForJavaClass {
|
||||
@JvmField val ID = "11"
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
public class User {
|
||||
public String getID(ForJavaClass user) {
|
||||
return user.ID;}
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
class ForJavaClass {
|
||||
@JvmField val ID<caret> = "11"
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"inspectionClass": "org.jetbrains.kotlin.idea.inspections.UnusedSymbolInspection",
|
||||
"k2InspectionClass": "org.jetbrains.kotlin.idea.k2.codeinsight.inspections.UnusedSymbolInspection",
|
||||
"problem": "none",
|
||||
"mainFile": "test.kt"
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
public class User {
|
||||
public static void getID() {
|
||||
DemoUtils.topLevelFun();
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
@file:JvmName("DemoUtils")
|
||||
|
||||
fun topLevelFun() {
|
||||
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
public class User {
|
||||
public static void getID() {
|
||||
DemoUtils.topLevelFun();
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
@file:JvmName("DemoUtils")
|
||||
|
||||
fun topLevelFun<caret>() {
|
||||
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"inspectionClass": "org.jetbrains.kotlin.idea.inspections.UnusedSymbolInspection",
|
||||
"k2InspectionClass": "org.jetbrains.kotlin.idea.k2.codeinsight.inspections.UnusedSymbolInspection",
|
||||
"problem": "none",
|
||||
"mainFile": "test.kt"
|
||||
}
|
||||
Reference in New Issue
Block a user