From 2b76fe8a726f4e8ec065a8cec293933920f74603 Mon Sep 17 00:00:00 2001 From: Roman Golyshev Date: Thu, 1 Oct 2020 15:40:08 +0300 Subject: [PATCH] [FIR Completion] Enable basic insertion handler tests for FIR completion Enable tests that are passing --- .../kotlin/generators/tests/GenerateTests.kt | 9 +- .../handlers/basic/ClassWithClassObject.kt | 1 + .../basic/ClassWithClassObject.kt.after | 1 + .../basic/DoNotUseParenthesisOnNextLine.kt | 1 + .../DoNotUseParenthesisOnNextLine.kt.after | 1 + .../handlers/basic/GenericFunctionWithTab.kt | 1 + .../basic/GenericFunctionWithTab.kt.after | 1 + .../handlers/basic/GenericFunctionWithTab2.kt | 1 + .../basic/GenericFunctionWithTab2.kt.after | 1 + .../testData/handlers/basic/KT19863.kt | 1 + .../testData/handlers/basic/KT19863.kt.after | 1 + .../testData/handlers/basic/KT19864.kt | 1 + .../testData/handlers/basic/KT19864.kt.after | 1 + .../ReplaceFunctionCallByPropertyArgs.kt | 1 + ...ReplaceFunctionCallByPropertyArgs.kt.after | 1 + .../testData/handlers/basic/TypeParameter.kt | 1 + .../handlers/basic/TypeParameter.kt.after | 1 + .../callableReference/ClassConstructor.kt | 1 + .../ClassConstructor.kt.after | 1 + .../basic/callableReference/Property.kt | 1 + .../basic/callableReference/Property.kt.after | 1 + ...ctionLiteralInsertWhenNoSpacesForBraces.kt | 1 + ...iteralInsertWhenNoSpacesForBraces.kt.after | 1 + .../HigherOrderFunctionWithArg.kt | 1 + .../HigherOrderFunctionWithArg.kt.after | 1 + .../ParameterTypeIsDerivedFromFunction.kt | 1 + ...arameterTypeIsDerivedFromFunction.kt.after | 1 + .../handlers/basic/importAliases/KDoc.kt | 1 + .../basic/importAliases/KDoc.kt.after | 1 + .../handlers/basic/stringTemplate/3.kt | 1 + .../handlers/basic/stringTemplate/3.kt.after | 1 + .../handlers/basic/stringTemplate/4.kt | 1 + .../handlers/basic/stringTemplate/4.kt.after | 1 + .../basic/stringTemplate/GlobalVal.kt | 1 + .../basic/stringTemplate/GlobalVal.kt.after | 1 + .../stringTemplate/GlobalValInCurlyBraces.kt | 1 + .../GlobalValInCurlyBraces.kt.after | 1 + .../basic/typeArgsForCall/AfterElse.kt | 1 + .../basic/typeArgsForCall/AfterElse.kt.after | 1 + .../basic/typeArgsForCall/AfterElvis.kt | 1 + .../basic/typeArgsForCall/AfterElvis.kt.after | 1 + .../basic/typeArgsForCall/HasExpectedType.kt | 1 + .../typeArgsForCall/HasExpectedType.kt.after | 1 + .../basic/typeArgsForCall/ReplaceByTab2.kt | 1 + .../typeArgsForCall/ReplaceByTab2.kt.after | 1 + .../TypeArgumentsFromParameters.kt | 1 + .../TypeArgumentsFromParameters.kt.after | 1 + ...ractHighLevelBasicCompletionHandlerTest.kt | 17 + ...elBasicCompletionHandlerTestGenerated.java | 1016 +++++++++++++++++ 49 files changed, 1084 insertions(+), 4 deletions(-) create mode 100644 idea/idea-fir/tests/org/jetbrains/kotlin/idea/completion/test/handlers/AbstractHighLevelBasicCompletionHandlerTest.kt create mode 100644 idea/idea-fir/tests/org/jetbrains/kotlin/idea/completion/test/handlers/HighLevelBasicCompletionHandlerTestGenerated.java diff --git a/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt b/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt index 59ebb6b6ad3..7d78fea0411 100644 --- a/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt +++ b/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt @@ -51,10 +51,7 @@ import org.jetbrains.kotlin.idea.codeInsight.surroundWith.AbstractSurroundWithTe import org.jetbrains.kotlin.idea.codeInsight.unwrap.AbstractUnwrapRemoveTest import org.jetbrains.kotlin.idea.completion.AbstractHighLevelJvmBasicCompletionTest import org.jetbrains.kotlin.idea.completion.test.* -import org.jetbrains.kotlin.idea.completion.test.handlers.AbstractBasicCompletionHandlerTest -import org.jetbrains.kotlin.idea.completion.test.handlers.AbstractCompletionCharFilterTest -import org.jetbrains.kotlin.idea.completion.test.handlers.AbstractKeywordCompletionHandlerTest -import org.jetbrains.kotlin.idea.completion.test.handlers.AbstractSmartCompletionHandlerTest +import org.jetbrains.kotlin.idea.completion.test.handlers.* import org.jetbrains.kotlin.idea.completion.test.weighers.AbstractBasicCompletionWeigherTest import org.jetbrains.kotlin.idea.completion.test.weighers.AbstractSmartCompletionWeigherTest import org.jetbrains.kotlin.idea.configuration.AbstractGradleConfigureProjectByChangingFileTest @@ -1067,6 +1064,10 @@ fun main(args: Array) { model("basic/common") model("basic/java") } + + testClass { + model("handlers/basic", pattern = KT_WITHOUT_DOTS_IN_NAME) + } } testGroup("idea/idea-fir/tests", "idea/testData/findUsages") { diff --git a/idea/idea-completion/testData/handlers/basic/ClassWithClassObject.kt b/idea/idea-completion/testData/handlers/basic/ClassWithClassObject.kt index 14de688f380..b04bc842cb6 100644 --- a/idea/idea-completion/testData/handlers/basic/ClassWithClassObject.kt +++ b/idea/idea-completion/testData/handlers/basic/ClassWithClassObject.kt @@ -1,3 +1,4 @@ +// FIR_COMPARISON class AClass { companion object {} } diff --git a/idea/idea-completion/testData/handlers/basic/ClassWithClassObject.kt.after b/idea/idea-completion/testData/handlers/basic/ClassWithClassObject.kt.after index eb0666a1883..48d31702f9f 100644 --- a/idea/idea-completion/testData/handlers/basic/ClassWithClassObject.kt.after +++ b/idea/idea-completion/testData/handlers/basic/ClassWithClassObject.kt.after @@ -1,3 +1,4 @@ +// FIR_COMPARISON class AClass { companion object {} } diff --git a/idea/idea-completion/testData/handlers/basic/DoNotUseParenthesisOnNextLine.kt b/idea/idea-completion/testData/handlers/basic/DoNotUseParenthesisOnNextLine.kt index 5a5a0971bb4..2b4cb3f2892 100644 --- a/idea/idea-completion/testData/handlers/basic/DoNotUseParenthesisOnNextLine.kt +++ b/idea/idea-completion/testData/handlers/basic/DoNotUseParenthesisOnNextLine.kt @@ -1,3 +1,4 @@ +// FIR_COMPARISON fun foo(p: Int){} fun f() { diff --git a/idea/idea-completion/testData/handlers/basic/DoNotUseParenthesisOnNextLine.kt.after b/idea/idea-completion/testData/handlers/basic/DoNotUseParenthesisOnNextLine.kt.after index 0591fc7c5fd..7db2c232a01 100644 --- a/idea/idea-completion/testData/handlers/basic/DoNotUseParenthesisOnNextLine.kt.after +++ b/idea/idea-completion/testData/handlers/basic/DoNotUseParenthesisOnNextLine.kt.after @@ -1,3 +1,4 @@ +// FIR_COMPARISON fun foo(p: Int){} fun f() { diff --git a/idea/idea-completion/testData/handlers/basic/GenericFunctionWithTab.kt b/idea/idea-completion/testData/handlers/basic/GenericFunctionWithTab.kt index 0b558784d7c..d30a3536c90 100644 --- a/idea/idea-completion/testData/handlers/basic/GenericFunctionWithTab.kt +++ b/idea/idea-completion/testData/handlers/basic/GenericFunctionWithTab.kt @@ -1,3 +1,4 @@ +// FIR_COMPARISON fun foo() {} fun use() = f() diff --git a/idea/idea-completion/testData/handlers/basic/GenericFunctionWithTab.kt.after b/idea/idea-completion/testData/handlers/basic/GenericFunctionWithTab.kt.after index 08f69a53ed3..82d953d31d2 100644 --- a/idea/idea-completion/testData/handlers/basic/GenericFunctionWithTab.kt.after +++ b/idea/idea-completion/testData/handlers/basic/GenericFunctionWithTab.kt.after @@ -1,3 +1,4 @@ +// FIR_COMPARISON fun foo() {} fun use() = foo() diff --git a/idea/idea-completion/testData/handlers/basic/GenericFunctionWithTab2.kt b/idea/idea-completion/testData/handlers/basic/GenericFunctionWithTab2.kt index 2fef4ef3f2c..cdad7cfe51d 100644 --- a/idea/idea-completion/testData/handlers/basic/GenericFunctionWithTab2.kt +++ b/idea/idea-completion/testData/handlers/basic/GenericFunctionWithTab2.kt @@ -1,3 +1,4 @@ +// FIR_COMPARISON fun foo() {} fun use() = f () diff --git a/idea/idea-completion/testData/handlers/basic/GenericFunctionWithTab2.kt.after b/idea/idea-completion/testData/handlers/basic/GenericFunctionWithTab2.kt.after index 32cce2aaf11..04399bd3f72 100644 --- a/idea/idea-completion/testData/handlers/basic/GenericFunctionWithTab2.kt.after +++ b/idea/idea-completion/testData/handlers/basic/GenericFunctionWithTab2.kt.after @@ -1,3 +1,4 @@ +// FIR_COMPARISON fun foo() {} fun use() = foo () diff --git a/idea/idea-completion/testData/handlers/basic/KT19863.kt b/idea/idea-completion/testData/handlers/basic/KT19863.kt index bc994639c22..0b0849e3455 100644 --- a/idea/idea-completion/testData/handlers/basic/KT19863.kt +++ b/idea/idea-completion/testData/handlers/basic/KT19863.kt @@ -1,3 +1,4 @@ +// FIR_COMPARISON package test fun `backticked`() {} diff --git a/idea/idea-completion/testData/handlers/basic/KT19863.kt.after b/idea/idea-completion/testData/handlers/basic/KT19863.kt.after index 545ea74c913..77d265ca458 100644 --- a/idea/idea-completion/testData/handlers/basic/KT19863.kt.after +++ b/idea/idea-completion/testData/handlers/basic/KT19863.kt.after @@ -1,3 +1,4 @@ +// FIR_COMPARISON package test fun `backticked`() {} diff --git a/idea/idea-completion/testData/handlers/basic/KT19864.kt b/idea/idea-completion/testData/handlers/basic/KT19864.kt index 7f430a0fe2f..53777ff450f 100644 --- a/idea/idea-completion/testData/handlers/basic/KT19864.kt +++ b/idea/idea-completion/testData/handlers/basic/KT19864.kt @@ -1,3 +1,4 @@ +// FIR_COMPARISON package test fun `backticked~name`() {} diff --git a/idea/idea-completion/testData/handlers/basic/KT19864.kt.after b/idea/idea-completion/testData/handlers/basic/KT19864.kt.after index 2ebf81e7840..f44acd99bc9 100644 --- a/idea/idea-completion/testData/handlers/basic/KT19864.kt.after +++ b/idea/idea-completion/testData/handlers/basic/KT19864.kt.after @@ -1,3 +1,4 @@ +// FIR_COMPARISON package test fun `backticked~name`() {} diff --git a/idea/idea-completion/testData/handlers/basic/ReplaceFunctionCallByPropertyArgs.kt b/idea/idea-completion/testData/handlers/basic/ReplaceFunctionCallByPropertyArgs.kt index b3a831fea8e..1cb86058bdb 100644 --- a/idea/idea-completion/testData/handlers/basic/ReplaceFunctionCallByPropertyArgs.kt +++ b/idea/idea-completion/testData/handlers/basic/ReplaceFunctionCallByPropertyArgs.kt @@ -1,3 +1,4 @@ +// FIR_COMPARISON class C { val bar: Int } diff --git a/idea/idea-completion/testData/handlers/basic/ReplaceFunctionCallByPropertyArgs.kt.after b/idea/idea-completion/testData/handlers/basic/ReplaceFunctionCallByPropertyArgs.kt.after index d91c8379574..4d395a08add 100644 --- a/idea/idea-completion/testData/handlers/basic/ReplaceFunctionCallByPropertyArgs.kt.after +++ b/idea/idea-completion/testData/handlers/basic/ReplaceFunctionCallByPropertyArgs.kt.after @@ -1,3 +1,4 @@ +// FIR_COMPARISON class C { val bar: Int } diff --git a/idea/idea-completion/testData/handlers/basic/TypeParameter.kt b/idea/idea-completion/testData/handlers/basic/TypeParameter.kt index 4400434e133..3b6c424f531 100644 --- a/idea/idea-completion/testData/handlers/basic/TypeParameter.kt +++ b/idea/idea-completion/testData/handlers/basic/TypeParameter.kt @@ -1,3 +1,4 @@ +// FIR_COMPARISON package xxx class A { diff --git a/idea/idea-completion/testData/handlers/basic/TypeParameter.kt.after b/idea/idea-completion/testData/handlers/basic/TypeParameter.kt.after index 99eb2805f5c..7ea784c7b78 100644 --- a/idea/idea-completion/testData/handlers/basic/TypeParameter.kt.after +++ b/idea/idea-completion/testData/handlers/basic/TypeParameter.kt.after @@ -1,3 +1,4 @@ +// FIR_COMPARISON package xxx class A { diff --git a/idea/idea-completion/testData/handlers/basic/callableReference/ClassConstructor.kt b/idea/idea-completion/testData/handlers/basic/callableReference/ClassConstructor.kt index 3380161e199..01d7c47de3e 100644 --- a/idea/idea-completion/testData/handlers/basic/callableReference/ClassConstructor.kt +++ b/idea/idea-completion/testData/handlers/basic/callableReference/ClassConstructor.kt @@ -1,3 +1,4 @@ +// FIR_COMPARISON package ppp class X(p: Int) diff --git a/idea/idea-completion/testData/handlers/basic/callableReference/ClassConstructor.kt.after b/idea/idea-completion/testData/handlers/basic/callableReference/ClassConstructor.kt.after index 6ca0de4b4ea..3b681d43185 100644 --- a/idea/idea-completion/testData/handlers/basic/callableReference/ClassConstructor.kt.after +++ b/idea/idea-completion/testData/handlers/basic/callableReference/ClassConstructor.kt.after @@ -1,3 +1,4 @@ +// FIR_COMPARISON package ppp class X(p: Int) diff --git a/idea/idea-completion/testData/handlers/basic/callableReference/Property.kt b/idea/idea-completion/testData/handlers/basic/callableReference/Property.kt index 0a98338902b..4de35af8582 100644 --- a/idea/idea-completion/testData/handlers/basic/callableReference/Property.kt +++ b/idea/idea-completion/testData/handlers/basic/callableReference/Property.kt @@ -1,3 +1,4 @@ +// FIR_COMPARISON val prop: Int = 0 class C { diff --git a/idea/idea-completion/testData/handlers/basic/callableReference/Property.kt.after b/idea/idea-completion/testData/handlers/basic/callableReference/Property.kt.after index 293d8fd217b..f761c9abcd2 100644 --- a/idea/idea-completion/testData/handlers/basic/callableReference/Property.kt.after +++ b/idea/idea-completion/testData/handlers/basic/callableReference/Property.kt.after @@ -1,3 +1,4 @@ +// FIR_COMPARISON val prop: Int = 0 class C { diff --git a/idea/idea-completion/testData/handlers/basic/highOrderFunctions/FunctionLiteralInsertWhenNoSpacesForBraces.kt b/idea/idea-completion/testData/handlers/basic/highOrderFunctions/FunctionLiteralInsertWhenNoSpacesForBraces.kt index 7b6ee42f6f4..18447995318 100644 --- a/idea/idea-completion/testData/handlers/basic/highOrderFunctions/FunctionLiteralInsertWhenNoSpacesForBraces.kt +++ b/idea/idea-completion/testData/handlers/basic/highOrderFunctions/FunctionLiteralInsertWhenNoSpacesForBraces.kt @@ -1,3 +1,4 @@ +// FIR_COMPARISON // CODE_STYLE_SETTING: INSERT_WHITESPACES_IN_SIMPLE_ONE_LINE_METHOD = false fun main(args: Array) { diff --git a/idea/idea-completion/testData/handlers/basic/highOrderFunctions/FunctionLiteralInsertWhenNoSpacesForBraces.kt.after b/idea/idea-completion/testData/handlers/basic/highOrderFunctions/FunctionLiteralInsertWhenNoSpacesForBraces.kt.after index c2441ce4a61..c17ec99e2e0 100644 --- a/idea/idea-completion/testData/handlers/basic/highOrderFunctions/FunctionLiteralInsertWhenNoSpacesForBraces.kt.after +++ b/idea/idea-completion/testData/handlers/basic/highOrderFunctions/FunctionLiteralInsertWhenNoSpacesForBraces.kt.after @@ -1,3 +1,4 @@ +// FIR_COMPARISON // CODE_STYLE_SETTING: INSERT_WHITESPACES_IN_SIMPLE_ONE_LINE_METHOD = false fun main(args: Array) { diff --git a/idea/idea-completion/testData/handlers/basic/highOrderFunctions/HigherOrderFunctionWithArg.kt b/idea/idea-completion/testData/handlers/basic/highOrderFunctions/HigherOrderFunctionWithArg.kt index 963e9f70541..7934b8b05e1 100644 --- a/idea/idea-completion/testData/handlers/basic/highOrderFunctions/HigherOrderFunctionWithArg.kt +++ b/idea/idea-completion/testData/handlers/basic/highOrderFunctions/HigherOrderFunctionWithArg.kt @@ -1,3 +1,4 @@ +// FIR_COMPARISON fun main(args: Array) { args.filter {it != ""} } diff --git a/idea/idea-completion/testData/handlers/basic/highOrderFunctions/HigherOrderFunctionWithArg.kt.after b/idea/idea-completion/testData/handlers/basic/highOrderFunctions/HigherOrderFunctionWithArg.kt.after index 9b4c7f8093f..6fa2c8636a7 100644 --- a/idea/idea-completion/testData/handlers/basic/highOrderFunctions/HigherOrderFunctionWithArg.kt.after +++ b/idea/idea-completion/testData/handlers/basic/highOrderFunctions/HigherOrderFunctionWithArg.kt.after @@ -1,3 +1,4 @@ +// FIR_COMPARISON fun main(args: Array) { args.filterNot {it != ""} } diff --git a/idea/idea-completion/testData/handlers/basic/highOrderFunctions/ParameterTypeIsDerivedFromFunction.kt b/idea/idea-completion/testData/handlers/basic/highOrderFunctions/ParameterTypeIsDerivedFromFunction.kt index 0e5f6da65c8..3c9d8ef2789 100644 --- a/idea/idea-completion/testData/handlers/basic/highOrderFunctions/ParameterTypeIsDerivedFromFunction.kt +++ b/idea/idea-completion/testData/handlers/basic/highOrderFunctions/ParameterTypeIsDerivedFromFunction.kt @@ -1,3 +1,4 @@ +// FIR_COMPARISON interface I : () -> Unit fun foo(i: I){} diff --git a/idea/idea-completion/testData/handlers/basic/highOrderFunctions/ParameterTypeIsDerivedFromFunction.kt.after b/idea/idea-completion/testData/handlers/basic/highOrderFunctions/ParameterTypeIsDerivedFromFunction.kt.after index 14ea2219a60..90a310beb19 100644 --- a/idea/idea-completion/testData/handlers/basic/highOrderFunctions/ParameterTypeIsDerivedFromFunction.kt.after +++ b/idea/idea-completion/testData/handlers/basic/highOrderFunctions/ParameterTypeIsDerivedFromFunction.kt.after @@ -1,3 +1,4 @@ +// FIR_COMPARISON interface I : () -> Unit fun foo(i: I){} diff --git a/idea/idea-completion/testData/handlers/basic/importAliases/KDoc.kt b/idea/idea-completion/testData/handlers/basic/importAliases/KDoc.kt index 877c2096527..c7be76ed3d1 100644 --- a/idea/idea-completion/testData/handlers/basic/importAliases/KDoc.kt +++ b/idea/idea-completion/testData/handlers/basic/importAliases/KDoc.kt @@ -1,3 +1,4 @@ +// FIR_COMPARISON import java.sql.Date as SqlDate /** diff --git a/idea/idea-completion/testData/handlers/basic/importAliases/KDoc.kt.after b/idea/idea-completion/testData/handlers/basic/importAliases/KDoc.kt.after index 9d03fe2e2a6..98bd6a26cdd 100644 --- a/idea/idea-completion/testData/handlers/basic/importAliases/KDoc.kt.after +++ b/idea/idea-completion/testData/handlers/basic/importAliases/KDoc.kt.after @@ -1,3 +1,4 @@ +// FIR_COMPARISON import java.sql.Date as SqlDate /** diff --git a/idea/idea-completion/testData/handlers/basic/stringTemplate/3.kt b/idea/idea-completion/testData/handlers/basic/stringTemplate/3.kt index 8737ad4502b..7ca45dcea84 100644 --- a/idea/idea-completion/testData/handlers/basic/stringTemplate/3.kt +++ b/idea/idea-completion/testData/handlers/basic/stringTemplate/3.kt @@ -1,3 +1,4 @@ +// FIR_COMPARISON package ppp fun foo(): String { diff --git a/idea/idea-completion/testData/handlers/basic/stringTemplate/3.kt.after b/idea/idea-completion/testData/handlers/basic/stringTemplate/3.kt.after index d71d69bb93f..cb14fe01093 100644 --- a/idea/idea-completion/testData/handlers/basic/stringTemplate/3.kt.after +++ b/idea/idea-completion/testData/handlers/basic/stringTemplate/3.kt.after @@ -1,3 +1,4 @@ +// FIR_COMPARISON package ppp fun foo(): String { diff --git a/idea/idea-completion/testData/handlers/basic/stringTemplate/4.kt b/idea/idea-completion/testData/handlers/basic/stringTemplate/4.kt index fa7ae139387..a6374b3e4be 100644 --- a/idea/idea-completion/testData/handlers/basic/stringTemplate/4.kt +++ b/idea/idea-completion/testData/handlers/basic/stringTemplate/4.kt @@ -1,3 +1,4 @@ +// FIR_COMPARISON fun foo(param: Any): String { val s = "${}" } diff --git a/idea/idea-completion/testData/handlers/basic/stringTemplate/4.kt.after b/idea/idea-completion/testData/handlers/basic/stringTemplate/4.kt.after index 5595753fa10..5855f1908d1 100644 --- a/idea/idea-completion/testData/handlers/basic/stringTemplate/4.kt.after +++ b/idea/idea-completion/testData/handlers/basic/stringTemplate/4.kt.after @@ -1,3 +1,4 @@ +// FIR_COMPARISON fun foo(param: Any): String { val s = "${param}" } diff --git a/idea/idea-completion/testData/handlers/basic/stringTemplate/GlobalVal.kt b/idea/idea-completion/testData/handlers/basic/stringTemplate/GlobalVal.kt index 22b0fbbba65..a53f9975bf9 100644 --- a/idea/idea-completion/testData/handlers/basic/stringTemplate/GlobalVal.kt +++ b/idea/idea-completion/testData/handlers/basic/stringTemplate/GlobalVal.kt @@ -1,3 +1,4 @@ +// FIR_COMPARISON package p val vvv = 1 diff --git a/idea/idea-completion/testData/handlers/basic/stringTemplate/GlobalVal.kt.after b/idea/idea-completion/testData/handlers/basic/stringTemplate/GlobalVal.kt.after index 01f13022e12..c5af602c636 100644 --- a/idea/idea-completion/testData/handlers/basic/stringTemplate/GlobalVal.kt.after +++ b/idea/idea-completion/testData/handlers/basic/stringTemplate/GlobalVal.kt.after @@ -1,3 +1,4 @@ +// FIR_COMPARISON package p val vvv = 1 diff --git a/idea/idea-completion/testData/handlers/basic/stringTemplate/GlobalValInCurlyBraces.kt b/idea/idea-completion/testData/handlers/basic/stringTemplate/GlobalValInCurlyBraces.kt index de59ccf6950..f50606f3e85 100644 --- a/idea/idea-completion/testData/handlers/basic/stringTemplate/GlobalValInCurlyBraces.kt +++ b/idea/idea-completion/testData/handlers/basic/stringTemplate/GlobalValInCurlyBraces.kt @@ -1,3 +1,4 @@ +// FIR_COMPARISON package p val vvv = 1 diff --git a/idea/idea-completion/testData/handlers/basic/stringTemplate/GlobalValInCurlyBraces.kt.after b/idea/idea-completion/testData/handlers/basic/stringTemplate/GlobalValInCurlyBraces.kt.after index 10448898875..8cca111d152 100644 --- a/idea/idea-completion/testData/handlers/basic/stringTemplate/GlobalValInCurlyBraces.kt.after +++ b/idea/idea-completion/testData/handlers/basic/stringTemplate/GlobalValInCurlyBraces.kt.after @@ -1,3 +1,4 @@ +// FIR_COMPARISON package p val vvv = 1 diff --git a/idea/idea-completion/testData/handlers/basic/typeArgsForCall/AfterElse.kt b/idea/idea-completion/testData/handlers/basic/typeArgsForCall/AfterElse.kt index f30e38fe6c5..3bd8b927f96 100644 --- a/idea/idea-completion/testData/handlers/basic/typeArgsForCall/AfterElse.kt +++ b/idea/idea-completion/testData/handlers/basic/typeArgsForCall/AfterElse.kt @@ -1,3 +1,4 @@ +// FIR_COMPARISON fun foo(list: List, b: Boolean) { val v = if (b) list else emp } diff --git a/idea/idea-completion/testData/handlers/basic/typeArgsForCall/AfterElse.kt.after b/idea/idea-completion/testData/handlers/basic/typeArgsForCall/AfterElse.kt.after index da857b07a17..04b22d82b8f 100644 --- a/idea/idea-completion/testData/handlers/basic/typeArgsForCall/AfterElse.kt.after +++ b/idea/idea-completion/testData/handlers/basic/typeArgsForCall/AfterElse.kt.after @@ -1,3 +1,4 @@ +// FIR_COMPARISON fun foo(list: List, b: Boolean) { val v = if (b) list else emptyList() } diff --git a/idea/idea-completion/testData/handlers/basic/typeArgsForCall/AfterElvis.kt b/idea/idea-completion/testData/handlers/basic/typeArgsForCall/AfterElvis.kt index 0c9a22af8dc..7948ce8f5ed 100644 --- a/idea/idea-completion/testData/handlers/basic/typeArgsForCall/AfterElvis.kt +++ b/idea/idea-completion/testData/handlers/basic/typeArgsForCall/AfterElvis.kt @@ -1,3 +1,4 @@ +// FIR_COMPARISON fun foo(list: List?) { val v = list ?: emp } diff --git a/idea/idea-completion/testData/handlers/basic/typeArgsForCall/AfterElvis.kt.after b/idea/idea-completion/testData/handlers/basic/typeArgsForCall/AfterElvis.kt.after index 8eb2794e82e..d19a3f706ee 100644 --- a/idea/idea-completion/testData/handlers/basic/typeArgsForCall/AfterElvis.kt.after +++ b/idea/idea-completion/testData/handlers/basic/typeArgsForCall/AfterElvis.kt.after @@ -1,3 +1,4 @@ +// FIR_COMPARISON fun foo(list: List?) { val v = list ?: emptyList() } diff --git a/idea/idea-completion/testData/handlers/basic/typeArgsForCall/HasExpectedType.kt b/idea/idea-completion/testData/handlers/basic/typeArgsForCall/HasExpectedType.kt index df7a31c487f..4a71c2a96f1 100644 --- a/idea/idea-completion/testData/handlers/basic/typeArgsForCall/HasExpectedType.kt +++ b/idea/idea-completion/testData/handlers/basic/typeArgsForCall/HasExpectedType.kt @@ -1,3 +1,4 @@ +// FIR_COMPARISON public inline fun Iterable<*>.myFirstIsInstance(): T { } fun foo(list: List): String { diff --git a/idea/idea-completion/testData/handlers/basic/typeArgsForCall/HasExpectedType.kt.after b/idea/idea-completion/testData/handlers/basic/typeArgsForCall/HasExpectedType.kt.after index 830ad9d3baa..7a5678294c7 100644 --- a/idea/idea-completion/testData/handlers/basic/typeArgsForCall/HasExpectedType.kt.after +++ b/idea/idea-completion/testData/handlers/basic/typeArgsForCall/HasExpectedType.kt.after @@ -1,3 +1,4 @@ +// FIR_COMPARISON public inline fun Iterable<*>.myFirstIsInstance(): T { } fun foo(list: List): String { diff --git a/idea/idea-completion/testData/handlers/basic/typeArgsForCall/ReplaceByTab2.kt b/idea/idea-completion/testData/handlers/basic/typeArgsForCall/ReplaceByTab2.kt index 182e9559f3f..1fc4831a80e 100644 --- a/idea/idea-completion/testData/handlers/basic/typeArgsForCall/ReplaceByTab2.kt +++ b/idea/idea-completion/testData/handlers/basic/typeArgsForCall/ReplaceByTab2.kt @@ -1,3 +1,4 @@ +// FIR_COMPARISON inline fun Iterable<*>.myFilterIsInstance(): List { return filterIsInstanceTo(ArrayList()) } diff --git a/idea/idea-completion/testData/handlers/basic/typeArgsForCall/ReplaceByTab2.kt.after b/idea/idea-completion/testData/handlers/basic/typeArgsForCall/ReplaceByTab2.kt.after index d4e610c774c..f7508b8cd06 100644 --- a/idea/idea-completion/testData/handlers/basic/typeArgsForCall/ReplaceByTab2.kt.after +++ b/idea/idea-completion/testData/handlers/basic/typeArgsForCall/ReplaceByTab2.kt.after @@ -1,3 +1,4 @@ +// FIR_COMPARISON inline fun Iterable<*>.myFilterIsInstance(): List { return filterIsInstanceTo(ArrayList()) } diff --git a/idea/idea-completion/testData/handlers/basic/typeArgsForCall/TypeArgumentsFromParameters.kt b/idea/idea-completion/testData/handlers/basic/typeArgsForCall/TypeArgumentsFromParameters.kt index b7f139ce0b3..52220133bdf 100644 --- a/idea/idea-completion/testData/handlers/basic/typeArgsForCall/TypeArgumentsFromParameters.kt +++ b/idea/idea-completion/testData/handlers/basic/typeArgsForCall/TypeArgumentsFromParameters.kt @@ -1,3 +1,4 @@ +// FIR_COMPARISON fun T1.foo(t: T2): T2 = t fun foo() { diff --git a/idea/idea-completion/testData/handlers/basic/typeArgsForCall/TypeArgumentsFromParameters.kt.after b/idea/idea-completion/testData/handlers/basic/typeArgsForCall/TypeArgumentsFromParameters.kt.after index 70c5864146b..182831a720b 100644 --- a/idea/idea-completion/testData/handlers/basic/typeArgsForCall/TypeArgumentsFromParameters.kt.after +++ b/idea/idea-completion/testData/handlers/basic/typeArgsForCall/TypeArgumentsFromParameters.kt.after @@ -1,3 +1,4 @@ +// FIR_COMPARISON fun T1.foo(t: T2): T2 = t fun foo() { diff --git a/idea/idea-fir/tests/org/jetbrains/kotlin/idea/completion/test/handlers/AbstractHighLevelBasicCompletionHandlerTest.kt b/idea/idea-fir/tests/org/jetbrains/kotlin/idea/completion/test/handlers/AbstractHighLevelBasicCompletionHandlerTest.kt new file mode 100644 index 00000000000..f42cf2e47fc --- /dev/null +++ b/idea/idea-fir/tests/org/jetbrains/kotlin/idea/completion/test/handlers/AbstractHighLevelBasicCompletionHandlerTest.kt @@ -0,0 +1,17 @@ +/* + * 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.idea.completion.test.handlers + +import org.jetbrains.kotlin.idea.completion.FIR_COMPARISON +import org.jetbrains.kotlin.idea.completion.runTestWithCustomEnableDirective + +abstract class AbstractHighLevelBasicCompletionHandlerTest : AbstractBasicCompletionHandlerTest() { + override val captureExceptions: Boolean = false + + override fun doTest(testPath: String) { + runTestWithCustomEnableDirective(FIR_COMPARISON, testDataFile()) { super.doTest(testPath) } + } +} \ No newline at end of file diff --git a/idea/idea-fir/tests/org/jetbrains/kotlin/idea/completion/test/handlers/HighLevelBasicCompletionHandlerTestGenerated.java b/idea/idea-fir/tests/org/jetbrains/kotlin/idea/completion/test/handlers/HighLevelBasicCompletionHandlerTestGenerated.java new file mode 100644 index 00000000000..a50fba9ea1d --- /dev/null +++ b/idea/idea-fir/tests/org/jetbrains/kotlin/idea/completion/test/handlers/HighLevelBasicCompletionHandlerTestGenerated.java @@ -0,0 +1,1016 @@ +/* + * 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.idea.completion.test.handlers; + +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/idea-completion/testData/handlers/basic") +@TestDataPath("$PROJECT_ROOT") +@RunWith(JUnit3RunnerWithInners.class) +public class HighLevelBasicCompletionHandlerTestGenerated extends AbstractHighLevelBasicCompletionHandlerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("AddLabelToReturn.kt") + public void testAddLabelToReturn() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/AddLabelToReturn.kt"); + } + + public void testAllFilesPresentInBasic() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/idea-completion/testData/handlers/basic"), Pattern.compile("^([^.]+)\\.kt$"), null, true); + } + + @TestMetadata("ClassKeywordBeforeName.kt") + public void testClassKeywordBeforeName() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/ClassKeywordBeforeName.kt"); + } + + @TestMetadata("ClassNameForMethodWithPackageConflict.kt") + public void testClassNameForMethodWithPackageConflict() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/ClassNameForMethodWithPackageConflict.kt"); + } + + @TestMetadata("ClassNameForMethodWithPackageConflict2.kt") + public void testClassNameForMethodWithPackageConflict2() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/ClassNameForMethodWithPackageConflict2.kt"); + } + + @TestMetadata("ClassNameWithPackageConflict.kt") + public void testClassNameWithPackageConflict() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/ClassNameWithPackageConflict.kt"); + } + + @TestMetadata("ClassWithClassObject.kt") + public void testClassWithClassObject() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/ClassWithClassObject.kt"); + } + + @TestMetadata("DoNotUseParenthesisOnNextLine.kt") + public void testDoNotUseParenthesisOnNextLine() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/DoNotUseParenthesisOnNextLine.kt"); + } + + @TestMetadata("EA70229.kt") + public void testEA70229() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/EA70229.kt"); + } + + @TestMetadata("ExtensionFunctionTypeVariable1.kt") + public void testExtensionFunctionTypeVariable1() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/ExtensionFunctionTypeVariable1.kt"); + } + + @TestMetadata("ExtensionFunctionTypeVariable2.kt") + public void testExtensionFunctionTypeVariable2() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/ExtensionFunctionTypeVariable2.kt"); + } + + @TestMetadata("ExtensionReceiverTypeArg.kt") + public void testExtensionReceiverTypeArg() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/ExtensionReceiverTypeArg.kt"); + } + + @TestMetadata("FirstTypeArgument.kt") + public void testFirstTypeArgument() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/FirstTypeArgument.kt"); + } + + @TestMetadata("GenericFunctionWithTab.kt") + public void testGenericFunctionWithTab() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/GenericFunctionWithTab.kt"); + } + + @TestMetadata("GenericFunctionWithTab2.kt") + public void testGenericFunctionWithTab2() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/GenericFunctionWithTab2.kt"); + } + + @TestMetadata("GetOperator.kt") + public void testGetOperator() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/GetOperator.kt"); + } + + @TestMetadata("InterfaceNameBeforeRunBug.kt") + public void testInterfaceNameBeforeRunBug() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/InterfaceNameBeforeRunBug.kt"); + } + + @TestMetadata("JavaSAM.kt") + public void testJavaSAM() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/JavaSAM.kt"); + } + + @TestMetadata("KT11633.kt") + public void testKT11633() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/KT11633.kt"); + } + + @TestMetadata("KT12328.kt") + public void testKT12328() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/KT12328.kt"); + } + + @TestMetadata("KT14130.kt") + public void testKT14130() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/KT14130.kt"); + } + + @TestMetadata("KT19863.kt") + public void testKT19863() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/KT19863.kt"); + } + + @TestMetadata("KT19864.kt") + public void testKT19864() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/KT19864.kt"); + } + + @TestMetadata("KT23627.kt") + public void testKT23627() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/KT23627.kt"); + } + + @TestMetadata("KT36306.kt") + public void testKT36306() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/KT36306.kt"); + } + + @TestMetadata("NestedTypeArg.kt") + public void testNestedTypeArg() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/NestedTypeArg.kt"); + } + + @TestMetadata("NoTailFromSmart.kt") + public void testNoTailFromSmart() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/NoTailFromSmart.kt"); + } + + @TestMetadata("PreferClassToConstructor.kt") + public void testPreferClassToConstructor() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/PreferClassToConstructor.kt"); + } + + @TestMetadata("PreferMatchingKeyword.kt") + public void testPreferMatchingKeyword() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/PreferMatchingKeyword.kt"); + } + + @TestMetadata("ReceiverParam.kt") + public void testReceiverParam() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/ReceiverParam.kt"); + } + + @TestMetadata("ReceiverParam2.kt") + public void testReceiverParam2() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/ReceiverParam2.kt"); + } + + @TestMetadata("ReplaceFunctionCallByProperty.kt") + public void testReplaceFunctionCallByProperty() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/ReplaceFunctionCallByProperty.kt"); + } + + @TestMetadata("ReplaceFunctionCallByPropertyArgs.kt") + public void testReplaceFunctionCallByPropertyArgs() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/ReplaceFunctionCallByPropertyArgs.kt"); + } + + @TestMetadata("SecondTypeArg.kt") + public void testSecondTypeArg() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/SecondTypeArg.kt"); + } + + @TestMetadata("SpaceAfterParenthesisBug.kt") + public void testSpaceAfterParenthesisBug() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/SpaceAfterParenthesisBug.kt"); + } + + @TestMetadata("StaticFunctionFromJavaWithConflict.kt") + public void testStaticFunctionFromJavaWithConflict() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/StaticFunctionFromJavaWithConflict.kt"); + } + + @TestMetadata("StringFakeConstructor.kt") + public void testStringFakeConstructor() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/StringFakeConstructor.kt"); + } + + @TestMetadata("SuperMethod.kt") + public void testSuperMethod() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/SuperMethod.kt"); + } + + @TestMetadata("SuperMethod2.kt") + public void testSuperMethod2() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/SuperMethod2.kt"); + } + + @TestMetadata("SuperTypeArg.kt") + public void testSuperTypeArg() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/SuperTypeArg.kt"); + } + + @TestMetadata("SyntheticExtension.kt") + public void testSyntheticExtension() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/SyntheticExtension.kt"); + } + + @TestMetadata("TypeInferedFromWrapperType.kt") + public void testTypeInferedFromWrapperType() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/TypeInferedFromWrapperType.kt"); + } + + @TestMetadata("TypeParameter.kt") + public void testTypeParameter() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/TypeParameter.kt"); + } + + @TestMetadata("idea/idea-completion/testData/handlers/basic/annotation") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Annotation extends AbstractHighLevelBasicCompletionHandlerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInAnnotation() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/idea-completion/testData/handlers/basic/annotation"), Pattern.compile("^([^.]+)\\.kt$"), null, true); + } + + @TestMetadata("AnnotationInBrackets.kt") + public void testAnnotationInBrackets() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/annotation/AnnotationInBrackets.kt"); + } + + @TestMetadata("AnnotationInClassAddImport.kt") + public void testAnnotationInClassAddImport() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/annotation/AnnotationInClassAddImport.kt"); + } + + @TestMetadata("AnnotationInCompanionObjectAddImport.kt") + public void testAnnotationInCompanionObjectAddImport() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/annotation/AnnotationInCompanionObjectAddImport.kt"); + } + + @TestMetadata("KT12077.kt") + public void testKT12077() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/annotation/KT12077.kt"); + } + } + + @TestMetadata("idea/idea-completion/testData/handlers/basic/callableReference") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class CallableReference extends AbstractHighLevelBasicCompletionHandlerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInCallableReference() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/idea-completion/testData/handlers/basic/callableReference"), Pattern.compile("^([^.]+)\\.kt$"), null, true); + } + + @TestMetadata("ClassConstructor.kt") + public void testClassConstructor() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/callableReference/ClassConstructor.kt"); + } + + @TestMetadata("EmptyQualifier.kt") + public void testEmptyQualifier() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/callableReference/EmptyQualifier.kt"); + } + + @TestMetadata("NonEmptyQualifier.kt") + public void testNonEmptyQualifier() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/callableReference/NonEmptyQualifier.kt"); + } + + @TestMetadata("NotImportedTopLevel.kt") + public void testNotImportedTopLevel() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/callableReference/NotImportedTopLevel.kt"); + } + + @TestMetadata("Property.kt") + public void testProperty() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/callableReference/Property.kt"); + } + } + + @TestMetadata("idea/idea-completion/testData/handlers/basic/exclChar") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ExclChar extends AbstractHighLevelBasicCompletionHandlerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("1.kt") + public void test1() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/exclChar/1.kt"); + } + + @TestMetadata("2.kt") + public void test2() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/exclChar/2.kt"); + } + + @TestMetadata("3.kt") + public void test3() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/exclChar/3.kt"); + } + + @TestMetadata("4.kt") + public void test4() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/exclChar/4.kt"); + } + + @TestMetadata("5.kt") + public void test5() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/exclChar/5.kt"); + } + + public void testAllFilesPresentInExclChar() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/idea-completion/testData/handlers/basic/exclChar"), Pattern.compile("^([^.]+)\\.kt$"), null, true); + } + } + + @TestMetadata("idea/idea-completion/testData/handlers/basic/extensionMethodInObject") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ExtensionMethodInObject extends AbstractHighLevelBasicCompletionHandlerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInExtensionMethodInObject() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/idea-completion/testData/handlers/basic/extensionMethodInObject"), Pattern.compile("^([^.]+)\\.kt$"), null, true); + } + + @TestMetadata("CompanionObjectInSameFileExplicitReceiver.kt") + public void testCompanionObjectInSameFileExplicitReceiver() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/extensionMethodInObject/CompanionObjectInSameFileExplicitReceiver.kt"); + } + + @TestMetadata("CompanionObjectInSameFileImplicitReceiver.kt") + public void testCompanionObjectInSameFileImplicitReceiver() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/extensionMethodInObject/CompanionObjectInSameFileImplicitReceiver.kt"); + } + + @TestMetadata("NestedCompanionObjectInSameFileExplicitReceiver.kt") + public void testNestedCompanionObjectInSameFileExplicitReceiver() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/extensionMethodInObject/NestedCompanionObjectInSameFileExplicitReceiver.kt"); + } + + @TestMetadata("NestedCompanionObjectInSameFileImplicitReceiver.kt") + public void testNestedCompanionObjectInSameFileImplicitReceiver() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/extensionMethodInObject/NestedCompanionObjectInSameFileImplicitReceiver.kt"); + } + + @TestMetadata("NestedObjectInSameFileExplicitReceiver.kt") + public void testNestedObjectInSameFileExplicitReceiver() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/extensionMethodInObject/NestedObjectInSameFileExplicitReceiver.kt"); + } + + @TestMetadata("NestedObjectInSameFileImplicitReceiver.kt") + public void testNestedObjectInSameFileImplicitReceiver() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/extensionMethodInObject/NestedObjectInSameFileImplicitReceiver.kt"); + } + + @TestMetadata("ObjectInSameFileExplicitReceiver.kt") + public void testObjectInSameFileExplicitReceiver() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/extensionMethodInObject/ObjectInSameFileExplicitReceiver.kt"); + } + + @TestMetadata("ObjectInSameFileImplicitReceiver.kt") + public void testObjectInSameFileImplicitReceiver() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/extensionMethodInObject/ObjectInSameFileImplicitReceiver.kt"); + } + } + + @TestMetadata("idea/idea-completion/testData/handlers/basic/highOrderFunctions") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class HighOrderFunctions extends AbstractHighLevelBasicCompletionHandlerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInHighOrderFunctions() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/idea-completion/testData/handlers/basic/highOrderFunctions"), Pattern.compile("^([^.]+)\\.kt$"), null, true); + } + + @TestMetadata("ContextVariable.kt") + public void testContextVariable() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/highOrderFunctions/ContextVariable.kt"); + } + + @TestMetadata("ContextVariableDot.kt") + public void testContextVariableDot() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/highOrderFunctions/ContextVariableDot.kt"); + } + + @TestMetadata("ContextVariableTypeArgsNeeded.kt") + public void testContextVariableTypeArgsNeeded() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/highOrderFunctions/ContextVariableTypeArgsNeeded.kt"); + } + + @TestMetadata("ForceParenthesisForTabChar.kt") + public void testForceParenthesisForTabChar() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/highOrderFunctions/ForceParenthesisForTabChar.kt"); + } + + @TestMetadata("FunctionLiteralInsertOnSpace.kt") + public void testFunctionLiteralInsertOnSpace() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/highOrderFunctions/FunctionLiteralInsertOnSpace.kt"); + } + + @TestMetadata("FunctionLiteralInsertWhenNoSpacesForBraces.kt") + public void testFunctionLiteralInsertWhenNoSpacesForBraces() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/highOrderFunctions/FunctionLiteralInsertWhenNoSpacesForBraces.kt"); + } + + @TestMetadata("HigherOrderFunction.kt") + public void testHigherOrderFunction() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/highOrderFunctions/HigherOrderFunction.kt"); + } + + @TestMetadata("HigherOrderFunctionWithArg.kt") + public void testHigherOrderFunctionWithArg() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/highOrderFunctions/HigherOrderFunctionWithArg.kt"); + } + + @TestMetadata("HigherOrderFunctionWithArgs1.kt") + public void testHigherOrderFunctionWithArgs1() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/highOrderFunctions/HigherOrderFunctionWithArgs1.kt"); + } + + @TestMetadata("HigherOrderFunctionWithArgs2.kt") + public void testHigherOrderFunctionWithArgs2() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/highOrderFunctions/HigherOrderFunctionWithArgs2.kt"); + } + + @TestMetadata("HigherOrderFunctionWithArgs3.kt") + public void testHigherOrderFunctionWithArgs3() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/highOrderFunctions/HigherOrderFunctionWithArgs3.kt"); + } + + @TestMetadata("HigherOrderSuspendFunctionWithArgs.kt") + public void testHigherOrderSuspendFunctionWithArgs() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/highOrderFunctions/HigherOrderSuspendFunctionWithArgs.kt"); + } + + @TestMetadata("InsertFunctionWithSingleParameterWithBrace.kt") + public void testInsertFunctionWithSingleParameterWithBrace() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/highOrderFunctions/InsertFunctionWithSingleParameterWithBrace.kt"); + } + + @TestMetadata("OptionalParameters1.kt") + public void testOptionalParameters1() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/highOrderFunctions/OptionalParameters1.kt"); + } + + @TestMetadata("OptionalParameters2.kt") + public void testOptionalParameters2() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/highOrderFunctions/OptionalParameters2.kt"); + } + + @TestMetadata("OptionalParameters3.kt") + public void testOptionalParameters3() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/highOrderFunctions/OptionalParameters3.kt"); + } + + @TestMetadata("ParameterTypeIsDerivedFromFunction.kt") + public void testParameterTypeIsDerivedFromFunction() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/highOrderFunctions/ParameterTypeIsDerivedFromFunction.kt"); + } + + @TestMetadata("ReplaceByLambdaTemplateNoClosingParenth.kt") + public void testReplaceByLambdaTemplateNoClosingParenth() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/highOrderFunctions/ReplaceByLambdaTemplateNoClosingParenth.kt"); + } + + @TestMetadata("SameTypeParameters.kt") + public void testSameTypeParameters() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/highOrderFunctions/SameTypeParameters.kt"); + } + + @TestMetadata("SameTypeParameters2.kt") + public void testSameTypeParameters2() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/highOrderFunctions/SameTypeParameters2.kt"); + } + + @TestMetadata("SameTypeParameters3.kt") + public void testSameTypeParameters3() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/highOrderFunctions/SameTypeParameters3.kt"); + } + + @TestMetadata("WithArgsEmptyLambdaAfter.kt") + public void testWithArgsEmptyLambdaAfter() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/highOrderFunctions/WithArgsEmptyLambdaAfter.kt"); + } + + @TestMetadata("WithArgsNonEmptyLambdaAfter.kt") + public void testWithArgsNonEmptyLambdaAfter() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/highOrderFunctions/WithArgsNonEmptyLambdaAfter.kt"); + } + } + + @TestMetadata("idea/idea-completion/testData/handlers/basic/importAliases") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ImportAliases extends AbstractHighLevelBasicCompletionHandlerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInImportAliases() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/idea-completion/testData/handlers/basic/importAliases"), Pattern.compile("^([^.]+)\\.kt$"), null, true); + } + + @TestMetadata("CompanionObject.kt") + public void testCompanionObject() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/importAliases/CompanionObject.kt"); + } + + @TestMetadata("ExtensionFun.kt") + public void testExtensionFun() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/importAliases/ExtensionFun.kt"); + } + + @TestMetadata("ExtensionVal.kt") + public void testExtensionVal() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/importAliases/ExtensionVal.kt"); + } + + @TestMetadata("KDoc.kt") + public void testKDoc() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/importAliases/KDoc.kt"); + } + + @TestMetadata("TopLevelFun.kt") + public void testTopLevelFun() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/importAliases/TopLevelFun.kt"); + } + + @TestMetadata("TopLevelVal.kt") + public void testTopLevelVal() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/importAliases/TopLevelVal.kt"); + } + + @TestMetadata("Type.kt") + public void testType() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/importAliases/Type.kt"); + } + } + + @TestMetadata("idea/idea-completion/testData/handlers/basic/override") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Override extends AbstractHighLevelBasicCompletionHandlerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("AfterFunKeyword.kt") + public void testAfterFunKeyword() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/override/AfterFunKeyword.kt"); + } + + @TestMetadata("AfterFunKeywordKeepModifiersBefore.kt") + public void testAfterFunKeywordKeepModifiersBefore() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/override/AfterFunKeywordKeepModifiersBefore.kt"); + } + + @TestMetadata("AfterValKeyword.kt") + public void testAfterValKeyword() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/override/AfterValKeyword.kt"); + } + + @TestMetadata("AfterValKeywordInConstructorParameter.kt") + public void testAfterValKeywordInConstructorParameter() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/override/AfterValKeywordInConstructorParameter.kt"); + } + + public void testAllFilesPresentInOverride() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/idea-completion/testData/handlers/basic/override"), Pattern.compile("^([^.]+)\\.kt$"), null, true); + } + + @TestMetadata("ExpectClassValOverride.kt") + public void testExpectClassValOverride() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/override/ExpectClassValOverride.kt"); + } + + @TestMetadata("ImplementFunction.kt") + public void testImplementFunction() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/override/ImplementFunction.kt"); + } + + @TestMetadata("ImplementVal.kt") + public void testImplementVal() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/override/ImplementVal.kt"); + } + + @TestMetadata("ImplementVar.kt") + public void testImplementVar() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/override/ImplementVar.kt"); + } + + @TestMetadata("KeepAnnotationBefore.kt") + public void testKeepAnnotationBefore() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/override/KeepAnnotationBefore.kt"); + } + + @TestMetadata("KeepModifiersBefore.kt") + public void testKeepModifiersBefore() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/override/KeepModifiersBefore.kt"); + } + + @TestMetadata("kt25312.kt") + public void testKt25312() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/override/kt25312.kt"); + } + + @TestMetadata("OverrideFunction.kt") + public void testOverrideFunction() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/override/OverrideFunction.kt"); + } + + @TestMetadata("OverrideVar.kt") + public void testOverrideVar() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/override/OverrideVar.kt"); + } + + @TestMetadata("PublicValInConstructorParameter.kt") + public void testPublicValInConstructorParameter() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/override/PublicValInConstructorParameter.kt"); + } + + @TestMetadata("Suspend.kt") + public void testSuspend() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/override/Suspend.kt"); + } + + @TestMetadata("TypeFunctionName.kt") + public void testTypeFunctionName() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/override/TypeFunctionName.kt"); + } + + @TestMetadata("TypeNameInConstructorParameter.kt") + public void testTypeNameInConstructorParameter() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/override/TypeNameInConstructorParameter.kt"); + } + + @TestMetadata("ValInConstructorParameter.kt") + public void testValInConstructorParameter() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/override/ValInConstructorParameter.kt"); + } + + @TestMetadata("ValInConstructorParameter2.kt") + public void testValInConstructorParameter2() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/override/ValInConstructorParameter2.kt"); + } + + @TestMetadata("ValInConstructorParameter3.kt") + public void testValInConstructorParameter3() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/override/ValInConstructorParameter3.kt"); + } + + @TestMetadata("ValInConstructorParameter4.kt") + public void testValInConstructorParameter4() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/override/ValInConstructorParameter4.kt"); + } + } + + @TestMetadata("idea/idea-completion/testData/handlers/basic/parameterNameAndType") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ParameterNameAndType extends AbstractHighLevelBasicCompletionHandlerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInParameterNameAndType() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/idea-completion/testData/handlers/basic/parameterNameAndType"), Pattern.compile("^([^.]+)\\.kt$"), null, true); + } + + @TestMetadata("CodeStyleSettings.kt") + public void testCodeStyleSettings() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/parameterNameAndType/CodeStyleSettings.kt"); + } + + @TestMetadata("Comma.kt") + public void testComma() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/parameterNameAndType/Comma.kt"); + } + + @TestMetadata("InsertImport.kt") + public void testInsertImport() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/parameterNameAndType/InsertImport.kt"); + } + + @TestMetadata("NoInsertionOnTypingColon.kt") + public void testNoInsertionOnTypingColon() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/parameterNameAndType/NoInsertionOnTypingColon.kt"); + } + + @TestMetadata("NoInsertionOnTypingSpace.kt") + public void testNoInsertionOnTypingSpace() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/parameterNameAndType/NoInsertionOnTypingSpace.kt"); + } + + @TestMetadata("ParameterInFile.kt") + public void testParameterInFile() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/parameterNameAndType/ParameterInFile.kt"); + } + + @TestMetadata("ParameterInFile2.kt") + public void testParameterInFile2() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/parameterNameAndType/ParameterInFile2.kt"); + } + + @TestMetadata("Simple.kt") + public void testSimple() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/parameterNameAndType/Simple.kt"); + } + + @TestMetadata("TabReplace1.kt") + public void testTabReplace1() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/parameterNameAndType/TabReplace1.kt"); + } + + @TestMetadata("TabReplace2.kt") + public void testTabReplace2() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/parameterNameAndType/TabReplace2.kt"); + } + + @TestMetadata("TabReplace3.kt") + public void testTabReplace3() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/parameterNameAndType/TabReplace3.kt"); + } + + @TestMetadata("TypeParameter.kt") + public void testTypeParameter() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/parameterNameAndType/TypeParameter.kt"); + } + + @TestMetadata("UserPrefix.kt") + public void testUserPrefix() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/parameterNameAndType/UserPrefix.kt"); + } + } + + @TestMetadata("idea/idea-completion/testData/handlers/basic/staticMemberOfNotImported") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class StaticMemberOfNotImported extends AbstractHighLevelBasicCompletionHandlerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInStaticMemberOfNotImported() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/idea-completion/testData/handlers/basic/staticMemberOfNotImported"), Pattern.compile("^([^.]+)\\.kt$"), null, true); + } + + @TestMetadata("AmbigiousExtension.kt") + public void testAmbigiousExtension() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/staticMemberOfNotImported/AmbigiousExtension.kt"); + } + + @TestMetadata("AmbigiousName.kt") + public void testAmbigiousName() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/staticMemberOfNotImported/AmbigiousName.kt"); + } + + @TestMetadata("CompanionObjectMember.kt") + public void testCompanionObjectMember() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/staticMemberOfNotImported/CompanionObjectMember.kt"); + } + + @TestMetadata("EnumEntry.kt") + public void testEnumEntry() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/staticMemberOfNotImported/EnumEntry.kt"); + } + + @TestMetadata("ObjectMember.kt") + public void testObjectMember() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/staticMemberOfNotImported/ObjectMember.kt"); + } + } + + @TestMetadata("idea/idea-completion/testData/handlers/basic/staticMembers") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class StaticMembers extends AbstractHighLevelBasicCompletionHandlerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInStaticMembers() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/idea-completion/testData/handlers/basic/staticMembers"), Pattern.compile("^([^.]+)\\.kt$"), null, true); + } + + @TestMetadata("classObjectMethod.kt") + public void testClassObjectMethod() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/staticMembers/classObjectMethod.kt"); + } + + @TestMetadata("ImportFromCompanionObject.kt") + public void testImportFromCompanionObject() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/staticMembers/ImportFromCompanionObject.kt"); + } + + @TestMetadata("ImportJavaStaticMethod.kt") + public void testImportJavaStaticMethod() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/staticMembers/ImportJavaStaticMethod.kt"); + } + + @TestMetadata("JavaStaticMethod.kt") + public void testJavaStaticMethod() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/staticMembers/JavaStaticMethod.kt"); + } + } + + @TestMetadata("idea/idea-completion/testData/handlers/basic/stringTemplate") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class StringTemplate extends AbstractHighLevelBasicCompletionHandlerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("1.kt") + public void test1() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/stringTemplate/1.kt"); + } + + @TestMetadata("2.kt") + public void test2() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/stringTemplate/2.kt"); + } + + @TestMetadata("3.kt") + public void test3() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/stringTemplate/3.kt"); + } + + @TestMetadata("4.kt") + public void test4() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/stringTemplate/4.kt"); + } + + @TestMetadata("AfterDot1.kt") + public void testAfterDot1() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/stringTemplate/AfterDot1.kt"); + } + + @TestMetadata("AfterDot2.kt") + public void testAfterDot2() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/stringTemplate/AfterDot2.kt"); + } + + @TestMetadata("AfterDot3.kt") + public void testAfterDot3() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/stringTemplate/AfterDot3.kt"); + } + + @TestMetadata("AfterDot4.kt") + public void testAfterDot4() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/stringTemplate/AfterDot4.kt"); + } + + @TestMetadata("AfterThisDot.kt") + public void testAfterThisDot() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/stringTemplate/AfterThisDot.kt"); + } + + public void testAllFilesPresentInStringTemplate() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/idea-completion/testData/handlers/basic/stringTemplate"), Pattern.compile("^([^.]+)\\.kt$"), null, true); + } + + @TestMetadata("GlobalVal.kt") + public void testGlobalVal() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/stringTemplate/GlobalVal.kt"); + } + + @TestMetadata("GlobalValInCurlyBraces.kt") + public void testGlobalValInCurlyBraces() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/stringTemplate/GlobalValInCurlyBraces.kt"); + } + + @TestMetadata("InsertCurlyBracesBeforeLetter.kt") + public void testInsertCurlyBracesBeforeLetter() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/stringTemplate/InsertCurlyBracesBeforeLetter.kt"); + } + + @TestMetadata("NotEmptyPrefix.kt") + public void testNotEmptyPrefix() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/stringTemplate/NotEmptyPrefix.kt"); + } + + @TestMetadata("Replace.kt") + public void testReplace() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/stringTemplate/Replace.kt"); + } + + @TestMetadata("ValInObject.kt") + public void testValInObject() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/stringTemplate/ValInObject.kt"); + } + } + + @TestMetadata("idea/idea-completion/testData/handlers/basic/typeArgsForCall") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class TypeArgsForCall extends AbstractHighLevelBasicCompletionHandlerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("AfterElse.kt") + public void testAfterElse() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/typeArgsForCall/AfterElse.kt"); + } + + @TestMetadata("AfterElvis.kt") + public void testAfterElvis() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/typeArgsForCall/AfterElvis.kt"); + } + + public void testAllFilesPresentInTypeArgsForCall() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/idea-completion/testData/handlers/basic/typeArgsForCall"), Pattern.compile("^([^.]+)\\.kt$"), null, true); + } + + @TestMetadata("ExpectedTypeDoesNotHelp.kt") + public void testExpectedTypeDoesNotHelp() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/typeArgsForCall/ExpectedTypeDoesNotHelp.kt"); + } + + @TestMetadata("ExpectedTypeDoesNotHelp2.kt") + public void testExpectedTypeDoesNotHelp2() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/typeArgsForCall/ExpectedTypeDoesNotHelp2.kt"); + } + + @TestMetadata("ExplicitLambdaSignature.kt") + public void testExplicitLambdaSignature() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/typeArgsForCall/ExplicitLambdaSignature.kt"); + } + + @TestMetadata("FunctionTypeParameter1.kt") + public void testFunctionTypeParameter1() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/typeArgsForCall/FunctionTypeParameter1.kt"); + } + + @TestMetadata("FunctionTypeParameter2.kt") + public void testFunctionTypeParameter2() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/typeArgsForCall/FunctionTypeParameter2.kt"); + } + + @TestMetadata("FunctionTypeParameter3.kt") + public void testFunctionTypeParameter3() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/typeArgsForCall/FunctionTypeParameter3.kt"); + } + + @TestMetadata("HasExpectedType.kt") + public void testHasExpectedType() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/typeArgsForCall/HasExpectedType.kt"); + } + + @TestMetadata("NotAllTypeArgumentsFromParameters.kt") + public void testNotAllTypeArgumentsFromParameters() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/typeArgsForCall/NotAllTypeArgumentsFromParameters.kt"); + } + + @TestMetadata("ReplaceByTab1.kt") + public void testReplaceByTab1() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/typeArgsForCall/ReplaceByTab1.kt"); + } + + @TestMetadata("ReplaceByTab2.kt") + public void testReplaceByTab2() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/typeArgsForCall/ReplaceByTab2.kt"); + } + + @TestMetadata("Simple.kt") + public void testSimple() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/typeArgsForCall/Simple.kt"); + } + + @TestMetadata("TypeArgumentsFromParameters.kt") + public void testTypeArgumentsFromParameters() throws Exception { + runTest("idea/idea-completion/testData/handlers/basic/typeArgsForCall/TypeArgumentsFromParameters.kt"); + } + } +}