Implement IdeReplCompletionTest to test completion of entities declared in already evaluated lines

This commit is contained in:
Pavel V. Talanov
2016-04-13 16:45:49 +03:00
parent f59638d60f
commit c7cefad7d5
10 changed files with 193 additions and 0 deletions
+4
View File
@@ -0,0 +1,4 @@
>> val c = 4
-- c.unary
// EXIST: unaryPlus
// EXIST: unaryMinus
+4
View File
@@ -0,0 +1,4 @@
>> class MyClass { fun f() {} fun g() {} }
-- val g: M
// EXIST: MyClass
+5
View File
@@ -0,0 +1,5 @@
>> class MyClass { fun f() {} fun g() {} }
-- MyClass().
// EXIST: f
// EXIST: g
+4
View File
@@ -0,0 +1,4 @@
>> fun String.myExt() = "a"
-- "asd".myEx
// EXIST: myExt
// NOTHING_ELSE
+8
View File
@@ -0,0 +1,8 @@
>> fun foo() {}
>> fun foo(i: Int) {}
>> fun foo(s: String = "asd") {}
>> foo(3)
-- fo
// EXIST: { itemText: "foo", tailText:"()" }
// EXIST: { itemText: "foo", tailText:"(i: Int)" }
// EXIST: { itemText: "foo", tailText:"(s: String = ...)" }
+3
View File
@@ -0,0 +1,3 @@
>> val str = "a"
-- str.capi
// EXIST: capitalize
+5
View File
@@ -0,0 +1,5 @@
>> var variable = 5
>> var variable2 = "Sdsd"
-- varia
// EXIST: variable
// EXIST: variable2