Unused symbol: add test to fix behaviour #KT-16318 Obsolete
This commit is contained in:
committed by
Mikhail Glukhikh
parent
37d2386a0b
commit
ae509d5980
@@ -0,0 +1,7 @@
|
|||||||
|
// PROBLEM: none
|
||||||
|
|
||||||
|
class My(val x: Int = IMPORTANT_CONST) {
|
||||||
|
companion object {
|
||||||
|
val <caret>IMPORTANT_CONST = 42
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1850,6 +1850,12 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest {
|
|||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/unusedSymbol"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/unusedSymbol"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("asDefaultConstructorParameter.kt")
|
||||||
|
public void testAsDefaultConstructorParameter() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/unusedSymbol/asDefaultConstructorParameter.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("companionViaImport.kt")
|
@TestMetadata("companionViaImport.kt")
|
||||||
public void testCompanionViaImport() throws Exception {
|
public void testCompanionViaImport() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/unusedSymbol/companionViaImport.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/unusedSymbol/companionViaImport.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user