[Analysis API] Migrate existing code fragment tests to the new API

This commit is contained in:
Yan Zhulanow
2024-01-18 23:37:27 +09:00
committed by Space Team
parent ef890e9b76
commit 3cd04a9e9e
139 changed files with 793 additions and 314 deletions
@@ -1,7 +0,0 @@
class Foo(val x: Int) {
fun foo() {
<expr>foo()</expr>
}
}
Foo(1)
@@ -1,3 +1,20 @@
// MODULE: context
// FILE: context.kt
fun test() {
<caret>Unit
}
<caret_context>Unit
}
// MODULE: main
// MODULE_KIND: CodeFragment
// FILE: fragment.kt
// CODE_FRAGMENT_KIND: BLOCK
class Foo(val x: Int) {
fun foo() {
<expr>foo()</expr>
}
}
Foo(1)
@@ -1,7 +0,0 @@
fun foo(a: Int, b: String) {}
fun bar() {
<expr>foo(1, "foo")</expr>
}
bar()
@@ -1,3 +1,20 @@
// MODULE: context
// FILE: context.kt
fun test() {
<caret>Unit
}
<caret_context>Unit
}
// MODULE: main
// MODULE_KIND: CodeFragment
// FILE: fragment.kt
// CODE_FRAGMENT_KIND: BLOCK
fun foo(a: Int, b: String) {}
fun bar() {
<expr>foo(1, "foo")</expr>
}
bar()
@@ -1 +0,0 @@
<expr>foo</expr>
@@ -1,10 +1,21 @@
// MODULE: context
// FILE: context.kt
package test
class Foo
fun test() {
val foo = Foo()
<caret>consume(foo)
<caret_context>consume(foo)
}
fun consume(foo: Foo) {}
fun consume(foo: Foo) {}
// MODULE: main
// MODULE_KIND: CodeFragment
// FILE: fragment.kt
// CODE_FRAGMENT_KIND: EXPRESSION
<expr>foo</expr>