Created module idea-test-framework and moved classes needed for idea tests there
Moved tests for completion and their test data into module idea-completion
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
fun String?.foo(){
|
||||
if (this != null){
|
||||
val s : String = <caret>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// EXIST: { itemText:"this" }
|
||||
@@ -0,0 +1,7 @@
|
||||
fun f(p: String?) {
|
||||
if (p != null){
|
||||
var a : String = <caret>
|
||||
}
|
||||
}
|
||||
|
||||
// EXIST: { itemText:"p" }
|
||||
@@ -0,0 +1,9 @@
|
||||
class Foo(val prop : String?){
|
||||
fun f(foo: Foo) {
|
||||
if (foo.prop != null){
|
||||
var a: String = <caret>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ABSENT: { itemText:"prop" }
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
class Foo(val s: String?) {
|
||||
fun bar(){
|
||||
if (s != null) {
|
||||
foo(<caret>)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun foo(s: String){}
|
||||
|
||||
// EXIST: { itemText:"s" }
|
||||
@@ -0,0 +1,12 @@
|
||||
class Foo(val prop1 : String?, val prop2 : String?){
|
||||
fun f(p1: Foo, p2: Foo) {
|
||||
if (p1.prop1 != null && p2.prop2 != null && prop2 != null){
|
||||
var a : String = p1.<caret>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// EXIST: { itemText:"prop1" }
|
||||
// ABSENT: { itemText:"prop2" }
|
||||
// EXIST: { itemText:"!! prop2" }
|
||||
// EXIST: { itemText:"?: prop2" }
|
||||
@@ -0,0 +1,12 @@
|
||||
open class Foo{
|
||||
fun f() {
|
||||
if (this is Bar){
|
||||
var a : Bar = <caret>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class Bar : Foo
|
||||
|
||||
|
||||
// EXIST: { itemText:"this" }
|
||||
@@ -0,0 +1,7 @@
|
||||
fun f(p: Any) {
|
||||
if (p is String){
|
||||
var a : String = <caret>
|
||||
}
|
||||
}
|
||||
|
||||
// EXIST: { itemText:"p" }
|
||||
@@ -0,0 +1,10 @@
|
||||
class Foo(val prop1 : Any, val prop2 : Any){
|
||||
fun f(p1: Foo, p2: Foo) {
|
||||
if (p1.prop1 is String && p2.prop2 is String && prop2 is String){
|
||||
var a : String = p1.<caret>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// EXIST: { itemText:"prop1" }
|
||||
// ABSENT: { itemText:"prop2" }
|
||||
Reference in New Issue
Block a user