diff --git a/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt b/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt index 68b6b05e9f3..4849fbd16d5 100644 --- a/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt +++ b/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt @@ -23,10 +23,7 @@ import org.jetbrains.kotlin.asJava.classes.AbstractUltraLightFacadeClassTest import org.jetbrains.kotlin.asJava.classes.AbstractUltraLightScriptLoadingTest import org.jetbrains.kotlin.checkers.* import org.jetbrains.kotlin.copyright.AbstractUpdateKotlinCopyrightTest -import org.jetbrains.kotlin.findUsages.AbstractFindUsagesTest -import org.jetbrains.kotlin.findUsages.AbstractFindUsagesWithDisableComponentSearchTest -import org.jetbrains.kotlin.findUsages.AbstractKotlinFindUsagesWithLibraryTest -import org.jetbrains.kotlin.findUsages.AbstractKotlinFindUsagesWithStdlibTest +import org.jetbrains.kotlin.findUsages.* import org.jetbrains.kotlin.fir.plugin.AbstractFirAllOpenDiagnosticTest import org.jetbrains.kotlin.formatter.AbstractFormatterTest import org.jetbrains.kotlin.formatter.AbstractTypingIndentationTestBase @@ -1067,6 +1064,27 @@ fun main(args: Array) { } } + testGroup("idea/idea-fir/tests", "idea/testData/findUsages") { + + testClass { + model("kotlin", pattern = """^(.+)\.0\.(kt|kts)$""") + model("java", pattern = """^(.+)\.0\.java$""") + model("propertyFiles", pattern = """^(.+)\.0\.properties$""") + } + + testClass { + model("kotlin/conventions/components", pattern = """^(.+)\.0\.(kt|kts)$""") + } + + testClass { + model("libraryUsages", pattern = """^(.+)\.0\.kt$""") + } + + testClass { + model("stdlibUsages", pattern = """^(.+)\.0\.kt$""") + } + } + testGroup("idea/scripting-support/test", "idea/scripting-support/testData") { testClass { model( diff --git a/idea/idea-fir/tests/org/jetbrains/kotlin/findUsages/FindUsagesFirTestGenerated.java b/idea/idea-fir/tests/org/jetbrains/kotlin/findUsages/FindUsagesFirTestGenerated.java new file mode 100644 index 00000000000..5c3bd70c6d9 --- /dev/null +++ b/idea/idea-fir/tests/org/jetbrains/kotlin/findUsages/FindUsagesFirTestGenerated.java @@ -0,0 +1,1834 @@ +/* + * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.findUsages; + +import com.intellij.testFramework.TestDataPath; +import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; +import org.jetbrains.kotlin.test.KotlinTestUtils; +import org.jetbrains.kotlin.test.TestMetadata; +import org.junit.runner.RunWith; + +import java.io.File; +import java.util.regex.Pattern; + +/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ +@SuppressWarnings("all") +@RunWith(JUnit3RunnerWithInners.class) +public class FindUsagesFirTestGenerated extends AbstractFindUsagesFirTest { + @TestMetadata("idea/testData/findUsages/kotlin") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Kotlin extends AbstractFindUsagesFirTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInKotlin() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/findUsages/kotlin"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), null, true); + } + + @TestMetadata("idea/testData/findUsages/kotlin/companionObject") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class CompanionObject extends AbstractFindUsagesFirTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInCompanionObject() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/findUsages/kotlin/companionObject"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), null, true); + } + + @TestMetadata("inContainingClass.0.kt") + public void testInContainingClass() throws Exception { + runTest("idea/testData/findUsages/kotlin/companionObject/inContainingClass.0.kt"); + } + + @TestMetadata("javaUsage.0.kt") + public void testJavaUsage() throws Exception { + runTest("idea/testData/findUsages/kotlin/companionObject/javaUsage.0.kt"); + } + + @TestMetadata("named.0.kt") + public void testNamed() throws Exception { + runTest("idea/testData/findUsages/kotlin/companionObject/named.0.kt"); + } + + @TestMetadata("simple.0.kt") + public void testSimple() throws Exception { + runTest("idea/testData/findUsages/kotlin/companionObject/simple.0.kt"); + } + } + + @TestMetadata("idea/testData/findUsages/kotlin/conventions") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Conventions extends AbstractFindUsagesFirTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInConventions() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/findUsages/kotlin/conventions"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), null, true); + } + + @TestMetadata("compareTo.0.kt") + public void testCompareTo() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/compareTo.0.kt"); + } + + @TestMetadata("contains.0.kt") + public void testContains() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/contains.0.kt"); + } + + @TestMetadata("equals.0.kt") + public void testEquals() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/equals.0.kt"); + } + + @TestMetadata("equalsNotAny.0.kt") + public void testEqualsNotAny() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/equalsNotAny.0.kt"); + } + + @TestMetadata("forIteration.0.kt") + public void testForIteration() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/forIteration.0.kt"); + } + + @TestMetadata("get.0.kt") + public void testGet() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/get.0.kt"); + } + + @TestMetadata("getAsPropertyDelegate.0.kt") + public void testGetAsPropertyDelegate() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/getAsPropertyDelegate.0.kt"); + } + + @TestMetadata("inc.0.kt") + public void testInc() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/inc.0.kt"); + } + + @TestMetadata("invoke.0.kt") + public void testInvoke() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/invoke.0.kt"); + } + + @TestMetadata("invokeExtension.0.kt") + public void testInvokeExtension() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/invokeExtension.0.kt"); + } + + @TestMetadata("invokeWithVarArg.0.kt") + public void testInvokeWithVarArg() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/invokeWithVarArg.0.kt"); + } + + @TestMetadata("plus.0.kt") + public void testPlus() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/plus.0.kt"); + } + + @TestMetadata("plusAssign.0.kt") + public void testPlusAssign() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/plusAssign.0.kt"); + } + + @TestMetadata("set.0.kt") + public void testSet() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/set.0.kt"); + } + + @TestMetadata("setAsPropertyDelegate.0.kt") + public void testSetAsPropertyDelegate() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/setAsPropertyDelegate.0.kt"); + } + + @TestMetadata("severalOperators.0.kt") + public void testSeveralOperators() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/severalOperators.0.kt"); + } + + @TestMetadata("unaryMinus.0.kt") + public void testUnaryMinus() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/unaryMinus.0.kt"); + } + + @TestMetadata("idea/testData/findUsages/kotlin/conventions/components") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Components extends AbstractFindUsagesFirTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInComponents() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/findUsages/kotlin/conventions/components"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), null, true); + } + + @TestMetadata("callableReferences.0.kt") + public void testCallableReferences() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/components/callableReferences.0.kt"); + } + + @TestMetadata("companionObjectAccess.0.kt") + public void testCompanionObjectAccess() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/components/companionObjectAccess.0.kt"); + } + + @TestMetadata("componentFunForGenericType1.0.kt") + public void testComponentFunForGenericType1() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/components/componentFunForGenericType1.0.kt"); + } + + @TestMetadata("componentFunForGenericType2.0.kt") + public void testComponentFunForGenericType2() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/components/componentFunForGenericType2.0.kt"); + } + + @TestMetadata("dataClass.0.kt") + public void testDataClass() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/components/dataClass.0.kt"); + } + + @TestMetadata("dataClassComponentByRef.0.kt") + public void testDataClassComponentByRef() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/components/dataClassComponentByRef.0.kt"); + } + + @TestMetadata("dataClassFromStdlib.0.kt") + public void testDataClassFromStdlib() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/components/dataClassFromStdlib.0.kt"); + } + + @TestMetadata("dataClassInsideDataClass.0.kt") + public void testDataClassInsideDataClass() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/components/dataClassInsideDataClass.0.kt"); + } + + @TestMetadata("extensionComponentFun.0.kt") + public void testExtensionComponentFun() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/components/extensionComponentFun.0.kt"); + } + + @TestMetadata("for.0.kt") + public void testFor() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/components/for.0.kt"); + } + + @TestMetadata("isAndAs.0.kt") + public void testIsAndAs() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/components/isAndAs.0.kt"); + } + + @TestMetadata("lambdas.0.kt") + public void testLambdas() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/components/lambdas.0.kt"); + } + + @TestMetadata("mayTypeAffectAncestors.0.kt") + public void testMayTypeAffectAncestors() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/components/mayTypeAffectAncestors.0.kt"); + } + + @TestMetadata("memberComponentFun.0.kt") + public void testMemberComponentFun() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/components/memberComponentFun.0.kt"); + } + + @TestMetadata("operators.0.kt") + public void testOperators() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/components/operators.0.kt"); + } + + @TestMetadata("recursiveDataClass1.0.kt") + public void testRecursiveDataClass1() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/components/recursiveDataClass1.0.kt"); + } + + @TestMetadata("recursiveDataClass2.0.kt") + public void testRecursiveDataClass2() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/components/recursiveDataClass2.0.kt"); + } + + @TestMetadata("SAM.0.kt") + public void testSAM() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/components/SAM.0.kt"); + } + + @TestMetadata("when.0.kt") + public void testWhen() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/components/when.0.kt"); + } + } + } + + @TestMetadata("idea/testData/findUsages/kotlin/findClassUsages") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class FindClassUsages extends AbstractFindUsagesFirTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInFindClassUsages() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/findUsages/kotlin/findClassUsages"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), null, true); + } + + @TestMetadata("classUsedInPlainText.0.kt") + public void testClassUsedInPlainText() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/classUsedInPlainText.0.kt"); + } + + @TestMetadata("classUsedInTextAsRef.0.kt") + public void testClassUsedInTextAsRef() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/classUsedInTextAsRef.0.kt"); + } + + @TestMetadata("javaClassAllUsages.0.kt") + public void testJavaClassAllUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/javaClassAllUsages.0.kt"); + } + + @TestMetadata("javaClassConstructorUsages.0.kt") + public void testJavaClassConstructorUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/javaClassConstructorUsages.0.kt"); + } + + @TestMetadata("javaClassFunctionUsages1.0.kt") + public void testJavaClassFunctionUsages1() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/javaClassFunctionUsages1.0.kt"); + } + + @TestMetadata("javaClassFunctionUsages2.0.kt") + public void testJavaClassFunctionUsages2() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/javaClassFunctionUsages2.0.kt"); + } + + @TestMetadata("javaClassNonConstructorUsages.0.kt") + public void testJavaClassNonConstructorUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/javaClassNonConstructorUsages.0.kt"); + } + + @TestMetadata("javaClassPropertyUsages1.0.kt") + public void testJavaClassPropertyUsages1() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/javaClassPropertyUsages1.0.kt"); + } + + @TestMetadata("javaClassPropertyUsages2.0.kt") + public void testJavaClassPropertyUsages2() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/javaClassPropertyUsages2.0.kt"); + } + + @TestMetadata("javaClassSecondaryCtrUsages.0.kt") + public void testJavaClassSecondaryCtrUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/javaClassSecondaryCtrUsages.0.kt"); + } + + @TestMetadata("javaDerivedClassUsages1.0.kt") + public void testJavaDerivedClassUsages1() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/javaDerivedClassUsages1.0.kt"); + } + + @TestMetadata("javaDerivedClassUsages2.0.kt") + public void testJavaDerivedClassUsages2() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/javaDerivedClassUsages2.0.kt"); + } + + @TestMetadata("javaDerivedInterfaceUsages1.0.kt") + public void testJavaDerivedInterfaceUsages1() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/javaDerivedInterfaceUsages1.0.kt"); + } + + @TestMetadata("javaDerivedInterfaceUsages2.0.kt") + public void testJavaDerivedInterfaceUsages2() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/javaDerivedInterfaceUsages2.0.kt"); + } + + @TestMetadata("kotlinAliasedClassAllUsages.0.kt") + public void testKotlinAliasedClassAllUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinAliasedClassAllUsages.0.kt"); + } + + @TestMetadata("kotlinClassAllUsages.0.kt") + public void testKotlinClassAllUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassAllUsages.0.kt"); + } + + @TestMetadata("kotlinClassAllUsages2.0.kt") + public void testKotlinClassAllUsages2() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassAllUsages2.0.kt"); + } + + @TestMetadata("kotlinClassAllUsages3.0.kt") + public void testKotlinClassAllUsages3() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassAllUsages3.0.kt"); + } + + @TestMetadata("kotlinClassAllUsagesNoImport.0.kt") + public void testKotlinClassAllUsagesNoImport() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassAllUsagesNoImport.0.kt"); + } + + @TestMetadata("kotlinClassConstructorUsages.0.kt") + public void testKotlinClassConstructorUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassConstructorUsages.0.kt"); + } + + @TestMetadata("kotlinClassDerivedAnonymousObjects.0.kt") + public void testKotlinClassDerivedAnonymousObjects() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassDerivedAnonymousObjects.0.kt"); + } + + @TestMetadata("kotlinClassDerivedClasses.0.kt") + public void testKotlinClassDerivedClasses() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassDerivedClasses.0.kt"); + } + + @TestMetadata("kotlinClassDerivedInnerClasses.0.kt") + public void testKotlinClassDerivedInnerClasses() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassDerivedInnerClasses.0.kt"); + } + + @TestMetadata("kotlinClassDerivedInnerObjects.0.kt") + public void testKotlinClassDerivedInnerObjects() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassDerivedInnerObjects.0.kt"); + } + + @TestMetadata("kotlinClassDerivedLocalClasses.0.kt") + public void testKotlinClassDerivedLocalClasses() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassDerivedLocalClasses.0.kt"); + } + + @TestMetadata("kotlinClassDerivedLocalObjects.0.kt") + public void testKotlinClassDerivedLocalObjects() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassDerivedLocalObjects.0.kt"); + } + + @TestMetadata("kotlinClassDerivedLocalTraits.0.kt") + public void testKotlinClassDerivedLocalTraits() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassDerivedLocalTraits.0.kt"); + } + + @TestMetadata("kotlinClassDerivedObjects.0.kt") + public void testKotlinClassDerivedObjects() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassDerivedObjects.0.kt"); + } + + @TestMetadata("kotlinClassDerivedTraits.0.kt") + public void testKotlinClassDerivedTraits() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassDerivedTraits.0.kt"); + } + + @TestMetadata("kotlinClassFunctionUsages1.0.kt") + public void testKotlinClassFunctionUsages1() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassFunctionUsages1.0.kt"); + } + + @TestMetadata("kotlinClassFunctionUsages2.0.kt") + public void testKotlinClassFunctionUsages2() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassFunctionUsages2.0.kt"); + } + + @TestMetadata("kotlinClassImportAliasAllUsages.0.kt") + public void testKotlinClassImportAliasAllUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassImportAliasAllUsages.0.kt"); + } + + @TestMetadata("kotlinClassNonConstructorUsages.0.kt") + public void testKotlinClassNonConstructorUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassNonConstructorUsages.0.kt"); + } + + @TestMetadata("kotlinClassPropertyUsages1.0.kt") + public void testKotlinClassPropertyUsages1() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassPropertyUsages1.0.kt"); + } + + @TestMetadata("kotlinClassPropertyUsages2.0.kt") + public void testKotlinClassPropertyUsages2() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassPropertyUsages2.0.kt"); + } + + @TestMetadata("kotlinClassSecondaryCtorUsages.0.kt") + public void testKotlinClassSecondaryCtorUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassSecondaryCtorUsages.0.kt"); + } + + @TestMetadata("kotlinDeeplyNestedClassAllUsages.0.kt") + public void testKotlinDeeplyNestedClassAllUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinDeeplyNestedClassAllUsages.0.kt"); + } + + @TestMetadata("kotlinInnerClassAllUsages.0.kt") + public void testKotlinInnerClassAllUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinInnerClassAllUsages.0.kt"); + } + + @TestMetadata("kotlinLocalClassDerivedAnonymousObjects.0.kt") + public void testKotlinLocalClassDerivedAnonymousObjects() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinLocalClassDerivedAnonymousObjects.0.kt"); + } + + @TestMetadata("kotlinLocalClassDerivedLocalClasses.0.kt") + public void testKotlinLocalClassDerivedLocalClasses() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinLocalClassDerivedLocalClasses.0.kt"); + } + + @TestMetadata("kotlinLocalClassDerivedLocalObjects.0.kt") + public void testKotlinLocalClassDerivedLocalObjects() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinLocalClassDerivedLocalObjects.0.kt"); + } + + @TestMetadata("kotlinLocalClassDerivedLocalTraits.0.kt") + public void testKotlinLocalClassDerivedLocalTraits() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinLocalClassDerivedLocalTraits.0.kt"); + } + + @TestMetadata("kotlinLocalClassUsages1.0.kt") + public void testKotlinLocalClassUsages1() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinLocalClassUsages1.0.kt"); + } + + @TestMetadata("kotlinLocalClassUsages2.0.kt") + public void testKotlinLocalClassUsages2() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinLocalClassUsages2.0.kt"); + } + + @TestMetadata("kotlinNestedClassAllUsages.0.kt") + public void testKotlinNestedClassAllUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinNestedClassAllUsages.0.kt"); + } + + @TestMetadata("kotlinPrivateClassUsages.0.kt") + public void testKotlinPrivateClassUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinPrivateClassUsages.0.kt"); + } + + @TestMetadata("kotlinTraitDerivedAnonymousObjects.0.kt") + public void testKotlinTraitDerivedAnonymousObjects() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinTraitDerivedAnonymousObjects.0.kt"); + } + + @TestMetadata("kotlinTraitDerivedClasses.0.kt") + public void testKotlinTraitDerivedClasses() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinTraitDerivedClasses.0.kt"); + } + + @TestMetadata("kotlinTraitDerivedInnerClasses.0.kt") + public void testKotlinTraitDerivedInnerClasses() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinTraitDerivedInnerClasses.0.kt"); + } + + @TestMetadata("kotlinTraitDerivedInnerObjects.0.kt") + public void testKotlinTraitDerivedInnerObjects() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinTraitDerivedInnerObjects.0.kt"); + } + + @TestMetadata("kotlinTraitDerivedLocalClasses.0.kt") + public void testKotlinTraitDerivedLocalClasses() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinTraitDerivedLocalClasses.0.kt"); + } + + @TestMetadata("kotlinTraitDerivedLocalObjects.0.kt") + public void testKotlinTraitDerivedLocalObjects() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinTraitDerivedLocalObjects.0.kt"); + } + + @TestMetadata("kotlinTraitDerivedLocalTraits.0.kt") + public void testKotlinTraitDerivedLocalTraits() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinTraitDerivedLocalTraits.0.kt"); + } + + @TestMetadata("kotlinTraitDerivedObjects.0.kt") + public void testKotlinTraitDerivedObjects() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinTraitDerivedObjects.0.kt"); + } + + @TestMetadata("kotlinTraitDerivedTraits.0.kt") + public void testKotlinTraitDerivedTraits() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinTraitDerivedTraits.0.kt"); + } + + @TestMetadata("localAndNonLocalClass.0.kt") + public void testLocalAndNonLocalClass() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/localAndNonLocalClass.0.kt"); + } + + @TestMetadata("primaryConstructorWithDefaultParams.0.kt") + public void testPrimaryConstructorWithDefaultParams() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/primaryConstructorWithDefaultParams.0.kt"); + } + + @TestMetadata("usageInTypeAlias.0.kt") + public void testUsageInTypeAlias() throws Exception { + runTest("idea/testData/findUsages/kotlin/findClassUsages/usageInTypeAlias.0.kt"); + } + } + + @TestMetadata("idea/testData/findUsages/kotlin/findFunctionUsages") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class FindFunctionUsages extends AbstractFindUsagesFirTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInFindFunctionUsages() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/findUsages/kotlin/findFunctionUsages"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), null, true); + } + + @TestMetadata("enumFunctionUsages.0.kt") + public void testEnumFunctionUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/enumFunctionUsages.0.kt"); + } + + @TestMetadata("functionUsedInPlainText.0.kt") + public void testFunctionUsedInPlainText() throws Exception { + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/functionUsedInPlainText.0.kt"); + } + + @TestMetadata("highlightingOfSuperUsages.0.kt") + public void testHighlightingOfSuperUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/highlightingOfSuperUsages.0.kt"); + } + + @TestMetadata("javaAndKotlinOverrides.0.kt") + public void testJavaAndKotlinOverrides() throws Exception { + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/javaAndKotlinOverrides.0.kt"); + } + + @TestMetadata("javaMethodUsages.0.kt") + public void testJavaMethodUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/javaMethodUsages.0.kt"); + } + + @TestMetadata("jvmOverloaded.0.kt") + public void testJvmOverloaded() throws Exception { + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/jvmOverloaded.0.kt"); + } + + @TestMetadata("jvmStaticFun.0.kt") + public void testJvmStaticFun() throws Exception { + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/jvmStaticFun.0.kt"); + } + + @TestMetadata("jvmStaticJvmOverloadsFun.0.kt") + public void testJvmStaticJvmOverloadsFun() throws Exception { + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/jvmStaticJvmOverloadsFun.0.kt"); + } + + @TestMetadata("kotlinAliasedMethodUsages.0.kt") + public void testKotlinAliasedMethodUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/kotlinAliasedMethodUsages.0.kt"); + } + + @TestMetadata("kotlinInternalMethodUsages.0.kt") + public void testKotlinInternalMethodUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/kotlinInternalMethodUsages.0.kt"); + } + + @TestMetadata("kotlinLocalMethodUsages1.0.kt") + public void testKotlinLocalMethodUsages1() throws Exception { + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/kotlinLocalMethodUsages1.0.kt"); + } + + @TestMetadata("kotlinLocalMethodUsages2.0.kt") + public void testKotlinLocalMethodUsages2() throws Exception { + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/kotlinLocalMethodUsages2.0.kt"); + } + + @TestMetadata("kotlinMethodAliasedUsages.0.kt") + public void testKotlinMethodAliasedUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/kotlinMethodAliasedUsages.0.kt"); + } + + @TestMetadata("kotlinMethodUsages.0.kt") + public void testKotlinMethodUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/kotlinMethodUsages.0.kt"); + } + + @TestMetadata("kotlinMethodsAliasedUsages.0.kt") + public void testKotlinMethodsAliasedUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/kotlinMethodsAliasedUsages.0.kt"); + } + + @TestMetadata("kotlinMultiRefInImport.0.kt") + public void testKotlinMultiRefInImport() throws Exception { + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/kotlinMultiRefInImport.0.kt"); + } + + @TestMetadata("kotlinNestedClassMethodUsages.0.kt") + public void testKotlinNestedClassMethodUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/kotlinNestedClassMethodUsages.0.kt"); + } + + @TestMetadata("kotlinOverloadAndExtensionUsages.0.kt") + public void testKotlinOverloadAndExtensionUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/kotlinOverloadAndExtensionUsages.0.kt"); + } + + @TestMetadata("kotlinOverloadAndExtensionUsages2.0.kt") + public void testKotlinOverloadAndExtensionUsages2() throws Exception { + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/kotlinOverloadAndExtensionUsages2.0.kt"); + } + + @TestMetadata("kotlinPrivateMethodUsages.0.kt") + public void testKotlinPrivateMethodUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/kotlinPrivateMethodUsages.0.kt"); + } + + @TestMetadata("kotlinTopLevelMethodUsages.0.kt") + public void testKotlinTopLevelMethodUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/kotlinTopLevelMethodUsages.0.kt"); + } + + @TestMetadata("kotlinTopLevelMethodUsagesMultifile.0.kt") + public void testKotlinTopLevelMethodUsagesMultifile() throws Exception { + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/kotlinTopLevelMethodUsagesMultifile.0.kt"); + } + + @TestMetadata("kotlinTopLevelMethodUsagesNoImport.0.kt") + public void testKotlinTopLevelMethodUsagesNoImport() throws Exception { + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/kotlinTopLevelMethodUsagesNoImport.0.kt"); + } + + @TestMetadata("kotlinTopLevelMethodUsagesWithRenamedFile.0.kt") + public void testKotlinTopLevelMethodUsagesWithRenamedFile() throws Exception { + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/kotlinTopLevelMethodUsagesWithRenamedFile.0.kt"); + } + + @TestMetadata("kotlinTraitImplThroughDelegate.0.kt") + public void testKotlinTraitImplThroughDelegate() throws Exception { + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/kotlinTraitImplThroughDelegate.0.kt"); + } + + @TestMetadata("kotlinTraitNoImplThroughDelegate.0.kt") + public void testKotlinTraitNoImplThroughDelegate() throws Exception { + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/kotlinTraitNoImplThroughDelegate.0.kt"); + } + + @TestMetadata("labeledReturns.0.kt") + public void testLabeledReturns() throws Exception { + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/labeledReturns.0.kt"); + } + + @TestMetadata("localClassMember.0.kt") + public void testLocalClassMember() throws Exception { + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/localClassMember.0.kt"); + } + + @TestMetadata("nonBaseDeclarationFunctionAsPropName.0.kt") + public void testNonBaseDeclarationFunctionAsPropName() throws Exception { + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/nonBaseDeclarationFunctionAsPropName.0.kt"); + } + + @TestMetadata("objectExpressionDeepMember.0.kt") + public void testObjectExpressionDeepMember() throws Exception { + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionDeepMember.0.kt"); + } + + @TestMetadata("objectExpressionMember.0.kt") + public void testObjectExpressionMember() throws Exception { + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionMember.0.kt"); + } + + @TestMetadata("objectExpressionMember2.0.kt") + public void testObjectExpressionMember2() throws Exception { + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionMember2.0.kt"); + } + + @TestMetadata("objectExpressionMemberInClass.0.kt") + public void testObjectExpressionMemberInClass() throws Exception { + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionMemberInClass.0.kt"); + } + + @TestMetadata("objectExpressionMemberInCompanion.0.kt") + public void testObjectExpressionMemberInCompanion() throws Exception { + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionMemberInCompanion.0.kt"); + } + + @TestMetadata("objectExpressionMemberInTopLevel.0.kt") + public void testObjectExpressionMemberInTopLevel() throws Exception { + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionMemberInTopLevel.0.kt"); + } + + @TestMetadata("synthesizedFunction.0.kt") + public void testSynthesizedFunction() throws Exception { + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/synthesizedFunction.0.kt"); + } + + @TestMetadata("usagesOfBaseForFunction.0.kt") + public void testUsagesOfBaseForFunction() throws Exception { + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/usagesOfBaseForFunction.0.kt"); + } + } + + @TestMetadata("idea/testData/findUsages/kotlin/findJavaPropertyUsages") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class FindJavaPropertyUsages extends AbstractFindUsagesFirTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInFindJavaPropertyUsages() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/findUsages/kotlin/findJavaPropertyUsages"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), null, true); + } + + @TestMetadata("javaPropertyUsagesK.0.kt") + public void testJavaPropertyUsagesK() throws Exception { + runTest("idea/testData/findUsages/kotlin/findJavaPropertyUsages/javaPropertyUsagesK.0.kt"); + } + + @TestMetadata("javaPropertyUsagesKJK.0.kt") + public void testJavaPropertyUsagesKJK() throws Exception { + runTest("idea/testData/findUsages/kotlin/findJavaPropertyUsages/javaPropertyUsagesKJK.0.kt"); + } + + @TestMetadata("javaPropertyUsagesKK.0.kt") + public void testJavaPropertyUsagesKK() throws Exception { + runTest("idea/testData/findUsages/kotlin/findJavaPropertyUsages/javaPropertyUsagesKK.0.kt"); + } + } + + @TestMetadata("idea/testData/findUsages/kotlin/findObjectUsages") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class FindObjectUsages extends AbstractFindUsagesFirTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInFindObjectUsages() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/findUsages/kotlin/findObjectUsages"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), null, true); + } + + @TestMetadata("javaObjectUsages.0.kt") + public void testJavaObjectUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findObjectUsages/javaObjectUsages.0.kt"); + } + + @TestMetadata("kotlinImportedObjectUsages.0.kt") + public void testKotlinImportedObjectUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findObjectUsages/kotlinImportedObjectUsages.0.kt"); + } + + @TestMetadata("kotlinLocalObjectUsages1.0.kt") + public void testKotlinLocalObjectUsages1() throws Exception { + runTest("idea/testData/findUsages/kotlin/findObjectUsages/kotlinLocalObjectUsages1.0.kt"); + } + + @TestMetadata("kotlinLocalObjectUsages2.0.kt") + public void testKotlinLocalObjectUsages2() throws Exception { + runTest("idea/testData/findUsages/kotlin/findObjectUsages/kotlinLocalObjectUsages2.0.kt"); + } + + @TestMetadata("kotlinNestedObjectUsages.0.kt") + public void testKotlinNestedObjectUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findObjectUsages/kotlinNestedObjectUsages.0.kt"); + } + + @TestMetadata("kotlinObjectUsages.0.kt") + public void testKotlinObjectUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findObjectUsages/kotlinObjectUsages.0.kt"); + } + + @TestMetadata("kotlinPrivateObjectUsages.0.kt") + public void testKotlinPrivateObjectUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findObjectUsages/kotlinPrivateObjectUsages.0.kt"); + } + } + + @TestMetadata("idea/testData/findUsages/kotlin/findPackageUsages") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class FindPackageUsages extends AbstractFindUsagesFirTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInFindPackageUsages() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/findUsages/kotlin/findPackageUsages"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), null, true); + } + + @TestMetadata("kotlinPackageUsages.0.kt") + public void testKotlinPackageUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findPackageUsages/kotlinPackageUsages.0.kt"); + } + } + + @TestMetadata("idea/testData/findUsages/kotlin/findParameterUsages") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class FindParameterUsages extends AbstractFindUsagesFirTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInFindParameterUsages() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/findUsages/kotlin/findParameterUsages"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), null, true); + } + + @TestMetadata("kotlinAnnotationConstructorParameterUsages.0.kt") + public void testKotlinAnnotationConstructorParameterUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findParameterUsages/kotlinAnnotationConstructorParameterUsages.0.kt"); + } + + @TestMetadata("kotlinComponentFunctionParameterUsages.0.kt") + public void testKotlinComponentFunctionParameterUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findParameterUsages/kotlinComponentFunctionParameterUsages.0.kt"); + } + + @TestMetadata("kotlinConstructorParameterUsages.0.kt") + public void testKotlinConstructorParameterUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findParameterUsages/kotlinConstructorParameterUsages.0.kt"); + } + + @TestMetadata("kotlinDefaultAnnotationParameterUsages.0.kt") + public void testKotlinDefaultAnnotationParameterUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findParameterUsages/kotlinDefaultAnnotationParameterUsages.0.kt"); + } + + @TestMetadata("kotlinFunctionParameterUsages.0.kt") + public void testKotlinFunctionParameterUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findParameterUsages/kotlinFunctionParameterUsages.0.kt"); + } + + @TestMetadata("kotlinHighlightParameterUsages.0.kt") + public void testKotlinHighlightParameterUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findParameterUsages/kotlinHighlightParameterUsages.0.kt"); + } + + @TestMetadata("parameterNameInTextFile.0.kt") + public void testParameterNameInTextFile() throws Exception { + runTest("idea/testData/findUsages/kotlin/findParameterUsages/parameterNameInTextFile.0.kt"); + } + } + + @TestMetadata("idea/testData/findUsages/kotlin/findPrimaryConstructorUsages") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class FindPrimaryConstructorUsages extends AbstractFindUsagesFirTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInFindPrimaryConstructorUsages() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/findUsages/kotlin/findPrimaryConstructorUsages"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), null, true); + } + + @TestMetadata("annotationEntry.0.kt") + public void testAnnotationEntry() throws Exception { + runTest("idea/testData/findUsages/kotlin/findPrimaryConstructorUsages/annotationEntry.0.kt"); + } + + @TestMetadata("constructorCall.0.kt") + public void testConstructorCall() throws Exception { + runTest("idea/testData/findUsages/kotlin/findPrimaryConstructorUsages/constructorCall.0.kt"); + } + + @TestMetadata("jvmOverloaded.0.kt") + public void testJvmOverloaded() throws Exception { + runTest("idea/testData/findUsages/kotlin/findPrimaryConstructorUsages/jvmOverloaded.0.kt"); + } + + @TestMetadata("missingName.0.kt") + public void testMissingName() throws Exception { + runTest("idea/testData/findUsages/kotlin/findPrimaryConstructorUsages/missingName.0.kt"); + } + + @TestMetadata("primaryConstructorByRef.0.kt") + public void testPrimaryConstructorByRef() throws Exception { + runTest("idea/testData/findUsages/kotlin/findPrimaryConstructorUsages/primaryConstructorByRef.0.kt"); + } + + @TestMetadata("primaryConstructorNoKeyword.0.kt") + public void testPrimaryConstructorNoKeyword() throws Exception { + runTest("idea/testData/findUsages/kotlin/findPrimaryConstructorUsages/primaryConstructorNoKeyword.0.kt"); + } + + @TestMetadata("primaryConstructorWithKeyword.0.kt") + public void testPrimaryConstructorWithKeyword() throws Exception { + runTest("idea/testData/findUsages/kotlin/findPrimaryConstructorUsages/primaryConstructorWithKeyword.0.kt"); + } + } + + @TestMetadata("idea/testData/findUsages/kotlin/findPropertyUsages") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class FindPropertyUsages extends AbstractFindUsagesFirTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInFindPropertyUsages() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/findUsages/kotlin/findPropertyUsages"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), null, true); + } + + @TestMetadata("extensionPropertyUsages.0.kt") + public void testExtensionPropertyUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/extensionPropertyUsages.0.kt"); + } + + @TestMetadata("javaAndKotlinOverrides.0.kt") + public void testJavaAndKotlinOverrides() throws Exception { + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/javaAndKotlinOverrides.0.kt"); + } + + @TestMetadata("javaAndKotlinOverrides2.0.kt") + public void testJavaAndKotlinOverrides2() throws Exception { + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/javaAndKotlinOverrides2.0.kt"); + } + + @TestMetadata("javaClassObjectPropertyUsages.0.kt") + public void testJavaClassObjectPropertyUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/javaClassObjectPropertyUsages.0.kt"); + } + + @TestMetadata("javaPropertyReadUsages.0.kt") + public void testJavaPropertyReadUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/javaPropertyReadUsages.0.kt"); + } + + @TestMetadata("javaPropertyReadUsages2.0.kt") + public void testJavaPropertyReadUsages2() throws Exception { + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/javaPropertyReadUsages2.0.kt"); + } + + @TestMetadata("javaPropertyUsages.0.kt") + public void testJavaPropertyUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/javaPropertyUsages.0.kt"); + } + + @TestMetadata("javaPropertyUsages2.0.kt") + public void testJavaPropertyUsages2() throws Exception { + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/javaPropertyUsages2.0.kt"); + } + + @TestMetadata("javaPropertyUsages3.0.kt") + public void testJavaPropertyUsages3() throws Exception { + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/javaPropertyUsages3.0.kt"); + } + + @TestMetadata("javaPropertyWriteUsages.0.kt") + public void testJavaPropertyWriteUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/javaPropertyWriteUsages.0.kt"); + } + + @TestMetadata("javaPropertyWriteUsages2.0.kt") + public void testJavaPropertyWriteUsages2() throws Exception { + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/javaPropertyWriteUsages2.0.kt"); + } + + @TestMetadata("jvmStaticProperty.0.kt") + public void testJvmStaticProperty() throws Exception { + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/jvmStaticProperty.0.kt"); + } + + @TestMetadata("kotlinClassObjectPropertyUsage.0.kt") + public void testKotlinClassObjectPropertyUsage() throws Exception { + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/kotlinClassObjectPropertyUsage.0.kt"); + } + + @TestMetadata("kotlinLocalPropertyUsages1.0.kt") + public void testKotlinLocalPropertyUsages1() throws Exception { + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/kotlinLocalPropertyUsages1.0.kt"); + } + + @TestMetadata("kotlinLocalPropertyUsages2.0.kt") + public void testKotlinLocalPropertyUsages2() throws Exception { + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/kotlinLocalPropertyUsages2.0.kt"); + } + + @TestMetadata("kotlinMultiRefInImport.0.kt") + public void testKotlinMultiRefInImport() throws Exception { + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/kotlinMultiRefInImport.0.kt"); + } + + @TestMetadata("kotlinNestedClassPropertyUsages.0.kt") + public void testKotlinNestedClassPropertyUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/kotlinNestedClassPropertyUsages.0.kt"); + } + + @TestMetadata("kotlinPrivatePropertyInClassObjectUsages.0.kt") + public void testKotlinPrivatePropertyInClassObjectUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPrivatePropertyInClassObjectUsages.0.kt"); + } + + @TestMetadata("kotlinPrivatePropertyUsages.0.kt") + public void testKotlinPrivatePropertyUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPrivatePropertyUsages.0.kt"); + } + + @TestMetadata("kotlinPrivatePropertyUsages2.0.kt") + public void testKotlinPrivatePropertyUsages2() throws Exception { + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPrivatePropertyUsages2.0.kt"); + } + + @TestMetadata("kotlinPropertyReadUsages.0.kt") + public void testKotlinPropertyReadUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyReadUsages.0.kt"); + } + + @TestMetadata("kotlinPropertyReadUsages2.0.kt") + public void testKotlinPropertyReadUsages2() throws Exception { + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyReadUsages2.0.kt"); + } + + @TestMetadata("kotlinPropertySameNameAsMethodUsages.0.kt") + public void testKotlinPropertySameNameAsMethodUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertySameNameAsMethodUsages.0.kt"); + } + + @TestMetadata("kotlinPropertyUsages.0.kt") + public void testKotlinPropertyUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyUsages.0.kt"); + } + + @TestMetadata("kotlinPropertyUsages2.0.kt") + public void testKotlinPropertyUsages2() throws Exception { + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyUsages2.0.kt"); + } + + @TestMetadata("kotlinPropertyWriteUsages.0.kt") + public void testKotlinPropertyWriteUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyWriteUsages.0.kt"); + } + + @TestMetadata("kotlinPropertyWriteUsages2.0.kt") + public void testKotlinPropertyWriteUsages2() throws Exception { + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyWriteUsages2.0.kt"); + } + + @TestMetadata("kotlinTopLevelPropertyUsages.0.kt") + public void testKotlinTopLevelPropertyUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/kotlinTopLevelPropertyUsages.0.kt"); + } + + @TestMetadata("kt7656.0.kt") + public void testKt7656() throws Exception { + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/kt7656.0.kt"); + } + } + + @TestMetadata("idea/testData/findUsages/kotlin/findSecondaryConstructorUsages") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class FindSecondaryConstructorUsages extends AbstractFindUsagesFirTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInFindSecondaryConstructorUsages() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/findUsages/kotlin/findSecondaryConstructorUsages"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), null, true); + } + + @TestMetadata("constructorCall.0.kt") + public void testConstructorCall() throws Exception { + runTest("idea/testData/findUsages/kotlin/findSecondaryConstructorUsages/constructorCall.0.kt"); + } + + @TestMetadata("defaultSecondaryConstructor.0.kt") + public void testDefaultSecondaryConstructor() throws Exception { + runTest("idea/testData/findUsages/kotlin/findSecondaryConstructorUsages/defaultSecondaryConstructor.0.kt"); + } + + @TestMetadata("jvmOverloaded.0.kt") + public void testJvmOverloaded() throws Exception { + runTest("idea/testData/findUsages/kotlin/findSecondaryConstructorUsages/jvmOverloaded.0.kt"); + } + + @TestMetadata("secondaryConstructor.0.kt") + public void testSecondaryConstructor() throws Exception { + runTest("idea/testData/findUsages/kotlin/findSecondaryConstructorUsages/secondaryConstructor.0.kt"); + } + } + + @TestMetadata("idea/testData/findUsages/kotlin/findTypeAliasUsages") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class FindTypeAliasUsages extends AbstractFindUsagesFirTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInFindTypeAliasUsages() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/findUsages/kotlin/findTypeAliasUsages"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), null, true); + } + + @TestMetadata("objectAlias.0.kt") + public void testObjectAlias() throws Exception { + runTest("idea/testData/findUsages/kotlin/findTypeAliasUsages/objectAlias.0.kt"); + } + } + + @TestMetadata("idea/testData/findUsages/kotlin/findTypeParameterUsages") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class FindTypeParameterUsages extends AbstractFindUsagesFirTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInFindTypeParameterUsages() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/findUsages/kotlin/findTypeParameterUsages"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), null, true); + } + + @TestMetadata("kotlinClassTypeParameterUsages.0.kt") + public void testKotlinClassTypeParameterUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findTypeParameterUsages/kotlinClassTypeParameterUsages.0.kt"); + } + + @TestMetadata("kotlinFunctionTypeParameterUsages.0.kt") + public void testKotlinFunctionTypeParameterUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findTypeParameterUsages/kotlinFunctionTypeParameterUsages.0.kt"); + } + + @TestMetadata("propertyWithTypeParameter.0.kt") + public void testPropertyWithTypeParameter() throws Exception { + runTest("idea/testData/findUsages/kotlin/findTypeParameterUsages/propertyWithTypeParameter.0.kt"); + } + } + + @TestMetadata("idea/testData/findUsages/kotlin/findWithFilteringImports") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class FindWithFilteringImports extends AbstractFindUsagesFirTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInFindWithFilteringImports() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/findUsages/kotlin/findWithFilteringImports"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), null, true); + } + + @TestMetadata("findWithFilteringImports.0.kt") + public void testFindWithFilteringImports() throws Exception { + runTest("idea/testData/findUsages/kotlin/findWithFilteringImports/findWithFilteringImports.0.kt"); + } + } + + @TestMetadata("idea/testData/findUsages/kotlin/findWithStructuralGrouping") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class FindWithStructuralGrouping extends AbstractFindUsagesFirTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInFindWithStructuralGrouping() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/findUsages/kotlin/findWithStructuralGrouping"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), null, true); + } + + @TestMetadata("kotlinClassAllUsages.0.kt") + public void testKotlinClassAllUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findWithStructuralGrouping/kotlinClassAllUsages.0.kt"); + } + + @TestMetadata("kotlinMethodUsages.0.kt") + public void testKotlinMethodUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findWithStructuralGrouping/kotlinMethodUsages.0.kt"); + } + + @TestMetadata("kotlinPropertyUsages.0.kt") + public void testKotlinPropertyUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/findWithStructuralGrouping/kotlinPropertyUsages.0.kt"); + } + } + + @TestMetadata("idea/testData/findUsages/kotlin/internal") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Internal extends AbstractFindUsagesFirTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInInternal() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/findUsages/kotlin/internal"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), null, true); + } + + @TestMetadata("idea/testData/findUsages/kotlin/internal/findFunctionUsages") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class FindFunctionUsages extends AbstractFindUsagesFirTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInFindFunctionUsages() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/findUsages/kotlin/internal/findFunctionUsages"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), null, true); + } + + @TestMetadata("enumFunctionUsages.0.kt") + public void testEnumFunctionUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/internal/findFunctionUsages/enumFunctionUsages.0.kt"); + } + + @TestMetadata("kotlinMethodUsages.0.kt") + public void testKotlinMethodUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/internal/findFunctionUsages/kotlinMethodUsages.0.kt"); + } + + @TestMetadata("kotlinMultiRefInImport.0.kt") + public void testKotlinMultiRefInImport() throws Exception { + runTest("idea/testData/findUsages/kotlin/internal/findFunctionUsages/kotlinMultiRefInImport.0.kt"); + } + + @TestMetadata("kotlinOverloadAndExtensionUsages.0.kt") + public void testKotlinOverloadAndExtensionUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/internal/findFunctionUsages/kotlinOverloadAndExtensionUsages.0.kt"); + } + + @TestMetadata("kotlinTopLevelMethodUsages.0.kt") + public void testKotlinTopLevelMethodUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/internal/findFunctionUsages/kotlinTopLevelMethodUsages.0.kt"); + } + + @TestMetadata("kotlinTraitImplThroughDelegate.0.kt") + public void testKotlinTraitImplThroughDelegate() throws Exception { + runTest("idea/testData/findUsages/kotlin/internal/findFunctionUsages/kotlinTraitImplThroughDelegate.0.kt"); + } + + @TestMetadata("usagesOfBaseForFunction.0.kt") + public void testUsagesOfBaseForFunction() throws Exception { + runTest("idea/testData/findUsages/kotlin/internal/findFunctionUsages/usagesOfBaseForFunction.0.kt"); + } + } + + @TestMetadata("idea/testData/findUsages/kotlin/internal/findPrimaryConstructorUsages") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class FindPrimaryConstructorUsages extends AbstractFindUsagesFirTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInFindPrimaryConstructorUsages() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/findUsages/kotlin/internal/findPrimaryConstructorUsages"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), null, true); + } + + @TestMetadata("constructorCall.0.kt") + public void testConstructorCall() throws Exception { + runTest("idea/testData/findUsages/kotlin/internal/findPrimaryConstructorUsages/constructorCall.0.kt"); + } + + @TestMetadata("primaryConstructorByRef.0.kt") + public void testPrimaryConstructorByRef() throws Exception { + runTest("idea/testData/findUsages/kotlin/internal/findPrimaryConstructorUsages/primaryConstructorByRef.0.kt"); + } + } + + @TestMetadata("idea/testData/findUsages/kotlin/internal/findPropertyUsages") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class FindPropertyUsages extends AbstractFindUsagesFirTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInFindPropertyUsages() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/findUsages/kotlin/internal/findPropertyUsages"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), null, true); + } + + @TestMetadata("kotlinClassObjectPropertyUsage.0.kt") + public void testKotlinClassObjectPropertyUsage() throws Exception { + runTest("idea/testData/findUsages/kotlin/internal/findPropertyUsages/kotlinClassObjectPropertyUsage.0.kt"); + } + + @TestMetadata("kotlinMultiRefInImport.0.kt") + public void testKotlinMultiRefInImport() throws Exception { + runTest("idea/testData/findUsages/kotlin/internal/findPropertyUsages/kotlinMultiRefInImport.0.kt"); + } + + @TestMetadata("kotlinPropertyUsages.0.kt") + public void testKotlinPropertyUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/internal/findPropertyUsages/kotlinPropertyUsages.0.kt"); + } + + @TestMetadata("kotlinTopLevelPropertyUsages.0.kt") + public void testKotlinTopLevelPropertyUsages() throws Exception { + runTest("idea/testData/findUsages/kotlin/internal/findPropertyUsages/kotlinTopLevelPropertyUsages.0.kt"); + } + } + + @TestMetadata("idea/testData/findUsages/kotlin/internal/findSecondaryConstructorUsages") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class FindSecondaryConstructorUsages extends AbstractFindUsagesFirTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInFindSecondaryConstructorUsages() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/findUsages/kotlin/internal/findSecondaryConstructorUsages"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), null, true); + } + + @TestMetadata("constructorCall.0.kt") + public void testConstructorCall() throws Exception { + runTest("idea/testData/findUsages/kotlin/internal/findSecondaryConstructorUsages/constructorCall.0.kt"); + } + + @TestMetadata("defaultSecondaryConstructor.0.kt") + public void testDefaultSecondaryConstructor() throws Exception { + runTest("idea/testData/findUsages/kotlin/internal/findSecondaryConstructorUsages/defaultSecondaryConstructor.0.kt"); + } + + @TestMetadata("secondaryConstructor.0.kt") + public void testSecondaryConstructor() throws Exception { + runTest("idea/testData/findUsages/kotlin/internal/findSecondaryConstructorUsages/secondaryConstructor.0.kt"); + } + } + } + + @TestMetadata("idea/testData/findUsages/kotlin/propertyFiles") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class PropertyFiles extends AbstractFindUsagesFirTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInPropertyFiles() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/findUsages/kotlin/propertyFiles"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), null, true); + } + + @TestMetadata("propertyFileUsagesByRef.0.kt") + public void testPropertyFileUsagesByRef() throws Exception { + runTest("idea/testData/findUsages/kotlin/propertyFiles/propertyFileUsagesByRef.0.kt"); + } + + @TestMetadata("propertyUsagesByRef.0.kt") + public void testPropertyUsagesByRef() throws Exception { + runTest("idea/testData/findUsages/kotlin/propertyFiles/propertyUsagesByRef.0.kt"); + } + } + + @TestMetadata("idea/testData/findUsages/kotlin/script") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Script extends AbstractFindUsagesFirTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInScript() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/findUsages/kotlin/script"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), null, true); + } + + @TestMetadata("anonymousObject.0.kts") + public void testAnonymousObject() throws Exception { + runTest("idea/testData/findUsages/kotlin/script/anonymousObject.0.kts"); + } + + @TestMetadata("anonymousObjectAsInitializer.0.kts") + public void testAnonymousObjectAsInitializer() throws Exception { + runTest("idea/testData/findUsages/kotlin/script/anonymousObjectAsInitializer.0.kts"); + } + + @TestMetadata("anonymousObjectInFun.0.kts") + public void testAnonymousObjectInFun() throws Exception { + runTest("idea/testData/findUsages/kotlin/script/anonymousObjectInFun.0.kts"); + } + + @TestMetadata("dummy.0.kts") + public void testDummy() throws Exception { + runTest("idea/testData/findUsages/kotlin/script/dummy.0.kts"); + } + + @TestMetadata("localClass.0.kts") + public void testLocalClass() throws Exception { + runTest("idea/testData/findUsages/kotlin/script/localClass.0.kts"); + } + } + + @TestMetadata("idea/testData/findUsages/kotlin/unresolvedAnnotation") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class UnresolvedAnnotation extends AbstractFindUsagesFirTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInUnresolvedAnnotation() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/findUsages/kotlin/unresolvedAnnotation"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), null, true); + } + + @TestMetadata("unresolvedAnnotation.0.kt") + public void testUnresolvedAnnotation() throws Exception { + runTest("idea/testData/findUsages/kotlin/unresolvedAnnotation/unresolvedAnnotation.0.kt"); + } + } + + @TestMetadata("idea/testData/findUsages/kotlin/variable") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Variable extends AbstractFindUsagesFirTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInVariable() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/findUsages/kotlin/variable"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), null, true); + } + + @TestMetadata("plusAssignFun.0.kt") + public void testPlusAssignFun() throws Exception { + runTest("idea/testData/findUsages/kotlin/variable/plusAssignFun.0.kt"); + } + + @TestMetadata("readAccess.0.kt") + public void testReadAccess() throws Exception { + runTest("idea/testData/findUsages/kotlin/variable/readAccess.0.kt"); + } + + @TestMetadata("varInDoWhile.0.kt") + public void testVarInDoWhile() throws Exception { + runTest("idea/testData/findUsages/kotlin/variable/varInDoWhile.0.kt"); + } + + @TestMetadata("writeAccess.0.kt") + public void testWriteAccess() throws Exception { + runTest("idea/testData/findUsages/kotlin/variable/writeAccess.0.kt"); + } + } + } + + @TestMetadata("idea/testData/findUsages/java") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Java extends AbstractFindUsagesFirTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInJava() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/findUsages/java"), Pattern.compile("^(.+)\\.0\\.java$"), null, true); + } + + @TestMetadata("idea/testData/findUsages/java/findConstructorUsages") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class FindConstructorUsages extends AbstractFindUsagesFirTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInFindConstructorUsages() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/findUsages/java/findConstructorUsages"), Pattern.compile("^(.+)\\.0\\.java$"), null, true); + } + + @TestMetadata("javaConstructorInDelegationCall.0.java") + public void testJavaConstructorInDelegationCall() throws Exception { + runTest("idea/testData/findUsages/java/findConstructorUsages/javaConstructorInDelegationCall.0.java"); + } + + @TestMetadata("javaDefaultConstructorInDelegationCall.0.java") + public void testJavaDefaultConstructorInDelegationCall() throws Exception { + runTest("idea/testData/findUsages/java/findConstructorUsages/javaDefaultConstructorInDelegationCall.0.java"); + } + + @TestMetadata("primaryConstructorByJavaRef.0.java") + public void testPrimaryConstructorByJavaRef() throws Exception { + runTest("idea/testData/findUsages/java/findConstructorUsages/primaryConstructorByJavaRef.0.java"); + } + + @TestMetadata("primaryConstructorByJavaSuperRef.0.java") + public void testPrimaryConstructorByJavaSuperRef() throws Exception { + runTest("idea/testData/findUsages/java/findConstructorUsages/primaryConstructorByJavaSuperRef.0.java"); + } + + @TestMetadata("secondaryConstructorByJavaNewExpression.0.java") + public void testSecondaryConstructorByJavaNewExpression() throws Exception { + runTest("idea/testData/findUsages/java/findConstructorUsages/secondaryConstructorByJavaNewExpression.0.java"); + } + + @TestMetadata("secondaryConstructorByJavaSuperCall.0.java") + public void testSecondaryConstructorByJavaSuperCall() throws Exception { + runTest("idea/testData/findUsages/java/findConstructorUsages/secondaryConstructorByJavaSuperCall.0.java"); + } + } + + @TestMetadata("idea/testData/findUsages/java/findJavaClassUsages") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class FindJavaClassUsages extends AbstractFindUsagesFirTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInFindJavaClassUsages() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/findUsages/java/findJavaClassUsages"), Pattern.compile("^(.+)\\.0\\.java$"), null, true); + } + + @TestMetadata("JKAliasedClassAllUsages.0.java") + public void testJKAliasedClassAllUsages() throws Exception { + runTest("idea/testData/findUsages/java/findJavaClassUsages/JKAliasedClassAllUsages.0.java"); + } + + @TestMetadata("JKClassAllUsages.0.java") + public void testJKClassAllUsages() throws Exception { + runTest("idea/testData/findUsages/java/findJavaClassUsages/JKClassAllUsages.0.java"); + } + + @TestMetadata("JKClassDerivedAnonymousObjects.0.java") + public void testJKClassDerivedAnonymousObjects() throws Exception { + runTest("idea/testData/findUsages/java/findJavaClassUsages/JKClassDerivedAnonymousObjects.0.java"); + } + + @TestMetadata("JKClassDerivedClasses.0.java") + public void testJKClassDerivedClasses() throws Exception { + runTest("idea/testData/findUsages/java/findJavaClassUsages/JKClassDerivedClasses.0.java"); + } + + @TestMetadata("JKClassDerivedInnerClasses.0.java") + public void testJKClassDerivedInnerClasses() throws Exception { + runTest("idea/testData/findUsages/java/findJavaClassUsages/JKClassDerivedInnerClasses.0.java"); + } + + @TestMetadata("JKClassDerivedInnerObjects.0.java") + public void testJKClassDerivedInnerObjects() throws Exception { + runTest("idea/testData/findUsages/java/findJavaClassUsages/JKClassDerivedInnerObjects.0.java"); + } + + @TestMetadata("JKClassDerivedLocalClasses.0.java") + public void testJKClassDerivedLocalClasses() throws Exception { + runTest("idea/testData/findUsages/java/findJavaClassUsages/JKClassDerivedLocalClasses.0.java"); + } + + @TestMetadata("JKClassDerivedLocalObjects.0.java") + public void testJKClassDerivedLocalObjects() throws Exception { + runTest("idea/testData/findUsages/java/findJavaClassUsages/JKClassDerivedLocalObjects.0.java"); + } + + @TestMetadata("JKClassDerivedObjects.0.java") + public void testJKClassDerivedObjects() throws Exception { + runTest("idea/testData/findUsages/java/findJavaClassUsages/JKClassDerivedObjects.0.java"); + } + + @TestMetadata("JKClassFieldsUsages.0.java") + public void testJKClassFieldsUsages() throws Exception { + runTest("idea/testData/findUsages/java/findJavaClassUsages/JKClassFieldsUsages.0.java"); + } + + @TestMetadata("JKClassMethodsUsages.0.java") + public void testJKClassMethodsUsages() throws Exception { + runTest("idea/testData/findUsages/java/findJavaClassUsages/JKClassMethodsUsages.0.java"); + } + + @TestMetadata("JKClassWithImplicitConstructorAllUsages.0.java") + public void testJKClassWithImplicitConstructorAllUsages() throws Exception { + runTest("idea/testData/findUsages/java/findJavaClassUsages/JKClassWithImplicitConstructorAllUsages.0.java"); + } + + @TestMetadata("JKDerivedInterfaces.0.java") + public void testJKDerivedInterfaces() throws Exception { + runTest("idea/testData/findUsages/java/findJavaClassUsages/JKDerivedInterfaces.0.java"); + } + + @TestMetadata("JKInnerClassAllUsages.0.java") + public void testJKInnerClassAllUsages() throws Exception { + runTest("idea/testData/findUsages/java/findJavaClassUsages/JKInnerClassAllUsages.0.java"); + } + + @TestMetadata("JKInterfaceDerivedAnonymousObjects.0.java") + public void testJKInterfaceDerivedAnonymousObjects() throws Exception { + runTest("idea/testData/findUsages/java/findJavaClassUsages/JKInterfaceDerivedAnonymousObjects.0.java"); + } + + @TestMetadata("JKInterfaceDerivedClasses.0.java") + public void testJKInterfaceDerivedClasses() throws Exception { + runTest("idea/testData/findUsages/java/findJavaClassUsages/JKInterfaceDerivedClasses.0.java"); + } + + @TestMetadata("JKInterfaceDerivedInnerClasses.0.java") + public void testJKInterfaceDerivedInnerClasses() throws Exception { + runTest("idea/testData/findUsages/java/findJavaClassUsages/JKInterfaceDerivedInnerClasses.0.java"); + } + + @TestMetadata("JKInterfaceDerivedInnerObjects.0.java") + public void testJKInterfaceDerivedInnerObjects() throws Exception { + runTest("idea/testData/findUsages/java/findJavaClassUsages/JKInterfaceDerivedInnerObjects.0.java"); + } + + @TestMetadata("JKInterfaceDerivedLocalClasses.0.java") + public void testJKInterfaceDerivedLocalClasses() throws Exception { + runTest("idea/testData/findUsages/java/findJavaClassUsages/JKInterfaceDerivedLocalClasses.0.java"); + } + + @TestMetadata("JKInterfaceDerivedLocalObjects.0.java") + public void testJKInterfaceDerivedLocalObjects() throws Exception { + runTest("idea/testData/findUsages/java/findJavaClassUsages/JKInterfaceDerivedLocalObjects.0.java"); + } + + @TestMetadata("JKInterfaceDerivedLocalTraits.0.java") + public void testJKInterfaceDerivedLocalTraits() throws Exception { + runTest("idea/testData/findUsages/java/findJavaClassUsages/JKInterfaceDerivedLocalTraits.0.java"); + } + + @TestMetadata("JKInterfaceDerivedObjects.0.java") + public void testJKInterfaceDerivedObjects() throws Exception { + runTest("idea/testData/findUsages/java/findJavaClassUsages/JKInterfaceDerivedObjects.0.java"); + } + + @TestMetadata("JKNestedClassAllUsages.0.java") + public void testJKNestedClassAllUsages() throws Exception { + runTest("idea/testData/findUsages/java/findJavaClassUsages/JKNestedClassAllUsages.0.java"); + } + } + + @TestMetadata("idea/testData/findUsages/java/findJavaFieldUsages") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class FindJavaFieldUsages extends AbstractFindUsagesFirTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInFindJavaFieldUsages() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/findUsages/java/findJavaFieldUsages"), Pattern.compile("^(.+)\\.0\\.java$"), null, true); + } + + @TestMetadata("JKFieldUsages.0.java") + public void testJKFieldUsages() throws Exception { + runTest("idea/testData/findUsages/java/findJavaFieldUsages/JKFieldUsages.0.java"); + } + } + + @TestMetadata("idea/testData/findUsages/java/findJavaMethodUsages") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class FindJavaMethodUsages extends AbstractFindUsagesFirTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInFindJavaMethodUsages() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/findUsages/java/findJavaMethodUsages"), Pattern.compile("^(.+)\\.0\\.java$"), null, true); + } + + @TestMetadata("ConventionUsages.0.java") + public void testConventionUsages() throws Exception { + runTest("idea/testData/findUsages/java/findJavaMethodUsages/ConventionUsages.0.java"); + } + + @TestMetadata("defaultJavaAnnotationMethodUsages.0.java") + public void testDefaultJavaAnnotationMethodUsages() throws Exception { + runTest("idea/testData/findUsages/java/findJavaMethodUsages/defaultJavaAnnotationMethodUsages.0.java"); + } + + @TestMetadata("JKMethodOverrides.0.java") + public void testJKMethodOverrides() throws Exception { + runTest("idea/testData/findUsages/java/findJavaMethodUsages/JKMethodOverrides.0.java"); + } + + @TestMetadata("JKMethodUsages.0.java") + public void testJKMethodUsages() throws Exception { + runTest("idea/testData/findUsages/java/findJavaMethodUsages/JKMethodUsages.0.java"); + } + + @TestMetadata("javaComponentFunctions.0.java") + public void testJavaComponentFunctions() throws Exception { + runTest("idea/testData/findUsages/java/findJavaMethodUsages/javaComponentFunctions.0.java"); + } + + @TestMetadata("javaInvoke.0.java") + public void testJavaInvoke() throws Exception { + runTest("idea/testData/findUsages/java/findJavaMethodUsages/javaInvoke.0.java"); + } + + @TestMetadata("javaInvokeWithStaticImport.0.java") + public void testJavaInvokeWithStaticImport() throws Exception { + runTest("idea/testData/findUsages/java/findJavaMethodUsages/javaInvokeWithStaticImport.0.java"); + } + + @TestMetadata("JavaWithGroovyInvoke.0.java") + public void testJavaWithGroovyInvoke() throws Exception { + runTest("idea/testData/findUsages/java/findJavaMethodUsages/JavaWithGroovyInvoke.0.java"); + } + + @TestMetadata("MismatchedAccessor.0.java") + public void testMismatchedAccessor() throws Exception { + runTest("idea/testData/findUsages/java/findJavaMethodUsages/MismatchedAccessor.0.java"); + } + + @TestMetadata("OverriddenMethodSyntheticAccessor.0.java") + public void testOverriddenMethodSyntheticAccessor() throws Exception { + runTest("idea/testData/findUsages/java/findJavaMethodUsages/OverriddenMethodSyntheticAccessor.0.java"); + } + + @TestMetadata("OverridenRawGenericSignatureBase.0.java") + public void testOverridenRawGenericSignatureBase() throws Exception { + runTest("idea/testData/findUsages/java/findJavaMethodUsages/OverridenRawGenericSignatureBase.0.java"); + } + + @TestMetadata("OverridenRawGenericSignatureBase2.0.java") + public void testOverridenRawGenericSignatureBase2() throws Exception { + runTest("idea/testData/findUsages/java/findJavaMethodUsages/OverridenRawGenericSignatureBase2.0.java"); + } + + @TestMetadata("SyntheticProperties.0.java") + public void testSyntheticProperties() throws Exception { + runTest("idea/testData/findUsages/java/findJavaMethodUsages/SyntheticProperties.0.java"); + } + + @TestMetadata("UnaryNot.0.java") + public void testUnaryNot() throws Exception { + runTest("idea/testData/findUsages/java/findJavaMethodUsages/UnaryNot.0.java"); + } + } + + @TestMetadata("idea/testData/findUsages/java/findJavaPropertyUsages") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class FindJavaPropertyUsages extends AbstractFindUsagesFirTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInFindJavaPropertyUsages() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/findUsages/java/findJavaPropertyUsages"), Pattern.compile("^(.+)\\.0\\.java$"), null, true); + } + + @TestMetadata("javaPropertyGetterUsagesKJ.0.java") + public void testJavaPropertyGetterUsagesKJ() throws Exception { + runTest("idea/testData/findUsages/java/findJavaPropertyUsages/javaPropertyGetterUsagesKJ.0.java"); + } + + @TestMetadata("javaPropertySetterUsagesKJ.0.java") + public void testJavaPropertySetterUsagesKJ() throws Exception { + runTest("idea/testData/findUsages/java/findJavaPropertyUsages/javaPropertySetterUsagesKJ.0.java"); + } + } + } + + @TestMetadata("idea/testData/findUsages/propertyFiles") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class PropertyFiles extends AbstractFindUsagesFirTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInPropertyFiles() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/findUsages/propertyFiles"), Pattern.compile("^(.+)\\.0\\.properties$"), null, true); + } + + @TestMetadata("propertyFileUsages.0.properties") + public void testPropertyFileUsages() throws Exception { + runTest("idea/testData/findUsages/propertyFiles/propertyFileUsages.0.properties"); + } + + @TestMetadata("propertyUsages.0.properties") + public void testPropertyUsages() throws Exception { + runTest("idea/testData/findUsages/propertyFiles/propertyUsages.0.properties"); + } + } +} diff --git a/idea/idea-fir/tests/org/jetbrains/kotlin/findUsages/FindUsagesMultiModuleFirTest.kt b/idea/idea-fir/tests/org/jetbrains/kotlin/findUsages/FindUsagesMultiModuleFirTest.kt new file mode 100644 index 00000000000..470b4351ac3 --- /dev/null +++ b/idea/idea-fir/tests/org/jetbrains/kotlin/findUsages/FindUsagesMultiModuleFirTest.kt @@ -0,0 +1,16 @@ +/* + * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.findUsages + +import org.jetbrains.kotlin.doTestWithFIRFlags + +class FindUsagesMultiModuleFirTest : FindUsagesMultiModuleTest() { + override val isFirPlugin: Boolean = true + + override fun doFindUsagesTest() = doTestWithFIRFlags(mainFile.text) { + super.doFindUsagesTest() + } +} \ No newline at end of file diff --git a/idea/idea-fir/tests/org/jetbrains/kotlin/findUsages/FindUsagesWithDisableComponentSearchFirTestGenerated.java b/idea/idea-fir/tests/org/jetbrains/kotlin/findUsages/FindUsagesWithDisableComponentSearchFirTestGenerated.java new file mode 100644 index 00000000000..9e4d9eeea3f --- /dev/null +++ b/idea/idea-fir/tests/org/jetbrains/kotlin/findUsages/FindUsagesWithDisableComponentSearchFirTestGenerated.java @@ -0,0 +1,125 @@ +/* + * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.findUsages; + +import com.intellij.testFramework.TestDataPath; +import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; +import org.jetbrains.kotlin.test.KotlinTestUtils; +import org.jetbrains.kotlin.test.TestMetadata; +import org.junit.runner.RunWith; + +import java.io.File; +import java.util.regex.Pattern; + +/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ +@SuppressWarnings("all") +@TestMetadata("idea/testData/findUsages/kotlin/conventions/components") +@TestDataPath("$PROJECT_ROOT") +@RunWith(JUnit3RunnerWithInners.class) +public class FindUsagesWithDisableComponentSearchFirTestGenerated extends AbstractFindUsagesWithDisableComponentSearchFirTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInComponents() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/findUsages/kotlin/conventions/components"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), null, true); + } + + @TestMetadata("callableReferences.0.kt") + public void testCallableReferences() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/components/callableReferences.0.kt"); + } + + @TestMetadata("companionObjectAccess.0.kt") + public void testCompanionObjectAccess() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/components/companionObjectAccess.0.kt"); + } + + @TestMetadata("componentFunForGenericType1.0.kt") + public void testComponentFunForGenericType1() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/components/componentFunForGenericType1.0.kt"); + } + + @TestMetadata("componentFunForGenericType2.0.kt") + public void testComponentFunForGenericType2() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/components/componentFunForGenericType2.0.kt"); + } + + @TestMetadata("dataClass.0.kt") + public void testDataClass() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/components/dataClass.0.kt"); + } + + @TestMetadata("dataClassComponentByRef.0.kt") + public void testDataClassComponentByRef() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/components/dataClassComponentByRef.0.kt"); + } + + @TestMetadata("dataClassFromStdlib.0.kt") + public void testDataClassFromStdlib() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/components/dataClassFromStdlib.0.kt"); + } + + @TestMetadata("dataClassInsideDataClass.0.kt") + public void testDataClassInsideDataClass() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/components/dataClassInsideDataClass.0.kt"); + } + + @TestMetadata("extensionComponentFun.0.kt") + public void testExtensionComponentFun() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/components/extensionComponentFun.0.kt"); + } + + @TestMetadata("for.0.kt") + public void testFor() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/components/for.0.kt"); + } + + @TestMetadata("isAndAs.0.kt") + public void testIsAndAs() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/components/isAndAs.0.kt"); + } + + @TestMetadata("lambdas.0.kt") + public void testLambdas() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/components/lambdas.0.kt"); + } + + @TestMetadata("mayTypeAffectAncestors.0.kt") + public void testMayTypeAffectAncestors() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/components/mayTypeAffectAncestors.0.kt"); + } + + @TestMetadata("memberComponentFun.0.kt") + public void testMemberComponentFun() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/components/memberComponentFun.0.kt"); + } + + @TestMetadata("operators.0.kt") + public void testOperators() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/components/operators.0.kt"); + } + + @TestMetadata("recursiveDataClass1.0.kt") + public void testRecursiveDataClass1() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/components/recursiveDataClass1.0.kt"); + } + + @TestMetadata("recursiveDataClass2.0.kt") + public void testRecursiveDataClass2() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/components/recursiveDataClass2.0.kt"); + } + + @TestMetadata("SAM.0.kt") + public void testSAM() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/components/SAM.0.kt"); + } + + @TestMetadata("when.0.kt") + public void testWhen() throws Exception { + runTest("idea/testData/findUsages/kotlin/conventions/components/when.0.kt"); + } +} diff --git a/idea/idea-fir/tests/org/jetbrains/kotlin/findUsages/KotlinFindUsagesWithLibraryFirTestGenerated.java b/idea/idea-fir/tests/org/jetbrains/kotlin/findUsages/KotlinFindUsagesWithLibraryFirTestGenerated.java new file mode 100644 index 00000000000..7e2057a2d60 --- /dev/null +++ b/idea/idea-fir/tests/org/jetbrains/kotlin/findUsages/KotlinFindUsagesWithLibraryFirTestGenerated.java @@ -0,0 +1,172 @@ +/* + * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.findUsages; + +import com.intellij.testFramework.TestDataPath; +import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; +import org.jetbrains.kotlin.test.KotlinTestUtils; +import org.jetbrains.kotlin.test.TestMetadata; +import org.junit.runner.RunWith; + +import java.io.File; +import java.util.regex.Pattern; + +/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ +@SuppressWarnings("all") +@TestMetadata("idea/testData/findUsages/libraryUsages") +@TestDataPath("$PROJECT_ROOT") +@RunWith(JUnit3RunnerWithInners.class) +public class KotlinFindUsagesWithLibraryFirTestGenerated extends AbstractKotlinFindUsagesWithLibraryFirTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInLibraryUsages() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/findUsages/libraryUsages"), Pattern.compile("^(.+)\\.0\\.kt$"), null, true); + } + + @TestMetadata("idea/testData/findUsages/libraryUsages/javaLibrary") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class JavaLibrary extends AbstractKotlinFindUsagesWithLibraryFirTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInJavaLibrary() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/findUsages/libraryUsages/javaLibrary"), Pattern.compile("^(.+)\\.0\\.kt$"), null, true); + } + + @TestMetadata("LibraryClassUsages.0.kt") + public void testLibraryClassUsages() throws Exception { + runTest("idea/testData/findUsages/libraryUsages/javaLibrary/LibraryClassUsages.0.kt"); + } + + @TestMetadata("LibraryConstructorUsages.0.kt") + public void testLibraryConstructorUsages() throws Exception { + runTest("idea/testData/findUsages/libraryUsages/javaLibrary/LibraryConstructorUsages.0.kt"); + } + + @TestMetadata("LibraryFieldUsages.0.kt") + public void testLibraryFieldUsages() throws Exception { + runTest("idea/testData/findUsages/libraryUsages/javaLibrary/LibraryFieldUsages.0.kt"); + } + + @TestMetadata("LibraryMethodUsages.0.kt") + public void testLibraryMethodUsages() throws Exception { + runTest("idea/testData/findUsages/libraryUsages/javaLibrary/LibraryMethodUsages.0.kt"); + } + + @TestMetadata("LibraryStaticFieldUsages.0.kt") + public void testLibraryStaticFieldUsages() throws Exception { + runTest("idea/testData/findUsages/libraryUsages/javaLibrary/LibraryStaticFieldUsages.0.kt"); + } + + @TestMetadata("LibraryStaticMethodUsages.0.kt") + public void testLibraryStaticMethodUsages() throws Exception { + runTest("idea/testData/findUsages/libraryUsages/javaLibrary/LibraryStaticMethodUsages.0.kt"); + } + } + + @TestMetadata("idea/testData/findUsages/libraryUsages/kotlinLibrary") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class KotlinLibrary extends AbstractKotlinFindUsagesWithLibraryFirTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInKotlinLibrary() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/findUsages/libraryUsages/kotlinLibrary"), Pattern.compile("^(.+)\\.0\\.kt$"), null, true); + } + + @TestMetadata("LibraryClassUsages.0.kt") + public void testLibraryClassUsages() throws Exception { + runTest("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryClassUsages.0.kt"); + } + + @TestMetadata("LibraryCompanionObjectUsages.0.kt") + public void testLibraryCompanionObjectUsages() throws Exception { + runTest("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryCompanionObjectUsages.0.kt"); + } + + @TestMetadata("LibraryEnumEntryUsages.0.kt") + public void testLibraryEnumEntryUsages() throws Exception { + runTest("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryEnumEntryUsages.0.kt"); + } + + @TestMetadata("LibraryFunctionUsages.0.kt") + public void testLibraryFunctionUsages() throws Exception { + runTest("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryFunctionUsages.0.kt"); + } + + @TestMetadata("LibraryMemberFunctionUsages.0.kt") + public void testLibraryMemberFunctionUsages() throws Exception { + runTest("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryMemberFunctionUsages.0.kt"); + } + + @TestMetadata("LibraryNestedClassMemberFunctionUsages.0.kt") + public void testLibraryNestedClassMemberFunctionUsages() throws Exception { + runTest("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassMemberFunctionUsages.0.kt"); + } + + @TestMetadata("LibraryNestedClassPrimaryConstructorUsages.0.kt") + public void testLibraryNestedClassPrimaryConstructorUsages() throws Exception { + runTest("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassPrimaryConstructorUsages.0.kt"); + } + + @TestMetadata("LibraryNestedClassSecondaryConstructorUsages.0.kt") + public void testLibraryNestedClassSecondaryConstructorUsages() throws Exception { + runTest("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassSecondaryConstructorUsages.0.kt"); + } + + @TestMetadata("LibraryNestedClassUsages.0.kt") + public void testLibraryNestedClassUsages() throws Exception { + runTest("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassUsages.0.kt"); + } + + @TestMetadata("LibraryObjectUsages.0.kt") + public void testLibraryObjectUsages() throws Exception { + runTest("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryObjectUsages.0.kt"); + } + + @TestMetadata("LibraryPrimaryConstructorUsages.0.kt") + public void testLibraryPrimaryConstructorUsages() throws Exception { + runTest("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryPrimaryConstructorUsages.0.kt"); + } + + @TestMetadata("LibrarySecondaryConstructorUsages.0.kt") + public void testLibrarySecondaryConstructorUsages() throws Exception { + runTest("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibrarySecondaryConstructorUsages.0.kt"); + } + } + + @TestMetadata("idea/testData/findUsages/libraryUsages/_library") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class _library extends AbstractKotlinFindUsagesWithLibraryFirTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentIn_library() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/findUsages/libraryUsages/_library"), Pattern.compile("^(.+)\\.0\\.kt$"), null, true); + } + + @TestMetadata("idea/testData/findUsages/libraryUsages/_library/library") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Library extends AbstractKotlinFindUsagesWithLibraryFirTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInLibrary() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/findUsages/libraryUsages/_library/library"), Pattern.compile("^(.+)\\.0\\.kt$"), null, true); + } + } + } +} diff --git a/idea/idea-fir/tests/org/jetbrains/kotlin/findUsages/KotlinFindUsagesWithStdlibFirTestGenerated.java b/idea/idea-fir/tests/org/jetbrains/kotlin/findUsages/KotlinFindUsagesWithStdlibFirTestGenerated.java new file mode 100644 index 00000000000..1d81e8806a4 --- /dev/null +++ b/idea/idea-fir/tests/org/jetbrains/kotlin/findUsages/KotlinFindUsagesWithStdlibFirTestGenerated.java @@ -0,0 +1,35 @@ +/* + * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.findUsages; + +import com.intellij.testFramework.TestDataPath; +import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; +import org.jetbrains.kotlin.test.KotlinTestUtils; +import org.jetbrains.kotlin.test.TestMetadata; +import org.junit.runner.RunWith; + +import java.io.File; +import java.util.regex.Pattern; + +/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ +@SuppressWarnings("all") +@TestMetadata("idea/testData/findUsages/stdlibUsages") +@TestDataPath("$PROJECT_ROOT") +@RunWith(JUnit3RunnerWithInners.class) +public class KotlinFindUsagesWithStdlibFirTestGenerated extends AbstractKotlinFindUsagesWithStdlibFirTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInStdlibUsages() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/findUsages/stdlibUsages"), Pattern.compile("^(.+)\\.0\\.kt$"), null, true); + } + + @TestMetadata("LibraryMemberFunctionUsagesInStdlib.0.kt") + public void testLibraryMemberFunctionUsagesInStdlib() throws Exception { + runTest("idea/testData/findUsages/stdlibUsages/LibraryMemberFunctionUsagesInStdlib.0.kt"); + } +} diff --git a/idea/idea-test-framework/test/org/jetbrains/kotlin/idea/test/KotlinLightCodeInsightFixtureTestCase.kt b/idea/idea-test-framework/test/org/jetbrains/kotlin/idea/test/KotlinLightCodeInsightFixtureTestCase.kt index a383fd1cd57..5a2c759e453 100644 --- a/idea/idea-test-framework/test/org/jetbrains/kotlin/idea/test/KotlinLightCodeInsightFixtureTestCase.kt +++ b/idea/idea-test-framework/test/org/jetbrains/kotlin/idea/test/KotlinLightCodeInsightFixtureTestCase.kt @@ -24,6 +24,7 @@ import com.intellij.openapi.vfs.VfsUtilCore import com.intellij.openapi.vfs.newvfs.impl.VfsRootAccess import com.intellij.pom.java.LanguageLevel import com.intellij.psi.PsiClassOwner +import com.intellij.psi.PsiElement import com.intellij.psi.PsiJavaFile import com.intellij.psi.PsiManager import com.intellij.psi.codeStyle.CodeStyleSettings @@ -58,6 +59,7 @@ import java.util.* import kotlin.reflect.full.findAnnotation abstract class KotlinLightCodeInsightFixtureTestCase : KotlinLightCodeInsightFixtureTestCaseBase() { + private val exceptions = ArrayList() protected open val captureExceptions = true diff --git a/idea/testData/findUsages/java/findJavaFieldUsages/JKFieldUsages.0.java b/idea/testData/findUsages/java/findJavaFieldUsages/JKFieldUsages.0.java index 6e90ce2f4d0..d89e818ee2a 100644 --- a/idea/testData/findUsages/java/findJavaFieldUsages/JKFieldUsages.0.java +++ b/idea/testData/findUsages/java/findJavaFieldUsages/JKFieldUsages.0.java @@ -1,5 +1,6 @@ // PSI_ELEMENT: com.intellij.psi.PsiField // OPTIONS: skipWrite +// FIR_COMPARISON public class A { public String foo = "foo"; } \ No newline at end of file diff --git a/idea/testData/findUsages/java/findJavaMethodUsages/JKMethodUsages.0.java b/idea/testData/findUsages/java/findJavaMethodUsages/JKMethodUsages.0.java index 3a8b6374127..a6da9c48dc8 100644 --- a/idea/testData/findUsages/java/findJavaMethodUsages/JKMethodUsages.0.java +++ b/idea/testData/findUsages/java/findJavaMethodUsages/JKMethodUsages.0.java @@ -1,5 +1,6 @@ // PSI_ELEMENT: com.intellij.psi.PsiMethod // OPTIONS: usages +// FIR_COMPARISON class A { public void foo() { diff --git a/idea/testData/findUsages/java/findJavaMethodUsages/MismatchedAccessor.0.java b/idea/testData/findUsages/java/findJavaMethodUsages/MismatchedAccessor.0.java index 8865f514a02..2c2f6326307 100644 --- a/idea/testData/findUsages/java/findJavaMethodUsages/MismatchedAccessor.0.java +++ b/idea/testData/findUsages/java/findJavaMethodUsages/MismatchedAccessor.0.java @@ -1,5 +1,6 @@ // PSI_ELEMENT: com.intellij.psi.PsiMethod // OPTIONS: usages +// FIR_COMPARISON public class Bar { public String getValue() { return "value"; diff --git a/idea/testData/findUsages/kotlin/conventions/components/SAM.0.kt b/idea/testData/findUsages/kotlin/conventions/components/SAM.0.kt index 88746b24f08..7eee200da89 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/SAM.0.kt +++ b/idea/testData/findUsages/kotlin/conventions/components/SAM.0.kt @@ -1,5 +1,7 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtParameter // OPTIONS: usages +// FIR_IGNORE + package pack data class A(val a: Int, val b: String) \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/conventions/components/callableReferences.0.kt b/idea/testData/findUsages/kotlin/conventions/components/callableReferences.0.kt index 7611fb861dc..e982ddead74 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/callableReferences.0.kt +++ b/idea/testData/findUsages/kotlin/conventions/components/callableReferences.0.kt @@ -1,5 +1,6 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtParameter // OPTIONS: usages +// FIR_IGNORE data class A(val a: Int, val b: Int) { fun f() {} diff --git a/idea/testData/findUsages/kotlin/conventions/components/callableReferences.results.txt b/idea/testData/findUsages/kotlin/conventions/components/callableReferences.results.txt index a8748d1b0c6..914d590b78e 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/callableReferences.results.txt +++ b/idea/testData/findUsages/kotlin/conventions/components/callableReferences.results.txt @@ -1,4 +1,4 @@ -Value read 19 val (a1, b1) = fun2() -Value read 20 val (a2, b2) = fun3() -Value read 23 val (a3, b3) = constructor(1, 2) -Value read 25 val (a4, b4) = A::class.java.newInstance() \ No newline at end of file +Value read 20 val (a1, b1) = fun2() +Value read 21 val (a2, b2) = fun3() +Value read 24 val (a3, b3) = constructor(1, 2) +Value read 26 val (a4, b4) = A::class.java.newInstance() \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/conventions/components/companionObjectAccess.0.kt b/idea/testData/findUsages/kotlin/conventions/components/companionObjectAccess.0.kt index 83e525f7701..3d634c2e6f3 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/companionObjectAccess.0.kt +++ b/idea/testData/findUsages/kotlin/conventions/components/companionObjectAccess.0.kt @@ -1,5 +1,6 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtParameter // OPTIONS: usages +// FIR_COMPARISON data class A(val x: Int, val y: Int) { companion object { diff --git a/idea/testData/findUsages/kotlin/conventions/components/dataClass.0.kt b/idea/testData/findUsages/kotlin/conventions/components/dataClass.0.kt index c2cae241912..6119cc3c610 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/dataClass.0.kt +++ b/idea/testData/findUsages/kotlin/conventions/components/dataClass.0.kt @@ -1,5 +1,7 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtParameter // OPTIONS: usages +// FIR_IGNORE + package pack data class A(val n: Int, val s: String, val o: Any) { diff --git a/idea/testData/findUsages/kotlin/conventions/components/dataClass.results.txt b/idea/testData/findUsages/kotlin/conventions/components/dataClass.results.txt index e71b80b80f0..6b33de76b75 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/dataClass.results.txt +++ b/idea/testData/findUsages/kotlin/conventions/components/dataClass.results.txt @@ -1,5 +1,5 @@ -[dataClass.0.kt] Value read 16 val (x, y) = getThis() -[dataClass.0.kt] Value read 24 val (x, y) = get(0) +[dataClass.0.kt] Value read 18 val (x, y) = getThis() +[dataClass.0.kt] Value read 26 val (x, y) = get(0) [dataClass.1.kt] Function call 6 a.component1() [dataClass.1.kt] Value read 10 val (x2, y2, z2) = g() [dataClass.1.kt] Value read 11 val (x3, y3, z3) = h() diff --git a/idea/testData/findUsages/kotlin/conventions/components/dataClassComponentByRef.0.kt b/idea/testData/findUsages/kotlin/conventions/components/dataClassComponentByRef.0.kt index dff3f0caf1c..648738f6ed5 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/dataClassComponentByRef.0.kt +++ b/idea/testData/findUsages/kotlin/conventions/components/dataClassComponentByRef.0.kt @@ -1,6 +1,7 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtParameter // OPTIONS: usages // FIND_BY_REF +// FIR_IGNORE data class A(val n: Int, val s: String, val o: Any) diff --git a/idea/testData/findUsages/kotlin/conventions/components/dataClassComponentByRef.DisabledComponents.results.txt b/idea/testData/findUsages/kotlin/conventions/components/dataClassComponentByRef.DisabledComponents.results.txt index 718949fce91..6cc2333674b 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/dataClassComponentByRef.DisabledComponents.results.txt +++ b/idea/testData/findUsages/kotlin/conventions/components/dataClassComponentByRef.DisabledComponents.results.txt @@ -1 +1 @@ -Value read 9 a.n +Value read 10 a.n \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/conventions/components/dataClassComponentByRef.results.txt b/idea/testData/findUsages/kotlin/conventions/components/dataClassComponentByRef.results.txt index ea35cc53b84..4e7b8e03693 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/dataClassComponentByRef.results.txt +++ b/idea/testData/findUsages/kotlin/conventions/components/dataClassComponentByRef.results.txt @@ -1,3 +1,3 @@ -Function call 10 a.component1() -Value read 11 val (x, y, z) = a -Value read 9 a.n +Function call 11 a.component1() +Value read 10 a.n +Value read 12 val (x, y, z) = a \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/conventions/components/dataClassInsideDataClass.0.kt b/idea/testData/findUsages/kotlin/conventions/components/dataClassInsideDataClass.0.kt index 9169d9a5b32..c8ffe57b030 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/dataClassInsideDataClass.0.kt +++ b/idea/testData/findUsages/kotlin/conventions/components/dataClassInsideDataClass.0.kt @@ -1,5 +1,6 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtParameter // OPTIONS: usages +// FIR_IGNORE data class A(val x: Int, val y: Int, val z: String) data class B(val a: A, val n: Int) diff --git a/idea/testData/findUsages/kotlin/conventions/components/dataClassInsideDataClass.DisabledComponents.results.txt b/idea/testData/findUsages/kotlin/conventions/components/dataClassInsideDataClass.DisabledComponents.results.txt index 4180404d082..4b7f75086cf 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/dataClassInsideDataClass.DisabledComponents.results.txt +++ b/idea/testData/findUsages/kotlin/conventions/components/dataClassInsideDataClass.DisabledComponents.results.txt @@ -1 +1 @@ -Value read 14 val (x, y, z) = a +Value read 15 val (x, y, z) = a \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/conventions/components/dataClassInsideDataClass.results.txt b/idea/testData/findUsages/kotlin/conventions/components/dataClassInsideDataClass.results.txt index 609852519cc..5914ef3eb03 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/dataClassInsideDataClass.results.txt +++ b/idea/testData/findUsages/kotlin/conventions/components/dataClassInsideDataClass.results.txt @@ -1,2 +1,2 @@ -Value read 14 val (x, y, z) = a -Value read 17 val (x1, y1, z1) = a1 +Value read 15 val (x, y, z) = a +Value read 18 val (x1, y1, z1) = a1 \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/conventions/components/for.0.kt b/idea/testData/findUsages/kotlin/conventions/components/for.0.kt index 1f8fecc4c07..b3fd3d9c14f 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/for.0.kt +++ b/idea/testData/findUsages/kotlin/conventions/components/for.0.kt @@ -1,5 +1,6 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtParameter // OPTIONS: usages +// FIR_IGNORE data class A(val n: Int, val s: String, val o: Any) { diff --git a/idea/testData/findUsages/kotlin/conventions/components/for.results.txt b/idea/testData/findUsages/kotlin/conventions/components/for.results.txt index f8b918eb677..a5135ac314e 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/for.results.txt +++ b/idea/testData/findUsages/kotlin/conventions/components/for.results.txt @@ -1,2 +1,2 @@ -Value read 11 val (x, y) = a -Value read 7 for ((x, y, z) in arrayOf()) { +Value read 12 val (x, y) = a +Value read 8 for ((x, y, z) in arrayOf()) { \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/conventions/components/isAndAs.0.kt b/idea/testData/findUsages/kotlin/conventions/components/isAndAs.0.kt index da93535cc5c..9009348a28a 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/isAndAs.0.kt +++ b/idea/testData/findUsages/kotlin/conventions/components/isAndAs.0.kt @@ -1,5 +1,6 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtParameter // OPTIONS: usages +// FIR_IGNORE data class A(val x: Int, val y: Int) diff --git a/idea/testData/findUsages/kotlin/conventions/components/isAndAs.DisabledComponents.results.txt b/idea/testData/findUsages/kotlin/conventions/components/isAndAs.DisabledComponents.results.txt index 205c233931c..69570935fcc 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/isAndAs.DisabledComponents.results.txt +++ b/idea/testData/findUsages/kotlin/conventions/components/isAndAs.DisabledComponents.results.txt @@ -1,2 +1,2 @@ -Value read 15 val (x, y) = list[0] -Value read 8 val (x, y) = o +Value read 16 val (x, y) = list[0] +Value read 9 val (x, y) = o \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/conventions/components/isAndAs.results.txt b/idea/testData/findUsages/kotlin/conventions/components/isAndAs.results.txt index 24471fd146e..4ec53e72927 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/isAndAs.results.txt +++ b/idea/testData/findUsages/kotlin/conventions/components/isAndAs.results.txt @@ -1,3 +1,3 @@ -Value read 15 val (x, y) = list[0] -Value read 8 val (x, y) = o -Value read 9 val (x1, y1) = A(1, "", "") +Value read 10 val (x1, y1) = A(1, "", "") +Value read 16 val (x, y) = list[0] +Value read 9 val (x, y) = o \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/conventions/components/lambdas.0.kt b/idea/testData/findUsages/kotlin/conventions/components/lambdas.0.kt index 20d179e34a1..3ca4332cb18 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/lambdas.0.kt +++ b/idea/testData/findUsages/kotlin/conventions/components/lambdas.0.kt @@ -1,5 +1,6 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtParameter // OPTIONS: usages +// FIR_IGNORE data class A(val a: Int, val b: Int) diff --git a/idea/testData/findUsages/kotlin/conventions/components/lambdas.DisabledComponents.results.txt b/idea/testData/findUsages/kotlin/conventions/components/lambdas.DisabledComponents.results.txt index 12163fddfba..480c0684b09 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/lambdas.DisabledComponents.results.txt +++ b/idea/testData/findUsages/kotlin/conventions/components/lambdas.DisabledComponents.results.txt @@ -1 +1 @@ -Value read 28 takeFun2 { a, n -> val (x, y) = a!! } +Value read 29 takeFun2 { a, n -> val (x, y) = a!! } \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/conventions/components/lambdas.results.txt b/idea/testData/findUsages/kotlin/conventions/components/lambdas.results.txt index 727ae9b3a12..e2a46fa1bcf 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/lambdas.results.txt +++ b/idea/testData/findUsages/kotlin/conventions/components/lambdas.results.txt @@ -1,8 +1,8 @@ -Value read 19 p[0] = { val (x, y) = it } -Value read 25 takeExtFun { val (x, y) = this } -Value read 27 takeFun1 { val (x, y) = it } -Value read 28 takeFun2 { a, n -> val (x, y) = a!! } -Value read 29 takeFun3 { val (x, y) = it[0] } -Value read 31 x(p) { val (x, y) = it } -Value read 32 x(p, fun (p) { val (x, y) = p }) -Value read 40 "".v = { val (x, y ) = it } \ No newline at end of file +Value read 20 p[0] = { val (x, y) = it } +Value read 26 takeExtFun { val (x, y) = this } +Value read 28 takeFun1 { val (x, y) = it } +Value read 29 takeFun2 { a, n -> val (x, y) = a!! } +Value read 30 takeFun3 { val (x, y) = it[0] } +Value read 32 x(p) { val (x, y) = it } +Value read 33 x(p, fun (p) { val (x, y) = p }) +Value read 41 "".v = { val (x, y ) = it } \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/conventions/components/mayTypeAffectAncestors.0.kt b/idea/testData/findUsages/kotlin/conventions/components/mayTypeAffectAncestors.0.kt index 853ac91eb0a..7341d0c5bd4 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/mayTypeAffectAncestors.0.kt +++ b/idea/testData/findUsages/kotlin/conventions/components/mayTypeAffectAncestors.0.kt @@ -1,5 +1,6 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtParameter // OPTIONS: usages +// FIR_IGNORE data class A(val n: Int, val s: String) diff --git a/idea/testData/findUsages/kotlin/conventions/components/mayTypeAffectAncestors.results.txt b/idea/testData/findUsages/kotlin/conventions/components/mayTypeAffectAncestors.results.txt index db6050293f0..2c02b0c22c7 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/mayTypeAffectAncestors.results.txt +++ b/idea/testData/findUsages/kotlin/conventions/components/mayTypeAffectAncestors.results.txt @@ -1,2 +1,2 @@ -Value read 19 val (x1, y1) = if (b) { -Value read 20 A(1, "").apply { val (x2, y2) = this } \ No newline at end of file +Value read 20 val (x1, y1) = if (b) { +Value read 21 A(1, "").apply { val (x2, y2) = this } \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/conventions/components/operators.0.kt b/idea/testData/findUsages/kotlin/conventions/components/operators.0.kt index e891ee61110..327b0e469a7 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/operators.0.kt +++ b/idea/testData/findUsages/kotlin/conventions/components/operators.0.kt @@ -1,5 +1,6 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtParameter // OPTIONS: usages +// FIR_IGNORE data class A(val x: Int, val y: Int) { fun f() { diff --git a/idea/testData/findUsages/kotlin/conventions/components/operators.DisabledComponents.results.txt b/idea/testData/findUsages/kotlin/conventions/components/operators.DisabledComponents.results.txt index 1eada25f8fa..4f0182f334e 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/operators.DisabledComponents.results.txt +++ b/idea/testData/findUsages/kotlin/conventions/components/operators.DisabledComponents.results.txt @@ -1,2 +1,2 @@ -Value read 15 val (x, y) = b1 + b2 -Value read 6 val (x, y) = this +Value read 16 val (x, y) = b1 + b2 +Value read 7 val (x, y) = this \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/conventions/components/operators.results.txt b/idea/testData/findUsages/kotlin/conventions/components/operators.results.txt index 2bd789b1d65..4f0182f334e 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/operators.results.txt +++ b/idea/testData/findUsages/kotlin/conventions/components/operators.results.txt @@ -1,2 +1,2 @@ -Value read 15 val (x, y) = b1 + b2 -Value read 6 val (x, y) = this \ No newline at end of file +Value read 16 val (x, y) = b1 + b2 +Value read 7 val (x, y) = this \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/conventions/components/recursiveDataClass1.0.kt b/idea/testData/findUsages/kotlin/conventions/components/recursiveDataClass1.0.kt index 8dafb5970e7..46a19fdb756 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/recursiveDataClass1.0.kt +++ b/idea/testData/findUsages/kotlin/conventions/components/recursiveDataClass1.0.kt @@ -1,6 +1,6 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtParameter // OPTIONS: usages - +// FIR_COMPARISON data class A(val a: A?, val n: Int) fun f(a: A) { diff --git a/idea/testData/findUsages/kotlin/conventions/components/recursiveDataClass2.0.kt b/idea/testData/findUsages/kotlin/conventions/components/recursiveDataClass2.0.kt index 3c88c168545..349a51333fe 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/recursiveDataClass2.0.kt +++ b/idea/testData/findUsages/kotlin/conventions/components/recursiveDataClass2.0.kt @@ -1,5 +1,6 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtParameter // OPTIONS: usages +// FIR_IGNORE data class A(val b: B, val n: Int) data class B(val a: A?, val s: String) diff --git a/idea/testData/findUsages/kotlin/conventions/components/recursiveDataClass2.DisabledComponents.results.txt b/idea/testData/findUsages/kotlin/conventions/components/recursiveDataClass2.DisabledComponents.results.txt index 4d72f220479..f2a4014f430 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/recursiveDataClass2.DisabledComponents.results.txt +++ b/idea/testData/findUsages/kotlin/conventions/components/recursiveDataClass2.DisabledComponents.results.txt @@ -1 +1 @@ -Value read 8 val (b, n) = a +Value read 9 val (b, n) = a \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/conventions/components/recursiveDataClass2.results.txt b/idea/testData/findUsages/kotlin/conventions/components/recursiveDataClass2.results.txt index 4d72f220479..f2a4014f430 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/recursiveDataClass2.results.txt +++ b/idea/testData/findUsages/kotlin/conventions/components/recursiveDataClass2.results.txt @@ -1 +1 @@ -Value read 8 val (b, n) = a +Value read 9 val (b, n) = a \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/conventions/components/when.0.kt b/idea/testData/findUsages/kotlin/conventions/components/when.0.kt index e823e58db0f..245dab4f910 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/when.0.kt +++ b/idea/testData/findUsages/kotlin/conventions/components/when.0.kt @@ -1,5 +1,6 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtParameter // OPTIONS: usages +// FIR_IGNORE data class A(val a: Int, val b: Int) diff --git a/idea/testData/findUsages/kotlin/conventions/components/when.results.txt b/idea/testData/findUsages/kotlin/conventions/components/when.results.txt index 4b9f6c2920b..67fc46c2eb6 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/when.results.txt +++ b/idea/testData/findUsages/kotlin/conventions/components/when.results.txt @@ -1,2 +1,2 @@ -Value read 23 val (x, y) = o -Value read 9 val (x, y) = o +Value read 10 val (x, y) = o +Value read 24 val (x, y) = o \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/findClassUsages/kotlinClassAllUsages3.0.kt b/idea/testData/findUsages/kotlin/findClassUsages/kotlinClassAllUsages3.0.kt index 9fe85fab996..3e0c6e6e7f9 100644 --- a/idea/testData/findUsages/kotlin/findClassUsages/kotlinClassAllUsages3.0.kt +++ b/idea/testData/findUsages/kotlin/findClassUsages/kotlinClassAllUsages3.0.kt @@ -1,5 +1,7 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtClass // OPTIONS: usages, constructorUsages +// FIR_COMPARISON + package server data class Data diff --git a/idea/testData/findUsages/kotlin/findClassUsages/kotlinClassAllUsagesNoImport.0.kt b/idea/testData/findUsages/kotlin/findClassUsages/kotlinClassAllUsagesNoImport.0.kt index 9c6119d076d..18f76ae9575 100644 --- a/idea/testData/findUsages/kotlin/findClassUsages/kotlinClassAllUsagesNoImport.0.kt +++ b/idea/testData/findUsages/kotlin/findClassUsages/kotlinClassAllUsagesNoImport.0.kt @@ -1,5 +1,7 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtClass // OPTIONS: usages, constructorUsages, skipImports +// FIR_COMPARISON + package server open class Server { diff --git a/idea/testData/findUsages/kotlin/findClassUsages/kotlinClassFunctionUsages1.0.kt b/idea/testData/findUsages/kotlin/findClassUsages/kotlinClassFunctionUsages1.0.kt index 17a9cd7cc20..a5ce1368fe5 100644 --- a/idea/testData/findUsages/kotlin/findClassUsages/kotlinClassFunctionUsages1.0.kt +++ b/idea/testData/findUsages/kotlin/findClassUsages/kotlinClassFunctionUsages1.0.kt @@ -1,5 +1,7 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtClass // OPTIONS: functionUsages +// FIR_COMPARISON + interface X { val a: String get() { diff --git a/idea/testData/findUsages/kotlin/findClassUsages/kotlinClassFunctionUsages2.0.kt b/idea/testData/findUsages/kotlin/findClassUsages/kotlinClassFunctionUsages2.0.kt index 873c0431a26..12a7d80bb70 100644 --- a/idea/testData/findUsages/kotlin/findClassUsages/kotlinClassFunctionUsages2.0.kt +++ b/idea/testData/findUsages/kotlin/findClassUsages/kotlinClassFunctionUsages2.0.kt @@ -1,5 +1,7 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtClass // OPTIONS: functionUsages +// FIR_COMPARISON + interface X { val a: String get() { diff --git a/idea/testData/findUsages/kotlin/findClassUsages/kotlinClassPropertyUsages1.0.kt b/idea/testData/findUsages/kotlin/findClassUsages/kotlinClassPropertyUsages1.0.kt index 263e25b2b1b..288fc667b85 100644 --- a/idea/testData/findUsages/kotlin/findClassUsages/kotlinClassPropertyUsages1.0.kt +++ b/idea/testData/findUsages/kotlin/findClassUsages/kotlinClassPropertyUsages1.0.kt @@ -1,5 +1,7 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtClass // OPTIONS: propertyUsages +// FIR_COMPARISON + interface X { val a: String get() { diff --git a/idea/testData/findUsages/kotlin/findClassUsages/kotlinClassPropertyUsages2.0.kt b/idea/testData/findUsages/kotlin/findClassUsages/kotlinClassPropertyUsages2.0.kt index 730da298eb9..1e37ad183c6 100644 --- a/idea/testData/findUsages/kotlin/findClassUsages/kotlinClassPropertyUsages2.0.kt +++ b/idea/testData/findUsages/kotlin/findClassUsages/kotlinClassPropertyUsages2.0.kt @@ -1,5 +1,7 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtClass // OPTIONS: propertyUsages +// FIR_COMPARISON + interface X { val a: String get() { diff --git a/idea/testData/findUsages/kotlin/findClassUsages/kotlinLocalClassUsages1.0.kt b/idea/testData/findUsages/kotlin/findClassUsages/kotlinLocalClassUsages1.0.kt index 9c92a39e260..8efd5f43491 100644 --- a/idea/testData/findUsages/kotlin/findClassUsages/kotlinLocalClassUsages1.0.kt +++ b/idea/testData/findUsages/kotlin/findClassUsages/kotlinLocalClassUsages1.0.kt @@ -1,5 +1,7 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtClass // OPTIONS: usages, constructorUsages +// FIR_IGNORE + fun foo(): Any { class Bar diff --git a/idea/testData/findUsages/kotlin/findClassUsages/kotlinLocalClassUsages1.results.txt b/idea/testData/findUsages/kotlin/findClassUsages/kotlinLocalClassUsages1.results.txt index c9d2d90f356..690d15fb418 100644 --- a/idea/testData/findUsages/kotlin/findClassUsages/kotlinLocalClassUsages1.results.txt +++ b/idea/testData/findUsages/kotlin/findClassUsages/kotlinLocalClassUsages1.results.txt @@ -1 +1 @@ -New instance creation 6 return Bar() +New instance creation 8 return Bar() \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/findClassUsages/kotlinLocalClassUsages2.0.kt b/idea/testData/findUsages/kotlin/findClassUsages/kotlinLocalClassUsages2.0.kt index 17b07f01aa9..c74dbf58bf0 100644 --- a/idea/testData/findUsages/kotlin/findClassUsages/kotlinLocalClassUsages2.0.kt +++ b/idea/testData/findUsages/kotlin/findClassUsages/kotlinLocalClassUsages2.0.kt @@ -1,5 +1,7 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtClass // OPTIONS: usages, constructorUsages +// FIR_IGNORE + fun foo(): Any { if (false) { class Bar diff --git a/idea/testData/findUsages/kotlin/findClassUsages/kotlinLocalClassUsages2.results.txt b/idea/testData/findUsages/kotlin/findClassUsages/kotlinLocalClassUsages2.results.txt index 52865405118..d913261493b 100644 --- a/idea/testData/findUsages/kotlin/findClassUsages/kotlinLocalClassUsages2.results.txt +++ b/idea/testData/findUsages/kotlin/findClassUsages/kotlinLocalClassUsages2.results.txt @@ -1 +1 @@ -New instance creation 7 return Bar() +New instance creation 9 return Bar() \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/findClassUsages/kotlinPrivateClassUsages.0.kt b/idea/testData/findUsages/kotlin/findClassUsages/kotlinPrivateClassUsages.0.kt index cb0e5e9ee17..5977bcfefe6 100644 --- a/idea/testData/findUsages/kotlin/findClassUsages/kotlinPrivateClassUsages.0.kt +++ b/idea/testData/findUsages/kotlin/findClassUsages/kotlinPrivateClassUsages.0.kt @@ -1,5 +1,7 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtClass // OPTIONS: usages, constructorUsages +// FIR_IGNORE + package server public open class Server() { diff --git a/idea/testData/findUsages/kotlin/findClassUsages/kotlinPrivateClassUsages.results.txt b/idea/testData/findUsages/kotlin/findClassUsages/kotlinPrivateClassUsages.results.txt index 4378695e2b1..2dcd4a59286 100644 --- a/idea/testData/findUsages/kotlin/findClassUsages/kotlinPrivateClassUsages.results.txt +++ b/idea/testData/findUsages/kotlin/findClassUsages/kotlinPrivateClassUsages.results.txt @@ -1 +1 @@ -New instance creation 10 open fun processRequest() = Foo() +New instance creation 12 open fun processRequest() = Foo() \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/findClassUsages/localAndNonLocalClass.0.kt b/idea/testData/findUsages/kotlin/findClassUsages/localAndNonLocalClass.0.kt index 31575b8bdc5..c54e961b28a 100644 --- a/idea/testData/findUsages/kotlin/findClassUsages/localAndNonLocalClass.0.kt +++ b/idea/testData/findUsages/kotlin/findClassUsages/localAndNonLocalClass.0.kt @@ -1,5 +1,7 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtClass // OPTIONS: usages, constructorUsages +// FIR_IGNORE + class C { init { println("global") diff --git a/idea/testData/findUsages/kotlin/findClassUsages/localAndNonLocalClass.results.txt b/idea/testData/findUsages/kotlin/findClassUsages/localAndNonLocalClass.results.txt index 6a1a096c590..8f364b443bd 100644 --- a/idea/testData/findUsages/kotlin/findClassUsages/localAndNonLocalClass.results.txt +++ b/idea/testData/findUsages/kotlin/findClassUsages/localAndNonLocalClass.results.txt @@ -1 +1 @@ -New instance creation 10 C() +New instance creation 12 C() \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/findClassUsages/usageInTypeAlias.0.kt b/idea/testData/findUsages/kotlin/findClassUsages/usageInTypeAlias.0.kt index c3f123860fc..867c2d0e82a 100644 --- a/idea/testData/findUsages/kotlin/findClassUsages/usageInTypeAlias.0.kt +++ b/idea/testData/findUsages/kotlin/findClassUsages/usageInTypeAlias.0.kt @@ -1,5 +1,7 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtClass // OPTIONS: usages +// FIR_IGNORE + class A typealias B = A \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/findClassUsages/usageInTypeAlias.results.txt b/idea/testData/findUsages/kotlin/findClassUsages/usageInTypeAlias.results.txt index 3acfd13b01c..a418894f7f0 100644 --- a/idea/testData/findUsages/kotlin/findClassUsages/usageInTypeAlias.results.txt +++ b/idea/testData/findUsages/kotlin/findClassUsages/usageInTypeAlias.results.txt @@ -1 +1 @@ -Type alias 5 typealias B = A \ No newline at end of file +Type alias 7 typealias B = A \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/findFunctionUsages/functionUsedInPlainText.0.kt b/idea/testData/findUsages/kotlin/findFunctionUsages/functionUsedInPlainText.0.kt index a9cf129750f..9f5e427d31f 100644 --- a/idea/testData/findUsages/kotlin/findFunctionUsages/functionUsedInPlainText.0.kt +++ b/idea/testData/findUsages/kotlin/findFunctionUsages/functionUsedInPlainText.0.kt @@ -1,5 +1,7 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction // OPTIONS: textOccurrences +// FIR_COMPARISON + package test class Foo { diff --git a/idea/testData/findUsages/kotlin/findFunctionUsages/kotlinAliasedMethodUsages.0.kt b/idea/testData/findUsages/kotlin/findFunctionUsages/kotlinAliasedMethodUsages.0.kt index b18a55be6ff..0e3d17641cf 100644 --- a/idea/testData/findUsages/kotlin/findFunctionUsages/kotlinAliasedMethodUsages.0.kt +++ b/idea/testData/findUsages/kotlin/findFunctionUsages/kotlinAliasedMethodUsages.0.kt @@ -1,5 +1,7 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction // OPTIONS: usages +// FIR_COMPARISON + package server fun processRequest() = "foo" diff --git a/idea/testData/findUsages/kotlin/findFunctionUsages/kotlinLocalMethodUsages1.0.kt b/idea/testData/findUsages/kotlin/findFunctionUsages/kotlinLocalMethodUsages1.0.kt index bf38a8062c3..bff59dde5d6 100644 --- a/idea/testData/findUsages/kotlin/findFunctionUsages/kotlinLocalMethodUsages1.0.kt +++ b/idea/testData/findUsages/kotlin/findFunctionUsages/kotlinLocalMethodUsages1.0.kt @@ -1,5 +1,7 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction // OPTIONS: usages +// FIR_IGNORE + fun foo() { fun bar() { diff --git a/idea/testData/findUsages/kotlin/findFunctionUsages/kotlinLocalMethodUsages1.results.txt b/idea/testData/findUsages/kotlin/findFunctionUsages/kotlinLocalMethodUsages1.results.txt index d556a995ee2..b7290564000 100644 --- a/idea/testData/findUsages/kotlin/findFunctionUsages/kotlinLocalMethodUsages1.results.txt +++ b/idea/testData/findUsages/kotlin/findFunctionUsages/kotlinLocalMethodUsages1.results.txt @@ -1 +1 @@ -Function call 8 bar() +Function call 10 bar() \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/findFunctionUsages/kotlinLocalMethodUsages2.0.kt b/idea/testData/findUsages/kotlin/findFunctionUsages/kotlinLocalMethodUsages2.0.kt index 48a0f547341..31af2cebcd6 100644 --- a/idea/testData/findUsages/kotlin/findFunctionUsages/kotlinLocalMethodUsages2.0.kt +++ b/idea/testData/findUsages/kotlin/findFunctionUsages/kotlinLocalMethodUsages2.0.kt @@ -1,5 +1,7 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction // OPTIONS: usages +// FIR_IGNORE + fun foo() { if (true) { fun bar() { diff --git a/idea/testData/findUsages/kotlin/findFunctionUsages/kotlinLocalMethodUsages2.results.txt b/idea/testData/findUsages/kotlin/findFunctionUsages/kotlinLocalMethodUsages2.results.txt index 034575b3312..fb72394e98e 100644 --- a/idea/testData/findUsages/kotlin/findFunctionUsages/kotlinLocalMethodUsages2.results.txt +++ b/idea/testData/findUsages/kotlin/findFunctionUsages/kotlinLocalMethodUsages2.results.txt @@ -1 +1 @@ -Function call 9 bar() +Function call 11 bar() \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/findFunctionUsages/kotlinMethodsAliasedUsages.0.kt b/idea/testData/findUsages/kotlin/findFunctionUsages/kotlinMethodsAliasedUsages.0.kt index b33d2cdfade..667e49e84c2 100644 --- a/idea/testData/findUsages/kotlin/findFunctionUsages/kotlinMethodsAliasedUsages.0.kt +++ b/idea/testData/findUsages/kotlin/findFunctionUsages/kotlinMethodsAliasedUsages.0.kt @@ -1,6 +1,7 @@ // IGNORE: see KotlinFindUsagesHandlerFactory: it is ambiguous case: ImportAlias does not have any reference to be resolved // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtImportAlias // OPTIONS: usages +// FIR_COMPARISON package c diff --git a/idea/testData/findUsages/kotlin/findFunctionUsages/kotlinOverloadAndExtensionUsages.0.kt b/idea/testData/findUsages/kotlin/findFunctionUsages/kotlinOverloadAndExtensionUsages.0.kt index a7963f85d91..7e2c7585e31 100644 --- a/idea/testData/findUsages/kotlin/findFunctionUsages/kotlinOverloadAndExtensionUsages.0.kt +++ b/idea/testData/findUsages/kotlin/findFunctionUsages/kotlinOverloadAndExtensionUsages.0.kt @@ -1,5 +1,7 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction // OPTIONS: overloadUsages +// FIR_IGNORE + interface X { } diff --git a/idea/testData/findUsages/kotlin/findFunctionUsages/kotlinOverloadAndExtensionUsages.results.txt b/idea/testData/findUsages/kotlin/findFunctionUsages/kotlinOverloadAndExtensionUsages.results.txt index ee51ac2ceb0..b0eb538959f 100644 --- a/idea/testData/findUsages/kotlin/findFunctionUsages/kotlinOverloadAndExtensionUsages.results.txt +++ b/idea/testData/findUsages/kotlin/findFunctionUsages/kotlinOverloadAndExtensionUsages.results.txt @@ -1,7 +1,7 @@ -[kotlinOverloadAndExtensionUsages.0.kt] Function call 11 x.foo(1, 2) -[kotlinOverloadAndExtensionUsages.0.kt] Function call 25 foo(t) -[kotlinOverloadAndExtensionUsages.0.kt] Function call 30 a.foo(1, "") -[kotlinOverloadAndExtensionUsages.0.kt] Function call 35 foo(t) -[kotlinOverloadAndExtensionUsages.0.kt] Function call 39 foo(s) +[kotlinOverloadAndExtensionUsages.0.kt] Function call 13 x.foo(1, 2) +[kotlinOverloadAndExtensionUsages.0.kt] Function call 27 foo(t) +[kotlinOverloadAndExtensionUsages.0.kt] Function call 32 a.foo(1, "") +[kotlinOverloadAndExtensionUsages.0.kt] Function call 37 foo(t) +[kotlinOverloadAndExtensionUsages.0.kt] Function call 41 foo(s) [kotlinOverloadAndExtensionUsages.1.kt] Function call 11 a.foo(0, "") [kotlinOverloadAndExtensionUsages.1.kt] Function call 3 super.foo(t) diff --git a/idea/testData/findUsages/kotlin/findFunctionUsages/kotlinPrivateMethodUsages.0.kt b/idea/testData/findUsages/kotlin/findFunctionUsages/kotlinPrivateMethodUsages.0.kt index 6fc889dad19..f17a2b57afd 100644 --- a/idea/testData/findUsages/kotlin/findFunctionUsages/kotlinPrivateMethodUsages.0.kt +++ b/idea/testData/findUsages/kotlin/findFunctionUsages/kotlinPrivateMethodUsages.0.kt @@ -1,5 +1,7 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction // OPTIONS: usages +// FIR_IGNORE + package server public open class Server() { diff --git a/idea/testData/findUsages/kotlin/findFunctionUsages/kotlinPrivateMethodUsages.results.txt b/idea/testData/findUsages/kotlin/findFunctionUsages/kotlinPrivateMethodUsages.results.txt index 3de7eba2bf8..b1d8b01af99 100644 --- a/idea/testData/findUsages/kotlin/findFunctionUsages/kotlinPrivateMethodUsages.results.txt +++ b/idea/testData/findUsages/kotlin/findFunctionUsages/kotlinPrivateMethodUsages.results.txt @@ -1 +1 @@ -Function call 8 open fun processRequest() = doProcessRequest() \ No newline at end of file +Function call 10 open fun processRequest() = doProcessRequest() \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/findFunctionUsages/kotlinTopLevelMethodUsagesNoImport.0.kt b/idea/testData/findUsages/kotlin/findFunctionUsages/kotlinTopLevelMethodUsagesNoImport.0.kt index ca8312dda85..904bf0bd7d8 100644 --- a/idea/testData/findUsages/kotlin/findFunctionUsages/kotlinTopLevelMethodUsagesNoImport.0.kt +++ b/idea/testData/findUsages/kotlin/findFunctionUsages/kotlinTopLevelMethodUsagesNoImport.0.kt @@ -1,5 +1,7 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction // OPTIONS: usages, skipImports +// FIR_COMPARISON + package server fun processRequest() = "foo" diff --git a/idea/testData/findUsages/kotlin/findFunctionUsages/localClassMember.0.kt b/idea/testData/findUsages/kotlin/findFunctionUsages/localClassMember.0.kt index da88c77b032..7dfaaf5ee76 100644 --- a/idea/testData/findUsages/kotlin/findFunctionUsages/localClassMember.0.kt +++ b/idea/testData/findUsages/kotlin/findFunctionUsages/localClassMember.0.kt @@ -1,5 +1,7 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction // OPTIONS: usages +// FIR_IGNORE + package anonymousUnused fun main(args: Array) { diff --git a/idea/testData/findUsages/kotlin/findFunctionUsages/localClassMember.results.txt b/idea/testData/findUsages/kotlin/findFunctionUsages/localClassMember.results.txt index 6ad941c7f7d..b038f6aeca1 100644 --- a/idea/testData/findUsages/kotlin/findFunctionUsages/localClassMember.results.txt +++ b/idea/testData/findUsages/kotlin/findFunctionUsages/localClassMember.results.txt @@ -1 +1 @@ -Function call 11 LocalClass().f() +Function call 13 LocalClass().f() \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionDeepMember.0.kt b/idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionDeepMember.0.kt index 328c450adb4..1dd5b65c282 100644 --- a/idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionDeepMember.0.kt +++ b/idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionDeepMember.0.kt @@ -1,5 +1,7 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtProperty // OPTIONS: usages +// FIR_IGNORE + package anonymousUnused fun main(args: Array) { diff --git a/idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionDeepMember.results.txt b/idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionDeepMember.results.txt index 267a51de14c..f9566cef68f 100644 --- a/idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionDeepMember.results.txt +++ b/idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionDeepMember.results.txt @@ -1 +1 @@ -Value read 14 a.b.c.d +Value read 16 a.b.c.d \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionMember.0.kt b/idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionMember.0.kt index 3a137a48d9f..25a900cd538 100644 --- a/idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionMember.0.kt +++ b/idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionMember.0.kt @@ -1,5 +1,7 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction // OPTIONS: usages +// FIR_IGNORE + package anonymousUnused fun main(args: Array) { diff --git a/idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionMember.results.txt b/idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionMember.results.txt index f85574d82a1..36f89ba9bee 100644 --- a/idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionMember.results.txt +++ b/idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionMember.results.txt @@ -1 +1 @@ -Function call 11 localObject.f() +Function call 13 localObject.f() \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionMember2.0.kt b/idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionMember2.0.kt index d844354bd4d..e27a4dfa9a4 100644 --- a/idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionMember2.0.kt +++ b/idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionMember2.0.kt @@ -1,5 +1,7 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction // OPTIONS: usages +// FIR_IGNORE + package anonymousUnused fun main(args: Array) { diff --git a/idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionMember2.results.txt b/idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionMember2.results.txt index 850f2bed9f0..e9f42a599b7 100644 --- a/idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionMember2.results.txt +++ b/idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionMember2.results.txt @@ -1 +1 @@ -Function call 11 localObject().f() +Function call 13 localObject().f() \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionMemberInClass.0.kt b/idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionMemberInClass.0.kt index d675c8742b9..c5ce4bb6237 100644 --- a/idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionMemberInClass.0.kt +++ b/idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionMemberInClass.0.kt @@ -1,5 +1,7 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction // OPTIONS: usages +// FIR_IGNORE + class Foo { private val localObject = object : Any() { fun f() { diff --git a/idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionMemberInClass.results.txt b/idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionMemberInClass.results.txt index 9ebf98c0309..5c7000d36af 100644 --- a/idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionMemberInClass.results.txt +++ b/idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionMemberInClass.results.txt @@ -1 +1 @@ -Function call 10 localObject.f() +Function call 12 localObject.f() \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionMemberInCompanion.0.kt b/idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionMemberInCompanion.0.kt index 45741d7a903..6ce1c251e06 100644 --- a/idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionMemberInCompanion.0.kt +++ b/idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionMemberInCompanion.0.kt @@ -1,5 +1,7 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction // OPTIONS: usages +// FIR_IGNORE + class Foo { companion object { private val localObject = object : Any() { diff --git a/idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionMemberInCompanion.results.txt b/idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionMemberInCompanion.results.txt index b078e345293..ec634380e65 100644 --- a/idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionMemberInCompanion.results.txt +++ b/idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionMemberInCompanion.results.txt @@ -1 +1 @@ -Function call 12 localObject.f() +Function call 14 localObject.f() \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionMemberInTopLevel.0.kt b/idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionMemberInTopLevel.0.kt index b9e831784b4..030d6f43768 100644 --- a/idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionMemberInTopLevel.0.kt +++ b/idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionMemberInTopLevel.0.kt @@ -1,5 +1,7 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction // OPTIONS: usages +// FIR_IGNORE + private val localObject = object : Any() { fun f() { } diff --git a/idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionMemberInTopLevel.results.txt b/idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionMemberInTopLevel.results.txt index 9ebf98c0309..5c7000d36af 100644 --- a/idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionMemberInTopLevel.results.txt +++ b/idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionMemberInTopLevel.results.txt @@ -1 +1 @@ -Function call 10 localObject.f() +Function call 12 localObject.f() \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/findObjectUsages/kotlinImportedObjectUsages.0.kt b/idea/testData/findUsages/kotlin/findObjectUsages/kotlinImportedObjectUsages.0.kt index 8d7752b74ed..78698ede455 100644 --- a/idea/testData/findUsages/kotlin/findObjectUsages/kotlinImportedObjectUsages.0.kt +++ b/idea/testData/findUsages/kotlin/findObjectUsages/kotlinImportedObjectUsages.0.kt @@ -1,4 +1,6 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtObjectDeclaration +// FIR_IGNORE + import Imported as Alias object Imported diff --git a/idea/testData/findUsages/kotlin/findObjectUsages/kotlinImportedObjectUsages.results.txt b/idea/testData/findUsages/kotlin/findObjectUsages/kotlinImportedObjectUsages.results.txt index b3beb91925b..1b8b5b208eb 100644 --- a/idea/testData/findUsages/kotlin/findObjectUsages/kotlinImportedObjectUsages.results.txt +++ b/idea/testData/findUsages/kotlin/findObjectUsages/kotlinImportedObjectUsages.results.txt @@ -1 +1 @@ -Usage in import 2 import Imported as Alias +Usage in import 4 import Imported as Alias \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/findObjectUsages/kotlinObjectUsages.0.kt b/idea/testData/findUsages/kotlin/findObjectUsages/kotlinObjectUsages.0.kt index b8bec636e17..88516991946 100644 --- a/idea/testData/findUsages/kotlin/findObjectUsages/kotlinObjectUsages.0.kt +++ b/idea/testData/findUsages/kotlin/findObjectUsages/kotlinObjectUsages.0.kt @@ -1,4 +1,6 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtObjectDeclaration +// FIR_COMPARISON + package server object O { diff --git a/idea/testData/findUsages/kotlin/findObjectUsages/kotlinPrivateObjectUsages.0.kt b/idea/testData/findUsages/kotlin/findObjectUsages/kotlinPrivateObjectUsages.0.kt index cf9f5683d91..4df5126c072 100644 --- a/idea/testData/findUsages/kotlin/findObjectUsages/kotlinPrivateObjectUsages.0.kt +++ b/idea/testData/findUsages/kotlin/findObjectUsages/kotlinPrivateObjectUsages.0.kt @@ -1,5 +1,7 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtObjectDeclaration // OPTIONS: usages +// FIR_IGNORE + package server public open class Server() { diff --git a/idea/testData/findUsages/kotlin/findObjectUsages/kotlinPrivateObjectUsages.results.txt b/idea/testData/findUsages/kotlin/findObjectUsages/kotlinPrivateObjectUsages.results.txt index d6541bcc41d..7d8ae4fc560 100644 --- a/idea/testData/findUsages/kotlin/findObjectUsages/kotlinPrivateObjectUsages.results.txt +++ b/idea/testData/findUsages/kotlin/findObjectUsages/kotlinPrivateObjectUsages.results.txt @@ -1 +1 @@ -Value read 10 open fun processRequest() = Foo +Value read 12 open fun processRequest() = Foo \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/findPrimaryConstructorUsages/missingName.0.kt b/idea/testData/findUsages/kotlin/findPrimaryConstructorUsages/missingName.0.kt index 950506dbc31..66ac5d7c4e6 100644 --- a/idea/testData/findUsages/kotlin/findPrimaryConstructorUsages/missingName.0.kt +++ b/idea/testData/findUsages/kotlin/findPrimaryConstructorUsages/missingName.0.kt @@ -1,5 +1,7 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtPrimaryConstructor // OPTIONS: usages +// FIR_COMPARISON + class () { } \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinLocalPropertyUsages1.0.kt b/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinLocalPropertyUsages1.0.kt index 99455f5fbca..2a7453cb8d4 100644 --- a/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinLocalPropertyUsages1.0.kt +++ b/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinLocalPropertyUsages1.0.kt @@ -1,5 +1,7 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtProperty // OPTIONS: usages +// FIR_IGNORE + fun foo(): String { val bar = "" diff --git a/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinLocalPropertyUsages1.results.txt b/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinLocalPropertyUsages1.results.txt index 4eadbaf9102..847b07cd4ac 100644 --- a/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinLocalPropertyUsages1.results.txt +++ b/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinLocalPropertyUsages1.results.txt @@ -1 +1 @@ -Value read 6 return bar +Value read 8 return bar \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinLocalPropertyUsages2.0.kt b/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinLocalPropertyUsages2.0.kt index 6e01f82cf42..b6506851916 100644 --- a/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinLocalPropertyUsages2.0.kt +++ b/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinLocalPropertyUsages2.0.kt @@ -1,5 +1,7 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtProperty // OPTIONS: usages +// FIR_IGNORE + fun foo(): String { if (true) { val bar = "" diff --git a/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinLocalPropertyUsages2.results.txt b/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinLocalPropertyUsages2.results.txt index 2a38aee1fc2..37dbad7f33c 100644 --- a/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinLocalPropertyUsages2.results.txt +++ b/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinLocalPropertyUsages2.results.txt @@ -1 +1 @@ -Value read 7 return bar +Value read 9 return bar \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPrivatePropertyInClassObjectUsages.0.kt b/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPrivatePropertyInClassObjectUsages.0.kt index b8a9f8a7ffd..62d8b5a69d0 100644 --- a/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPrivatePropertyInClassObjectUsages.0.kt +++ b/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPrivatePropertyInClassObjectUsages.0.kt @@ -1,5 +1,7 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtProperty // OPTIONS: usages +// FIR_IGNORE + class Outer { val x = Outer.t diff --git a/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPrivatePropertyInClassObjectUsages.results.txt b/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPrivatePropertyInClassObjectUsages.results.txt index 179a24f90d2..1579b2e781a 100644 --- a/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPrivatePropertyInClassObjectUsages.results.txt +++ b/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPrivatePropertyInClassObjectUsages.results.txt @@ -1 +1 @@ -Value read 4 val x = Outer.t +Value read 6 val x = Outer.t \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyReadUsages.0.kt b/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyReadUsages.0.kt index ba459fbf2c0..af1fd918b33 100644 --- a/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyReadUsages.0.kt +++ b/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyReadUsages.0.kt @@ -1,5 +1,6 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtProperty // OPTIONS: usages, skipWrite +// FIR_IGNORE package server open class A { diff --git a/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyReadUsages.results.txt b/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyReadUsages.results.txt index 0ed531fe69b..666e41f27e7 100644 --- a/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyReadUsages.results.txt +++ b/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyReadUsages.results.txt @@ -1,3 +1,3 @@ -[kotlinPropertyReadUsages.0.kt] Value read 13 return super.foo +[kotlinPropertyReadUsages.0.kt] Value read 14 return super.foo [kotlinPropertyReadUsages.1.kt] Value read 11 println("b.foo = ${b.foo}") -[kotlinPropertyReadUsages.1.kt] Value read 7 println("a.foo = ${a.foo}") +[kotlinPropertyReadUsages.1.kt] Value read 7 println("a.foo = ${a.foo}") \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyReadUsages2.0.kt b/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyReadUsages2.0.kt index eb59ba4a65d..4c9bb8060a9 100644 --- a/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyReadUsages2.0.kt +++ b/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyReadUsages2.0.kt @@ -1,5 +1,7 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtParameter // OPTIONS: usages, skipWrite +// FIR_IGNORE + package server open class A(open var foo: T) diff --git a/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyReadUsages2.results.txt b/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyReadUsages2.results.txt index 2c5adfee983..ace8461ee6b 100644 --- a/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyReadUsages2.results.txt +++ b/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyReadUsages2.results.txt @@ -1,3 +1,3 @@ -[kotlinPropertyReadUsages2.0.kt] Value read 11 return super.foo +[kotlinPropertyReadUsages2.0.kt] Value read 13 return super.foo [kotlinPropertyReadUsages2.1.kt] Value read 11 println("b.foo = ${b.foo}") [kotlinPropertyReadUsages2.1.kt] Value read 7 println("a.foo = ${a.foo}") diff --git a/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertySameNameAsMethodUsages.0.kt b/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertySameNameAsMethodUsages.0.kt index 11fb57b318c..d909e4419a1 100644 --- a/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertySameNameAsMethodUsages.0.kt +++ b/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertySameNameAsMethodUsages.0.kt @@ -1,5 +1,7 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtProperty // OPTIONS: usages +// FIR_IGNORE + class P interface C { diff --git a/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertySameNameAsMethodUsages.results.txt b/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertySameNameAsMethodUsages.results.txt index f28e5923bc6..8a5f1f9ddcd 100644 --- a/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertySameNameAsMethodUsages.results.txt +++ b/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertySameNameAsMethodUsages.results.txt @@ -1 +1 @@ -Value read 11 println(p) +Value read 13 println(p) \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyUsages.0.kt b/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyUsages.0.kt index a2be0ed3a53..e7118871a82 100644 --- a/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyUsages.0.kt +++ b/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyUsages.0.kt @@ -1,5 +1,6 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtProperty // OPTIONS: usages +// FIR_IGNORE package server open class A { diff --git a/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyUsages.results.txt b/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyUsages.results.txt index 6cfee77e94a..54f9357982b 100644 --- a/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyUsages.results.txt +++ b/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyUsages.results.txt @@ -1,6 +1,6 @@ -[kotlinPropertyUsages.0.kt] Value read 13 return super.foo -[kotlinPropertyUsages.0.kt] Value write 17 super.foo = value +[kotlinPropertyUsages.0.kt] Value read 14 return super.foo +[kotlinPropertyUsages.0.kt] Value write 18 super.foo = value [kotlinPropertyUsages.1.kt] Value read 11 println("b.foo = ${b.foo}") [kotlinPropertyUsages.1.kt] Value read 7 println("a.foo = ${a.foo}") [kotlinPropertyUsages.1.kt] Value write 10 b.foo = "b" -[kotlinPropertyUsages.1.kt] Value write 6 a.foo = "a" +[kotlinPropertyUsages.1.kt] Value write 6 a.foo = "a" \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyUsages2.0.kt b/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyUsages2.0.kt index 04c8a21ec7e..4946a0a33ae 100644 --- a/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyUsages2.0.kt +++ b/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyUsages2.0.kt @@ -1,5 +1,6 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtParameter // OPTIONS: usages +// FIR_IGNORE package server open class A(open var foo: T) diff --git a/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyUsages2.results.txt b/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyUsages2.results.txt index 05c937fb6d5..79ea68733cf 100644 --- a/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyUsages2.results.txt +++ b/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyUsages2.results.txt @@ -1,6 +1,6 @@ -[kotlinPropertyUsages2.0.kt] Value read 11 return super.foo -[kotlinPropertyUsages2.0.kt] Value write 15 super.foo = value +[kotlinPropertyUsages2.0.kt] Value read 12 return super.foo +[kotlinPropertyUsages2.0.kt] Value write 16 super.foo = value [kotlinPropertyUsages2.1.kt] Value read 11 println("b.foo = ${b.foo}") [kotlinPropertyUsages2.1.kt] Value read 7 println("a.foo = ${a.foo}") [kotlinPropertyUsages2.1.kt] Value write 10 b.foo = "b" -[kotlinPropertyUsages2.1.kt] Value write 6 a.foo = "a" +[kotlinPropertyUsages2.1.kt] Value write 6 a.foo = "a" \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyWriteUsages.0.kt b/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyWriteUsages.0.kt index d53b8c00982..94d48e2bfce 100644 --- a/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyWriteUsages.0.kt +++ b/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyWriteUsages.0.kt @@ -1,5 +1,7 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtProperty // OPTIONS: usages, skipRead +// FIR_IGNORE + package server open class A { diff --git a/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyWriteUsages.results.txt b/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyWriteUsages.results.txt index 90a830f663c..aa2d0317744 100644 --- a/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyWriteUsages.results.txt +++ b/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyWriteUsages.results.txt @@ -1,3 +1,3 @@ -[kotlinPropertyWriteUsages.0.kt] Value write 17 super.foo = value +[kotlinPropertyWriteUsages.0.kt] Value write 19 super.foo = value [kotlinPropertyWriteUsages.1.kt] Value write 10 b.foo = "b" -[kotlinPropertyWriteUsages.1.kt] Value write 6 a.foo = "a" +[kotlinPropertyWriteUsages.1.kt] Value write 6 a.foo = "a" \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyWriteUsages2.0.kt b/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyWriteUsages2.0.kt index 02183528b79..c227d2c0f23 100644 --- a/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyWriteUsages2.0.kt +++ b/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyWriteUsages2.0.kt @@ -1,5 +1,7 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtParameter // OPTIONS: usages, skipRead +// FIR_IGNORE + package server open class A(open var foo: T) diff --git a/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyWriteUsages2.results.txt b/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyWriteUsages2.results.txt index 174802c6e7a..5da653efe3d 100644 --- a/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyWriteUsages2.results.txt +++ b/idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyWriteUsages2.results.txt @@ -1,3 +1,3 @@ -[kotlinPropertyWriteUsages2.0.kt] Value write 15 super.foo = value +[kotlinPropertyWriteUsages2.0.kt] Value write 17 super.foo = value [kotlinPropertyWriteUsages2.1.kt] Value write 10 b.foo = "b" -[kotlinPropertyWriteUsages2.1.kt] Value write 6 a.foo = "a" +[kotlinPropertyWriteUsages2.1.kt] Value write 6 a.foo = "a" \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/findWithFilteringImports/findWithFilteringImports.0.kt b/idea/testData/findUsages/kotlin/findWithFilteringImports/findWithFilteringImports.0.kt index 72abe35c21c..fcb1c992d5d 100644 --- a/idea/testData/findUsages/kotlin/findWithFilteringImports/findWithFilteringImports.0.kt +++ b/idea/testData/findUsages/kotlin/findWithFilteringImports/findWithFilteringImports.0.kt @@ -1,6 +1,7 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtClass // FILTERING_RULES: org.jetbrains.kotlin.idea.findUsages.KotlinImportFilteringRule // OPTIONS: usages, constructorUsages +// FIR_COMPARISON package testing diff --git a/idea/testData/findUsages/kotlin/findWithStructuralGrouping/kotlinPropertyUsages.0.kt b/idea/testData/findUsages/kotlin/findWithStructuralGrouping/kotlinPropertyUsages.0.kt index 37e0000d3fc..c85bfe0ea6a 100644 --- a/idea/testData/findUsages/kotlin/findWithStructuralGrouping/kotlinPropertyUsages.0.kt +++ b/idea/testData/findUsages/kotlin/findWithStructuralGrouping/kotlinPropertyUsages.0.kt @@ -1,6 +1,8 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtProperty // GROUPING_RULES: org.jetbrains.kotlin.idea.findUsages.KotlinDeclarationGroupingRule // OPTIONS: usages +// FIR_IGNORE + package server open class A { diff --git a/idea/testData/findUsages/kotlin/findWithStructuralGrouping/kotlinPropertyUsages.results.txt b/idea/testData/findUsages/kotlin/findWithStructuralGrouping/kotlinPropertyUsages.results.txt index 225f4fe05c6..5dd1f09f894 100644 --- a/idea/testData/findUsages/kotlin/findWithStructuralGrouping/kotlinPropertyUsages.results.txt +++ b/idea/testData/findUsages/kotlin/findWithStructuralGrouping/kotlinPropertyUsages.results.txt @@ -1,5 +1,5 @@ -[kotlinPropertyUsages.0.kt] Value read (B) 14 return super.foo -[kotlinPropertyUsages.0.kt] Value write (B) 18 super.foo = value +[kotlinPropertyUsages.0.kt] Value read (B) 16 return super.foo +[kotlinPropertyUsages.0.kt] Value write (B) 20 super.foo = value [kotlinPropertyUsages.1.kt] Value read (Client) 11 println("b.foo = ${b.foo}") [kotlinPropertyUsages.1.kt] Value read (Client) 7 println("a.foo = ${a.foo}") [kotlinPropertyUsages.1.kt] Value write (Client) 10 b.foo = "b" diff --git a/idea/testData/findUsages/kotlin/internal/findFunctionUsages/kotlinOverloadAndExtensionUsages.0.kt b/idea/testData/findUsages/kotlin/internal/findFunctionUsages/kotlinOverloadAndExtensionUsages.0.kt index d62f5084a30..3ffe3b16978 100644 --- a/idea/testData/findUsages/kotlin/internal/findFunctionUsages/kotlinOverloadAndExtensionUsages.0.kt +++ b/idea/testData/findUsages/kotlin/internal/findFunctionUsages/kotlinOverloadAndExtensionUsages.0.kt @@ -1,5 +1,7 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction // OPTIONS: overloadUsages +// FIR_IGNORE + interface X { } diff --git a/idea/testData/findUsages/kotlin/internal/findFunctionUsages/kotlinOverloadAndExtensionUsages.results.txt b/idea/testData/findUsages/kotlin/internal/findFunctionUsages/kotlinOverloadAndExtensionUsages.results.txt index ee51ac2ceb0..2eba7e2ed1b 100644 --- a/idea/testData/findUsages/kotlin/internal/findFunctionUsages/kotlinOverloadAndExtensionUsages.results.txt +++ b/idea/testData/findUsages/kotlin/internal/findFunctionUsages/kotlinOverloadAndExtensionUsages.results.txt @@ -1,7 +1,7 @@ -[kotlinOverloadAndExtensionUsages.0.kt] Function call 11 x.foo(1, 2) -[kotlinOverloadAndExtensionUsages.0.kt] Function call 25 foo(t) -[kotlinOverloadAndExtensionUsages.0.kt] Function call 30 a.foo(1, "") -[kotlinOverloadAndExtensionUsages.0.kt] Function call 35 foo(t) -[kotlinOverloadAndExtensionUsages.0.kt] Function call 39 foo(s) +[kotlinOverloadAndExtensionUsages.0.kt] Function call 13 x.foo(1, 2) +[kotlinOverloadAndExtensionUsages.0.kt] Function call 27 foo(t) +[kotlinOverloadAndExtensionUsages.0.kt] Function call 32 a.foo(1, "") +[kotlinOverloadAndExtensionUsages.0.kt] Function call 37 foo(t) +[kotlinOverloadAndExtensionUsages.0.kt] Function call 41 foo(s) [kotlinOverloadAndExtensionUsages.1.kt] Function call 11 a.foo(0, "") -[kotlinOverloadAndExtensionUsages.1.kt] Function call 3 super.foo(t) +[kotlinOverloadAndExtensionUsages.1.kt] Function call 3 super.foo(t) \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/internal/findFunctionUsages/kotlinTopLevelMethodUsages.0.kt b/idea/testData/findUsages/kotlin/internal/findFunctionUsages/kotlinTopLevelMethodUsages.0.kt index a5b6636d19e..a93c41dff58 100644 --- a/idea/testData/findUsages/kotlin/internal/findFunctionUsages/kotlinTopLevelMethodUsages.0.kt +++ b/idea/testData/findUsages/kotlin/internal/findFunctionUsages/kotlinTopLevelMethodUsages.0.kt @@ -1,5 +1,7 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction // OPTIONS: usages +// FIR_COMPARISON + package server internal fun processRequest() = "foo" diff --git a/idea/testData/findUsages/kotlin/internal/findPropertyUsages/kotlinClassObjectPropertyUsage.0.kt b/idea/testData/findUsages/kotlin/internal/findPropertyUsages/kotlinClassObjectPropertyUsage.0.kt index e8a9ed8d699..c6a36bc700e 100644 --- a/idea/testData/findUsages/kotlin/internal/findPropertyUsages/kotlinClassObjectPropertyUsage.0.kt +++ b/idea/testData/findUsages/kotlin/internal/findPropertyUsages/kotlinClassObjectPropertyUsage.0.kt @@ -1,5 +1,7 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtProperty // OPTIONS: usages +// FIR_IGNORE + package server interface Some { diff --git a/idea/testData/findUsages/kotlin/internal/findPropertyUsages/kotlinClassObjectPropertyUsage.results.txt b/idea/testData/findUsages/kotlin/internal/findPropertyUsages/kotlinClassObjectPropertyUsage.results.txt index a8dae6dc2fa..a8b74bf9fb9 100644 --- a/idea/testData/findUsages/kotlin/internal/findPropertyUsages/kotlinClassObjectPropertyUsage.results.txt +++ b/idea/testData/findUsages/kotlin/internal/findPropertyUsages/kotlinClassObjectPropertyUsage.results.txt @@ -1 +1 @@ -Value read 11 val a = Some.XX \ No newline at end of file +Value read 13 val a = Some.XX \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/internal/findPropertyUsages/kotlinPropertyUsages.0.kt b/idea/testData/findUsages/kotlin/internal/findPropertyUsages/kotlinPropertyUsages.0.kt index 265971937d3..841b2083893 100644 --- a/idea/testData/findUsages/kotlin/internal/findPropertyUsages/kotlinPropertyUsages.0.kt +++ b/idea/testData/findUsages/kotlin/internal/findPropertyUsages/kotlinPropertyUsages.0.kt @@ -1,5 +1,7 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtProperty // OPTIONS: usages +// FIR_IGNORE + package server open class A { diff --git a/idea/testData/findUsages/kotlin/internal/findPropertyUsages/kotlinPropertyUsages.results.txt b/idea/testData/findUsages/kotlin/internal/findPropertyUsages/kotlinPropertyUsages.results.txt index 6cfee77e94a..04f57a58fb5 100644 --- a/idea/testData/findUsages/kotlin/internal/findPropertyUsages/kotlinPropertyUsages.results.txt +++ b/idea/testData/findUsages/kotlin/internal/findPropertyUsages/kotlinPropertyUsages.results.txt @@ -1,6 +1,6 @@ -[kotlinPropertyUsages.0.kt] Value read 13 return super.foo -[kotlinPropertyUsages.0.kt] Value write 17 super.foo = value +[kotlinPropertyUsages.0.kt] Value read 15 return super.foo +[kotlinPropertyUsages.0.kt] Value write 19 super.foo = value [kotlinPropertyUsages.1.kt] Value read 11 println("b.foo = ${b.foo}") [kotlinPropertyUsages.1.kt] Value read 7 println("a.foo = ${a.foo}") [kotlinPropertyUsages.1.kt] Value write 10 b.foo = "b" -[kotlinPropertyUsages.1.kt] Value write 6 a.foo = "a" +[kotlinPropertyUsages.1.kt] Value write 6 a.foo = "a" \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/internal/findPropertyUsages/kotlinTopLevelPropertyUsages.0.kt b/idea/testData/findUsages/kotlin/internal/findPropertyUsages/kotlinTopLevelPropertyUsages.0.kt index 50552e2bf47..2a3f57a292d 100644 --- a/idea/testData/findUsages/kotlin/internal/findPropertyUsages/kotlinTopLevelPropertyUsages.0.kt +++ b/idea/testData/findUsages/kotlin/internal/findPropertyUsages/kotlinTopLevelPropertyUsages.0.kt @@ -1,5 +1,7 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtProperty // OPTIONS: usages +// FIR_COMPARISON + package server internal var foo: String = "foo" diff --git a/idea/testData/findUsages/kotlin/variable/readAccess.0.kt b/idea/testData/findUsages/kotlin/variable/readAccess.0.kt index 36a12f3d8c1..02408a1bb6c 100644 --- a/idea/testData/findUsages/kotlin/variable/readAccess.0.kt +++ b/idea/testData/findUsages/kotlin/variable/readAccess.0.kt @@ -1,6 +1,8 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtProperty // OPTIONS: usages // OPTIONS: skipWrite +// FIR_IGNORE + fun foo() { var v = 1 (X@ v) = 2 diff --git a/idea/testData/findUsages/kotlin/variable/readAccess.results.txt b/idea/testData/findUsages/kotlin/variable/readAccess.results.txt index db23e7e8a7e..ae3ec2beb11 100644 --- a/idea/testData/findUsages/kotlin/variable/readAccess.results.txt +++ b/idea/testData/findUsages/kotlin/variable/readAccess.results.txt @@ -1,6 +1,6 @@ -Value read 10 print(-v) -Value read 7 print(v) -Value write 11 v += 1 -Value write 12 (v) -= 1 -Value write 8 ++ @X v -Value write 9 v-- +Value read 12 print(-v) +Value read 9 print(v) +Value write 10 ++ @X v +Value write 11 v-- +Value write 13 v += 1 +Value write 14 (v) -= 1 \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/variable/varInDoWhile.0.kt b/idea/testData/findUsages/kotlin/variable/varInDoWhile.0.kt index 0e6e9327ebe..0e5bb9092f9 100644 --- a/idea/testData/findUsages/kotlin/variable/varInDoWhile.0.kt +++ b/idea/testData/findUsages/kotlin/variable/varInDoWhile.0.kt @@ -1,5 +1,7 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtProperty // OPTIONS: usages +// FIR_IGNORE + fun test() { do { val message = "test" diff --git a/idea/testData/findUsages/kotlin/variable/varInDoWhile.results.txt b/idea/testData/findUsages/kotlin/variable/varInDoWhile.results.txt index 7f537d668d5..21d63de835d 100644 --- a/idea/testData/findUsages/kotlin/variable/varInDoWhile.results.txt +++ b/idea/testData/findUsages/kotlin/variable/varInDoWhile.results.txt @@ -1,2 +1,2 @@ -Receiver 7 } while (message.isEmpty()) -Value read 6 println(message) \ No newline at end of file +Receiver 9 } while (message.isEmpty()) +Value read 8 println(message) \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/variable/writeAccess.0.kt b/idea/testData/findUsages/kotlin/variable/writeAccess.0.kt index 001c2fdb21d..349d5c09c99 100644 --- a/idea/testData/findUsages/kotlin/variable/writeAccess.0.kt +++ b/idea/testData/findUsages/kotlin/variable/writeAccess.0.kt @@ -1,6 +1,8 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtProperty // OPTIONS: usages // OPTIONS: skipRead +// FIR_IGNORE + fun foo() { var v = 1 (@X v) = 2 diff --git a/idea/testData/findUsages/kotlin/variable/writeAccess.results.txt b/idea/testData/findUsages/kotlin/variable/writeAccess.results.txt index c9841b01f8f..f4e1dacdd16 100644 --- a/idea/testData/findUsages/kotlin/variable/writeAccess.results.txt +++ b/idea/testData/findUsages/kotlin/variable/writeAccess.results.txt @@ -1,5 +1,5 @@ -Value write 11 v += 1 -Value write 12 (v) -= 1 -Value write 6 (@X v) = 2 -Value write 8 ++ @X v -Value write 9 v-- +Value write 10 ++ @X v +Value write 11 v-- +Value write 13 v += 1 +Value write 14 (v) -= 1 +Value write 8 (@X v) = 2 \ No newline at end of file diff --git a/idea/testData/findUsages/libraryUsages/javaLibrary/LibraryClassUsages.0.kt b/idea/testData/findUsages/libraryUsages/javaLibrary/LibraryClassUsages.0.kt index e494fe47989..0d39b524ea9 100644 --- a/idea/testData/findUsages/libraryUsages/javaLibrary/LibraryClassUsages.0.kt +++ b/idea/testData/findUsages/libraryUsages/javaLibrary/LibraryClassUsages.0.kt @@ -1,6 +1,8 @@ // PSI_ELEMENT: com.intellij.psi.PsiClass // OPTIONS: usages // FIND_BY_REF +// FIR_IGNORE + package usages import library.Foo diff --git a/idea/testData/findUsages/libraryUsages/javaLibrary/LibraryClassUsages.results.txt b/idea/testData/findUsages/libraryUsages/javaLibrary/LibraryClassUsages.results.txt index 6d049d27601..398b679f773 100644 --- a/idea/testData/findUsages/libraryUsages/javaLibrary/LibraryClassUsages.results.txt +++ b/idea/testData/findUsages/libraryUsages/javaLibrary/LibraryClassUsages.results.txt @@ -1,2 +1,2 @@ -Local variable declaration 9 val foo: Foo -Usage in import 6 import library.Foo +Local variable declaration 11 val foo: Foo +Usage in import 8 import library.Foo \ No newline at end of file diff --git a/idea/testData/findUsages/libraryUsages/javaLibrary/LibraryConstructorUsages.0.kt b/idea/testData/findUsages/libraryUsages/javaLibrary/LibraryConstructorUsages.0.kt index d545f506d0e..8287442924e 100644 --- a/idea/testData/findUsages/libraryUsages/javaLibrary/LibraryConstructorUsages.0.kt +++ b/idea/testData/findUsages/libraryUsages/javaLibrary/LibraryConstructorUsages.0.kt @@ -1,6 +1,8 @@ // PSI_ELEMENT: com.intellij.psi.PsiMethod // OPTIONS: usages // FIND_BY_REF +// FIR_IGNORE + package usages import library.Foo diff --git a/idea/testData/findUsages/libraryUsages/javaLibrary/LibraryConstructorUsages.results.txt b/idea/testData/findUsages/libraryUsages/javaLibrary/LibraryConstructorUsages.results.txt index 0babe0fdc73..daef48c20ed 100644 --- a/idea/testData/findUsages/libraryUsages/javaLibrary/LibraryConstructorUsages.results.txt +++ b/idea/testData/findUsages/libraryUsages/javaLibrary/LibraryConstructorUsages.results.txt @@ -1 +1 @@ -New instance creation 9 Foo(1) +New instance creation 11 Foo(1) \ No newline at end of file diff --git a/idea/testData/findUsages/libraryUsages/javaLibrary/LibraryFieldUsages.0.kt b/idea/testData/findUsages/libraryUsages/javaLibrary/LibraryFieldUsages.0.kt index 99e7e9a49b9..12cca58c500 100644 --- a/idea/testData/findUsages/libraryUsages/javaLibrary/LibraryFieldUsages.0.kt +++ b/idea/testData/findUsages/libraryUsages/javaLibrary/LibraryFieldUsages.0.kt @@ -1,6 +1,8 @@ // PSI_ELEMENT: com.intellij.psi.PsiField // OPTIONS: usages // FIND_BY_REF +// FIR_IGNORE + package usages import library.Foo diff --git a/idea/testData/findUsages/libraryUsages/javaLibrary/LibraryFieldUsages.results.txt b/idea/testData/findUsages/libraryUsages/javaLibrary/LibraryFieldUsages.results.txt index 205c126532d..f8747371050 100644 --- a/idea/testData/findUsages/libraryUsages/javaLibrary/LibraryFieldUsages.results.txt +++ b/idea/testData/findUsages/libraryUsages/javaLibrary/LibraryFieldUsages.results.txt @@ -1 +1 @@ -Value write 9 Foo(1).x = 1 +Value write 11 Foo(1).x = 1 \ No newline at end of file diff --git a/idea/testData/findUsages/libraryUsages/javaLibrary/LibraryMethodUsages.0.kt b/idea/testData/findUsages/libraryUsages/javaLibrary/LibraryMethodUsages.0.kt index b7343ac206e..b898f44ab38 100644 --- a/idea/testData/findUsages/libraryUsages/javaLibrary/LibraryMethodUsages.0.kt +++ b/idea/testData/findUsages/libraryUsages/javaLibrary/LibraryMethodUsages.0.kt @@ -1,6 +1,8 @@ // PSI_ELEMENT: com.intellij.psi.PsiMethod // OPTIONS: usages // FIND_BY_REF +// FIR_IGNORE + package usages import library.Foo diff --git a/idea/testData/findUsages/libraryUsages/javaLibrary/LibraryMethodUsages.results.txt b/idea/testData/findUsages/libraryUsages/javaLibrary/LibraryMethodUsages.results.txt index 66de016a97c..d012c7b7757 100644 --- a/idea/testData/findUsages/libraryUsages/javaLibrary/LibraryMethodUsages.results.txt +++ b/idea/testData/findUsages/libraryUsages/javaLibrary/LibraryMethodUsages.results.txt @@ -1 +1 @@ -Function call 9 Foo(1).bar(1) +Function call 11 Foo(1).bar(1) \ No newline at end of file diff --git a/idea/testData/findUsages/libraryUsages/javaLibrary/LibraryStaticFieldUsages.0.kt b/idea/testData/findUsages/libraryUsages/javaLibrary/LibraryStaticFieldUsages.0.kt index b8dca719a3f..67b23f8af74 100644 --- a/idea/testData/findUsages/libraryUsages/javaLibrary/LibraryStaticFieldUsages.0.kt +++ b/idea/testData/findUsages/libraryUsages/javaLibrary/LibraryStaticFieldUsages.0.kt @@ -1,6 +1,8 @@ // PSI_ELEMENT: com.intellij.psi.PsiField // OPTIONS: usages // FIND_BY_REF +// FIR_IGNORE + package usages import library.Foo diff --git a/idea/testData/findUsages/libraryUsages/javaLibrary/LibraryStaticFieldUsages.results.txt b/idea/testData/findUsages/libraryUsages/javaLibrary/LibraryStaticFieldUsages.results.txt index 870088b5cf0..2f4b1c148a3 100644 --- a/idea/testData/findUsages/libraryUsages/javaLibrary/LibraryStaticFieldUsages.results.txt +++ b/idea/testData/findUsages/libraryUsages/javaLibrary/LibraryStaticFieldUsages.results.txt @@ -1 +1 @@ -Value write 9 Foo.X = 1 +Value write 11 Foo.X = 1 \ No newline at end of file diff --git a/idea/testData/findUsages/libraryUsages/javaLibrary/LibraryStaticMethodUsages.0.kt b/idea/testData/findUsages/libraryUsages/javaLibrary/LibraryStaticMethodUsages.0.kt index a93e8118b38..17bc2e7685f 100644 --- a/idea/testData/findUsages/libraryUsages/javaLibrary/LibraryStaticMethodUsages.0.kt +++ b/idea/testData/findUsages/libraryUsages/javaLibrary/LibraryStaticMethodUsages.0.kt @@ -1,6 +1,8 @@ // PSI_ELEMENT: com.intellij.psi.PsiMethod // OPTIONS: usages // FIND_BY_REF +// FIR_IGNORE + package usages import library.Foo diff --git a/idea/testData/findUsages/libraryUsages/javaLibrary/LibraryStaticMethodUsages.results.txt b/idea/testData/findUsages/libraryUsages/javaLibrary/LibraryStaticMethodUsages.results.txt index 254d2048b95..b286efe759e 100644 --- a/idea/testData/findUsages/libraryUsages/javaLibrary/LibraryStaticMethodUsages.results.txt +++ b/idea/testData/findUsages/libraryUsages/javaLibrary/LibraryStaticMethodUsages.results.txt @@ -1 +1 @@ -Function call 9 Foo.baz(1) +Function call 11 Foo.baz(1) \ No newline at end of file diff --git a/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryClassUsages.0.kt b/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryClassUsages.0.kt index e5249f354ce..c07dc17de37 100644 --- a/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryClassUsages.0.kt +++ b/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryClassUsages.0.kt @@ -2,6 +2,8 @@ // OPTIONS: usages, constructorUsages // FIND_BY_REF // WITH_FILE_NAME +// FIR_IGNORE + package usages import library.* diff --git a/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryClassUsages.results.txt b/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryClassUsages.results.txt index d3521910b2c..f1a9c8d8d0b 100644 --- a/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryClassUsages.results.txt +++ b/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryClassUsages.results.txt @@ -1,8 +1,8 @@ -[LibraryClassUsages.0.kt] Local variable declaration 16 val a: A = A() -[LibraryClassUsages.0.kt] New instance creation 16 val a: A = A() -[LibraryClassUsages.0.kt] New instance creation 17 val aa = A(1) -[LibraryClassUsages.0.kt] Supertype 13 class Y(): A(1) -[LibraryClassUsages.0.kt] Supertype 9 class X: A { +[LibraryClassUsages.0.kt] Local variable declaration 18 val a: A = A() +[LibraryClassUsages.0.kt] New instance creation 18 val a: A = A() +[LibraryClassUsages.0.kt] New instance creation 19 val aa = A(1) +[LibraryClassUsages.0.kt] Supertype 11 class X: A { +[LibraryClassUsages.0.kt] Supertype 15 class Y(): A(1) [LibraryClassUsages.1.java] Local variable declaration 11 A a = new A(); [LibraryClassUsages.1.java] Local variable declaration 12 A aa = new A(1); [LibraryClassUsages.1.java] New instance creation 11 A a = new A(); diff --git a/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryCompanionObjectUsages.0.kt b/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryCompanionObjectUsages.0.kt index 3d34b7d70bc..b1173b09e43 100644 --- a/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryCompanionObjectUsages.0.kt +++ b/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryCompanionObjectUsages.0.kt @@ -2,6 +2,8 @@ // OPTIONS: usages, constructorUsages // FIND_BY_REF // WITH_FILE_NAME +// FIR_IGNORE + package usages import library.* diff --git a/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryCompanionObjectUsages.results.txt b/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryCompanionObjectUsages.results.txt index d67258790d4..04c30086340 100644 --- a/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryCompanionObjectUsages.results.txt +++ b/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryCompanionObjectUsages.results.txt @@ -1,3 +1,3 @@ -[LibraryCompanionObjectUsages.0.kt] Companion object 10 val a = A.Companion +[LibraryCompanionObjectUsages.0.kt] Companion object 12 val a = A.Companion [LibraryCompanionObjectUsages.1.java] Local variable declaration 7 A.Companion o = A.Companion; [LibraryCompanionObjectUsages.1.java] Unclassified usage 7 A.Companion o = A.Companion; \ No newline at end of file diff --git a/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryFunctionUsages.0.kt b/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryFunctionUsages.0.kt index 9d62a757072..37f943d6cd1 100644 --- a/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryFunctionUsages.0.kt +++ b/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryFunctionUsages.0.kt @@ -1,7 +1,8 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction // OPTIONS: usages // FIND_BY_REF -// WITH_FILE_NAME +// FIR_IGNORE + package usages import library.* diff --git a/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryFunctionUsages.results.txt b/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryFunctionUsages.results.txt index 69046be7fd2..55fe107694c 100644 --- a/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryFunctionUsages.results.txt +++ b/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryFunctionUsages.results.txt @@ -1,4 +1,4 @@ -[LibraryFunctionUsages.0.kt] Callable reference 10 val f = ::foo -[LibraryFunctionUsages.0.kt] Function call 11 foo() +[LibraryFunctionUsages.0.kt] Callable reference 11 val f = ::foo +[LibraryFunctionUsages.0.kt] Function call 12 foo() [library.kt] Callable reference 53 val f = ::foo -[library.kt] Function call 52 foo() +[library.kt] Function call 52 foo() \ No newline at end of file diff --git a/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryMemberFunctionUsages.0.kt b/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryMemberFunctionUsages.0.kt index 564ec443749..5135d2aa761 100644 --- a/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryMemberFunctionUsages.0.kt +++ b/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryMemberFunctionUsages.0.kt @@ -2,6 +2,8 @@ // OPTIONS: usages // FIND_BY_REF // WITH_FILE_NAME +// FIR_IGNORE + package usages import library.* diff --git a/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryMemberFunctionUsages.results.txt b/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryMemberFunctionUsages.results.txt index 3c97939b94b..b8016d6570f 100644 --- a/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryMemberFunctionUsages.results.txt +++ b/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryMemberFunctionUsages.results.txt @@ -1,5 +1,5 @@ -[LibraryMemberFunctionUsages.0.kt] Callable reference 10 val f = A::foo -[LibraryMemberFunctionUsages.0.kt] Function call 11 A().foo(1) +[LibraryMemberFunctionUsages.0.kt] Callable reference 12 val f = A::foo +[LibraryMemberFunctionUsages.0.kt] Function call 13 A().foo(1) [LibraryMemberFunctionUsages.1.java] Unclassified usage 11 new A().foo(1); [library.kt] Callable reference 61 val ff = A::foo [library.kt] Function call 60 a.foo(2) \ No newline at end of file diff --git a/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassMemberFunctionUsages.0.kt b/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassMemberFunctionUsages.0.kt index 875232dc41d..203d3ad1075 100644 --- a/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassMemberFunctionUsages.0.kt +++ b/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassMemberFunctionUsages.0.kt @@ -2,6 +2,8 @@ // OPTIONS: usages // FIND_BY_REF // WITH_FILE_NAME +// FIR_IGNORE + package usages import library.* diff --git a/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassMemberFunctionUsages.results.txt b/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassMemberFunctionUsages.results.txt index cec5ef6ed65..b272b1ccc17 100644 --- a/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassMemberFunctionUsages.results.txt +++ b/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassMemberFunctionUsages.results.txt @@ -1,4 +1,4 @@ -[LibraryNestedClassMemberFunctionUsages.0.kt] Callable reference 10 val f = A.T::bar -[LibraryNestedClassMemberFunctionUsages.0.kt] Function call 11 A.T().bar(1) +[LibraryNestedClassMemberFunctionUsages.0.kt] Callable reference 12 val f = A.T::bar +[LibraryNestedClassMemberFunctionUsages.0.kt] Function call 13 A.T().bar(1) [library.kt] Callable reference 66 val fff = A.T::bar -[library.kt] Function call 65 t.bar(2) +[library.kt] Function call 65 t.bar(2) \ No newline at end of file diff --git a/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassPrimaryConstructorUsages.0.kt b/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassPrimaryConstructorUsages.0.kt index 0a642631e98..6e04a1e76a5 100644 --- a/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassPrimaryConstructorUsages.0.kt +++ b/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassPrimaryConstructorUsages.0.kt @@ -2,6 +2,8 @@ // OPTIONS: usages // FIND_BY_REF // WITH_FILE_NAME +// FIR_IGNORE + package usages import library.* diff --git a/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassPrimaryConstructorUsages.results.txt b/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassPrimaryConstructorUsages.results.txt index 5e7d4590040..47475b7845c 100644 --- a/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassPrimaryConstructorUsages.results.txt +++ b/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassPrimaryConstructorUsages.results.txt @@ -1,4 +1,4 @@ -[LibraryNestedClassPrimaryConstructorUsages.0.kt] New instance creation 17 val aa = A.T(1) -[LibraryNestedClassPrimaryConstructorUsages.0.kt] Supertype 13 class Y(): A.T(1) +[LibraryNestedClassPrimaryConstructorUsages.0.kt] New instance creation 19 val aa = A.T(1) +[LibraryNestedClassPrimaryConstructorUsages.0.kt] Supertype 15 class Y(): A.T(1) [library.kt] New instance creation 63 val t = A.T(1) -[library.kt] Supertype 28 class V(): A.T(1) +[library.kt] Supertype 28 class V(): A.T(1) \ No newline at end of file diff --git a/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassSecondaryConstructorUsages.0.kt b/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassSecondaryConstructorUsages.0.kt index 8d0d3c4cde3..c207a25ba21 100644 --- a/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassSecondaryConstructorUsages.0.kt +++ b/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassSecondaryConstructorUsages.0.kt @@ -2,6 +2,8 @@ // OPTIONS: usages // FIND_BY_REF // WITH_FILE_NAME +// FIR_IGNORE + package usages import library.* diff --git a/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassSecondaryConstructorUsages.results.txt b/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassSecondaryConstructorUsages.results.txt index 55a4ff92488..c868f58ad33 100644 --- a/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassSecondaryConstructorUsages.results.txt +++ b/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassSecondaryConstructorUsages.results.txt @@ -1,7 +1,7 @@ -[LibraryNestedClassSecondaryConstructorUsages.0.kt] New instance creation 16 val a: A.T = A.T() -[LibraryNestedClassSecondaryConstructorUsages.0.kt] Supertype 13 class Y(): A.T() +[LibraryNestedClassSecondaryConstructorUsages.0.kt] New instance creation 18 val a: A.T = A.T() +[LibraryNestedClassSecondaryConstructorUsages.0.kt] Supertype 15 class Y(): A.T() [LibraryNestedClassSecondaryConstructorUsages.1.java] New instance creation 14 A.T a = new A.T(); [LibraryNestedClassSecondaryConstructorUsages.1.java] Unclassified usage 10 super(); [LibraryNestedClassSecondaryConstructorUsages.1.java] Unclassified usage 6 public J() { [library.kt] New instance creation 64 val tt = A.T() -[library.kt] Supertype 40 class VV(): A.T() +[library.kt] Supertype 40 class VV(): A.T() \ No newline at end of file diff --git a/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassUsages.0.kt b/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassUsages.0.kt index f819974e58c..89efe6d477f 100644 --- a/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassUsages.0.kt +++ b/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassUsages.0.kt @@ -2,6 +2,8 @@ // OPTIONS: usages, constructorUsages // FIND_BY_REF // WITH_FILE_NAME +// FIR_IGNORE + package usages import library.* diff --git a/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassUsages.results.txt b/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassUsages.results.txt index 513a893c40e..48edf9a6e12 100644 --- a/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassUsages.results.txt +++ b/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassUsages.results.txt @@ -1,8 +1,8 @@ -[LibraryNestedClassUsages.0.kt] Local variable declaration 16 val a: A.T = A.T() -[LibraryNestedClassUsages.0.kt] New instance creation 16 val a: A.T = A.T() -[LibraryNestedClassUsages.0.kt] New instance creation 17 val aa = A.T(1) -[LibraryNestedClassUsages.0.kt] Supertype 13 class Y(): A.T(1) -[LibraryNestedClassUsages.0.kt] Supertype 9 class X: A.T { +[LibraryNestedClassUsages.0.kt] Local variable declaration 18 val a: A.T = A.T() +[LibraryNestedClassUsages.0.kt] New instance creation 18 val a: A.T = A.T() +[LibraryNestedClassUsages.0.kt] New instance creation 19 val aa = A.T(1) +[LibraryNestedClassUsages.0.kt] Supertype 11 class X: A.T { +[LibraryNestedClassUsages.0.kt] Supertype 15 class Y(): A.T(1) [LibraryNestedClassUsages.1.java] Local variable declaration 11 A.T t = new A.T(); [LibraryNestedClassUsages.1.java] Local variable declaration 12 A.T tt = new A.T(1); [LibraryNestedClassUsages.1.java] New instance creation 11 A.T t = new A.T(); diff --git a/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryObjectUsages.0.kt b/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryObjectUsages.0.kt index 0ee0d1fa375..c65b2efc89f 100644 --- a/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryObjectUsages.0.kt +++ b/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryObjectUsages.0.kt @@ -2,6 +2,8 @@ // OPTIONS: usages // FIND_BY_REF // WITH_FILE_NAME +// FIR_IGNORE + package usages import library.* diff --git a/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryObjectUsages.results.txt b/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryObjectUsages.results.txt index 2993b9bd15a..a0170b9bd54 100644 --- a/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryObjectUsages.results.txt +++ b/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryObjectUsages.results.txt @@ -1,4 +1,4 @@ -[LibraryObjectUsages.0.kt] Value read 10 val o = O +[LibraryObjectUsages.0.kt] Value read 12 val o = O [LibraryObjectUsages.1.java] Class static member access 7 O o = O.INSTANCE; [LibraryObjectUsages.1.java] Local variable declaration 7 O o = O.INSTANCE; -[library.kt] Value read 55 val o = O +[library.kt] Value read 55 val o = O \ No newline at end of file diff --git a/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryPrimaryConstructorUsages.0.kt b/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryPrimaryConstructorUsages.0.kt index f543f78d85b..ecd834aefcf 100644 --- a/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryPrimaryConstructorUsages.0.kt +++ b/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryPrimaryConstructorUsages.0.kt @@ -2,6 +2,8 @@ // OPTIONS: usages // FIND_BY_REF // WITH_FILE_NAME +// FIR_IGNORE + package usages import library.* diff --git a/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryPrimaryConstructorUsages.results.txt b/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryPrimaryConstructorUsages.results.txt index 6dc639a8e47..88b469418b3 100644 --- a/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryPrimaryConstructorUsages.results.txt +++ b/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryPrimaryConstructorUsages.results.txt @@ -1,4 +1,4 @@ -[LibraryPrimaryConstructorUsages.0.kt] New instance creation 17 val aa = A(1) -[LibraryPrimaryConstructorUsages.0.kt] Supertype 13 class Y(): A(1) +[LibraryPrimaryConstructorUsages.0.kt] New instance creation 19 val aa = A(1) +[LibraryPrimaryConstructorUsages.0.kt] Supertype 15 class Y(): A(1) [library.kt] New instance creation 57 val a = A(1) -[library.kt] Supertype 27 class C(): A(1) { +[library.kt] Supertype 27 class C(): A(1) { \ No newline at end of file diff --git a/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibrarySecondaryConstructorUsages.0.kt b/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibrarySecondaryConstructorUsages.0.kt index cd7f7ddd7a5..86c8f7324cb 100644 --- a/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibrarySecondaryConstructorUsages.0.kt +++ b/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibrarySecondaryConstructorUsages.0.kt @@ -2,6 +2,8 @@ // OPTIONS: usages // FIND_BY_REF // WITH_FILE_NAME +// FIR_IGNORE + package usages import library.* diff --git a/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibrarySecondaryConstructorUsages.results.txt b/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibrarySecondaryConstructorUsages.results.txt index 6e66d93e269..41518118c39 100644 --- a/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibrarySecondaryConstructorUsages.results.txt +++ b/idea/testData/findUsages/libraryUsages/kotlinLibrary/LibrarySecondaryConstructorUsages.results.txt @@ -1,5 +1,5 @@ -[LibrarySecondaryConstructorUsages.0.kt] New instance creation 16 val a: A = A() -[LibrarySecondaryConstructorUsages.0.kt] Supertype 13 class Y(): A() +[LibrarySecondaryConstructorUsages.0.kt] New instance creation 18 val a: A = A() +[LibrarySecondaryConstructorUsages.0.kt] Supertype 15 class Y(): A() [LibrarySecondaryConstructorUsages.1.java] New instance creation 14 A a = new A(); [LibrarySecondaryConstructorUsages.1.java] Unclassified usage 10 super(); [LibrarySecondaryConstructorUsages.1.java] Unclassified usage 6 public J() { diff --git a/idea/testData/findUsages/stdlibUsages/LibraryMemberFunctionUsagesInStdlib.0.kt b/idea/testData/findUsages/stdlibUsages/LibraryMemberFunctionUsagesInStdlib.0.kt index 713586bd34c..4cbfdfe8b1c 100644 --- a/idea/testData/findUsages/stdlibUsages/LibraryMemberFunctionUsagesInStdlib.0.kt +++ b/idea/testData/findUsages/stdlibUsages/LibraryMemberFunctionUsagesInStdlib.0.kt @@ -2,6 +2,8 @@ // OPTIONS: usages // FIND_BY_REF // WITH_FILE_NAME +// FIR_IGNORE + package usages fun test() { diff --git a/idea/testData/findUsages/stdlibUsages/LibraryMemberFunctionUsagesInStdlib.results.txt b/idea/testData/findUsages/stdlibUsages/LibraryMemberFunctionUsagesInStdlib.results.txt index 24481b96d2b..0cea55c8bef 100644 --- a/idea/testData/findUsages/stdlibUsages/LibraryMemberFunctionUsagesInStdlib.results.txt +++ b/idea/testData/findUsages/stdlibUsages/LibraryMemberFunctionUsagesInStdlib.results.txt @@ -1 +1 @@ -Function call 8 val f = mapOf(Pair("1","2")).keys.single( { true } ) +Function call 10 val f = mapOf(Pair("1","2")).keys.single( { true } ) \ No newline at end of file diff --git a/idea/tests/org/jetbrains/kotlin/FirTestUtils.kt b/idea/tests/org/jetbrains/kotlin/FirTestUtils.kt new file mode 100644 index 00000000000..be11365a623 --- /dev/null +++ b/idea/tests/org/jetbrains/kotlin/FirTestUtils.kt @@ -0,0 +1,48 @@ +/* + * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin + +import com.intellij.openapi.application.ApplicationManager +import com.intellij.openapi.application.runReadAction +import com.intellij.openapi.util.io.FileUtil +import org.jetbrains.kotlin.test.InTextDirectivesUtils +import java.io.File + +fun executeOnPooledThreadInReadAction(action: () -> R): R? { + var exception: Exception? = null + val result = ApplicationManager.getApplication().executeOnPooledThread { + try { + runReadAction(action) + } catch (e: Exception) { + exception = e + null + } + }.get() + + exception?.run { + throw this + } + return result +} + +inline fun doTestWithFIRFlagsByPath(path: String, body: () -> Unit) = + doTestWithFIRFlags(FileUtil.loadFile(File(path)), body) + +inline fun doTestWithFIRFlags(mainFileText: String, body: () -> Unit) { + + if (InTextDirectivesUtils.isDirectiveDefined(mainFileText, "FIR_IGNORE")) return + val isFirComparison = InTextDirectivesUtils.isDirectiveDefined(mainFileText, "FIR_COMPARISON") + + try { + body() + } catch (e: Throwable) { + if (isFirComparison) throw e + return + } + if (!isFirComparison) { + throw AssertionError("Looks like test is passing, please add // FIR_COMPARISON at the beginning of the file") + } +} \ No newline at end of file diff --git a/idea/tests/org/jetbrains/kotlin/findUsages/AbstractFindUsagesMultiModuleTest.kt b/idea/tests/org/jetbrains/kotlin/findUsages/AbstractFindUsagesMultiModuleTest.kt index dad61a1b7d9..7972f533a21 100644 --- a/idea/tests/org/jetbrains/kotlin/findUsages/AbstractFindUsagesMultiModuleTest.kt +++ b/idea/tests/org/jetbrains/kotlin/findUsages/AbstractFindUsagesMultiModuleTest.kt @@ -7,23 +7,26 @@ package org.jetbrains.kotlin.findUsages import com.intellij.codeInsight.TargetElementUtil import com.intellij.testFramework.UsefulTestCase +import org.jetbrains.kotlin.executeOnPooledThreadInReadAction import org.jetbrains.kotlin.idea.stubs.AbstractMultiModuleTest import org.jetbrains.kotlin.idea.test.PluginTestCaseBase import org.jetbrains.kotlin.idea.test.allKotlinFiles import org.jetbrains.kotlin.psi.KtDeclaration +import org.jetbrains.kotlin.psi.KtFile import org.jetbrains.kotlin.test.InTextDirectivesUtils abstract class AbstractFindUsagesMultiModuleTest : AbstractMultiModuleTest() { + protected open val isFirPlugin: Boolean = false + override fun getTestDataPath() = PluginTestCaseBase.getTestDataPathBase() + "/multiModuleFindUsages/" - protected fun doFindUsagesTest() { - val allFilesInProject = project.allKotlinFiles() - val mainFile = allFilesInProject.single { file -> + protected val mainFile: KtFile + get() = project.allKotlinFiles().single { file -> file.text.contains("// ") } - + protected open fun doFindUsagesTest() { val virtualFile = mainFile.virtualFile!! configureByExistingFile(virtualFile) @@ -40,7 +43,9 @@ abstract class AbstractFindUsagesMultiModuleTest : AbstractMultiModuleTest() { val rootPath = virtualFile.path.substringBeforeLast("/") + "/" - val caretElement = TargetElementUtil.findTargetElement(myEditor, TargetElementUtil.ELEMENT_NAME_ACCEPTED) + val caretElement = executeOnPooledThreadInReadAction { + TargetElementUtil.findTargetElement(myEditor, TargetElementUtil.ELEMENT_NAME_ACCEPTED) + } UsefulTestCase.assertInstanceOf(caretElement!!, caretElementClass) val options = parser?.parse(mainFileText, project) diff --git a/idea/tests/org/jetbrains/kotlin/findUsages/AbstractFindUsagesTest.kt b/idea/tests/org/jetbrains/kotlin/findUsages/AbstractFindUsagesTest.kt index 1132d777e66..53325f0d496 100644 --- a/idea/tests/org/jetbrains/kotlin/findUsages/AbstractFindUsagesTest.kt +++ b/idea/tests/org/jetbrains/kotlin/findUsages/AbstractFindUsagesTest.kt @@ -38,6 +38,8 @@ import com.intellij.usages.impl.rules.UsageTypeProvider import com.intellij.usages.rules.UsageFilteringRule import com.intellij.usages.rules.UsageGroupingRule import com.intellij.util.CommonProcessors +import org.jetbrains.kotlin.doTestWithFIRFlagsByPath +import org.jetbrains.kotlin.executeOnPooledThreadInReadAction import org.jetbrains.kotlin.idea.caches.resolve.analyzeWithAllCompilerChecks import org.jetbrains.kotlin.idea.core.script.ScriptConfigurationManager import org.jetbrains.kotlin.idea.core.util.clearDialogsResults @@ -45,10 +47,7 @@ import org.jetbrains.kotlin.idea.core.util.setDialogsResult import org.jetbrains.kotlin.idea.findUsages.handlers.KotlinFindMemberUsagesHandler import org.jetbrains.kotlin.idea.refactoring.CHECK_SUPER_METHODS_YES_NO_DIALOG import org.jetbrains.kotlin.idea.search.usagesSearch.ExpressionsOfTypeProcessor -import org.jetbrains.kotlin.idea.test.DirectiveBasedActionUtils -import org.jetbrains.kotlin.idea.test.KotlinLightCodeInsightFixtureTestCase -import org.jetbrains.kotlin.idea.test.KotlinWithJdkAndRuntimeLightProjectDescriptor -import org.jetbrains.kotlin.idea.test.TestFixtureExtension +import org.jetbrains.kotlin.idea.test.* import org.jetbrains.kotlin.idea.util.ProjectRootsUtil import org.jetbrains.kotlin.idea.util.runReadActionInSmartMode import org.jetbrains.kotlin.psi.KtFile @@ -60,6 +59,22 @@ import java.io.File import java.util.* import kotlin.collections.LinkedHashSet +abstract class AbstractFindUsagesWithDisableComponentSearchFirTest : AbstractFindUsagesWithDisableComponentSearchTest() { + override fun isFirPlugin(): Boolean = true + + override fun doTest(path: String) = doTestWithFIRFlagsByPath(path) { + super.doTest(path) + } +} + +abstract class AbstractFindUsagesFirTest : AbstractFindUsagesTest() { + override fun isFirPlugin(): Boolean = true + + override fun doTest(path: String) = doTestWithFIRFlagsByPath(path) { + super.doTest(path) + } +} + abstract class AbstractFindUsagesWithDisableComponentSearchTest : AbstractFindUsagesTest() { override fun doTest(path: String) { @@ -86,6 +101,7 @@ abstract class AbstractFindUsagesTest : KotlinLightCodeInsightFixtureTestCase() protected open val prefixForResults = "" protected open fun doTest(path: String) { + val mainFile = File(path) val mainFileName = mainFile.name val mainFileText = FileUtil.loadFile(mainFile, true) @@ -98,6 +114,12 @@ abstract class AbstractFindUsagesTest : KotlinLightCodeInsightFixtureTestCase() return } +// if (isFirPlugin) { +// InTextDirectivesUtils.findStringWithPrefixes(mainFileText, "// FIR_IGNORE")?.let { +// return +// } +// } + val isFindFileUsages = InTextDirectivesUtils.isDirectiveDefined(mainFileText, "## FIND_FILE_USAGES") @Suppress("UNCHECKED_CAST") @@ -139,17 +161,23 @@ abstract class AbstractFindUsagesTest : KotlinLightCodeInsightFixtureTestCase() ScriptConfigurationManager.updateScriptDependenciesSynchronously(myFixture.file) } - (myFixture.file as? KtFile)?.let { ktFile -> - val diagnosticsProvider: (KtFile) -> Diagnostics = { it.analyzeWithAllCompilerChecks().bindingContext.diagnostics } - DirectiveBasedActionUtils.checkForUnexpectedWarnings(ktFile, diagnosticsProvider) - DirectiveBasedActionUtils.checkForUnexpectedErrors(ktFile, diagnosticsProvider) + if (!isFirPlugin) { + (myFixture.file as? KtFile)?.let { ktFile -> + val diagnosticsProvider: (KtFile) -> Diagnostics = { it.analyzeWithAllCompilerChecks().bindingContext.diagnostics } + DirectiveBasedActionUtils.checkForUnexpectedWarnings(ktFile, diagnosticsProvider) + DirectiveBasedActionUtils.checkForUnexpectedErrors(ktFile, diagnosticsProvider) + } } val caretElement = when { - InTextDirectivesUtils.isDirectiveDefined(mainFileText, "// FIND_BY_REF") -> TargetElementUtil.findTargetElement( - myFixture.editor, - TargetElementUtil.REFERENCED_ELEMENT_ACCEPTED or TargetElementUtil.getInstance().referenceSearchFlags - )!! + InTextDirectivesUtils.isDirectiveDefined(mainFileText, "// FIND_BY_REF") -> { + executeOnPooledThreadInReadAction { + TargetElementUtil.findTargetElement( + myFixture.editor, + TargetElementUtil.REFERENCED_ELEMENT_ACCEPTED or TargetElementUtil.getInstance().referenceSearchFlags + ) + }!! + } isFindFileUsages -> myFixture.file @@ -273,7 +301,10 @@ internal fun findUsagesAndCheckResults( groupAsString = "($groupAsString) " } - val usageType = AbstractFindUsagesTest.getUsageType(usageAdapter.element) + val usageType = executeOnPooledThreadInReadAction { + AbstractFindUsagesTest.getUsageType(usageAdapter.element) + } + val usageTypeAsString = usageType?.toString(AbstractFindUsagesTest.USAGE_VIEW_PRESENTATION) ?: "null" val usageChunks = ArrayList() diff --git a/idea/tests/org/jetbrains/kotlin/findUsages/AbstractKotlinFindUsagesWithLibraryTest.kt b/idea/tests/org/jetbrains/kotlin/findUsages/AbstractKotlinFindUsagesWithLibraryTest.kt index 892848ce42d..e6a79323fbb 100644 --- a/idea/tests/org/jetbrains/kotlin/findUsages/AbstractKotlinFindUsagesWithLibraryTest.kt +++ b/idea/tests/org/jetbrains/kotlin/findUsages/AbstractKotlinFindUsagesWithLibraryTest.kt @@ -5,9 +5,19 @@ package org.jetbrains.kotlin.findUsages +import com.intellij.psi.PsiElement +import org.jetbrains.kotlin.doTestWithFIRFlagsByPath import org.jetbrains.kotlin.idea.test.PluginTestCaseBase import org.jetbrains.kotlin.idea.test.SdkAndMockLibraryProjectDescriptor +abstract class AbstractKotlinFindUsagesWithLibraryFirTest : AbstractKotlinFindUsagesWithLibraryTest() { + override fun isFirPlugin(): Boolean = true + + override fun doTest(path: String) = doTestWithFIRFlagsByPath(path) { + super.doTest(path) + } +} + abstract class AbstractKotlinFindUsagesWithLibraryTest : AbstractFindUsagesTest() { override fun getProjectDescriptor() = SdkAndMockLibraryProjectDescriptor( diff --git a/idea/tests/org/jetbrains/kotlin/findUsages/AbstractKotlinFindUsagesWithStdlibTest.kt b/idea/tests/org/jetbrains/kotlin/findUsages/AbstractKotlinFindUsagesWithStdlibTest.kt index bf9163a2113..d8ce3617fe6 100644 --- a/idea/tests/org/jetbrains/kotlin/findUsages/AbstractKotlinFindUsagesWithStdlibTest.kt +++ b/idea/tests/org/jetbrains/kotlin/findUsages/AbstractKotlinFindUsagesWithStdlibTest.kt @@ -5,9 +5,17 @@ package org.jetbrains.kotlin.findUsages +import com.intellij.psi.PsiElement +import org.jetbrains.kotlin.doTestWithFIRFlagsByPath import org.jetbrains.kotlin.idea.test.KotlinJdkAndMultiplatformStdlibDescriptor -import org.jetbrains.kotlin.idea.test.PluginTestCaseBase -import org.jetbrains.kotlin.idea.test.SdkAndMockLibraryProjectDescriptor + +abstract class AbstractKotlinFindUsagesWithStdlibFirTest : AbstractKotlinFindUsagesWithStdlibTest() { + override fun isFirPlugin(): Boolean = true + + override fun doTest(path: String) = doTestWithFIRFlagsByPath(path) { + super.doTest(path) + } +} abstract class AbstractKotlinFindUsagesWithStdlibTest : AbstractFindUsagesTest() { override fun getProjectDescriptor() = diff --git a/idea/tests/org/jetbrains/kotlin/findUsages/FindUsagesMultiModuleTest.kt b/idea/tests/org/jetbrains/kotlin/findUsages/FindUsagesMultiModuleTest.kt index 0142dd71aa1..f16fdad24c2 100644 --- a/idea/tests/org/jetbrains/kotlin/findUsages/FindUsagesMultiModuleTest.kt +++ b/idea/tests/org/jetbrains/kotlin/findUsages/FindUsagesMultiModuleTest.kt @@ -11,7 +11,7 @@ import org.junit.runner.RunWith import java.io.File @RunWith(JUnit3WithIdeaConfigurationRunner::class) -class FindUsagesMultiModuleTest : AbstractFindUsagesMultiModuleTest() { +open class FindUsagesMultiModuleTest : AbstractFindUsagesMultiModuleTest() { fun testFindActualInterface() { doTest()