FIR IDE: add more test cases to TraversalCounterTestGenerated
This commit is contained in:
+11
@@ -0,0 +1,11 @@
|
||||
class A {
|
||||
val a = run {
|
||||
class X()
|
||||
|
||||
val y = 10
|
||||
}
|
||||
}
|
||||
|
||||
inline fun <R> run(block: () -> R): R {
|
||||
return block()
|
||||
}
|
||||
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
enum class A {
|
||||
X,
|
||||
Y,
|
||||
Z
|
||||
|
||||
;
|
||||
|
||||
fun foo(){}
|
||||
|
||||
val x = 10
|
||||
|
||||
fun bar() = 10
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
enum class A {
|
||||
X {
|
||||
fun localInX() = 1
|
||||
},
|
||||
Y {
|
||||
override fun foo() {}
|
||||
},
|
||||
Z,
|
||||
|
||||
;
|
||||
|
||||
open fun foo() {}
|
||||
}
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
class A {
|
||||
init {
|
||||
val x = 10
|
||||
class B
|
||||
}
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
class Outer {
|
||||
val i: Int = 1
|
||||
get() {
|
||||
class Inner {
|
||||
var i: Int = 2
|
||||
get() {
|
||||
field++
|
||||
return field
|
||||
}
|
||||
val j: Int = 3
|
||||
get() {
|
||||
field = 42
|
||||
return field
|
||||
}
|
||||
|
||||
fun innerMember() {
|
||||
field++
|
||||
}
|
||||
}
|
||||
return field
|
||||
}
|
||||
|
||||
val j: Int = 4
|
||||
get() {
|
||||
fun local() {
|
||||
field++
|
||||
field++
|
||||
}
|
||||
local()
|
||||
return field
|
||||
}
|
||||
}
|
||||
idea/idea-frontend-fir/idea-fir-low-level-api/testdata/diagnosticTraversalCounter/memberTypeAlias.kt
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
class A {
|
||||
typealias X = Int
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
class A {
|
||||
fun y() {}
|
||||
|
||||
class B {
|
||||
fun x() {}
|
||||
}
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
typealias A = 10
|
||||
+45
@@ -34,11 +34,36 @@ public class DiagnosticTraversalCounterTestGenerated extends AbstractDiagnosticT
|
||||
runTest("idea/idea-frontend-fir/idea-fir-low-level-api/testdata/diagnosticTraversalCounter/constructor.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("declarationsInPropertyInit.kt")
|
||||
public void testDeclarationsInPropertyInit() throws Exception {
|
||||
runTest("idea/idea-frontend-fir/idea-fir-low-level-api/testdata/diagnosticTraversalCounter/declarationsInPropertyInit.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("enumClass.kt")
|
||||
public void testEnumClass() throws Exception {
|
||||
runTest("idea/idea-frontend-fir/idea-fir-low-level-api/testdata/diagnosticTraversalCounter/enumClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("enumClassWithBody.kt")
|
||||
public void testEnumClassWithBody() throws Exception {
|
||||
runTest("idea/idea-frontend-fir/idea-fir-low-level-api/testdata/diagnosticTraversalCounter/enumClassWithBody.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("functionalType.kt")
|
||||
public void testFunctionalType() throws Exception {
|
||||
runTest("idea/idea-frontend-fir/idea-fir-low-level-api/testdata/diagnosticTraversalCounter/functionalType.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("initBlock.kt")
|
||||
public void testInitBlock() throws Exception {
|
||||
runTest("idea/idea-frontend-fir/idea-fir-low-level-api/testdata/diagnosticTraversalCounter/initBlock.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("localDeclarationsInAccessor.kt")
|
||||
public void testLocalDeclarationsInAccessor() throws Exception {
|
||||
runTest("idea/idea-frontend-fir/idea-fir-low-level-api/testdata/diagnosticTraversalCounter/localDeclarationsInAccessor.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("localFunctionWithImplicitType.kt")
|
||||
public void testLocalFunctionWithImplicitType() throws Exception {
|
||||
runTest("idea/idea-frontend-fir/idea-fir-low-level-api/testdata/diagnosticTraversalCounter/localFunctionWithImplicitType.kt");
|
||||
@@ -59,6 +84,11 @@ public class DiagnosticTraversalCounterTestGenerated extends AbstractDiagnosticT
|
||||
runTest("idea/idea-frontend-fir/idea-fir-low-level-api/testdata/diagnosticTraversalCounter/memberProperties.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("memberTypeAlias.kt")
|
||||
public void testMemberTypeAlias() throws Exception {
|
||||
runTest("idea/idea-frontend-fir/idea-fir-low-level-api/testdata/diagnosticTraversalCounter/memberTypeAlias.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("multipleTopLevelClasses.kt")
|
||||
public void testMultipleTopLevelClasses() throws Exception {
|
||||
runTest("idea/idea-frontend-fir/idea-fir-low-level-api/testdata/diagnosticTraversalCounter/multipleTopLevelClasses.kt");
|
||||
@@ -79,6 +109,16 @@ public class DiagnosticTraversalCounterTestGenerated extends AbstractDiagnosticT
|
||||
runTest("idea/idea-frontend-fir/idea-fir-low-level-api/testdata/diagnosticTraversalCounter/nestedClases.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nestedClasesWithFun.kt")
|
||||
public void testNestedClasesWithFun() throws Exception {
|
||||
runTest("idea/idea-frontend-fir/idea-fir-low-level-api/testdata/diagnosticTraversalCounter/nestedClasesWithFun.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("propertyAccessors.kt")
|
||||
public void testPropertyAccessors() throws Exception {
|
||||
runTest("idea/idea-frontend-fir/idea-fir-low-level-api/testdata/diagnosticTraversalCounter/propertyAccessors.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("propertyWithGetterAndSetter.kt")
|
||||
public void testPropertyWithGetterAndSetter() throws Exception {
|
||||
runTest("idea/idea-frontend-fir/idea-fir-low-level-api/testdata/diagnosticTraversalCounter/propertyWithGetterAndSetter.kt");
|
||||
@@ -88,4 +128,9 @@ public class DiagnosticTraversalCounterTestGenerated extends AbstractDiagnosticT
|
||||
public void testSecondaryConstructor() throws Exception {
|
||||
runTest("idea/idea-frontend-fir/idea-fir-low-level-api/testdata/diagnosticTraversalCounter/secondaryConstructor.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("typeAlias.kt")
|
||||
public void testTypeAlias() throws Exception {
|
||||
runTest("idea/idea-frontend-fir/idea-fir-low-level-api/testdata/diagnosticTraversalCounter/typeAlias.kt");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user