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,2 @@
fun Str<caret>foo() {
}
@@ -0,0 +1,2 @@
fun StringBuilder<caret>foo() {
}
@@ -0,0 +1,3 @@
package classCompletionImport
fun other() : SortedS<caret>
@@ -0,0 +1,5 @@
package classCompletionImport
import java.util.SortedSet
fun other() : SortedSet
@@ -0,0 +1 @@
import java.util.T<caret>
@@ -0,0 +1 @@
import java.util.TimeZone<caret>
@@ -0,0 +1,3 @@
fun foo(list: List<String>) {
list.map { Stri<caret> }
}
@@ -0,0 +1,3 @@
fun foo(list: List<String>) {
list.map { String<caret> }
}
@@ -0,0 +1,5 @@
import java.util.TimeZone
fun foo() {
Time<caret>Zone()
}
@@ -0,0 +1,5 @@
import java.util.TimeZone
fun foo() {
TimeZone<caret>()
}
@@ -0,0 +1,9 @@
class Test {
companion object {
class Some
}
}
fun test() {
Test.Companion.S<caret>
}
@@ -0,0 +1,9 @@
class Test {
companion object {
class Some
}
}
fun test() {
Test.Companion.Some
}
@@ -0,0 +1,11 @@
package a
class Test {
companion object {
class Some
}
}
fun test() {
a.Test.Companion.S<caret>
}
@@ -0,0 +1,11 @@
package a
class Test {
companion object {
class Some
}
}
fun test() {
a.Test.Companion.Some<caret>
}
@@ -0,0 +1,6 @@
fun main(args: Array<String>) {
println<caret>
}
// For KT-3620: Don't auto-import kotlin.js.* and remove in `optimize imports`
// JS
@@ -0,0 +1,6 @@
fun main(args: Array<String>) {
println()
}
// For KT-3620: Don't auto-import kotlin.js.* and remove in `optimize imports`
// JS
@@ -0,0 +1,5 @@
// KT-2424 Invoking completion adds unnecessary FQ name
fun main(args: Array<String>) {
throw IllegalAccessExceptio<caret> //Press Ctrl+Space and select it
}
@@ -0,0 +1,5 @@
// KT-2424 Invoking completion adds unnecessary FQ name
fun main(args: Array<String>) {
throw IllegalAccessException<caret> //Press Ctrl+Space and select it
}
@@ -0,0 +1,3 @@
fun main(args: Array<String>) {
throw IllegalAccessExceptio<caret> //Press Ctrl+Space and select it
}
@@ -0,0 +1,3 @@
fun main(args: Array<String>) {
throw IllegalAccessException<caret> //Press Ctrl+Space and select it
}
@@ -0,0 +1,9 @@
enum class E {
A
B
C
}
fun foo() {
val e = E.<caret>
}
@@ -0,0 +1,9 @@
enum class E {
A
B
C
}
fun foo() {
val e = E.A<caret>
}
@@ -0,0 +1,9 @@
enum class E {
A
B
C
}
fun foo() {
val e = E. <caret>
}
@@ -0,0 +1,9 @@
enum class E {
A
B
C
}
fun foo() {
val e = E. A<caret>
}
@@ -0,0 +1,13 @@
package Test.MyTest
class A {
companion object {
public fun testOther(a: Int) {
}
}
}
fun testMy() {
A.testOthe<caret>
}
@@ -0,0 +1,13 @@
package Test.MyTest
class A {
companion object {
public fun testOther(a: Int) {
}
}
}
fun testMy() {
A.testOther(<caret>)
}
@@ -0,0 +1,3 @@
fun main(args : Array<String>) {
"".toS<caret>
}
@@ -0,0 +1,3 @@
fun main(args : Array<String>) {
"".toString()
}
@@ -0,0 +1,8 @@
package testing
fun some(f: () -> Unit) = 12
fun other() = 12
fun test() {
som<caret>other()
}
@@ -0,0 +1,8 @@
package testing
fun some(f: () -> Unit) = 12
fun other() = 12
fun test() {
some(<caret>)
}
@@ -0,0 +1,7 @@
class Some
fun <T> Some.filter(predicate : (T) -> Boolean) = throw UnsupportedOperationException()
fun main(args: Array<String>) {
Some().fil<caret>
}
@@ -0,0 +1,7 @@
class Some
fun <T> Some.filter(predicate : (T) -> Boolean) = throw UnsupportedOperationException()
fun main(args: Array<String>) {
Some().filter { <caret> }
}
@@ -0,0 +1,5 @@
fun <T> Array<T>.filter(predicate : (T) -> Boolean) : java.util.List<T> = throw UnsupportedOperationException()
fun main(args: Array<String>) {
args.fil<caret>
}
@@ -0,0 +1,5 @@
fun <T> Array<T>.filter(predicate : (T) -> Boolean) : java.util.List<T> = throw UnsupportedOperationException()
fun main(args: Array<String>) {
args.filter {<caret>}
}
@@ -0,0 +1,5 @@
fun <T> Array<T>.filter(predicate : (T) -> Boolean) : java.util.List<T> = throw UnsupportedOperationException()
fun main(args: Array<String>) {
args.fil<caret>
}
@@ -0,0 +1,5 @@
fun <T> Array<T>.filter(predicate : (T) -> Boolean) : java.util.List<T> = throw UnsupportedOperationException()
fun main(args: Array<String>) {
args.filter { <caret> }
}
@@ -0,0 +1,7 @@
fun <T> Array<T>.filter(predicate : (T) -> Boolean) : java.util.List<T> = throw UnsupportedOperationException()
fun <T> Array<T>.filterNot(predicate : (T) -> Boolean) : java.util.List<T> = throw UnsupportedOperationException()
fun main(args: Array<String>) {
args.filter<caret> {it != ""}
}
@@ -0,0 +1,7 @@
fun <T> Array<T>.filter(predicate : (T) -> Boolean) : java.util.List<T> = throw UnsupportedOperationException()
fun <T> Array<T>.filterNot(predicate : (T) -> Boolean) : java.util.List<T> = throw UnsupportedOperationException()
fun main(args: Array<String>) {
args.filterNot {<caret>it != ""}
}
@@ -0,0 +1,5 @@
fun foo(p : (String, Char) -> Boolean){}
fun main(args: Array<String>) {
fo<caret>
}
@@ -0,0 +1,5 @@
fun foo(p : (String, Char) -> Boolean){}
fun main(args: Array<String>) {
foo { s, c -> <caret> }
}
@@ -0,0 +1,5 @@
fun foo(p : (String, Char) -> Boolean){}
fun main(args: Array<String>) {
fo<caret>
}
@@ -0,0 +1,5 @@
fun foo(p : (String, Char) -> Boolean){}
fun main(args: Array<String>) {
foo(<caret>)
}
@@ -0,0 +1,6 @@
fun foo(p : (String, Char) -> Boolean){}
fun foo(p : (String, Boolean) -> Boolean){}
fun main(args: Array<String>) {
fo<caret>
}
@@ -0,0 +1,6 @@
fun foo(p : (String, Char) -> Boolean){}
fun foo(p : (String, Boolean) -> Boolean){}
fun main(args: Array<String>) {
foo { s: String, c: Char -> <caret> }
}
@@ -0,0 +1,13 @@
package foo
import foo.Foo.*
enum class Foo {
AAA
}
fun take(a: Any){}
fun test() {
take(A<caret>)
}
@@ -0,0 +1,13 @@
package foo
import foo.Foo.*
enum class Foo {
AAA
}
fun take(a: Any){}
fun test() {
take(AAA<caret>)
}
@@ -0,0 +1,5 @@
fun <A, B> A.to(that: B): Pair<A, B> = Pair(this, that)
fun foo() {
val pair = 1 to<caret>
}
@@ -0,0 +1,5 @@
fun <A, B> A.to(that: B): Pair<A, B> = Pair(this, that)
fun foo() {
val pair = 1 to <caret>
}
@@ -0,0 +1,5 @@
fun <A, B> A.to(that: B): Pair<A, B> = Pair(this, that)
fun foo() {
val pair = 1 to<caret>
}
@@ -0,0 +1,5 @@
fun <A, B> A.to(that: B): Pair<A, B> = Pair(this, that)
fun foo() {
val pair = 1 to <caret>
}
@@ -0,0 +1,7 @@
class C {
inner class Inner(s: String)
}
fun foo(c: C) {
c.<caret>
}
@@ -0,0 +1,7 @@
class C {
inner class Inner(s: String)
}
fun foo(c: C) {
c.Inner(<caret>)
}
@@ -0,0 +1,5 @@
class SortedSet
fun test(set: SortedSet) {
val a = SortedSet<caret>
}
@@ -0,0 +1,7 @@
import java.util
class SortedSet
fun test(set: SortedSet) {
val a = util.SortedSet<caret>
}
@@ -0,0 +1,7 @@
// KT-1968 Double closing parentheses entered when completing unit function
package some
fun test() = 12
fun test1()
val a = <caret>
@@ -0,0 +1,7 @@
// KT-1968 Double closing parentheses entered when completing unit function
package some
fun test() = 12
fun test1()
val a = test()<caret>
@@ -0,0 +1,5 @@
fun some(f: () -> Unit) { f() }
fun test() {
some<caret>
}
@@ -0,0 +1,5 @@
fun some(f: () -> Unit) { f() }
fun test() {
some { <caret> }
}
@@ -0,0 +1 @@
val s = Ar<caret>List()
@@ -0,0 +1,3 @@
import java.util.ArrayList
val s = ArrayList()
@@ -0,0 +1,7 @@
package testing
fun other() {
SortedS<caret>
}
// INSERT: SortedSet
@@ -0,0 +1,9 @@
package testing
import java.util.SortedSet
fun other() {
SortedSet
}
// INSERT: SortedSet
@@ -0,0 +1,7 @@
import java.io.File
fun test() {
val f = File("testFile")
// Should be no ;
f.deleteOnExit<caret>
}
@@ -0,0 +1,7 @@
import java.io.File
fun test() {
val f = File("testFile")
// Should be no ;
f.deleteOnExit()
}
@@ -0,0 +1,5 @@
package test
class `class`
fun foo(p: <caret>)
@@ -0,0 +1,5 @@
package test
class `class`
fun foo(p: `class`<caret>)
@@ -0,0 +1,7 @@
package test
fun `fun`(){}
fun foo() {
<caret>
}
@@ -0,0 +1,7 @@
package test
fun `fun`(){}
fun foo() {
`fun`()<caret>
}
@@ -0,0 +1,5 @@
fun foo() {
class LocalClass {}
val v: Lo<caret>
}
@@ -0,0 +1,5 @@
fun foo() {
class LocalClass {}
val v: LocalClass<caret>
}
@@ -0,0 +1,5 @@
fun foo(`class`: Int) {}
fun test() {
foo(<caret>)
}
@@ -0,0 +1,5 @@
fun foo(`class`: Int) {}
fun test() {
foo(`class` = <caret>)
}
@@ -0,0 +1,6 @@
fun foo(paramTest: Int = 12)
fun test() {
// '=' is expected
foo(param<caret>)
}
@@ -0,0 +1,6 @@
fun foo(paramTest: Int = 12)
fun test() {
// '=' is expected
foo(paramTest = <caret>)
}
@@ -0,0 +1,8 @@
val paramVal = 12
fun foo(paramTest: Int = 12)
fun paramFun() {}
fun test() {
// Type '=', completion should be finishied
foo(param<caret>)
}
@@ -0,0 +1,8 @@
val paramVal = 12
fun foo(paramTest: Int = 12)
fun paramFun() {}
fun test() {
// Type '=', completion should be finishied
foo(paramTest = <caret>)
}
@@ -0,0 +1,7 @@
fun foo() {
class LocalClass {
inner class Nested {}
val v: <caret>
}
}
@@ -0,0 +1,7 @@
fun foo() {
class LocalClass {
inner class Nested {}
val v: Nested<caret>
}
}
@@ -0,0 +1,10 @@
package testing.handlers
fun testFun() {
}
fun other() {
testFu<caret>
}
// INSERT: test
@@ -0,0 +1,10 @@
package testing.handlers
fun testFun() {
}
fun other() {
testFun()<caret>
}
// INSERT: test
@@ -0,0 +1,2 @@
val x : Arra<caret>
val y: Array<String>
@@ -0,0 +1,4 @@
import java.lang.reflect
val x : reflect.Array<caret>
val y: Array<String>
@@ -0,0 +1,5 @@
package foo
object Unique
val t = Unique<caret>
@@ -0,0 +1,5 @@
package foo
object Unique
val t = Unique<caret>
@@ -0,0 +1,2 @@
fun foo(p: StringB<caret>) {
}
@@ -0,0 +1,2 @@
fun foo(p: StringBuilder<caret>) {
}
@@ -0,0 +1,8 @@
package somefortest
fun test(a: Int) {
}
fun other() {
te<caret>
}
@@ -0,0 +1,8 @@
package somefortest
fun test(a: Int) {
}
fun other() {
test(<caret>)
}
@@ -0,0 +1,6 @@
package propertiesSetter
class TestClass {
val a : Int
ge<caret>
}
@@ -0,0 +1,6 @@
package propertiesSetter
class TestClass {
val a : Int
get()<caret>
}
@@ -0,0 +1,17 @@
package Test.MyTest
class A {
companion object {
public fun testOther(a: Boolean) {
}
public fun testOther(a: Int) {
}
}
}
fun testMy() {
A.testOther<caret>
}
@@ -0,0 +1,17 @@
package Test.MyTest
class A {
companion object {
public fun testOther(a: Boolean) {
}
public fun testOther(a: Int) {
}
}
}
fun testMy() {
A.testOther()
}
@@ -0,0 +1,2 @@
val vvvvv = 112
val a = vv<caret>
@@ -0,0 +1,2 @@
val vvvvv = 112
val a = vvvvv<caret>
@@ -0,0 +1,4 @@
fun test() {
val vvvvv = 12
vv<caret>{}
}
@@ -0,0 +1,4 @@
fun test() {
val vvvvv = 12
vvvvv<caret>{}
}
@@ -0,0 +1,4 @@
fun test() {
val vvvvv = 12
vv<caret>[]
}
@@ -0,0 +1,4 @@
fun test() {
val vvvvv = 12
vvvvv<caret>[]
}
@@ -0,0 +1,4 @@
fun test() {
val vvvvv = 12
vv<caret>+12
}
@@ -0,0 +1,4 @@
fun test() {
val vvvvv = 12
vvvvv<caret>+12
}

Some files were not shown because too many files have changed in this diff Show More