Grouped test data for smart completion by folders

This commit is contained in:
Valentin Kipyatkov
2015-01-16 20:40:17 +03:00
parent fb7cd623ae
commit eae244c308
96 changed files with 646 additions and 529 deletions
@@ -0,0 +1,15 @@
open class Foo
fun foo(f: Foo){}
fun bar() {
foo(object: Foo() {
inner class Inner {
fun f() {
val x: Foo = <caret>
}
}
})
}
// ABSENT: this@foo
@@ -0,0 +1,6 @@
fun String?.foo(){
val s : String = <caret>
}
// EXIST: { lookupString:"this", itemText: "!! this", typeText:"String?" }
// EXIST: { lookupString:"this", itemText: "?: this", typeText:"String?" }
@@ -0,0 +1,13 @@
class Outer {
inner class Inner {
fun String.foo() {
val v: Any = this@<caret>
}
}
}
// ABSENT: this
// ABSENT: "this@foo"
// EXIST: { lookupString: "this@Inner", itemText: "this", tailText: "@Inner", typeText: "Outer.Inner", attributes: "bold" }
// EXIST: { lookupString: "this@Outer", itemText: "this", tailText: "@Outer", typeText: "Outer", attributes: "bold" }
// NUMBER: 2
@@ -0,0 +1,9 @@
class Foo{
fun String.foo(){
fun Foo.bar(){
val s: String = <caret>
}
}
}
// EXIST: { lookupString:"this@foo", typeText:"String" }
@@ -0,0 +1,12 @@
fun accept1(handler: String.() -> Unit){}
fun accept2(handler: Int.() -> Unit){}
fun foo(){
accept1({
accept2({
val s: String = <caret>
})
})
}
// EXIST: this@accept1
@@ -0,0 +1,14 @@
object X {
fun accept1(handler: String.() -> Unit){}
fun accept2(handler: Int.() -> Unit){}
}
fun foo(){
X.accept1({
X.accept2({
val s: String = <caret>
})
})
}
// EXIST: this@accept1
@@ -0,0 +1,12 @@
fun<T> accept1(handler: String.(t: T) -> Unit){}
fun accept2(handler: Int.() -> Unit){}
fun foo(){
accept1<String>({
accept2({
val s: String = <caret>
})
})
}
// EXIST: this@accept1
@@ -0,0 +1,31 @@
class Outer {
class Nested {
inner class Inner {
fun String.foo() {
takeHandler1 {
takeHandler2({
takeHandler3 {
takeHandler4 { val v: Any = <caret> }
}
})
}
}
}
}
}
fun takeHandler1(handler: Int.() -> Unit){}
fun takeHandler2(handler: Char.() -> Unit){}
fun takeHandler3(handler: (Any?).() -> Unit){}
fun takeHandler4(handler: Any.() -> Unit){}
// EXIST: { lookupString: "this", itemText: "this", tailText: null, typeText: "Any", attributes: "bold" }
// ABSENT: "this@takeHandler4"
// EXIST: { lookupString: "this@takeHandler3", itemText: "!! this", tailText: "@takeHandler3", typeText: "Any?", attributes: "bold" }
// EXIST: { lookupString: "this@takeHandler3", itemText: "?: this", tailText: "@takeHandler3", typeText: "Any?", attributes: "bold" }
// EXIST: { lookupString: "this@takeHandler2", itemText: "this", tailText: "@takeHandler2", typeText: "Char", attributes: "bold" }
// EXIST: { lookupString: "this@takeHandler1", itemText: "this", tailText: "@takeHandler1", typeText: "Int", attributes: "bold" }
// EXIST: { lookupString: "this@foo", itemText: "this", tailText: "@foo", typeText: "String", attributes: "bold" }
// EXIST: { lookupString: "this@Inner", itemText: "this", tailText: "@Inner", typeText: "Outer.Nested.Inner", attributes: "bold" }
// EXIST: { lookupString: "this@Nested", itemText: "this", tailText: "@Nested", typeText: "Outer.Nested", attributes: "bold" }
// ABSENT: "this@Outer"