From 7d351ca6b13968f3b83ede35a43cc9bfd1927e7e Mon Sep 17 00:00:00 2001 From: Ilya Kirillov Date: Wed, 19 May 2021 15:29:45 +0200 Subject: [PATCH] FIR IDE: add possibility to have different testdata for fir & fe10 keyword tests --- .../kotlin/generators/tests/idea/GenerateTests.kt | 4 ++-- .../kotlin/generators/util/TestGeneratorUtil.kt | 1 + .../testData/keywords/AfterClassName.kt | 1 + .../testData/keywords/AfterClassProperty.kt | 1 + idea/idea-completion/testData/keywords/AfterClasses.kt | 1 + .../testData/keywords/AfterClasses_LangLevel10.kt | 1 + .../testData/keywords/AfterClasses_LangLevel11.kt | 1 + idea/idea-completion/testData/keywords/AfterDot.kt | 1 + idea/idea-completion/testData/keywords/AfterFuns.kt | 1 + idea/idea-completion/testData/keywords/AfterIf.kt | 1 + idea/idea-completion/testData/keywords/AfterSafeDot.kt | 1 + .../testData/keywords/AfterSpaceAndDot.kt | 1 + .../idea-completion/testData/keywords/AfterTryCatch.kt | 1 + .../testData/keywords/AfterTryFinally.kt | 1 + idea/idea-completion/testData/keywords/BeforeClass.kt | 1 + .../testData/keywords/BeforeDelegationCall.kt | 1 + .../idea-completion/testData/keywords/BreakContinue.kt | 1 + .../idea-completion/testData/keywords/CommaExpected.kt | 1 + .../testData/keywords/CompanionObjectBeforeObject.kt | 1 + idea/idea-completion/testData/keywords/Else1.kt | 1 + idea/idea-completion/testData/keywords/Else2.kt | 1 + idea/idea-completion/testData/keywords/FileKeyword.kt | 1 + .../testData/keywords/FixingLayoutAndReturn.kt | 1 + .../testData/keywords/GlobalPropertyAccessors.kt | 1 + idea/idea-completion/testData/keywords/IfTryCatch.kt | 1 + .../testData/keywords/InAnnotationClassScope.kt | 1 + .../testData/keywords/InArgumentList.kt | 1 + .../testData/keywords/InBlockComment.kt | 1 + idea/idea-completion/testData/keywords/InChar.kt | 1 + .../testData/keywords/InClassBeforeFun.kt | 1 + .../testData/keywords/InClassNoCompletionInValName.kt | 1 + .../testData/keywords/InClassProperty.kt | 1 + idea/idea-completion/testData/keywords/InClassScope.kt | 1 + .../testData/keywords/InClassTypeParameters.kt | 1 + idea/idea-completion/testData/keywords/InCodeBlock.kt | 1 + idea/idea-completion/testData/keywords/InElse.kt | 1 + idea/idea-completion/testData/keywords/InEnumScope1.kt | 1 + idea/idea-completion/testData/keywords/InEnumScope2.kt | 1 + .../testData/keywords/InFunctionExpressionBody.kt | 1 + .../testData/keywords/InFunctionName.kt | 1 + .../testData/keywords/InFunctionRecieverType.kt | 1 + .../testData/keywords/InFunctionTypePosition.kt | 1 + .../testData/keywords/InGetterExpressionBody.kt | 1 + idea/idea-completion/testData/keywords/InIf.kt | 1 + .../testData/keywords/InInterfaceScope.kt | 1 + .../testData/keywords/InMemberFunParametersList.kt | 1 + .../testData/keywords/InModifierListInsideClass.kt | 1 + .../keywords/InNotFinishedGenericWithFunAfter.kt | 1 + .../idea-completion/testData/keywords/InObjectScope.kt | 1 + .../testData/keywords/InParameterDefaultValue.kt | 1 + .../keywords/InPrimaryConstructorParametersList.kt | 1 + .../testData/keywords/InPropertyInitializer.kt | 1 + .../testData/keywords/InPropertyTypeReference.kt | 1 + idea/idea-completion/testData/keywords/InString.kt | 1 + .../testData/keywords/InTopFunParametersList.kt | 1 + .../testData/keywords/InTopScopeAfterPackage.kt | 1 + .../testData/keywords/InTypePosition.kt | 1 + .../testData/keywords/LabeledLambdaThis.kt | 1 + idea/idea-completion/testData/keywords/LineComment.kt | 1 + idea/idea-completion/testData/keywords/NoBreak1.kt | 1 + idea/idea-completion/testData/keywords/NoBreak2.kt | 1 + .../testData/keywords/NoCompanionThis.kt | 1 + .../testData/keywords/NoCompletionForCapitalPrefix.kt | 1 + idea/idea-completion/testData/keywords/NoContinue.kt | 1 + .../testData/keywords/NoFinalInParameterList.kt | 1 + idea/idea-completion/testData/keywords/NotInNotIs.kt | 1 + idea/idea-completion/testData/keywords/NotInNotIs2.kt | 1 + .../idea-completion/testData/keywords/PrefixMatcher.kt | 1 + .../testData/keywords/PropertyAccessors.kt | 1 + .../testData/keywords/PropertyAccessors2.kt | 1 + .../testData/keywords/PropertySetter.kt | 1 + idea/idea-completion/testData/keywords/Receiver.kt | 1 + idea/idea-completion/testData/keywords/Return1.kt | 1 + idea/idea-completion/testData/keywords/Return2.kt | 1 + idea/idea-completion/testData/keywords/Return3.kt | 1 + idea/idea-completion/testData/keywords/Return4.kt | 1 + idea/idea-completion/testData/keywords/Return5.kt | 1 + idea/idea-completion/testData/keywords/Return7.kt | 1 + idea/idea-completion/testData/keywords/Return8.kt | 1 + idea/idea-completion/testData/keywords/Return9.kt | 1 + .../idea-completion/testData/keywords/ReturnBoolean.kt | 1 + .../testData/keywords/ReturnCollection.kt | 1 + .../testData/keywords/ReturnIterable.kt | 1 + .../testData/keywords/ReturnKeywordName.kt | 1 + idea/idea-completion/testData/keywords/ReturnList.kt | 1 + .../idea-completion/testData/keywords/ReturnNotNull.kt | 1 + idea/idea-completion/testData/keywords/ReturnNull.kt | 1 + .../testData/keywords/ReturnNullableBoolean.kt | 1 + idea/idea-completion/testData/keywords/ReturnSet.kt | 1 + .../testData/keywords/SealedForAlreadySealed.kt | 1 + .../testData/keywords/SealedForAnnotationClass.kt | 1 + .../testData/keywords/SealedForDataClass.kt | 1 + .../testData/keywords/SealedForDeclaredClass.kt | 1 + .../testData/keywords/SealedForDeclaredInterface.kt | 1 + .../testData/keywords/SealedForEnumClass.kt | 1 + .../testData/keywords/SealedForFunInterface.kt | 1 + .../testData/keywords/SealedForInnerClass.kt | 1 + .../testData/keywords/SealedForOpenClass.kt | 1 + .../testData/keywords/SealedWithName.kt | 1 + .../testData/keywords/SealedWithoutName.kt | 1 + .../keywords/SuspendInParameterTypePosition.kt | 1 + .../testData/keywords/SuspendInsideTypeArguments.kt | 1 + .../testData/keywords/SuspendInsideTypeArguments1.kt | 1 + idea/idea-completion/testData/keywords/This.kt | 1 + .../testData/keywords/ThisInCompanion.kt | 1 + .../testData/keywords/ThisPrefixMatching.kt | 1 + idea/idea-completion/testData/keywords/TopScope.kt | 1 + idea/idea-completion/testData/keywords/TopScope3-.kt | 1 + .../UseSiteTargetForPrimaryConstructorParameter.kt | 1 + idea/idea-completion/testData/keywords/topScope2.kt | 1 + .../test/KeywordCompletionTestGenerated.java | 2 +- .../test/KotlinFixtureCompletionBaseTestCase.kt | 7 +++++-- .../fir/completion/AbstractFirKeywordCompletionTest.kt | 8 ++++++++ .../completion/FirKeywordCompletionTestGenerated.java | 2 +- .../org/jetbrains/kotlin/test/utils/IgnoreTests.kt | 10 +++++++++- 115 files changed, 135 insertions(+), 7 deletions(-) diff --git a/generators/idea-generator/tests/org/jetbrains/kotlin/generators/tests/idea/GenerateTests.kt b/generators/idea-generator/tests/org/jetbrains/kotlin/generators/tests/idea/GenerateTests.kt index 5f4819c5554..8def30eacea 100644 --- a/generators/idea-generator/tests/org/jetbrains/kotlin/generators/tests/idea/GenerateTests.kt +++ b/generators/idea-generator/tests/org/jetbrains/kotlin/generators/tests/idea/GenerateTests.kt @@ -1216,7 +1216,7 @@ fun main(args: Array) { } testClass { - model("keywords", recursive = false) + model("keywords", recursive = false, pattern = KT_WITHOUT_FIR_PREFIX) } } @@ -1413,7 +1413,7 @@ fun main(args: Array) { } testClass { - model("keywords", recursive = false) + model("keywords", recursive = false, pattern = KT_WITHOUT_FIR_PREFIX) } testClass { diff --git a/generators/test-generator/tests/org/jetbrains/kotlin/generators/util/TestGeneratorUtil.kt b/generators/test-generator/tests/org/jetbrains/kotlin/generators/util/TestGeneratorUtil.kt index e831592df05..3a44ef9fb06 100644 --- a/generators/test-generator/tests/org/jetbrains/kotlin/generators/util/TestGeneratorUtil.kt +++ b/generators/test-generator/tests/org/jetbrains/kotlin/generators/util/TestGeneratorUtil.kt @@ -14,6 +14,7 @@ object TestGeneratorUtil { @Language("RegExp") const val KT_OR_KTS_WITHOUT_DOTS_IN_NAME = """^([^.]+)\.(kt|kts)$""" @Language("RegExp") const val KT_WITHOUT_DOTS_IN_NAME = """^([^.]+)\.kt$""" + @Language("RegExp") const val KT_WITHOUT_FIR_PREFIX = """^(.+)(? { } diff --git a/idea/idea-completion/testData/keywords/AfterClassProperty.kt b/idea/idea-completion/testData/keywords/AfterClassProperty.kt index 4d14a42004b..5ded4ab000e 100644 --- a/idea/idea-completion/testData/keywords/AfterClassProperty.kt +++ b/idea/idea-completion/testData/keywords/AfterClassProperty.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON // COMPILER_ARGUMENTS: -XXLanguage:+SealedInterfaces -XXLanguage:+MultiPlatformProjects diff --git a/idea/idea-completion/testData/keywords/AfterClasses.kt b/idea/idea-completion/testData/keywords/AfterClasses.kt index c86f9ccdc31..d85680fcb31 100644 --- a/idea/idea-completion/testData/keywords/AfterClasses.kt +++ b/idea/idea-completion/testData/keywords/AfterClasses.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON // COMPILER_ARGUMENTS: -XXLanguage:+SealedInterfaces -XXLanguage:+MultiPlatformProjects diff --git a/idea/idea-completion/testData/keywords/AfterClasses_LangLevel10.kt b/idea/idea-completion/testData/keywords/AfterClasses_LangLevel10.kt index d696f4a0c51..c3f8cae9a85 100644 --- a/idea/idea-completion/testData/keywords/AfterClasses_LangLevel10.kt +++ b/idea/idea-completion/testData/keywords/AfterClasses_LangLevel10.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON class A { fun foo() { diff --git a/idea/idea-completion/testData/keywords/AfterClasses_LangLevel11.kt b/idea/idea-completion/testData/keywords/AfterClasses_LangLevel11.kt index dc3480ed79b..a8a3981e87b 100644 --- a/idea/idea-completion/testData/keywords/AfterClasses_LangLevel11.kt +++ b/idea/idea-completion/testData/keywords/AfterClasses_LangLevel11.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON class A { fun foo() { diff --git a/idea/idea-completion/testData/keywords/AfterDot.kt b/idea/idea-completion/testData/keywords/AfterDot.kt index 87bd54a4c94..07f6e9ebfa4 100644 --- a/idea/idea-completion/testData/keywords/AfterDot.kt +++ b/idea/idea-completion/testData/keywords/AfterDot.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON fun foo() { val str : String diff --git a/idea/idea-completion/testData/keywords/AfterFuns.kt b/idea/idea-completion/testData/keywords/AfterFuns.kt index a59d69bb64b..4c24ec2f0fe 100644 --- a/idea/idea-completion/testData/keywords/AfterFuns.kt +++ b/idea/idea-completion/testData/keywords/AfterFuns.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON // COMPILER_ARGUMENTS: -XXLanguage:+SealedInterfaces -XXLanguage:+MultiPlatformProjects diff --git a/idea/idea-completion/testData/keywords/AfterIf.kt b/idea/idea-completion/testData/keywords/AfterIf.kt index dcd5cf434e7..a88d8ab7c05 100644 --- a/idea/idea-completion/testData/keywords/AfterIf.kt +++ b/idea/idea-completion/testData/keywords/AfterIf.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON fun some() { diff --git a/idea/idea-completion/testData/keywords/AfterSafeDot.kt b/idea/idea-completion/testData/keywords/AfterSafeDot.kt index e31c3cafe0e..7b5c31ea3da 100644 --- a/idea/idea-completion/testData/keywords/AfterSafeDot.kt +++ b/idea/idea-completion/testData/keywords/AfterSafeDot.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON fun foo() { val str : String? diff --git a/idea/idea-completion/testData/keywords/AfterSpaceAndDot.kt b/idea/idea-completion/testData/keywords/AfterSpaceAndDot.kt index ed7b5e4416b..4fb8009c127 100644 --- a/idea/idea-completion/testData/keywords/AfterSpaceAndDot.kt +++ b/idea/idea-completion/testData/keywords/AfterSpaceAndDot.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON fun foo() { val str : String diff --git a/idea/idea-completion/testData/keywords/AfterTryCatch.kt b/idea/idea-completion/testData/keywords/AfterTryCatch.kt index 42e442aafbf..668f707382e 100644 --- a/idea/idea-completion/testData/keywords/AfterTryCatch.kt +++ b/idea/idea-completion/testData/keywords/AfterTryCatch.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON fun foo() { try { diff --git a/idea/idea-completion/testData/keywords/AfterTryFinally.kt b/idea/idea-completion/testData/keywords/AfterTryFinally.kt index 787755a52cc..8f6eee4521c 100644 --- a/idea/idea-completion/testData/keywords/AfterTryFinally.kt +++ b/idea/idea-completion/testData/keywords/AfterTryFinally.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON fun foo() { try { diff --git a/idea/idea-completion/testData/keywords/BeforeClass.kt b/idea/idea-completion/testData/keywords/BeforeClass.kt index f5c7f5ae296..d64e95fec64 100644 --- a/idea/idea-completion/testData/keywords/BeforeClass.kt +++ b/idea/idea-completion/testData/keywords/BeforeClass.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON eclass A { } diff --git a/idea/idea-completion/testData/keywords/BeforeDelegationCall.kt b/idea/idea-completion/testData/keywords/BeforeDelegationCall.kt index 1109afd0662..9ec605a236b 100644 --- a/idea/idea-completion/testData/keywords/BeforeDelegationCall.kt +++ b/idea/idea-completion/testData/keywords/BeforeDelegationCall.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON class A(x: Int) { constructor(): diff --git a/idea/idea-completion/testData/keywords/BreakContinue.kt b/idea/idea-completion/testData/keywords/BreakContinue.kt index 01060124fc4..0bef75b90a0 100644 --- a/idea/idea-completion/testData/keywords/BreakContinue.kt +++ b/idea/idea-completion/testData/keywords/BreakContinue.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON fun foo() { myFor@ diff --git a/idea/idea-completion/testData/keywords/CommaExpected.kt b/idea/idea-completion/testData/keywords/CommaExpected.kt index 6180f601f72..e5a9534ef1d 100644 --- a/idea/idea-completion/testData/keywords/CommaExpected.kt +++ b/idea/idea-completion/testData/keywords/CommaExpected.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON fun foo() { Math.pow(2.0 ) diff --git a/idea/idea-completion/testData/keywords/CompanionObjectBeforeObject.kt b/idea/idea-completion/testData/keywords/CompanionObjectBeforeObject.kt index d794e1d7cc8..d2fe64b483d 100644 --- a/idea/idea-completion/testData/keywords/CompanionObjectBeforeObject.kt +++ b/idea/idea-completion/testData/keywords/CompanionObjectBeforeObject.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON class TestClass { diff --git a/idea/idea-completion/testData/keywords/Else1.kt b/idea/idea-completion/testData/keywords/Else1.kt index 382caee4664..536737de0f2 100644 --- a/idea/idea-completion/testData/keywords/Else1.kt +++ b/idea/idea-completion/testData/keywords/Else1.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON fun foo(p: Int) { if (p > 0) { diff --git a/idea/idea-completion/testData/keywords/Else2.kt b/idea/idea-completion/testData/keywords/Else2.kt index 2101e3e6c15..0f62d67a2e6 100644 --- a/idea/idea-completion/testData/keywords/Else2.kt +++ b/idea/idea-completion/testData/keywords/Else2.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON fun foo(p: Int) { if (p > 0) diff --git a/idea/idea-completion/testData/keywords/FileKeyword.kt b/idea/idea-completion/testData/keywords/FileKeyword.kt index 6386fc5eda8..6d49b35ea44 100644 --- a/idea/idea-completion/testData/keywords/FileKeyword.kt +++ b/idea/idea-completion/testData/keywords/FileKeyword.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON @[] diff --git a/idea/idea-completion/testData/keywords/FixingLayoutAndReturn.kt b/idea/idea-completion/testData/keywords/FixingLayoutAndReturn.kt index 7831d192311..7f1968d1649 100644 --- a/idea/idea-completion/testData/keywords/FixingLayoutAndReturn.kt +++ b/idea/idea-completion/testData/keywords/FixingLayoutAndReturn.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON fun foo() { куе diff --git a/idea/idea-completion/testData/keywords/GlobalPropertyAccessors.kt b/idea/idea-completion/testData/keywords/GlobalPropertyAccessors.kt index e5627de13c4..ce3fe7ae032 100644 --- a/idea/idea-completion/testData/keywords/GlobalPropertyAccessors.kt +++ b/idea/idea-completion/testData/keywords/GlobalPropertyAccessors.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON // COMPILER_ARGUMENTS: -XXLanguage:+SealedInterfaces -XXLanguage:+MultiPlatformProjects diff --git a/idea/idea-completion/testData/keywords/IfTryCatch.kt b/idea/idea-completion/testData/keywords/IfTryCatch.kt index b1ae9d0b9b5..b3abd2c7947 100644 --- a/idea/idea-completion/testData/keywords/IfTryCatch.kt +++ b/idea/idea-completion/testData/keywords/IfTryCatch.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON fun foo(p: Int) { if (p > 0) diff --git a/idea/idea-completion/testData/keywords/InAnnotationClassScope.kt b/idea/idea-completion/testData/keywords/InAnnotationClassScope.kt index 69c2d8ccbc7..44bc0d442ad 100644 --- a/idea/idea-completion/testData/keywords/InAnnotationClassScope.kt +++ b/idea/idea-completion/testData/keywords/InAnnotationClassScope.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON // COMPILER_ARGUMENTS: -XXLanguage:+SealedInterfaces -XXLanguage:+MultiPlatformProjects diff --git a/idea/idea-completion/testData/keywords/InArgumentList.kt b/idea/idea-completion/testData/keywords/InArgumentList.kt index 72cee4bc6e8..71cf832eb3e 100644 --- a/idea/idea-completion/testData/keywords/InArgumentList.kt +++ b/idea/idea-completion/testData/keywords/InArgumentList.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON fun foo(p: Int) { x() diff --git a/idea/idea-completion/testData/keywords/InBlockComment.kt b/idea/idea-completion/testData/keywords/InBlockComment.kt index 5d783a78e84..b9a3b567707 100644 --- a/idea/idea-completion/testData/keywords/InBlockComment.kt +++ b/idea/idea-completion/testData/keywords/InBlockComment.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON class TestClass { /* */ diff --git a/idea/idea-completion/testData/keywords/InChar.kt b/idea/idea-completion/testData/keywords/InChar.kt index 222c39d9904..7f27e87af94 100644 --- a/idea/idea-completion/testData/keywords/InChar.kt +++ b/idea/idea-completion/testData/keywords/InChar.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON class TestClass { fun test() { diff --git a/idea/idea-completion/testData/keywords/InClassBeforeFun.kt b/idea/idea-completion/testData/keywords/InClassBeforeFun.kt index 8acff53151e..d0a1af7aa2f 100644 --- a/idea/idea-completion/testData/keywords/InClassBeforeFun.kt +++ b/idea/idea-completion/testData/keywords/InClassBeforeFun.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON // COMPILER_ARGUMENTS: -XXLanguage:+SealedInterfaces -XXLanguage:+MultiPlatformProjects diff --git a/idea/idea-completion/testData/keywords/InClassNoCompletionInValName.kt b/idea/idea-completion/testData/keywords/InClassNoCompletionInValName.kt index de95efdcada..0024fbf7176 100644 --- a/idea/idea-completion/testData/keywords/InClassNoCompletionInValName.kt +++ b/idea/idea-completion/testData/keywords/InClassNoCompletionInValName.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON class Test { val diff --git a/idea/idea-completion/testData/keywords/InClassProperty.kt b/idea/idea-completion/testData/keywords/InClassProperty.kt index 83813338d60..6b0717c7292 100644 --- a/idea/idea-completion/testData/keywords/InClassProperty.kt +++ b/idea/idea-completion/testData/keywords/InClassProperty.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON class MouseMovedEventArgs { diff --git a/idea/idea-completion/testData/keywords/InClassScope.kt b/idea/idea-completion/testData/keywords/InClassScope.kt index fa489da47d3..69882f992d7 100644 --- a/idea/idea-completion/testData/keywords/InClassScope.kt +++ b/idea/idea-completion/testData/keywords/InClassScope.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON // COMPILER_ARGUMENTS: -XXLanguage:+SealedInterfaces -XXLanguage:+MultiPlatformProjects diff --git a/idea/idea-completion/testData/keywords/InClassTypeParameters.kt b/idea/idea-completion/testData/keywords/InClassTypeParameters.kt index 3a21f3c8902..e1de2dd711b 100644 --- a/idea/idea-completion/testData/keywords/InClassTypeParameters.kt +++ b/idea/idea-completion/testData/keywords/InClassTypeParameters.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON class T<> diff --git a/idea/idea-completion/testData/keywords/InCodeBlock.kt b/idea/idea-completion/testData/keywords/InCodeBlock.kt index f5f0481f1af..4edb5c61503 100644 --- a/idea/idea-completion/testData/keywords/InCodeBlock.kt +++ b/idea/idea-completion/testData/keywords/InCodeBlock.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON fun foo() { diff --git a/idea/idea-completion/testData/keywords/InElse.kt b/idea/idea-completion/testData/keywords/InElse.kt index ee867bb2f12..841cc14bb68 100644 --- a/idea/idea-completion/testData/keywords/InElse.kt +++ b/idea/idea-completion/testData/keywords/InElse.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON fun some() { diff --git a/idea/idea-completion/testData/keywords/InEnumScope1.kt b/idea/idea-completion/testData/keywords/InEnumScope1.kt index ae1ec29e0dd..f4d8cbda9e3 100644 --- a/idea/idea-completion/testData/keywords/InEnumScope1.kt +++ b/idea/idea-completion/testData/keywords/InEnumScope1.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON enum class Test { diff --git a/idea/idea-completion/testData/keywords/InEnumScope2.kt b/idea/idea-completion/testData/keywords/InEnumScope2.kt index a7b42d4223a..dc7c734b8a8 100644 --- a/idea/idea-completion/testData/keywords/InEnumScope2.kt +++ b/idea/idea-completion/testData/keywords/InEnumScope2.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON // COMPILER_ARGUMENTS: -XXLanguage:+SealedInterfaces -XXLanguage:+MultiPlatformProjects diff --git a/idea/idea-completion/testData/keywords/InFunctionExpressionBody.kt b/idea/idea-completion/testData/keywords/InFunctionExpressionBody.kt index 6370f714fa7..ea971bee725 100644 --- a/idea/idea-completion/testData/keywords/InFunctionExpressionBody.kt +++ b/idea/idea-completion/testData/keywords/InFunctionExpressionBody.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON fun foo() = diff --git a/idea/idea-completion/testData/keywords/InFunctionName.kt b/idea/idea-completion/testData/keywords/InFunctionName.kt index e44c4d79b0b..153cddcccc8 100644 --- a/idea/idea-completion/testData/keywords/InFunctionName.kt +++ b/idea/idea-completion/testData/keywords/InFunctionName.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON fun () { diff --git a/idea/idea-completion/testData/keywords/InFunctionRecieverType.kt b/idea/idea-completion/testData/keywords/InFunctionRecieverType.kt index 6dd437e93cf..5c04498d76b 100644 --- a/idea/idea-completion/testData/keywords/InFunctionRecieverType.kt +++ b/idea/idea-completion/testData/keywords/InFunctionRecieverType.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON fun . diff --git a/idea/idea-completion/testData/keywords/InFunctionTypePosition.kt b/idea/idea-completion/testData/keywords/InFunctionTypePosition.kt index 97d515d80e7..7ad84cde513 100644 --- a/idea/idea-completion/testData/keywords/InFunctionTypePosition.kt +++ b/idea/idea-completion/testData/keywords/InFunctionTypePosition.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON fun foo() { val test : diff --git a/idea/idea-completion/testData/keywords/InGetterExpressionBody.kt b/idea/idea-completion/testData/keywords/InGetterExpressionBody.kt index fd4ff547f02..72b0eaf9774 100644 --- a/idea/idea-completion/testData/keywords/InGetterExpressionBody.kt +++ b/idea/idea-completion/testData/keywords/InGetterExpressionBody.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON val prop: Int get() = diff --git a/idea/idea-completion/testData/keywords/InIf.kt b/idea/idea-completion/testData/keywords/InIf.kt index 9c36c4eeeb8..27d5895e60a 100644 --- a/idea/idea-completion/testData/keywords/InIf.kt +++ b/idea/idea-completion/testData/keywords/InIf.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON fun some() { diff --git a/idea/idea-completion/testData/keywords/InInterfaceScope.kt b/idea/idea-completion/testData/keywords/InInterfaceScope.kt index cfaec6148b0..e400ee3f49a 100644 --- a/idea/idea-completion/testData/keywords/InInterfaceScope.kt +++ b/idea/idea-completion/testData/keywords/InInterfaceScope.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON // COMPILER_ARGUMENTS: -XXLanguage:+SealedInterfaces -XXLanguage:+MultiPlatformProjects diff --git a/idea/idea-completion/testData/keywords/InMemberFunParametersList.kt b/idea/idea-completion/testData/keywords/InMemberFunParametersList.kt index 52661754f05..fe79da7caa5 100644 --- a/idea/idea-completion/testData/keywords/InMemberFunParametersList.kt +++ b/idea/idea-completion/testData/keywords/InMemberFunParametersList.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON package TestData diff --git a/idea/idea-completion/testData/keywords/InModifierListInsideClass.kt b/idea/idea-completion/testData/keywords/InModifierListInsideClass.kt index 1316c4595ff..288bc9f04b1 100644 --- a/idea/idea-completion/testData/keywords/InModifierListInsideClass.kt +++ b/idea/idea-completion/testData/keywords/InModifierListInsideClass.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON // for: KT-2170 open class Foo { diff --git a/idea/idea-completion/testData/keywords/InNotFinishedGenericWithFunAfter.kt b/idea/idea-completion/testData/keywords/InNotFinishedGenericWithFunAfter.kt index c67e8b5261f..64f53fe8322 100644 --- a/idea/idea-completion/testData/keywords/InNotFinishedGenericWithFunAfter.kt +++ b/idea/idea-completion/testData/keywords/InNotFinishedGenericWithFunAfter.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON class Test< diff --git a/idea/idea-completion/testData/keywords/InObjectScope.kt b/idea/idea-completion/testData/keywords/InObjectScope.kt index e8b141396df..990615cf157 100644 --- a/idea/idea-completion/testData/keywords/InObjectScope.kt +++ b/idea/idea-completion/testData/keywords/InObjectScope.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON // COMPILER_ARGUMENTS: -XXLanguage:+SealedInterfaces -XXLanguage:+MultiPlatformProjects diff --git a/idea/idea-completion/testData/keywords/InParameterDefaultValue.kt b/idea/idea-completion/testData/keywords/InParameterDefaultValue.kt index a1ae2d84809..dc687aa76ad 100644 --- a/idea/idea-completion/testData/keywords/InParameterDefaultValue.kt +++ b/idea/idea-completion/testData/keywords/InParameterDefaultValue.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON fun foo(p: Int = ) diff --git a/idea/idea-completion/testData/keywords/InPrimaryConstructorParametersList.kt b/idea/idea-completion/testData/keywords/InPrimaryConstructorParametersList.kt index 04097df1434..5953da6c347 100644 --- a/idea/idea-completion/testData/keywords/InPrimaryConstructorParametersList.kt +++ b/idea/idea-completion/testData/keywords/InPrimaryConstructorParametersList.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON package TestData diff --git a/idea/idea-completion/testData/keywords/InPropertyInitializer.kt b/idea/idea-completion/testData/keywords/InPropertyInitializer.kt index 2131fe0d179..a4efb635a2a 100644 --- a/idea/idea-completion/testData/keywords/InPropertyInitializer.kt +++ b/idea/idea-completion/testData/keywords/InPropertyInitializer.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON var a : Int = diff --git a/idea/idea-completion/testData/keywords/InPropertyTypeReference.kt b/idea/idea-completion/testData/keywords/InPropertyTypeReference.kt index 6963bf64e1b..55928428565 100644 --- a/idea/idea-completion/testData/keywords/InPropertyTypeReference.kt +++ b/idea/idea-completion/testData/keywords/InPropertyTypeReference.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON val e. diff --git a/idea/idea-completion/testData/keywords/InString.kt b/idea/idea-completion/testData/keywords/InString.kt index 46f53eccf39..5069013cfc5 100644 --- a/idea/idea-completion/testData/keywords/InString.kt +++ b/idea/idea-completion/testData/keywords/InString.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON class TestClass { fun test() { diff --git a/idea/idea-completion/testData/keywords/InTopFunParametersList.kt b/idea/idea-completion/testData/keywords/InTopFunParametersList.kt index 0c4142b0bb5..d2793fcc1d8 100644 --- a/idea/idea-completion/testData/keywords/InTopFunParametersList.kt +++ b/idea/idea-completion/testData/keywords/InTopFunParametersList.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON fun test() { diff --git a/idea/idea-completion/testData/keywords/InTopScopeAfterPackage.kt b/idea/idea-completion/testData/keywords/InTopScopeAfterPackage.kt index 9544ddb2a5a..86cd9182546 100644 --- a/idea/idea-completion/testData/keywords/InTopScopeAfterPackage.kt +++ b/idea/idea-completion/testData/keywords/InTopScopeAfterPackage.kt @@ -1,4 +1,5 @@ // FIR_COMPARISON +// FIR_IDENTICAL // COMPILER_ARGUMENTS: -XXLanguage:+SealedInterfaces -XXLanguage:+MultiPlatformProjects package Test diff --git a/idea/idea-completion/testData/keywords/InTypePosition.kt b/idea/idea-completion/testData/keywords/InTypePosition.kt index b95db663a01..d9f64737112 100644 --- a/idea/idea-completion/testData/keywords/InTypePosition.kt +++ b/idea/idea-completion/testData/keywords/InTypePosition.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON val a : diff --git a/idea/idea-completion/testData/keywords/LabeledLambdaThis.kt b/idea/idea-completion/testData/keywords/LabeledLambdaThis.kt index d82a5cc2d17..c2660c6a344 100644 --- a/idea/idea-completion/testData/keywords/LabeledLambdaThis.kt +++ b/idea/idea-completion/testData/keywords/LabeledLambdaThis.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON fun foo(): String.() -> Unit { return (label@ { diff --git a/idea/idea-completion/testData/keywords/LineComment.kt b/idea/idea-completion/testData/keywords/LineComment.kt index 06f603ce494..d8c795462aa 100644 --- a/idea/idea-completion/testData/keywords/LineComment.kt +++ b/idea/idea-completion/testData/keywords/LineComment.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON class TestClass { // diff --git a/idea/idea-completion/testData/keywords/NoBreak1.kt b/idea/idea-completion/testData/keywords/NoBreak1.kt index 1eb1229747b..8798a92d9af 100644 --- a/idea/idea-completion/testData/keywords/NoBreak1.kt +++ b/idea/idea-completion/testData/keywords/NoBreak1.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON fun foo() { myFor@ diff --git a/idea/idea-completion/testData/keywords/NoBreak2.kt b/idea/idea-completion/testData/keywords/NoBreak2.kt index ce4babeeca9..8cbf346c714 100644 --- a/idea/idea-completion/testData/keywords/NoBreak2.kt +++ b/idea/idea-completion/testData/keywords/NoBreak2.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON fun foo() { myFor@ diff --git a/idea/idea-completion/testData/keywords/NoCompanionThis.kt b/idea/idea-completion/testData/keywords/NoCompanionThis.kt index 24d096dbe03..d2306b7000d 100644 --- a/idea/idea-completion/testData/keywords/NoCompanionThis.kt +++ b/idea/idea-completion/testData/keywords/NoCompanionThis.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON class C { fun foo() { diff --git a/idea/idea-completion/testData/keywords/NoCompletionForCapitalPrefix.kt b/idea/idea-completion/testData/keywords/NoCompletionForCapitalPrefix.kt index 78ccc91a341..b07e9ab3a92 100644 --- a/idea/idea-completion/testData/keywords/NoCompletionForCapitalPrefix.kt +++ b/idea/idea-completion/testData/keywords/NoCompletionForCapitalPrefix.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON P diff --git a/idea/idea-completion/testData/keywords/NoContinue.kt b/idea/idea-completion/testData/keywords/NoContinue.kt index e39399e967a..bdb69048124 100644 --- a/idea/idea-completion/testData/keywords/NoContinue.kt +++ b/idea/idea-completion/testData/keywords/NoContinue.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON fun foo() { myFor@ diff --git a/idea/idea-completion/testData/keywords/NoFinalInParameterList.kt b/idea/idea-completion/testData/keywords/NoFinalInParameterList.kt index 3d9de118393..1682d278f3b 100644 --- a/idea/idea-completion/testData/keywords/NoFinalInParameterList.kt +++ b/idea/idea-completion/testData/keywords/NoFinalInParameterList.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON fun foo(f diff --git a/idea/idea-completion/testData/keywords/NotInNotIs.kt b/idea/idea-completion/testData/keywords/NotInNotIs.kt index 62ac325df09..3bb39f7c2d4 100644 --- a/idea/idea-completion/testData/keywords/NotInNotIs.kt +++ b/idea/idea-completion/testData/keywords/NotInNotIs.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON fun foo(v: String) { if (v !) diff --git a/idea/idea-completion/testData/keywords/NotInNotIs2.kt b/idea/idea-completion/testData/keywords/NotInNotIs2.kt index c0d6aedd277..ebd88cbf797 100644 --- a/idea/idea-completion/testData/keywords/NotInNotIs2.kt +++ b/idea/idea-completion/testData/keywords/NotInNotIs2.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON fun foo() { list.filter { it !i } diff --git a/idea/idea-completion/testData/keywords/PrefixMatcher.kt b/idea/idea-completion/testData/keywords/PrefixMatcher.kt index 79929b10647..213eb9d992b 100644 --- a/idea/idea-completion/testData/keywords/PrefixMatcher.kt +++ b/idea/idea-completion/testData/keywords/PrefixMatcher.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON // test that sinple prefix matching is used for keywords diff --git a/idea/idea-completion/testData/keywords/PropertyAccessors.kt b/idea/idea-completion/testData/keywords/PropertyAccessors.kt index 72c4bf02512..980939a19c3 100644 --- a/idea/idea-completion/testData/keywords/PropertyAccessors.kt +++ b/idea/idea-completion/testData/keywords/PropertyAccessors.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON // COMPILER_ARGUMENTS: -XXLanguage:+SealedInterfaces -XXLanguage:+MultiPlatformProjects diff --git a/idea/idea-completion/testData/keywords/PropertyAccessors2.kt b/idea/idea-completion/testData/keywords/PropertyAccessors2.kt index 8b6d9222882..7991010192d 100644 --- a/idea/idea-completion/testData/keywords/PropertyAccessors2.kt +++ b/idea/idea-completion/testData/keywords/PropertyAccessors2.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON // COMPILER_ARGUMENTS: -XXLanguage:+SealedInterfaces -XXLanguage:+MultiPlatformProjects diff --git a/idea/idea-completion/testData/keywords/PropertySetter.kt b/idea/idea-completion/testData/keywords/PropertySetter.kt index 8451a69c402..436107be6f5 100644 --- a/idea/idea-completion/testData/keywords/PropertySetter.kt +++ b/idea/idea-completion/testData/keywords/PropertySetter.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON // COMPILER_ARGUMENTS: -XXLanguage:+SealedInterfaces -XXLanguage:+MultiPlatformProjects diff --git a/idea/idea-completion/testData/keywords/Receiver.kt b/idea/idea-completion/testData/keywords/Receiver.kt index c049ffd01ea..fd047785794 100644 --- a/idea/idea-completion/testData/keywords/Receiver.kt +++ b/idea/idea-completion/testData/keywords/Receiver.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON fun @ diff --git a/idea/idea-completion/testData/keywords/Return1.kt b/idea/idea-completion/testData/keywords/Return1.kt index 9b31ec466b6..3a0eb807e8c 100644 --- a/idea/idea-completion/testData/keywords/Return1.kt +++ b/idea/idea-completion/testData/keywords/Return1.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON fun foo() { takeHandler1 { diff --git a/idea/idea-completion/testData/keywords/Return2.kt b/idea/idea-completion/testData/keywords/Return2.kt index 909d902ae45..91763e2f58b 100644 --- a/idea/idea-completion/testData/keywords/Return2.kt +++ b/idea/idea-completion/testData/keywords/Return2.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON fun foo() { takeHandler1 { diff --git a/idea/idea-completion/testData/keywords/Return3.kt b/idea/idea-completion/testData/keywords/Return3.kt index e99398f2668..92329dc37b3 100644 --- a/idea/idea-completion/testData/keywords/Return3.kt +++ b/idea/idea-completion/testData/keywords/Return3.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON fun foo() { takeHandler1 { diff --git a/idea/idea-completion/testData/keywords/Return4.kt b/idea/idea-completion/testData/keywords/Return4.kt index d566a2f7956..b7dac2baaaa 100644 --- a/idea/idea-completion/testData/keywords/Return4.kt +++ b/idea/idea-completion/testData/keywords/Return4.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON fun foo() { takeHandler label@ { diff --git a/idea/idea-completion/testData/keywords/Return5.kt b/idea/idea-completion/testData/keywords/Return5.kt index 85b5869705f..ab13a95bc17 100644 --- a/idea/idea-completion/testData/keywords/Return5.kt +++ b/idea/idea-completion/testData/keywords/Return5.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON fun foo() { takeHandler label@ { diff --git a/idea/idea-completion/testData/keywords/Return7.kt b/idea/idea-completion/testData/keywords/Return7.kt index db7b2e7f76a..a8ca1854682 100644 --- a/idea/idea-completion/testData/keywords/Return7.kt +++ b/idea/idea-completion/testData/keywords/Return7.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON val property: Int get() { diff --git a/idea/idea-completion/testData/keywords/Return8.kt b/idea/idea-completion/testData/keywords/Return8.kt index 6a31331d8a8..780f51a3c97 100644 --- a/idea/idea-completion/testData/keywords/Return8.kt +++ b/idea/idea-completion/testData/keywords/Return8.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON fun foo(p: Int?): Int = p ?: diff --git a/idea/idea-completion/testData/keywords/Return9.kt b/idea/idea-completion/testData/keywords/Return9.kt index 136fb2f1a70..16b131694af 100644 --- a/idea/idea-completion/testData/keywords/Return9.kt +++ b/idea/idea-completion/testData/keywords/Return9.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON inline fun run (p: () -> Unit) {} diff --git a/idea/idea-completion/testData/keywords/ReturnBoolean.kt b/idea/idea-completion/testData/keywords/ReturnBoolean.kt index 5de38890633..ed79fab152b 100644 --- a/idea/idea-completion/testData/keywords/ReturnBoolean.kt +++ b/idea/idea-completion/testData/keywords/ReturnBoolean.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON fun foo(): Boolean { ret diff --git a/idea/idea-completion/testData/keywords/ReturnCollection.kt b/idea/idea-completion/testData/keywords/ReturnCollection.kt index 61648ba7a57..cc831f2c20c 100644 --- a/idea/idea-completion/testData/keywords/ReturnCollection.kt +++ b/idea/idea-completion/testData/keywords/ReturnCollection.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON fun foo(): Collection { ret diff --git a/idea/idea-completion/testData/keywords/ReturnIterable.kt b/idea/idea-completion/testData/keywords/ReturnIterable.kt index ba2050c7c6c..fe9627c4da8 100644 --- a/idea/idea-completion/testData/keywords/ReturnIterable.kt +++ b/idea/idea-completion/testData/keywords/ReturnIterable.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON fun foo(): Iterable { ret diff --git a/idea/idea-completion/testData/keywords/ReturnKeywordName.kt b/idea/idea-completion/testData/keywords/ReturnKeywordName.kt index 27fc897fc7c..d180dba018e 100644 --- a/idea/idea-completion/testData/keywords/ReturnKeywordName.kt +++ b/idea/idea-completion/testData/keywords/ReturnKeywordName.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON fun foo() { `fun` { diff --git a/idea/idea-completion/testData/keywords/ReturnList.kt b/idea/idea-completion/testData/keywords/ReturnList.kt index 1c32b832709..5dd88ab6fc1 100644 --- a/idea/idea-completion/testData/keywords/ReturnList.kt +++ b/idea/idea-completion/testData/keywords/ReturnList.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON fun foo(): List { ret diff --git a/idea/idea-completion/testData/keywords/ReturnNotNull.kt b/idea/idea-completion/testData/keywords/ReturnNotNull.kt index 1ca3622001d..d3181bff4c8 100644 --- a/idea/idea-completion/testData/keywords/ReturnNotNull.kt +++ b/idea/idea-completion/testData/keywords/ReturnNotNull.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON fun foo(): String { ret diff --git a/idea/idea-completion/testData/keywords/ReturnNull.kt b/idea/idea-completion/testData/keywords/ReturnNull.kt index 21343f7e878..f6aa24ccb54 100644 --- a/idea/idea-completion/testData/keywords/ReturnNull.kt +++ b/idea/idea-completion/testData/keywords/ReturnNull.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON fun foo(): String? { ret diff --git a/idea/idea-completion/testData/keywords/ReturnNullableBoolean.kt b/idea/idea-completion/testData/keywords/ReturnNullableBoolean.kt index 2bdcb7e29e0..2df1ae57dd9 100644 --- a/idea/idea-completion/testData/keywords/ReturnNullableBoolean.kt +++ b/idea/idea-completion/testData/keywords/ReturnNullableBoolean.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON fun foo(): Boolean? { ret diff --git a/idea/idea-completion/testData/keywords/ReturnSet.kt b/idea/idea-completion/testData/keywords/ReturnSet.kt index f4fbf0eadd8..299e07d29b2 100644 --- a/idea/idea-completion/testData/keywords/ReturnSet.kt +++ b/idea/idea-completion/testData/keywords/ReturnSet.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON fun foo(): Set { ret diff --git a/idea/idea-completion/testData/keywords/SealedForAlreadySealed.kt b/idea/idea-completion/testData/keywords/SealedForAlreadySealed.kt index 4fe53c086de..63e42f4cef4 100644 --- a/idea/idea-completion/testData/keywords/SealedForAlreadySealed.kt +++ b/idea/idea-completion/testData/keywords/SealedForAlreadySealed.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON seal sealed class A // ABSENT: "sealed" diff --git a/idea/idea-completion/testData/keywords/SealedForAnnotationClass.kt b/idea/idea-completion/testData/keywords/SealedForAnnotationClass.kt index 5581cc95b64..cb33ca607e2 100644 --- a/idea/idea-completion/testData/keywords/SealedForAnnotationClass.kt +++ b/idea/idea-completion/testData/keywords/SealedForAnnotationClass.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON seal annotation class A // ABSENT: "sealed" diff --git a/idea/idea-completion/testData/keywords/SealedForDataClass.kt b/idea/idea-completion/testData/keywords/SealedForDataClass.kt index 0da12f7c0d6..b18e43a37d6 100644 --- a/idea/idea-completion/testData/keywords/SealedForDataClass.kt +++ b/idea/idea-completion/testData/keywords/SealedForDataClass.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON seal data class A(val f: Int) // ABSENT: "sealed" \ No newline at end of file diff --git a/idea/idea-completion/testData/keywords/SealedForDeclaredClass.kt b/idea/idea-completion/testData/keywords/SealedForDeclaredClass.kt index de9341c4b85..031e9d31e97 100644 --- a/idea/idea-completion/testData/keywords/SealedForDeclaredClass.kt +++ b/idea/idea-completion/testData/keywords/SealedForDeclaredClass.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON sealclass A // EXIST: "sealed" diff --git a/idea/idea-completion/testData/keywords/SealedForDeclaredInterface.kt b/idea/idea-completion/testData/keywords/SealedForDeclaredInterface.kt index c6b3e669aa7..54daecdfaf7 100644 --- a/idea/idea-completion/testData/keywords/SealedForDeclaredInterface.kt +++ b/idea/idea-completion/testData/keywords/SealedForDeclaredInterface.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON sealinterface A // EXIST: "sealed" diff --git a/idea/idea-completion/testData/keywords/SealedForEnumClass.kt b/idea/idea-completion/testData/keywords/SealedForEnumClass.kt index 6cba8fef6dc..47d502f34d6 100644 --- a/idea/idea-completion/testData/keywords/SealedForEnumClass.kt +++ b/idea/idea-completion/testData/keywords/SealedForEnumClass.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON seal enum class A // ABSENT: "sealed" \ No newline at end of file diff --git a/idea/idea-completion/testData/keywords/SealedForFunInterface.kt b/idea/idea-completion/testData/keywords/SealedForFunInterface.kt index 00c62d07511..bd7bb8779cf 100644 --- a/idea/idea-completion/testData/keywords/SealedForFunInterface.kt +++ b/idea/idea-completion/testData/keywords/SealedForFunInterface.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON seal fun interface A { fun aFunction() diff --git a/idea/idea-completion/testData/keywords/SealedForInnerClass.kt b/idea/idea-completion/testData/keywords/SealedForInnerClass.kt index 67842addd31..67f3aca41a4 100644 --- a/idea/idea-completion/testData/keywords/SealedForInnerClass.kt +++ b/idea/idea-completion/testData/keywords/SealedForInnerClass.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON class A { sealinner class B diff --git a/idea/idea-completion/testData/keywords/SealedForOpenClass.kt b/idea/idea-completion/testData/keywords/SealedForOpenClass.kt index 1688c48bd53..fe2adf39173 100644 --- a/idea/idea-completion/testData/keywords/SealedForOpenClass.kt +++ b/idea/idea-completion/testData/keywords/SealedForOpenClass.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON seal open class A // ABSENT: "sealed" \ No newline at end of file diff --git a/idea/idea-completion/testData/keywords/SealedWithName.kt b/idea/idea-completion/testData/keywords/SealedWithName.kt index 528754e939f..0c476f39f9c 100644 --- a/idea/idea-completion/testData/keywords/SealedWithName.kt +++ b/idea/idea-completion/testData/keywords/SealedWithName.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON // COMPILER_ARGUMENTS: -XXLanguage:+SealedInterfaces -XXLanguage:+MultiPlatformProjects diff --git a/idea/idea-completion/testData/keywords/SealedWithoutName.kt b/idea/idea-completion/testData/keywords/SealedWithoutName.kt index d7b26e08817..7d05e88a701 100644 --- a/idea/idea-completion/testData/keywords/SealedWithoutName.kt +++ b/idea/idea-completion/testData/keywords/SealedWithoutName.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON // COMPILER_ARGUMENTS: -XXLanguage:+SealedInterfaces -XXLanguage:+MultiPlatformProjects diff --git a/idea/idea-completion/testData/keywords/SuspendInParameterTypePosition.kt b/idea/idea-completion/testData/keywords/SuspendInParameterTypePosition.kt index 8d3563fa704..d0a963da194 100644 --- a/idea/idea-completion/testData/keywords/SuspendInParameterTypePosition.kt +++ b/idea/idea-completion/testData/keywords/SuspendInParameterTypePosition.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON fun foo(a: ) {} diff --git a/idea/idea-completion/testData/keywords/SuspendInsideTypeArguments.kt b/idea/idea-completion/testData/keywords/SuspendInsideTypeArguments.kt index 25e4344a92a..b64ae72ab3c 100644 --- a/idea/idea-completion/testData/keywords/SuspendInsideTypeArguments.kt +++ b/idea/idea-completion/testData/keywords/SuspendInsideTypeArguments.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON class Su() { fun x() { diff --git a/idea/idea-completion/testData/keywords/SuspendInsideTypeArguments1.kt b/idea/idea-completion/testData/keywords/SuspendInsideTypeArguments1.kt index 214c7fbbecc..63a9dce7ce8 100644 --- a/idea/idea-completion/testData/keywords/SuspendInsideTypeArguments1.kt +++ b/idea/idea-completion/testData/keywords/SuspendInsideTypeArguments1.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON class Su() { fun x() { diff --git a/idea/idea-completion/testData/keywords/This.kt b/idea/idea-completion/testData/keywords/This.kt index 704206a74b0..5584b5d5c85 100644 --- a/idea/idea-completion/testData/keywords/This.kt +++ b/idea/idea-completion/testData/keywords/This.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON class Outer { class Nested { diff --git a/idea/idea-completion/testData/keywords/ThisInCompanion.kt b/idea/idea-completion/testData/keywords/ThisInCompanion.kt index d24f9444adf..12bf1fb4af4 100644 --- a/idea/idea-completion/testData/keywords/ThisInCompanion.kt +++ b/idea/idea-completion/testData/keywords/ThisInCompanion.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON class C { companion object { diff --git a/idea/idea-completion/testData/keywords/ThisPrefixMatching.kt b/idea/idea-completion/testData/keywords/ThisPrefixMatching.kt index 6055c6fb6cd..952c5bb0a71 100644 --- a/idea/idea-completion/testData/keywords/ThisPrefixMatching.kt +++ b/idea/idea-completion/testData/keywords/ThisPrefixMatching.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON fun is1(): Boolean{} fun is2(): Boolean{} diff --git a/idea/idea-completion/testData/keywords/TopScope.kt b/idea/idea-completion/testData/keywords/TopScope.kt index bacb71a9f2b..2bc8004fc31 100644 --- a/idea/idea-completion/testData/keywords/TopScope.kt +++ b/idea/idea-completion/testData/keywords/TopScope.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON // COMPILER_ARGUMENTS: -XXLanguage:+SealedInterfaces -XXLanguage:+MultiPlatformProjects diff --git a/idea/idea-completion/testData/keywords/TopScope3-.kt b/idea/idea-completion/testData/keywords/TopScope3-.kt index ca286ab899a..d289de09655 100644 --- a/idea/idea-completion/testData/keywords/TopScope3-.kt +++ b/idea/idea-completion/testData/keywords/TopScope3-.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON // COMPILER_ARGUMENTS: -XXLanguage:+SealedInterfaces -XXLanguage:+MultiPlatformProjects diff --git a/idea/idea-completion/testData/keywords/UseSiteTargetForPrimaryConstructorParameter.kt b/idea/idea-completion/testData/keywords/UseSiteTargetForPrimaryConstructorParameter.kt index fe97b8f42c2..528f4a180c8 100644 --- a/idea/idea-completion/testData/keywords/UseSiteTargetForPrimaryConstructorParameter.kt +++ b/idea/idea-completion/testData/keywords/UseSiteTargetForPrimaryConstructorParameter.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON annotation class Ann diff --git a/idea/idea-completion/testData/keywords/topScope2.kt b/idea/idea-completion/testData/keywords/topScope2.kt index ca286ab899a..d289de09655 100644 --- a/idea/idea-completion/testData/keywords/topScope2.kt +++ b/idea/idea-completion/testData/keywords/topScope2.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_COMPARISON // COMPILER_ARGUMENTS: -XXLanguage:+SealedInterfaces -XXLanguage:+MultiPlatformProjects diff --git a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/KeywordCompletionTestGenerated.java b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/KeywordCompletionTestGenerated.java index 0f48c3d4e6c..a631e9ec921 100644 --- a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/KeywordCompletionTestGenerated.java +++ b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/KeywordCompletionTestGenerated.java @@ -96,7 +96,7 @@ public class KeywordCompletionTestGenerated extends AbstractKeywordCompletionTes } public void testAllFilesPresentInKeywords() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/idea-completion/testData/keywords"), Pattern.compile("^(.+)\\.kt$"), null, false); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/idea-completion/testData/keywords"), Pattern.compile("^(.+)(? complete(completionType, count) }, defaultCompletionType(), defaultInvocationCount(), - additionalValidDirectives = CompilerTestDirectives.ALL_COMPILER_TEST_DIRECTIVES + additionalValidDirectives = CompilerTestDirectives.ALL_COMPILER_TEST_DIRECTIVES + IgnoreTests.DIRECTIVES.FIR_IDENTICAL ) } } diff --git a/idea/idea-fir/tests/org/jetbrains/kotlin/idea/fir/completion/AbstractFirKeywordCompletionTest.kt b/idea/idea-fir/tests/org/jetbrains/kotlin/idea/fir/completion/AbstractFirKeywordCompletionTest.kt index dfc1eb41921..5576f552b0a 100644 --- a/idea/idea-fir/tests/org/jetbrains/kotlin/idea/fir/completion/AbstractFirKeywordCompletionTest.kt +++ b/idea/idea-fir/tests/org/jetbrains/kotlin/idea/fir/completion/AbstractFirKeywordCompletionTest.kt @@ -7,13 +7,21 @@ package org.jetbrains.kotlin.idea.fir.completion import org.jetbrains.kotlin.idea.completion.test.AbstractKeywordCompletionTest import org.jetbrains.kotlin.test.utils.IgnoreTests +import java.io.File abstract class AbstractFirKeywordCompletionTest : AbstractKeywordCompletionTest() { override val captureExceptions: Boolean = false + override fun handleTestPath(path: String): String = + IgnoreTests.getFirTestFileIfFirPassing( + File(path), + IgnoreTests.DIRECTIVES.FIR_COMPARISON + ).path + override fun executeTest(test: () -> Unit) { IgnoreTests.runTestIfEnabledByFileDirective(testDataFile().toPath(), IgnoreTests.DIRECTIVES.FIR_COMPARISON, ".after") { super.executeTest(test) + IgnoreTests.cleanUpIdenticalFirTestFile(testDataFile()) } } } \ No newline at end of file diff --git a/idea/idea-fir/tests/org/jetbrains/kotlin/idea/fir/completion/FirKeywordCompletionTestGenerated.java b/idea/idea-fir/tests/org/jetbrains/kotlin/idea/fir/completion/FirKeywordCompletionTestGenerated.java index 1de88e5a32d..fcc392937cb 100644 --- a/idea/idea-fir/tests/org/jetbrains/kotlin/idea/fir/completion/FirKeywordCompletionTestGenerated.java +++ b/idea/idea-fir/tests/org/jetbrains/kotlin/idea/fir/completion/FirKeywordCompletionTestGenerated.java @@ -96,7 +96,7 @@ public class FirKeywordCompletionTestGenerated extends AbstractFirKeywordComplet } public void testAllFilesPresentInKeywords() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/idea-completion/testData/keywords"), Pattern.compile("^(.+)\\.kt$"), null, false); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/idea-completion/testData/keywords"), Pattern.compile("^(.+)(?