diff --git a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/callInsideLambdaInsideSuperCallAndExplicitConstructor.kt b/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/callInsideLambdaInsideSuperCallAndExplicitConstructor.kt deleted file mode 100644 index 05fe077f55a..00000000000 --- a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/callInsideLambdaInsideSuperCallAndExplicitConstructor.kt +++ /dev/null @@ -1,7 +0,0 @@ -open class B(x: () -> Unit) - -class A() : B(1, { - foo() -}) - -fun foo() {} \ No newline at end of file diff --git a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/callInsideLambdaInsideSuperCallAndImplicitConstructor.kt b/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/callInsideLambdaInsideSuperCallAndImplicitConstructor.kt deleted file mode 100644 index c2fb0a7a203..00000000000 --- a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/callInsideLambdaInsideSuperCallAndImplicitConstructor.kt +++ /dev/null @@ -1,7 +0,0 @@ -open class B(x: () -> Unit) - -class A : B(1, { - foo() -}) - -fun foo() {} \ No newline at end of file diff --git a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/callInsideLambdaInsideSuperCallFromSecondaryConstructor.kt b/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/callInsideLambdaInsideSuperCallFromSecondaryConstructor.kt deleted file mode 100644 index af27c8780fb..00000000000 --- a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/callInsideLambdaInsideSuperCallFromSecondaryConstructor.kt +++ /dev/null @@ -1,17 +0,0 @@ -open class A(x: () -> Unit) - -class B : A { - constructor(i: Int) : super( - { - foo(i) - } - ) - - constructor(l: Long) : super( - { - foo(l) - } - ) -} - -fun foo(any: Any) {} \ No newline at end of file diff --git a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/callInsideLambdaInsideSuperCallFromSingleSecondaryConstructor.kt b/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/callInsideLambdaInsideSuperCallFromSingleSecondaryConstructor.kt deleted file mode 100644 index f2fd2ed6e6b..00000000000 --- a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/callInsideLambdaInsideSuperCallFromSingleSecondaryConstructor.kt +++ /dev/null @@ -1,11 +0,0 @@ -open class A(x: () -> Unit) - -class B : A { - constructor(i: Int) : super( - { - foo(i) - } - ) -} - -fun foo(any: Any) {} \ No newline at end of file diff --git a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/constructor.kt b/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/constructor.kt deleted file mode 100644 index 3b380befcfd..00000000000 --- a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/constructor.kt +++ /dev/null @@ -1,3 +0,0 @@ -fun foo(f: Float.(Int, String) -> Boolean) { - -} \ No newline at end of file diff --git a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/constructorParameters/constructorParameter.kt b/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/constructorParameters/constructorParameter.kt deleted file mode 100644 index 5b3a9caf804..00000000000 --- a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/constructorParameters/constructorParameter.kt +++ /dev/null @@ -1 +0,0 @@ -class A(var x: Int) \ No newline at end of file diff --git a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/constructorParameters/constructorParameterWithAnnotations.kt b/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/constructorParameters/constructorParameterWithAnnotations.kt deleted file mode 100644 index b1e8e834504..00000000000 --- a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/constructorParameters/constructorParameterWithAnnotations.kt +++ /dev/null @@ -1,10 +0,0 @@ -class A( - @setparam:Ann - @get:Ann - @set:Ann - @field:Ann - @property:Ann - var x: Int -) - -annotation class Ann \ No newline at end of file diff --git a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/declarationsInPropertyInit.kt b/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/declarationsInPropertyInit.kt deleted file mode 100644 index da2bb45093c..00000000000 --- a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/declarationsInPropertyInit.kt +++ /dev/null @@ -1,11 +0,0 @@ -class A { - val a = run { - class X() - - val y = 10 - } -} - -inline fun run(block: () -> R): R { - return block() -} diff --git a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/enumClass.kt b/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/enumClass.kt deleted file mode 100644 index b99dbb7821e..00000000000 --- a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/enumClass.kt +++ /dev/null @@ -1,13 +0,0 @@ -enum class A { - X, - Y, - Z - - ; - - fun foo(){} - - val x = 10 - - fun bar() = 10 -} \ No newline at end of file diff --git a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/enumClassWithBody.kt b/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/enumClassWithBody.kt deleted file mode 100644 index 54f1ec2b39a..00000000000 --- a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/enumClassWithBody.kt +++ /dev/null @@ -1,13 +0,0 @@ -enum class A { - X { - fun localInX() = 1 - }, - Y { - override fun foo() {} - }, - Z, - - ; - - open fun foo() {} -} \ No newline at end of file diff --git a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/functionalType.kt b/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/functionalType.kt deleted file mode 100644 index d21912cc19d..00000000000 --- a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/functionalType.kt +++ /dev/null @@ -1,3 +0,0 @@ -class A(val x: Int = 10, val b: String) { - -} \ No newline at end of file diff --git a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/initBlock.kt b/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/initBlock.kt deleted file mode 100644 index 07c97eca54f..00000000000 --- a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/initBlock.kt +++ /dev/null @@ -1,6 +0,0 @@ -class A { - init { - val x = 10 - class B - } -} \ No newline at end of file diff --git a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/lambda.kt b/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/lambda.kt deleted file mode 100644 index 1c33726f638..00000000000 --- a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/lambda.kt +++ /dev/null @@ -1,7 +0,0 @@ -// WITH_STDLIB - -val x = run { - val inLambda = 10 - println(inLambda) - inLambda -} diff --git a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/localFunctionWithImplicitType.kt b/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/localFunctionWithImplicitType.kt deleted file mode 100644 index 93eeabeb1c4..00000000000 --- a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/localFunctionWithImplicitType.kt +++ /dev/null @@ -1,3 +0,0 @@ -fun foo() { - fun local() = 0 -} \ No newline at end of file diff --git a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/localUnitFunction.kt b/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/localUnitFunction.kt deleted file mode 100644 index a437874f557..00000000000 --- a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/localUnitFunction.kt +++ /dev/null @@ -1,5 +0,0 @@ -fun foo() { - fun local() { - println("local") - } -} \ No newline at end of file diff --git a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/memberFunctions.kt b/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/memberFunctions.kt deleted file mode 100644 index 3e38d65f361..00000000000 --- a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/memberFunctions.kt +++ /dev/null @@ -1,7 +0,0 @@ -class A { - fun foo1() = 10 - - fun foo2() { - - } -} \ No newline at end of file diff --git a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/memberProperties.kt b/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/memberProperties.kt deleted file mode 100644 index 3e38d65f361..00000000000 --- a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/memberProperties.kt +++ /dev/null @@ -1,7 +0,0 @@ -class A { - fun foo1() = 10 - - fun foo2() { - - } -} \ No newline at end of file diff --git a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/memberTypeAlias.kt b/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/memberTypeAlias.kt deleted file mode 100644 index 08dbb4268c9..00000000000 --- a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/memberTypeAlias.kt +++ /dev/null @@ -1,3 +0,0 @@ -class A { - typealias X = Int -} \ No newline at end of file diff --git a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/multipleTopLevelClasses.kt b/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/multipleTopLevelClasses.kt deleted file mode 100644 index 016f11f0bce..00000000000 --- a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/multipleTopLevelClasses.kt +++ /dev/null @@ -1,15 +0,0 @@ -class A { - -} - -class B { - -} - -class C { - -} - -class D { - -} \ No newline at end of file diff --git a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/multipleTopLevelFunctionsWithImplicitTypes.kt b/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/multipleTopLevelFunctionsWithImplicitTypes.kt deleted file mode 100644 index 6d15d9153df..00000000000 --- a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/multipleTopLevelFunctionsWithImplicitTypes.kt +++ /dev/null @@ -1,7 +0,0 @@ -fun foo1() = 1 - -fun foo2() = 2 - -fun foo3() = 3 - -fun foo4() = 4 \ No newline at end of file diff --git a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/multipleTopLevelUnitFunctions.kt b/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/multipleTopLevelUnitFunctions.kt deleted file mode 100644 index 6737fbcf302..00000000000 --- a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/multipleTopLevelUnitFunctions.kt +++ /dev/null @@ -1,15 +0,0 @@ -fun foo1() { - println("foo1") -} - -fun foo2() { - println("foo2") -} - -fun foo3() { - println("foo3") -} - -fun foo4() { - println("foo4") -} diff --git a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/nestedClases.kt b/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/nestedClases.kt deleted file mode 100644 index 0534a52714e..00000000000 --- a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/nestedClases.kt +++ /dev/null @@ -1,11 +0,0 @@ -class A { - class B { - - } - - object C { - class D { - - } - } -} \ No newline at end of file diff --git a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/nestedClasesWithFun.kt b/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/nestedClasesWithFun.kt deleted file mode 100644 index e41b4f8d32d..00000000000 --- a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/nestedClasesWithFun.kt +++ /dev/null @@ -1,7 +0,0 @@ -class A { - fun y() {} - - class B { - fun x() {} - } -} \ No newline at end of file diff --git a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/propertyAccessors.kt b/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/propertyAccessors.kt deleted file mode 100644 index d23c2044635..00000000000 --- a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/propertyAccessors.kt +++ /dev/null @@ -1,15 +0,0 @@ -var x: Int = 10 - get() = field - set(value) { - println(1) - field = value - } - -class X { - var y: Int = 10 - get() = field - set(value) { - println(2) - field = value - } -} \ No newline at end of file diff --git a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/propertyWithGetterAndSetter.kt b/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/propertyWithGetterAndSetter.kt deleted file mode 100644 index e3481db3d06..00000000000 --- a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/propertyWithGetterAndSetter.kt +++ /dev/null @@ -1,5 +0,0 @@ -var withGetterAndSetter: Int = 42 - get() = field - set(value) { - field = value - } diff --git a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/qualifiedCallInsideSuperCall.kt b/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/qualifiedCallInsideSuperCall.kt deleted file mode 100644 index 00475340bf9..00000000000 --- a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/qualifiedCallInsideSuperCall.kt +++ /dev/null @@ -1,51 +0,0 @@ -open class A(init: A.() -> Unit) { - val prop: String = "" -} - -object B : A({}) - -object C : A( - { - fun foo() = B.prop.toString() - } -) - -class D : A( - { - fun foo() = B.prop.toString() - } -) - -class E() : A( - { - fun foo() = B.prop.toString() - } -) - -class F : A( - { - fun foo() = B.prop.toString() - } -) { - constructor() -} - -class G : A( - { - fun foo() = B.prop.toString() - } -) { - constructor() : super( - { - fun foo() = B.prop.toString() - } - ) -} - -class H : A { - constructor() : super( - { - fun foo() = B.prop.toString() - } - ) -} \ No newline at end of file diff --git a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/secondaryConstructor.kt b/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/secondaryConstructor.kt deleted file mode 100644 index b3fdb9dfa92..00000000000 --- a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/secondaryConstructor.kt +++ /dev/null @@ -1,3 +0,0 @@ -class A(val x: Int = 10, val b: String) { - constructor(i: Int) : this(x = 1, b = i.toString()) -} \ No newline at end of file diff --git a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/superCallAnnotation.kt b/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/superCallAnnotation.kt deleted file mode 100644 index 55a8590ea90..00000000000 --- a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/superCallAnnotation.kt +++ /dev/null @@ -1,6 +0,0 @@ -@Target(AnnotationTarget.TYPE) -annotation class Anno - -open class A - -class B : @Anno A() \ No newline at end of file diff --git a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/superCallAnnotation2.kt b/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/superCallAnnotation2.kt deleted file mode 100644 index 24fcb2f57a9..00000000000 --- a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/superCallAnnotation2.kt +++ /dev/null @@ -1,6 +0,0 @@ -@Target(AnnotationTarget.TYPE) -annotation class Anno - -interface A - -class B : @Anno A \ No newline at end of file diff --git a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/superType.kt b/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/superType.kt deleted file mode 100644 index a15364ca07b..00000000000 --- a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/superType.kt +++ /dev/null @@ -1,7 +0,0 @@ -interface A - -typealias AS = A - -class C : AS { - constructor() -} \ No newline at end of file diff --git a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/typeAlias.kt b/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/typeAlias.kt deleted file mode 100644 index 11f7fbd6d31..00000000000 --- a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/typeAlias.kt +++ /dev/null @@ -1 +0,0 @@ -typealias A = 10 \ No newline at end of file diff --git a/analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallAndExplicitConstructor.kt b/analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallAndExplicitConstructor.kt new file mode 100644 index 00000000000..614bac2e664 --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallAndExplicitConstructor.kt @@ -0,0 +1,7 @@ +open class B(x: () -> Unit)/* NonReanalyzableNonClassDeclarationStructureElement *//* NonReanalyzableClassDeclarationStructureElement */ + +class A()/* NonReanalyzableNonClassDeclarationStructureElement */ : B(1, { + foo() +})/* NonReanalyzableClassDeclarationStructureElement */ + +fun foo() {/* ReanalyzableFunctionStructureElement */} diff --git a/analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallAndImplicitConstructor.kt b/analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallAndImplicitConstructor.kt new file mode 100644 index 00000000000..a59faab2494 --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallAndImplicitConstructor.kt @@ -0,0 +1,7 @@ +open class B(x: () -> Unit)/* NonReanalyzableNonClassDeclarationStructureElement *//* NonReanalyzableClassDeclarationStructureElement */ + +class A : B(1, { + foo() +})/* NonReanalyzableClassDeclarationStructureElement */ + +fun foo() {/* ReanalyzableFunctionStructureElement */} diff --git a/analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallFromSecondaryConstructor.kt b/analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallFromSecondaryConstructor.kt new file mode 100644 index 00000000000..b40011374a6 --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallFromSecondaryConstructor.kt @@ -0,0 +1,17 @@ +open class A(x: () -> Unit)/* NonReanalyzableNonClassDeclarationStructureElement *//* NonReanalyzableClassDeclarationStructureElement */ + +class B : A {/* NonReanalyzableClassDeclarationStructureElement */ + constructor(i: Int) : super( + { + foo(i) + } + )/* NonReanalyzableNonClassDeclarationStructureElement */ + + constructor(l: Long) : super( + { + foo(l) + } + )/* NonReanalyzableNonClassDeclarationStructureElement */ +} + +fun foo(any: Any) {/* ReanalyzableFunctionStructureElement */} diff --git a/analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallFromSingleSecondaryConstructor.kt b/analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallFromSingleSecondaryConstructor.kt new file mode 100644 index 00000000000..fb14cf30b54 --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallFromSingleSecondaryConstructor.kt @@ -0,0 +1,11 @@ +open class A(x: () -> Unit)/* NonReanalyzableNonClassDeclarationStructureElement *//* NonReanalyzableClassDeclarationStructureElement */ + +class B : A {/* NonReanalyzableClassDeclarationStructureElement */ + constructor(i: Int) : super( + { + foo(i) + } + )/* NonReanalyzableNonClassDeclarationStructureElement */ +} + +fun foo(any: Any) {/* ReanalyzableFunctionStructureElement */} diff --git a/analysis/low-level-api-fir/testdata/fileStructure/constructorParameter.kt b/analysis/low-level-api-fir/testdata/fileStructure/constructorParameter.kt new file mode 100644 index 00000000000..eb0073b1d28 --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/constructorParameter.kt @@ -0,0 +1 @@ +class A(var x: Int)/* NonReanalyzableNonClassDeclarationStructureElement *//* NonReanalyzableClassDeclarationStructureElement */ diff --git a/analysis/low-level-api-fir/testdata/fileStructure/constructorParameterWithAnnotations.kt b/analysis/low-level-api-fir/testdata/fileStructure/constructorParameterWithAnnotations.kt new file mode 100644 index 00000000000..a3f96d208ab --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/constructorParameterWithAnnotations.kt @@ -0,0 +1,10 @@ +class A( + @setparam:Ann + @get:Ann + @set:Ann + @field:Ann + @property:Ann + var x: Int +)/* NonReanalyzableNonClassDeclarationStructureElement *//* NonReanalyzableClassDeclarationStructureElement */ + +annotation class Ann/* NonReanalyzableClassDeclarationStructureElement */ diff --git a/analysis/low-level-api-fir/testdata/fileStructure/functionalType.kt b/analysis/low-level-api-fir/testdata/fileStructure/functionalType.kt new file mode 100644 index 00000000000..18d61b7d508 --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/functionalType.kt @@ -0,0 +1,3 @@ +class A(val x: Int = 10, val b: String)/* NonReanalyzableNonClassDeclarationStructureElement */ {/* NonReanalyzableClassDeclarationStructureElement */ + +} diff --git a/analysis/low-level-api-fir/testdata/fileStructure/lambda.kt b/analysis/low-level-api-fir/testdata/fileStructure/lambda.kt new file mode 100644 index 00000000000..8558d42cabe --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/lambda.kt @@ -0,0 +1,9 @@ +val x = run { + val inLambda = 10 + println(inLambda) + inLambda +}/* NonReanalyzableNonClassDeclarationStructureElement */ + +fun println(any: Any) {/* ReanalyzableFunctionStructureElement */ + +} diff --git a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/localDeclarationsInAccessor.kt b/analysis/low-level-api-fir/testdata/fileStructure/localDeclarationsInAccessor.kt similarity index 77% rename from analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/localDeclarationsInAccessor.kt rename to analysis/low-level-api-fir/testdata/fileStructure/localDeclarationsInAccessor.kt index 38c74929bc4..540312cdaa4 100644 --- a/analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/localDeclarationsInAccessor.kt +++ b/analysis/low-level-api-fir/testdata/fileStructure/localDeclarationsInAccessor.kt @@ -1,5 +1,5 @@ -class Outer { - val i: Int = 1 +class Outer {/* NonReanalyzableClassDeclarationStructureElement */ + val i: Int = 1/* ReanalyzablePropertyStructureElement */ get() { class Inner { var i: Int = 2 @@ -20,7 +20,7 @@ class Outer { return field } - val j: Int = 4 + val j: Int = 4/* ReanalyzablePropertyStructureElement */ get() { fun local() { field++ diff --git a/analysis/low-level-api-fir/testdata/fileStructure/localFunctionWithImplicitType.kt b/analysis/low-level-api-fir/testdata/fileStructure/localFunctionWithImplicitType.kt new file mode 100644 index 00000000000..02d88fba7cb --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/localFunctionWithImplicitType.kt @@ -0,0 +1,3 @@ +fun foo() {/* ReanalyzableFunctionStructureElement */ + fun local() = 0 +} diff --git a/analysis/low-level-api-fir/testdata/fileStructure/localUnitFunction.kt b/analysis/low-level-api-fir/testdata/fileStructure/localUnitFunction.kt new file mode 100644 index 00000000000..cdad4424242 --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/localUnitFunction.kt @@ -0,0 +1,5 @@ +fun foo() {/* ReanalyzableFunctionStructureElement */ + fun local() { + println("local") + } +} diff --git a/analysis/low-level-api-fir/testdata/fileStructure/memberFunctions.kt b/analysis/low-level-api-fir/testdata/fileStructure/memberFunctions.kt new file mode 100644 index 00000000000..cb071f7efc9 --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/memberFunctions.kt @@ -0,0 +1,7 @@ +class A {/* NonReanalyzableClassDeclarationStructureElement */ + fun foo1() = 10/* NonReanalyzableNonClassDeclarationStructureElement */ + + fun foo2() {/* ReanalyzableFunctionStructureElement */ + + } +} diff --git a/analysis/low-level-api-fir/testdata/fileStructure/memberProperties.kt b/analysis/low-level-api-fir/testdata/fileStructure/memberProperties.kt new file mode 100644 index 00000000000..cb071f7efc9 --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/memberProperties.kt @@ -0,0 +1,7 @@ +class A {/* NonReanalyzableClassDeclarationStructureElement */ + fun foo1() = 10/* NonReanalyzableNonClassDeclarationStructureElement */ + + fun foo2() {/* ReanalyzableFunctionStructureElement */ + + } +} diff --git a/analysis/low-level-api-fir/testdata/fileStructure/multipleTopLevelClasses.kt b/analysis/low-level-api-fir/testdata/fileStructure/multipleTopLevelClasses.kt new file mode 100644 index 00000000000..b964d65f7b9 --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/multipleTopLevelClasses.kt @@ -0,0 +1,15 @@ +class A {/* NonReanalyzableClassDeclarationStructureElement */ + +} + +class B {/* NonReanalyzableClassDeclarationStructureElement */ + +} + +class C {/* NonReanalyzableClassDeclarationStructureElement */ + +} + +class D {/* NonReanalyzableClassDeclarationStructureElement */ + +} diff --git a/analysis/low-level-api-fir/testdata/fileStructure/multipleTopLevelFunctionsWithImplicitTypes.kt b/analysis/low-level-api-fir/testdata/fileStructure/multipleTopLevelFunctionsWithImplicitTypes.kt new file mode 100644 index 00000000000..6b9abd76d6b --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/multipleTopLevelFunctionsWithImplicitTypes.kt @@ -0,0 +1,7 @@ +fun foo1() = 1/* NonReanalyzableNonClassDeclarationStructureElement */ + +fun foo2() = 2/* NonReanalyzableNonClassDeclarationStructureElement */ + +fun foo3() = 3/* NonReanalyzableNonClassDeclarationStructureElement */ + +fun foo4() = 4/* NonReanalyzableNonClassDeclarationStructureElement */ diff --git a/analysis/low-level-api-fir/testdata/fileStructure/multipleTopLevelUnitFunctions.kt b/analysis/low-level-api-fir/testdata/fileStructure/multipleTopLevelUnitFunctions.kt new file mode 100644 index 00000000000..c4224d8bda2 --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/multipleTopLevelUnitFunctions.kt @@ -0,0 +1,15 @@ +fun foo1() {/* ReanalyzableFunctionStructureElement */ + println("foo1") +} + +fun foo2() {/* ReanalyzableFunctionStructureElement */ + println("foo2") +} + +fun foo3() {/* ReanalyzableFunctionStructureElement */ + println("foo3") +} + +fun foo4() {/* ReanalyzableFunctionStructureElement */ + println("foo4") +} diff --git a/analysis/low-level-api-fir/testdata/fileStructure/nestedClases.kt b/analysis/low-level-api-fir/testdata/fileStructure/nestedClases.kt new file mode 100644 index 00000000000..b6c0ada184b --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/nestedClases.kt @@ -0,0 +1,11 @@ +class A {/* NonReanalyzableClassDeclarationStructureElement */ + class B {/* NonReanalyzableClassDeclarationStructureElement */ + + } + + object C {/* NonReanalyzableClassDeclarationStructureElement */ + class D {/* NonReanalyzableClassDeclarationStructureElement */ + + } + } +} diff --git a/analysis/low-level-api-fir/testdata/fileStructure/nestedClasesWithFun.kt b/analysis/low-level-api-fir/testdata/fileStructure/nestedClasesWithFun.kt new file mode 100644 index 00000000000..c6d6ae3f28b --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/nestedClasesWithFun.kt @@ -0,0 +1,7 @@ +class A {/* NonReanalyzableClassDeclarationStructureElement */ + fun y() {/* ReanalyzableFunctionStructureElement */} + + class B {/* NonReanalyzableClassDeclarationStructureElement */ + fun x() {/* ReanalyzableFunctionStructureElement */} + } +} diff --git a/analysis/low-level-api-fir/testdata/fileStructure/propertyWithGetterAndSetter.kt b/analysis/low-level-api-fir/testdata/fileStructure/propertyWithGetterAndSetter.kt new file mode 100644 index 00000000000..ccd7660634a --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/propertyWithGetterAndSetter.kt @@ -0,0 +1,5 @@ +var withGetterAndSetter: Int = 42/* ReanalyzablePropertyStructureElement */ + get() = field + set(value) { + field = value + } diff --git a/analysis/low-level-api-fir/testdata/fileStructure/qualifiedCallInsideSuperCall.kt b/analysis/low-level-api-fir/testdata/fileStructure/qualifiedCallInsideSuperCall.kt new file mode 100644 index 00000000000..dc2bd2a496a --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/qualifiedCallInsideSuperCall.kt @@ -0,0 +1,51 @@ +open class A(init: A.() -> Unit)/* NonReanalyzableNonClassDeclarationStructureElement */ {/* NonReanalyzableClassDeclarationStructureElement */ + val prop: String = ""/* NonReanalyzableNonClassDeclarationStructureElement */ +} + +object B : A({})/* NonReanalyzableClassDeclarationStructureElement */ + +object C : A( + { + fun foo() = B.prop.toString() + } +)/* NonReanalyzableClassDeclarationStructureElement */ + +class D : A( + { + fun foo() = B.prop.toString() + } +)/* NonReanalyzableClassDeclarationStructureElement */ + +class E()/* NonReanalyzableNonClassDeclarationStructureElement */ : A( + { + fun foo() = B.prop.toString() + } +)/* NonReanalyzableClassDeclarationStructureElement */ + +class F : A( + { + fun foo() = B.prop.toString() + } +) {/* NonReanalyzableClassDeclarationStructureElement */ + constructor()/* NonReanalyzableNonClassDeclarationStructureElement */ +} + +class G : A( + { + fun foo() = B.prop.toString() + } +) {/* NonReanalyzableClassDeclarationStructureElement */ + constructor() : super( + { + fun foo() = B.prop.toString() + } + )/* NonReanalyzableNonClassDeclarationStructureElement */ +} + +class H : A {/* NonReanalyzableClassDeclarationStructureElement */ + constructor() : super( + { + fun foo() = B.prop.toString() + } + )/* NonReanalyzableNonClassDeclarationStructureElement */ +} diff --git a/analysis/low-level-api-fir/testdata/fileStructure/secondaryConstructor.kt b/analysis/low-level-api-fir/testdata/fileStructure/secondaryConstructor.kt new file mode 100644 index 00000000000..d9b5f29c269 --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/secondaryConstructor.kt @@ -0,0 +1,3 @@ +class A(val x: Int = 10, val b: String)/* NonReanalyzableNonClassDeclarationStructureElement */ {/* NonReanalyzableClassDeclarationStructureElement */ + constructor(i: Int) : this(x = 1, b = i.toString())/* NonReanalyzableNonClassDeclarationStructureElement */ +} diff --git a/analysis/low-level-api-fir/testdata/fileStructure/superCallAnnotation.kt b/analysis/low-level-api-fir/testdata/fileStructure/superCallAnnotation.kt new file mode 100644 index 00000000000..04e45a1524f --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/superCallAnnotation.kt @@ -0,0 +1,6 @@ +@Target(AnnotationTarget.TYPE) +annotation class Anno/* NonReanalyzableClassDeclarationStructureElement */ + +open class A/* NonReanalyzableClassDeclarationStructureElement */ + +class B : @Anno A()/* NonReanalyzableClassDeclarationStructureElement */ diff --git a/analysis/low-level-api-fir/testdata/fileStructure/superCallAnnotation2.kt b/analysis/low-level-api-fir/testdata/fileStructure/superCallAnnotation2.kt new file mode 100644 index 00000000000..bc924c8bd10 --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/superCallAnnotation2.kt @@ -0,0 +1,6 @@ +@Target(AnnotationTarget.TYPE) +annotation class Anno/* NonReanalyzableClassDeclarationStructureElement */ + +interface A/* NonReanalyzableClassDeclarationStructureElement */ + +class B : @Anno A/* NonReanalyzableClassDeclarationStructureElement */ diff --git a/analysis/low-level-api-fir/testdata/fileStructure/superType.kt b/analysis/low-level-api-fir/testdata/fileStructure/superType.kt new file mode 100644 index 00000000000..4ff1d888c24 --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/superType.kt @@ -0,0 +1,7 @@ +interface A/* NonReanalyzableClassDeclarationStructureElement */ + +typealias AS = A/* NonReanalyzableNonClassDeclarationStructureElement */ + +class C : AS {/* NonReanalyzableClassDeclarationStructureElement */ + constructor()/* NonReanalyzableNonClassDeclarationStructureElement */ +} diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/DiagnosticTraversalCounterTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/DiagnosticTraversalCounterTestGenerated.java index 7e0daf57a9c..7571b0e08ea 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/DiagnosticTraversalCounterTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/DiagnosticTraversalCounterTestGenerated.java @@ -16,213 +16,293 @@ import java.util.regex.Pattern; /** This class is generated by {@link org.jetbrains.kotlin.generators.tests.analysis.api.GenerateAnalysisApiTestsKt}. DO NOT MODIFY MANUALLY */ @SuppressWarnings("all") -@TestMetadata("analysis/low-level-api-fir/testdata/diagnosticTraversalCounter") +@TestMetadata("analysis/low-level-api-fir/testdata/fileStructure") @TestDataPath("$PROJECT_ROOT") public class DiagnosticTraversalCounterTestGenerated extends AbstractDiagnosticTraversalCounterTest { @Test - public void testAllFilesPresentInDiagnosticTraversalCounter() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/low-level-api-fir/testdata/diagnosticTraversalCounter"), Pattern.compile("^(.+)\\.kt$"), null, true); + public void testAllFilesPresentInFileStructure() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/low-level-api-fir/testdata/fileStructure"), Pattern.compile("^(.+)\\.(kt)$"), null, true); } @Test @TestMetadata("callInsideLambdaInsideSuperCallAndExplicitConstructor.kt") public void testCallInsideLambdaInsideSuperCallAndExplicitConstructor() throws Exception { - runTest("analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/callInsideLambdaInsideSuperCallAndExplicitConstructor.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallAndExplicitConstructor.kt"); } @Test @TestMetadata("callInsideLambdaInsideSuperCallAndImplicitConstructor.kt") public void testCallInsideLambdaInsideSuperCallAndImplicitConstructor() throws Exception { - runTest("analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/callInsideLambdaInsideSuperCallAndImplicitConstructor.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallAndImplicitConstructor.kt"); } @Test @TestMetadata("callInsideLambdaInsideSuperCallFromSecondaryConstructor.kt") public void testCallInsideLambdaInsideSuperCallFromSecondaryConstructor() throws Exception { - runTest("analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/callInsideLambdaInsideSuperCallFromSecondaryConstructor.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallFromSecondaryConstructor.kt"); } @Test @TestMetadata("callInsideLambdaInsideSuperCallFromSingleSecondaryConstructor.kt") public void testCallInsideLambdaInsideSuperCallFromSingleSecondaryConstructor() throws Exception { - runTest("analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/callInsideLambdaInsideSuperCallFromSingleSecondaryConstructor.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallFromSingleSecondaryConstructor.kt"); } @Test - @TestMetadata("constructor.kt") - public void testConstructor() throws Exception { - runTest("analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/constructor.kt"); + @TestMetadata("class.kt") + public void testClass() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/class.kt"); + } + + @Test + @TestMetadata("classMemberProperty.kt") + public void testClassMemberProperty() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/classMemberProperty.kt"); + } + + @Test + @TestMetadata("constructorParameter.kt") + public void testConstructorParameter() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/constructorParameter.kt"); + } + + @Test + @TestMetadata("constructorParameterWithAnnotations.kt") + public void testConstructorParameterWithAnnotations() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/constructorParameterWithAnnotations.kt"); + } + + @Test + @TestMetadata("constructors.kt") + public void testConstructors() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/constructors.kt"); + } + + @Test + @TestMetadata("danglingAnnotationClassLevel.kt") + public void testDanglingAnnotationClassLevel() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/danglingAnnotationClassLevel.kt"); + } + + @Test + @TestMetadata("danglingAnnotationTopLevel.kt") + public void testDanglingAnnotationTopLevel() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/danglingAnnotationTopLevel.kt"); } @Test @TestMetadata("declarationsInPropertyInit.kt") public void testDeclarationsInPropertyInit() throws Exception { - runTest("analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/declarationsInPropertyInit.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/declarationsInPropertyInit.kt"); } @Test @TestMetadata("enumClass.kt") public void testEnumClass() throws Exception { - runTest("analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/enumClass.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/enumClass.kt"); } @Test @TestMetadata("enumClassWithBody.kt") public void testEnumClassWithBody() throws Exception { - runTest("analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/enumClassWithBody.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/enumClassWithBody.kt"); } @Test @TestMetadata("functionalType.kt") public void testFunctionalType() throws Exception { - runTest("analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/functionalType.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/functionalType.kt"); } @Test @TestMetadata("initBlock.kt") public void testInitBlock() throws Exception { - runTest("analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/initBlock.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/initBlock.kt"); } @Test @TestMetadata("lambda.kt") public void testLambda() throws Exception { - runTest("analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/lambda.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/lambda.kt"); + } + + @Test + @TestMetadata("localClass.kt") + public void testLocalClass() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/localClass.kt"); } @Test @TestMetadata("localDeclarationsInAccessor.kt") public void testLocalDeclarationsInAccessor() throws Exception { - runTest("analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/localDeclarationsInAccessor.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/localDeclarationsInAccessor.kt"); + } + + @Test + @TestMetadata("localFun.kt") + public void testLocalFun() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/localFun.kt"); } @Test @TestMetadata("localFunctionWithImplicitType.kt") public void testLocalFunctionWithImplicitType() throws Exception { - runTest("analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/localFunctionWithImplicitType.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/localFunctionWithImplicitType.kt"); + } + + @Test + @TestMetadata("localProperty.kt") + public void testLocalProperty() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/localProperty.kt"); } @Test @TestMetadata("localUnitFunction.kt") public void testLocalUnitFunction() throws Exception { - runTest("analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/localUnitFunction.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/localUnitFunction.kt"); } @Test @TestMetadata("memberFunctions.kt") public void testMemberFunctions() throws Exception { - runTest("analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/memberFunctions.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/memberFunctions.kt"); } @Test @TestMetadata("memberProperties.kt") public void testMemberProperties() throws Exception { - runTest("analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/memberProperties.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/memberProperties.kt"); } @Test @TestMetadata("memberTypeAlias.kt") public void testMemberTypeAlias() throws Exception { - runTest("analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/memberTypeAlias.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/memberTypeAlias.kt"); } @Test @TestMetadata("multipleTopLevelClasses.kt") public void testMultipleTopLevelClasses() throws Exception { - runTest("analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/multipleTopLevelClasses.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/multipleTopLevelClasses.kt"); } @Test @TestMetadata("multipleTopLevelFunctionsWithImplicitTypes.kt") public void testMultipleTopLevelFunctionsWithImplicitTypes() throws Exception { - runTest("analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/multipleTopLevelFunctionsWithImplicitTypes.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/multipleTopLevelFunctionsWithImplicitTypes.kt"); } @Test @TestMetadata("multipleTopLevelUnitFunctions.kt") public void testMultipleTopLevelUnitFunctions() throws Exception { - runTest("analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/multipleTopLevelUnitFunctions.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/multipleTopLevelUnitFunctions.kt"); } @Test @TestMetadata("nestedClases.kt") public void testNestedClases() throws Exception { - runTest("analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/nestedClases.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/nestedClases.kt"); } @Test @TestMetadata("nestedClasesWithFun.kt") public void testNestedClasesWithFun() throws Exception { - runTest("analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/nestedClasesWithFun.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/nestedClasesWithFun.kt"); + } + + @Test + @TestMetadata("nestedClasses.kt") + public void testNestedClasses() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/nestedClasses.kt"); } @Test @TestMetadata("propertyAccessors.kt") public void testPropertyAccessors() throws Exception { - runTest("analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/propertyAccessors.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/propertyAccessors.kt"); } @Test @TestMetadata("propertyWithGetterAndSetter.kt") public void testPropertyWithGetterAndSetter() throws Exception { - runTest("analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/propertyWithGetterAndSetter.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/propertyWithGetterAndSetter.kt"); } @Test @TestMetadata("qualifiedCallInsideSuperCall.kt") public void testQualifiedCallInsideSuperCall() throws Exception { - runTest("analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/qualifiedCallInsideSuperCall.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/qualifiedCallInsideSuperCall.kt"); } @Test @TestMetadata("secondaryConstructor.kt") public void testSecondaryConstructor() throws Exception { - runTest("analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/secondaryConstructor.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/secondaryConstructor.kt"); } @Test @TestMetadata("superCallAnnotation.kt") public void testSuperCallAnnotation() throws Exception { - runTest("analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/superCallAnnotation.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/superCallAnnotation.kt"); } @Test @TestMetadata("superCallAnnotation2.kt") public void testSuperCallAnnotation2() throws Exception { - runTest("analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/superCallAnnotation2.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/superCallAnnotation2.kt"); + } + + @Test + @TestMetadata("superClassCall.kt") + public void testSuperClassCall() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/superClassCall.kt"); } @Test @TestMetadata("superType.kt") public void testSuperType() throws Exception { - runTest("analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/superType.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/superType.kt"); + } + + @Test + @TestMetadata("topLevelExpressionBodyFunWithType.kt") + public void testTopLevelExpressionBodyFunWithType() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/topLevelExpressionBodyFunWithType.kt"); + } + + @Test + @TestMetadata("topLevelExpressionBodyFunWithoutType.kt") + public void testTopLevelExpressionBodyFunWithoutType() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/topLevelExpressionBodyFunWithoutType.kt"); + } + + @Test + @TestMetadata("topLevelFunWithType.kt") + public void testTopLevelFunWithType() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/topLevelFunWithType.kt"); + } + + @Test + @TestMetadata("topLevelProperty.kt") + public void testTopLevelProperty() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/topLevelProperty.kt"); + } + + @Test + @TestMetadata("topLevelUnitFun.kt") + public void testTopLevelUnitFun() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/topLevelUnitFun.kt"); } @Test @TestMetadata("typeAlias.kt") public void testTypeAlias() throws Exception { - runTest("analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/typeAlias.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/typeAlias.kt"); } - @Nested - @TestMetadata("analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/constructorParameters") - @TestDataPath("$PROJECT_ROOT") - public class ConstructorParameters { - @Test - public void testAllFilesPresentInConstructorParameters() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/constructorParameters"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @Test - @TestMetadata("constructorParameter.kt") - public void testConstructorParameter() throws Exception { - runTest("analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/constructorParameters/constructorParameter.kt"); - } - - @Test - @TestMetadata("constructorParameterWithAnnotations.kt") - public void testConstructorParameterWithAnnotations() throws Exception { - runTest("analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/constructorParameters/constructorParameterWithAnnotations.kt"); - } + @Test + @TestMetadata("withoutName.kt") + public void testWithoutName() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/withoutName.kt"); } } diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/FirOutOfContentRootContextCollectionTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/FirOutOfContentRootContextCollectionTestGenerated.java index 7335b99db4e..eed987cb9de 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/FirOutOfContentRootContextCollectionTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/FirOutOfContentRootContextCollectionTestGenerated.java @@ -24,6 +24,30 @@ public class FirOutOfContentRootContextCollectionTestGenerated extends AbstractF KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/low-level-api-fir/testdata/fileStructure"), Pattern.compile("^(.+)\\.(kt)$"), null, true); } + @Test + @TestMetadata("callInsideLambdaInsideSuperCallAndExplicitConstructor.kt") + public void testCallInsideLambdaInsideSuperCallAndExplicitConstructor() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallAndExplicitConstructor.kt"); + } + + @Test + @TestMetadata("callInsideLambdaInsideSuperCallAndImplicitConstructor.kt") + public void testCallInsideLambdaInsideSuperCallAndImplicitConstructor() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallAndImplicitConstructor.kt"); + } + + @Test + @TestMetadata("callInsideLambdaInsideSuperCallFromSecondaryConstructor.kt") + public void testCallInsideLambdaInsideSuperCallFromSecondaryConstructor() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallFromSecondaryConstructor.kt"); + } + + @Test + @TestMetadata("callInsideLambdaInsideSuperCallFromSingleSecondaryConstructor.kt") + public void testCallInsideLambdaInsideSuperCallFromSingleSecondaryConstructor() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallFromSingleSecondaryConstructor.kt"); + } + @Test @TestMetadata("class.kt") public void testClass() throws Exception { @@ -36,6 +60,18 @@ public class FirOutOfContentRootContextCollectionTestGenerated extends AbstractF runTest("analysis/low-level-api-fir/testdata/fileStructure/classMemberProperty.kt"); } + @Test + @TestMetadata("constructorParameter.kt") + public void testConstructorParameter() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/constructorParameter.kt"); + } + + @Test + @TestMetadata("constructorParameterWithAnnotations.kt") + public void testConstructorParameterWithAnnotations() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/constructorParameterWithAnnotations.kt"); + } + @Test @TestMetadata("constructors.kt") public void testConstructors() throws Exception { @@ -72,36 +108,108 @@ public class FirOutOfContentRootContextCollectionTestGenerated extends AbstractF runTest("analysis/low-level-api-fir/testdata/fileStructure/enumClassWithBody.kt"); } + @Test + @TestMetadata("functionalType.kt") + public void testFunctionalType() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/functionalType.kt"); + } + @Test @TestMetadata("initBlock.kt") public void testInitBlock() throws Exception { runTest("analysis/low-level-api-fir/testdata/fileStructure/initBlock.kt"); } + @Test + @TestMetadata("lambda.kt") + public void testLambda() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/lambda.kt"); + } + @Test @TestMetadata("localClass.kt") public void testLocalClass() throws Exception { runTest("analysis/low-level-api-fir/testdata/fileStructure/localClass.kt"); } + @Test + @TestMetadata("localDeclarationsInAccessor.kt") + public void testLocalDeclarationsInAccessor() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/localDeclarationsInAccessor.kt"); + } + @Test @TestMetadata("localFun.kt") public void testLocalFun() throws Exception { runTest("analysis/low-level-api-fir/testdata/fileStructure/localFun.kt"); } + @Test + @TestMetadata("localFunctionWithImplicitType.kt") + public void testLocalFunctionWithImplicitType() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/localFunctionWithImplicitType.kt"); + } + @Test @TestMetadata("localProperty.kt") public void testLocalProperty() throws Exception { runTest("analysis/low-level-api-fir/testdata/fileStructure/localProperty.kt"); } + @Test + @TestMetadata("localUnitFunction.kt") + public void testLocalUnitFunction() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/localUnitFunction.kt"); + } + + @Test + @TestMetadata("memberFunctions.kt") + public void testMemberFunctions() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/memberFunctions.kt"); + } + + @Test + @TestMetadata("memberProperties.kt") + public void testMemberProperties() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/memberProperties.kt"); + } + @Test @TestMetadata("memberTypeAlias.kt") public void testMemberTypeAlias() throws Exception { runTest("analysis/low-level-api-fir/testdata/fileStructure/memberTypeAlias.kt"); } + @Test + @TestMetadata("multipleTopLevelClasses.kt") + public void testMultipleTopLevelClasses() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/multipleTopLevelClasses.kt"); + } + + @Test + @TestMetadata("multipleTopLevelFunctionsWithImplicitTypes.kt") + public void testMultipleTopLevelFunctionsWithImplicitTypes() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/multipleTopLevelFunctionsWithImplicitTypes.kt"); + } + + @Test + @TestMetadata("multipleTopLevelUnitFunctions.kt") + public void testMultipleTopLevelUnitFunctions() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/multipleTopLevelUnitFunctions.kt"); + } + + @Test + @TestMetadata("nestedClases.kt") + public void testNestedClases() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/nestedClases.kt"); + } + + @Test + @TestMetadata("nestedClasesWithFun.kt") + public void testNestedClasesWithFun() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/nestedClasesWithFun.kt"); + } + @Test @TestMetadata("nestedClasses.kt") public void testNestedClasses() throws Exception { @@ -114,12 +222,48 @@ public class FirOutOfContentRootContextCollectionTestGenerated extends AbstractF runTest("analysis/low-level-api-fir/testdata/fileStructure/propertyAccessors.kt"); } + @Test + @TestMetadata("propertyWithGetterAndSetter.kt") + public void testPropertyWithGetterAndSetter() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/propertyWithGetterAndSetter.kt"); + } + + @Test + @TestMetadata("qualifiedCallInsideSuperCall.kt") + public void testQualifiedCallInsideSuperCall() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/qualifiedCallInsideSuperCall.kt"); + } + + @Test + @TestMetadata("secondaryConstructor.kt") + public void testSecondaryConstructor() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/secondaryConstructor.kt"); + } + + @Test + @TestMetadata("superCallAnnotation.kt") + public void testSuperCallAnnotation() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/superCallAnnotation.kt"); + } + + @Test + @TestMetadata("superCallAnnotation2.kt") + public void testSuperCallAnnotation2() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/superCallAnnotation2.kt"); + } + @Test @TestMetadata("superClassCall.kt") public void testSuperClassCall() throws Exception { runTest("analysis/low-level-api-fir/testdata/fileStructure/superClassCall.kt"); } + @Test + @TestMetadata("superType.kt") + public void testSuperType() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/superType.kt"); + } + @Test @TestMetadata("topLevelExpressionBodyFunWithType.kt") public void testTopLevelExpressionBodyFunWithType() throws Exception { diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/FirSourceContextCollectionTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/FirSourceContextCollectionTestGenerated.java index 6dc8f84abb1..39895f8f46a 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/FirSourceContextCollectionTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/FirSourceContextCollectionTestGenerated.java @@ -24,6 +24,30 @@ public class FirSourceContextCollectionTestGenerated extends AbstractFirSourceCo KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/low-level-api-fir/testdata/fileStructure"), Pattern.compile("^(.+)\\.(kt)$"), null, true); } + @Test + @TestMetadata("callInsideLambdaInsideSuperCallAndExplicitConstructor.kt") + public void testCallInsideLambdaInsideSuperCallAndExplicitConstructor() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallAndExplicitConstructor.kt"); + } + + @Test + @TestMetadata("callInsideLambdaInsideSuperCallAndImplicitConstructor.kt") + public void testCallInsideLambdaInsideSuperCallAndImplicitConstructor() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallAndImplicitConstructor.kt"); + } + + @Test + @TestMetadata("callInsideLambdaInsideSuperCallFromSecondaryConstructor.kt") + public void testCallInsideLambdaInsideSuperCallFromSecondaryConstructor() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallFromSecondaryConstructor.kt"); + } + + @Test + @TestMetadata("callInsideLambdaInsideSuperCallFromSingleSecondaryConstructor.kt") + public void testCallInsideLambdaInsideSuperCallFromSingleSecondaryConstructor() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallFromSingleSecondaryConstructor.kt"); + } + @Test @TestMetadata("class.kt") public void testClass() throws Exception { @@ -36,6 +60,18 @@ public class FirSourceContextCollectionTestGenerated extends AbstractFirSourceCo runTest("analysis/low-level-api-fir/testdata/fileStructure/classMemberProperty.kt"); } + @Test + @TestMetadata("constructorParameter.kt") + public void testConstructorParameter() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/constructorParameter.kt"); + } + + @Test + @TestMetadata("constructorParameterWithAnnotations.kt") + public void testConstructorParameterWithAnnotations() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/constructorParameterWithAnnotations.kt"); + } + @Test @TestMetadata("constructors.kt") public void testConstructors() throws Exception { @@ -72,36 +108,108 @@ public class FirSourceContextCollectionTestGenerated extends AbstractFirSourceCo runTest("analysis/low-level-api-fir/testdata/fileStructure/enumClassWithBody.kt"); } + @Test + @TestMetadata("functionalType.kt") + public void testFunctionalType() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/functionalType.kt"); + } + @Test @TestMetadata("initBlock.kt") public void testInitBlock() throws Exception { runTest("analysis/low-level-api-fir/testdata/fileStructure/initBlock.kt"); } + @Test + @TestMetadata("lambda.kt") + public void testLambda() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/lambda.kt"); + } + @Test @TestMetadata("localClass.kt") public void testLocalClass() throws Exception { runTest("analysis/low-level-api-fir/testdata/fileStructure/localClass.kt"); } + @Test + @TestMetadata("localDeclarationsInAccessor.kt") + public void testLocalDeclarationsInAccessor() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/localDeclarationsInAccessor.kt"); + } + @Test @TestMetadata("localFun.kt") public void testLocalFun() throws Exception { runTest("analysis/low-level-api-fir/testdata/fileStructure/localFun.kt"); } + @Test + @TestMetadata("localFunctionWithImplicitType.kt") + public void testLocalFunctionWithImplicitType() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/localFunctionWithImplicitType.kt"); + } + @Test @TestMetadata("localProperty.kt") public void testLocalProperty() throws Exception { runTest("analysis/low-level-api-fir/testdata/fileStructure/localProperty.kt"); } + @Test + @TestMetadata("localUnitFunction.kt") + public void testLocalUnitFunction() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/localUnitFunction.kt"); + } + + @Test + @TestMetadata("memberFunctions.kt") + public void testMemberFunctions() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/memberFunctions.kt"); + } + + @Test + @TestMetadata("memberProperties.kt") + public void testMemberProperties() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/memberProperties.kt"); + } + @Test @TestMetadata("memberTypeAlias.kt") public void testMemberTypeAlias() throws Exception { runTest("analysis/low-level-api-fir/testdata/fileStructure/memberTypeAlias.kt"); } + @Test + @TestMetadata("multipleTopLevelClasses.kt") + public void testMultipleTopLevelClasses() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/multipleTopLevelClasses.kt"); + } + + @Test + @TestMetadata("multipleTopLevelFunctionsWithImplicitTypes.kt") + public void testMultipleTopLevelFunctionsWithImplicitTypes() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/multipleTopLevelFunctionsWithImplicitTypes.kt"); + } + + @Test + @TestMetadata("multipleTopLevelUnitFunctions.kt") + public void testMultipleTopLevelUnitFunctions() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/multipleTopLevelUnitFunctions.kt"); + } + + @Test + @TestMetadata("nestedClases.kt") + public void testNestedClases() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/nestedClases.kt"); + } + + @Test + @TestMetadata("nestedClasesWithFun.kt") + public void testNestedClasesWithFun() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/nestedClasesWithFun.kt"); + } + @Test @TestMetadata("nestedClasses.kt") public void testNestedClasses() throws Exception { @@ -114,12 +222,48 @@ public class FirSourceContextCollectionTestGenerated extends AbstractFirSourceCo runTest("analysis/low-level-api-fir/testdata/fileStructure/propertyAccessors.kt"); } + @Test + @TestMetadata("propertyWithGetterAndSetter.kt") + public void testPropertyWithGetterAndSetter() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/propertyWithGetterAndSetter.kt"); + } + + @Test + @TestMetadata("qualifiedCallInsideSuperCall.kt") + public void testQualifiedCallInsideSuperCall() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/qualifiedCallInsideSuperCall.kt"); + } + + @Test + @TestMetadata("secondaryConstructor.kt") + public void testSecondaryConstructor() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/secondaryConstructor.kt"); + } + + @Test + @TestMetadata("superCallAnnotation.kt") + public void testSuperCallAnnotation() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/superCallAnnotation.kt"); + } + + @Test + @TestMetadata("superCallAnnotation2.kt") + public void testSuperCallAnnotation2() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/superCallAnnotation2.kt"); + } + @Test @TestMetadata("superClassCall.kt") public void testSuperClassCall() throws Exception { runTest("analysis/low-level-api-fir/testdata/fileStructure/superClassCall.kt"); } + @Test + @TestMetadata("superType.kt") + public void testSuperType() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/superType.kt"); + } + @Test @TestMetadata("topLevelExpressionBodyFunWithType.kt") public void testTopLevelExpressionBodyFunWithType() throws Exception { diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/file/structure/OutOfContentRootFileStructureTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/file/structure/OutOfContentRootFileStructureTestGenerated.java index e7fe5e6ab91..e67611b0d3a 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/file/structure/OutOfContentRootFileStructureTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/file/structure/OutOfContentRootFileStructureTestGenerated.java @@ -24,6 +24,30 @@ public class OutOfContentRootFileStructureTestGenerated extends AbstractOutOfCon KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/low-level-api-fir/testdata/fileStructure"), Pattern.compile("^(.+)\\.(kt)$"), null, true); } + @Test + @TestMetadata("callInsideLambdaInsideSuperCallAndExplicitConstructor.kt") + public void testCallInsideLambdaInsideSuperCallAndExplicitConstructor() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallAndExplicitConstructor.kt"); + } + + @Test + @TestMetadata("callInsideLambdaInsideSuperCallAndImplicitConstructor.kt") + public void testCallInsideLambdaInsideSuperCallAndImplicitConstructor() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallAndImplicitConstructor.kt"); + } + + @Test + @TestMetadata("callInsideLambdaInsideSuperCallFromSecondaryConstructor.kt") + public void testCallInsideLambdaInsideSuperCallFromSecondaryConstructor() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallFromSecondaryConstructor.kt"); + } + + @Test + @TestMetadata("callInsideLambdaInsideSuperCallFromSingleSecondaryConstructor.kt") + public void testCallInsideLambdaInsideSuperCallFromSingleSecondaryConstructor() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallFromSingleSecondaryConstructor.kt"); + } + @Test @TestMetadata("class.kt") public void testClass() throws Exception { @@ -36,6 +60,18 @@ public class OutOfContentRootFileStructureTestGenerated extends AbstractOutOfCon runTest("analysis/low-level-api-fir/testdata/fileStructure/classMemberProperty.kt"); } + @Test + @TestMetadata("constructorParameter.kt") + public void testConstructorParameter() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/constructorParameter.kt"); + } + + @Test + @TestMetadata("constructorParameterWithAnnotations.kt") + public void testConstructorParameterWithAnnotations() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/constructorParameterWithAnnotations.kt"); + } + @Test @TestMetadata("constructors.kt") public void testConstructors() throws Exception { @@ -72,36 +108,108 @@ public class OutOfContentRootFileStructureTestGenerated extends AbstractOutOfCon runTest("analysis/low-level-api-fir/testdata/fileStructure/enumClassWithBody.kt"); } + @Test + @TestMetadata("functionalType.kt") + public void testFunctionalType() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/functionalType.kt"); + } + @Test @TestMetadata("initBlock.kt") public void testInitBlock() throws Exception { runTest("analysis/low-level-api-fir/testdata/fileStructure/initBlock.kt"); } + @Test + @TestMetadata("lambda.kt") + public void testLambda() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/lambda.kt"); + } + @Test @TestMetadata("localClass.kt") public void testLocalClass() throws Exception { runTest("analysis/low-level-api-fir/testdata/fileStructure/localClass.kt"); } + @Test + @TestMetadata("localDeclarationsInAccessor.kt") + public void testLocalDeclarationsInAccessor() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/localDeclarationsInAccessor.kt"); + } + @Test @TestMetadata("localFun.kt") public void testLocalFun() throws Exception { runTest("analysis/low-level-api-fir/testdata/fileStructure/localFun.kt"); } + @Test + @TestMetadata("localFunctionWithImplicitType.kt") + public void testLocalFunctionWithImplicitType() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/localFunctionWithImplicitType.kt"); + } + @Test @TestMetadata("localProperty.kt") public void testLocalProperty() throws Exception { runTest("analysis/low-level-api-fir/testdata/fileStructure/localProperty.kt"); } + @Test + @TestMetadata("localUnitFunction.kt") + public void testLocalUnitFunction() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/localUnitFunction.kt"); + } + + @Test + @TestMetadata("memberFunctions.kt") + public void testMemberFunctions() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/memberFunctions.kt"); + } + + @Test + @TestMetadata("memberProperties.kt") + public void testMemberProperties() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/memberProperties.kt"); + } + @Test @TestMetadata("memberTypeAlias.kt") public void testMemberTypeAlias() throws Exception { runTest("analysis/low-level-api-fir/testdata/fileStructure/memberTypeAlias.kt"); } + @Test + @TestMetadata("multipleTopLevelClasses.kt") + public void testMultipleTopLevelClasses() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/multipleTopLevelClasses.kt"); + } + + @Test + @TestMetadata("multipleTopLevelFunctionsWithImplicitTypes.kt") + public void testMultipleTopLevelFunctionsWithImplicitTypes() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/multipleTopLevelFunctionsWithImplicitTypes.kt"); + } + + @Test + @TestMetadata("multipleTopLevelUnitFunctions.kt") + public void testMultipleTopLevelUnitFunctions() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/multipleTopLevelUnitFunctions.kt"); + } + + @Test + @TestMetadata("nestedClases.kt") + public void testNestedClases() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/nestedClases.kt"); + } + + @Test + @TestMetadata("nestedClasesWithFun.kt") + public void testNestedClasesWithFun() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/nestedClasesWithFun.kt"); + } + @Test @TestMetadata("nestedClasses.kt") public void testNestedClasses() throws Exception { @@ -114,12 +222,48 @@ public class OutOfContentRootFileStructureTestGenerated extends AbstractOutOfCon runTest("analysis/low-level-api-fir/testdata/fileStructure/propertyAccessors.kt"); } + @Test + @TestMetadata("propertyWithGetterAndSetter.kt") + public void testPropertyWithGetterAndSetter() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/propertyWithGetterAndSetter.kt"); + } + + @Test + @TestMetadata("qualifiedCallInsideSuperCall.kt") + public void testQualifiedCallInsideSuperCall() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/qualifiedCallInsideSuperCall.kt"); + } + + @Test + @TestMetadata("secondaryConstructor.kt") + public void testSecondaryConstructor() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/secondaryConstructor.kt"); + } + + @Test + @TestMetadata("superCallAnnotation.kt") + public void testSuperCallAnnotation() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/superCallAnnotation.kt"); + } + + @Test + @TestMetadata("superCallAnnotation2.kt") + public void testSuperCallAnnotation2() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/superCallAnnotation2.kt"); + } + @Test @TestMetadata("superClassCall.kt") public void testSuperClassCall() throws Exception { runTest("analysis/low-level-api-fir/testdata/fileStructure/superClassCall.kt"); } + @Test + @TestMetadata("superType.kt") + public void testSuperType() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/superType.kt"); + } + @Test @TestMetadata("topLevelExpressionBodyFunWithType.kt") public void testTopLevelExpressionBodyFunWithType() throws Exception { diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/file/structure/SourceFileStructureTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/file/structure/SourceFileStructureTestGenerated.java index 31f65405e13..8ecf3f5623d 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/file/structure/SourceFileStructureTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/file/structure/SourceFileStructureTestGenerated.java @@ -24,6 +24,30 @@ public class SourceFileStructureTestGenerated extends AbstractSourceFileStructur KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/low-level-api-fir/testdata/fileStructure"), Pattern.compile("^(.+)\\.(kt)$"), null, true); } + @Test + @TestMetadata("callInsideLambdaInsideSuperCallAndExplicitConstructor.kt") + public void testCallInsideLambdaInsideSuperCallAndExplicitConstructor() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallAndExplicitConstructor.kt"); + } + + @Test + @TestMetadata("callInsideLambdaInsideSuperCallAndImplicitConstructor.kt") + public void testCallInsideLambdaInsideSuperCallAndImplicitConstructor() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallAndImplicitConstructor.kt"); + } + + @Test + @TestMetadata("callInsideLambdaInsideSuperCallFromSecondaryConstructor.kt") + public void testCallInsideLambdaInsideSuperCallFromSecondaryConstructor() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallFromSecondaryConstructor.kt"); + } + + @Test + @TestMetadata("callInsideLambdaInsideSuperCallFromSingleSecondaryConstructor.kt") + public void testCallInsideLambdaInsideSuperCallFromSingleSecondaryConstructor() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallFromSingleSecondaryConstructor.kt"); + } + @Test @TestMetadata("class.kt") public void testClass() throws Exception { @@ -36,6 +60,18 @@ public class SourceFileStructureTestGenerated extends AbstractSourceFileStructur runTest("analysis/low-level-api-fir/testdata/fileStructure/classMemberProperty.kt"); } + @Test + @TestMetadata("constructorParameter.kt") + public void testConstructorParameter() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/constructorParameter.kt"); + } + + @Test + @TestMetadata("constructorParameterWithAnnotations.kt") + public void testConstructorParameterWithAnnotations() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/constructorParameterWithAnnotations.kt"); + } + @Test @TestMetadata("constructors.kt") public void testConstructors() throws Exception { @@ -72,36 +108,108 @@ public class SourceFileStructureTestGenerated extends AbstractSourceFileStructur runTest("analysis/low-level-api-fir/testdata/fileStructure/enumClassWithBody.kt"); } + @Test + @TestMetadata("functionalType.kt") + public void testFunctionalType() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/functionalType.kt"); + } + @Test @TestMetadata("initBlock.kt") public void testInitBlock() throws Exception { runTest("analysis/low-level-api-fir/testdata/fileStructure/initBlock.kt"); } + @Test + @TestMetadata("lambda.kt") + public void testLambda() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/lambda.kt"); + } + @Test @TestMetadata("localClass.kt") public void testLocalClass() throws Exception { runTest("analysis/low-level-api-fir/testdata/fileStructure/localClass.kt"); } + @Test + @TestMetadata("localDeclarationsInAccessor.kt") + public void testLocalDeclarationsInAccessor() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/localDeclarationsInAccessor.kt"); + } + @Test @TestMetadata("localFun.kt") public void testLocalFun() throws Exception { runTest("analysis/low-level-api-fir/testdata/fileStructure/localFun.kt"); } + @Test + @TestMetadata("localFunctionWithImplicitType.kt") + public void testLocalFunctionWithImplicitType() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/localFunctionWithImplicitType.kt"); + } + @Test @TestMetadata("localProperty.kt") public void testLocalProperty() throws Exception { runTest("analysis/low-level-api-fir/testdata/fileStructure/localProperty.kt"); } + @Test + @TestMetadata("localUnitFunction.kt") + public void testLocalUnitFunction() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/localUnitFunction.kt"); + } + + @Test + @TestMetadata("memberFunctions.kt") + public void testMemberFunctions() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/memberFunctions.kt"); + } + + @Test + @TestMetadata("memberProperties.kt") + public void testMemberProperties() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/memberProperties.kt"); + } + @Test @TestMetadata("memberTypeAlias.kt") public void testMemberTypeAlias() throws Exception { runTest("analysis/low-level-api-fir/testdata/fileStructure/memberTypeAlias.kt"); } + @Test + @TestMetadata("multipleTopLevelClasses.kt") + public void testMultipleTopLevelClasses() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/multipleTopLevelClasses.kt"); + } + + @Test + @TestMetadata("multipleTopLevelFunctionsWithImplicitTypes.kt") + public void testMultipleTopLevelFunctionsWithImplicitTypes() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/multipleTopLevelFunctionsWithImplicitTypes.kt"); + } + + @Test + @TestMetadata("multipleTopLevelUnitFunctions.kt") + public void testMultipleTopLevelUnitFunctions() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/multipleTopLevelUnitFunctions.kt"); + } + + @Test + @TestMetadata("nestedClases.kt") + public void testNestedClases() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/nestedClases.kt"); + } + + @Test + @TestMetadata("nestedClasesWithFun.kt") + public void testNestedClasesWithFun() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/nestedClasesWithFun.kt"); + } + @Test @TestMetadata("nestedClasses.kt") public void testNestedClasses() throws Exception { @@ -114,12 +222,48 @@ public class SourceFileStructureTestGenerated extends AbstractSourceFileStructur runTest("analysis/low-level-api-fir/testdata/fileStructure/propertyAccessors.kt"); } + @Test + @TestMetadata("propertyWithGetterAndSetter.kt") + public void testPropertyWithGetterAndSetter() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/propertyWithGetterAndSetter.kt"); + } + + @Test + @TestMetadata("qualifiedCallInsideSuperCall.kt") + public void testQualifiedCallInsideSuperCall() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/qualifiedCallInsideSuperCall.kt"); + } + + @Test + @TestMetadata("secondaryConstructor.kt") + public void testSecondaryConstructor() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/secondaryConstructor.kt"); + } + + @Test + @TestMetadata("superCallAnnotation.kt") + public void testSuperCallAnnotation() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/superCallAnnotation.kt"); + } + + @Test + @TestMetadata("superCallAnnotation2.kt") + public void testSuperCallAnnotation2() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/superCallAnnotation2.kt"); + } + @Test @TestMetadata("superClassCall.kt") public void testSuperClassCall() throws Exception { runTest("analysis/low-level-api-fir/testdata/fileStructure/superClassCall.kt"); } + @Test + @TestMetadata("superType.kt") + public void testSuperType() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/superType.kt"); + } + @Test @TestMetadata("topLevelExpressionBodyFunWithType.kt") public void testTopLevelExpressionBodyFunWithType() throws Exception { diff --git a/generators/analysis-api-generator/tests/org/jetbrains/kotlin/generators/tests/analysis/api/firLowLevel.kt b/generators/analysis-api-generator/tests/org/jetbrains/kotlin/generators/tests/analysis/api/firLowLevel.kt index b836f93d361..6fb85a5d902 100644 --- a/generators/analysis-api-generator/tests/org/jetbrains/kotlin/generators/tests/analysis/api/firLowLevel.kt +++ b/generators/analysis-api-generator/tests/org/jetbrains/kotlin/generators/tests/analysis/api/firLowLevel.kt @@ -6,8 +6,8 @@ package org.jetbrains.kotlin.generators.tests.analysis.api import org.jetbrains.kotlin.analysis.low.level.api.fir.* -import org.jetbrains.kotlin.analysis.low.level.api.fir.diagnostic.compiler.based.AbstractLLFirDiagnosticCompilerTestDataSpecTest import org.jetbrains.kotlin.analysis.low.level.api.fir.diagnostic.AbstractDiagnosticTraversalCounterTest +import org.jetbrains.kotlin.analysis.low.level.api.fir.diagnostic.compiler.based.AbstractLLFirDiagnosticCompilerTestDataSpecTest import org.jetbrains.kotlin.analysis.low.level.api.fir.diagnostic.AbstractFirOutOfContentRootContextCollectionTest import org.jetbrains.kotlin.analysis.low.level.api.fir.diagnostic.AbstractFirSourceContextCollectionTest import org.jetbrains.kotlin.analysis.low.level.api.fir.diagnostic.AbstractScriptContextCollectionTest @@ -94,7 +94,7 @@ internal fun TestGroupSuite.generateFirLowLevelApiTests() { } testClass { - model("diagnosticTraversalCounter") + model("fileStructure", pattern = TestGeneratorUtil.KT) } testClass {