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:
Valentin Kipyatkov
2015-04-13 18:11:53 +03:00
parent 63825c45dd
commit bb808b5620
1303 changed files with 1741 additions and 1733 deletions
@@ -0,0 +1,6 @@
fun small(param: Int) {
}
fun test() = small(<caret>)
// EXIST: {"lookupString":"param","tailText":" Int","itemText":"param ="}
@@ -0,0 +1,7 @@
fun small(first: Int, second: Int) {
}
fun test() = small(12, <caret>)
// ABSENT: first
// EXIST: { lookupString:"second", itemText:"second =" }
@@ -0,0 +1,11 @@
import java.util.ArrayList
val paramTest = 12
fun small(paramFirst: ArrayList<String>, paramSecond: Comparable<java.lang.RuntimeException>) {
}
fun test() = small(<caret>)
// EXIST: {"lookupString":"paramSecond","tailText":" Comparable<RuntimeException>","itemText":"paramSecond ="}
// EXIST: {"lookupString":"paramFirst","tailText":" ArrayList<String>","itemText":"paramFirst ="}
@@ -0,0 +1,9 @@
fun test() {}
fun some() {
val localVal = 1
test(<caret>)
}
// Test no exceptions are thrown
// INVOCATION_COUNT: 1
// EXIST: localVal
@@ -0,0 +1,11 @@
val paramTest = 12
fun small(paramFirst: Int, paramSecond: Int) {
}
fun test() = small(paramFirst = param<caret>)
// EXIST: paramTest
// ABSENT: {"lookupString":"paramFirst","tailText":" Int","itemText":"paramFirst ="}
// ABSENT: paramSecond
// NUMBER: 1
@@ -0,0 +1,20 @@
package test
val nLocal = 12
class foo(nClassParam: String, val nClassField: String)
fun foo(nFirst: String) = 12
fun foo(nSecond: String? = null, nThird: Int = 1) { }
fun other() {
foo(n<caret>)
}
// EXIST: { lookupString:"nFirst", itemText:"nFirst =" }
// EXIST: { lookupString:"nSecond", itemText:"nSecond =" }
// EXIST: { lookupString:"nThird", itemText:"nThird =" }
// EXIST: nLocal
// todo - should exist
// ABSENT: nClassParam
// ABSENT: nClassField
@@ -0,0 +1,10 @@
package test
class Foo(pFirst: String? = null, val pSecond: Int = 1) { }
fun other() {
Foo(p<caret>)
}
// EXIST: {"lookupString":"pFirst","tailText":" String?","itemText":"pFirst ="}
// EXIST: {"lookupString":"pSecond","tailText":" Int","itemText":"pSecond ="}
@@ -0,0 +1,11 @@
fun foo(paramFirst: String, paramSecond: String, paramThird: String, paramFourth: String) {}
fun test() {
foo("str", paramThird = "test", param<caret>)
}
// ABSENT: paramFirst
// EXIST: paramSecond
// ABSENT: paramThird
// EXIST: paramFourth
@@ -0,0 +1,11 @@
fun foo(paramFirst: Int, paramSecond: Int) = 12
fun foo(paramThird: String, paramFourth: String) = 1
fun test() {
foo(12, param<caret>)
}
// ABSENT: paramFirst
// EXIST: {"lookupString":"paramSecond","tailText":" Int","itemText":"paramSecond ="}
// ABSENT: paramThird
// ABSENT: paramFourth
@@ -0,0 +1,9 @@
fun foo(first: Int, second: Int, third: String) {
}
fun test(p: Int) = foo(12, <caret>, third = "")
// EXIST: p
// ABSENT: first
// EXIST: third
// EXIST: second
@@ -0,0 +1,9 @@
fun foo(first: Int, second: Int, third: String) {
}
fun test(p: Int) = foo(<caret>second = 3)
// EXIST: p
// EXIST: first
// EXIST: second
// EXIST: third
@@ -0,0 +1,10 @@
fun foo(first: Int, second: Int, third: String) {
}
fun test(p: Int) = foo(12, third = "", <caret>)
// ABSENT: p
// ABSENT: first
// ABSENT: third
// EXIST: second
// NUMBER: 1
@@ -0,0 +1,12 @@
val paramTest = 12
fun small(paramFirst: Int, paramSecond: Int) {
}
fun test() = small(param<caret>First = 12)
// EXIST: paramFirst
// EXIST: paramSecond
// EXIST: paramTest
// NUMBER: 3