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 @@
class Test {
class <caret>
}
// EXIST: object
// NUMBER: 1
@@ -0,0 +1,35 @@
class MouseMovedEventArgs
{
public val X : int = 0
<caret>
}
// EXIST: abstract
// EXIST: annotation
// EXIST: as
// EXIST: class
// EXIST: enum
// EXIST: final
// EXIST: fun
// EXIST: get
// EXIST: in
/*why?*/
// EXIST: inner
// EXIST: internal
// EXIST: object
// EXIST: open
// EXIST: out
/*why?*/
// EXIST: override
// EXIST: private
// EXIST: protected
// EXIST: public
// EXIST: set
// EXIST: trait
// EXIST: val
// EXIST: var
// EXIST: vararg
// EXIST: constructor
// EXIST: init
/*why?*/
// NUMBER: 26
@@ -0,0 +1,38 @@
class A {
fun foo() {
bar()
}
}
class B {
fun bar() {
foo()
}
}
<caret>
// EXIST: abstract
// EXIST: annotation
// EXIST: class
// EXIST: enum
// EXIST: final
// EXIST: fun
// EXIST: in
/*why?*/
// EXIST: inner
// EXIST: internal
// EXIST: object
// EXIST: open
// EXIST: out
/*why?*/
// EXIST: override
// EXIST: private
// EXIST: protected
// EXIST: public
// EXIST: trait
// EXIST: val
// EXIST: var
// EXIST: vararg
/*why?*/
// NUMBER: 21
@@ -0,0 +1,6 @@
fun foo() {
val str : String
str.<caret>
}
// NUMBER: 0
@@ -0,0 +1,38 @@
class A {
fun foo() {
bar()
}
fun bar() {
foo()
}
<caret>
}
// EXIST: abstract
// EXIST: annotation
// EXIST: class
// EXIST: enum
// EXIST: final
// EXIST: fun
// EXIST: in
/*why?*/
// EXIST: inner
// EXIST: internal
// EXIST: object
// EXIST: open
// EXIST: out
/*why?*/
// EXIST: override
// EXIST: private
// EXIST: protected
// EXIST: public
// EXIST: trait
// EXIST: val
// EXIST: var
// EXIST: vararg
// EXIST: constructor
// EXIST: init
/*why?*/
// NUMBER: 23
@@ -0,0 +1,6 @@
fun foo() {
val str : String?
str?.<caret>
}
// NUMBER: 0
@@ -0,0 +1,6 @@
fun foo() {
val str : String
str. <caret>
}
// NUMBER: 0
@@ -0,0 +1,5 @@
class A(x: Int) {
constructor(): <caret>
}
// EXIST: this, super
@@ -0,0 +1,21 @@
fun foo() {
@myFor
for (i in 1..10) {
@myWhile
while (x()) {
@myDo
do {
<caret>
} while (y())
}
}
}
// EXIST: { lookupString: "break", itemText: "break", tailText: null, attributes: "bold" }
// EXIST: { lookupString: "continue", itemText: "continue", tailText: null, attributes: "bold" }
// EXIST: { lookupString: "break@myDo", itemText: "break", tailText: "@myDo", attributes: "bold" }
// EXIST: { lookupString: "continue@myDo", itemText: "continue", tailText: "@myDo", attributes: "bold" }
// EXIST: { lookupString: "break@myWhile", itemText: "break", tailText: "@myWhile", attributes: "bold" }
// EXIST: { lookupString: "continue@myWhile", itemText: "continue", tailText: "@myWhile", attributes: "bold" }
// EXIST: { lookupString: "break@myFor", itemText: "break", tailText: "@myFor", attributes: "bold" }
// EXIST: { lookupString: "continue@myFor", itemText: "continue", tailText: "@myFor", attributes: "bold" }
@@ -0,0 +1,17 @@
fun foo() {
@myFor
for (i in 1..10) {
@myWhile
while (x()) {
@myDo
do {
break@<caret>
} while (y())
}
}
}
// EXIST: { lookupString: "break@myDo", itemText: "break", tailText: "@myDo", attributes: "bold" }
// EXIST: { lookupString: "break@myWhile", itemText: "break", tailText: "@myWhile", attributes: "bold" }
// EXIST: { lookupString: "break@myFor", itemText: "break", tailText: "@myFor", attributes: "bold" }
// NUMBER: 3
@@ -0,0 +1,10 @@
fun foo() {
Math.pow(2.0 <caret>)
}
// EXIST: !in
// EXIST: !is
// EXIST: as
// EXIST: in
// EXIST: is
// NUMBER: 5
@@ -0,0 +1,17 @@
fun foo() {
@myFor
for (i in 1..10) {
@myWhile
while (x()) {
@myDo
do {
continue@<caret>
} while (y())
}
}
}
// EXIST: { lookupString: "continue@myDo", itemText: "continue", tailText: "@myDo", attributes: "bold" }
// EXIST: { lookupString: "continue@myWhile", itemText: "continue", tailText: "@myWhile", attributes: "bold" }
// EXIST: { lookupString: "continue@myFor", itemText: "continue", tailText: "@myFor", attributes: "bold" }
// NUMBER: 3
@@ -0,0 +1,4 @@
[<caret>]
// EXIST: file
// NUMBER: 1
@@ -0,0 +1,38 @@
fun foo() {
bar()
}
fun bar() {
foo()
}
var a : Int
<caret>
// EXIST: abstract
// EXIST: annotation
// EXIST: by
// EXIST: class
// EXIST: enum
// EXIST: final
// EXIST: fun
// EXIST: get
// EXIST: in
/*why?*/
// EXIST: inner
// EXIST: internal
// EXIST: object
// EXIST: open
// EXIST: out
/*why?*/
// EXIST: override
// EXIST: private
// EXIST: protected
// EXIST: public
// EXIST: set
// EXIST: trait
// EXIST: val
// EXIST: var
// EXIST: vararg
/*why?*/
// NUMBER: 24
@@ -0,0 +1,23 @@
fun foo(p: Int) {
x()
y()
val edge = a.b(<caret>)
z()
}
// EXIST: do
// EXIST: false
// EXIST: for
// EXIST: fun
// EXIST: if
// EXIST: null
// EXIST: object
// EXIST: package
// EXIST: return
// EXIST: super
// EXIST: throw
// EXIST: true
// EXIST: try
// EXIST: when
// EXIST: while
// NUMBER: 15
@@ -0,0 +1,7 @@
class TestClass {
/* <caret> */
fun test() {
}
}
// NUMBER: 0
@@ -0,0 +1,7 @@
class TestClass {
fun test() {
'<caret>'
}
}
// NUMBER: 0
@@ -0,0 +1,36 @@
public class Test {
<caret>
fun test() {
}
}
// EXIST: abstract
// EXIST: annotation
// EXIST: class
// EXIST: enum
// EXIST: final
// EXIST: fun
// EXIST: in
/*why?*/
// EXIST: inner
// EXIST: internal
// EXIST: object
// EXIST: open
// EXIST: out
/*why?*/
// EXIST: override
// EXIST: private
// EXIST: protected
// EXIST: public
// EXIST: trait
// EXIST: val
// EXIST: var
// EXIST: vararg
// EXIST: constructor
// EXIST: init
/*why?*/
// NUMBER: 23
@@ -0,0 +1,6 @@
class Test {
val <caret>
}
// NUMBER: 0
/* KT-4158 Type "var i" and press space. "var if" is auto-inserted. */
@@ -0,0 +1,6 @@
class MouseMovedEventArgs
{
public val X : int<caret> = 0
}
// ABSENT: internal
@@ -0,0 +1,30 @@
class TestClass {
<caret>
}
// EXIST: abstract
// EXIST: annotation
// EXIST: class
// EXIST: enum
// EXIST: final
// EXIST: fun
// EXIST: in
/*why?*/
// EXIST: inner
// EXIST: internal
// EXIST: object
// EXIST: open
// EXIST: out
/*why?*/
// EXIST: override
// EXIST: private
// EXIST: protected
// EXIST: public
// EXIST: trait
// EXIST: val
// EXIST: var
// EXIST: vararg
/*why?*/
// EXIST: constructor
// EXIST: init
// NUMBER: 23
@@ -0,0 +1,5 @@
class T<<caret>>
// EXIST: in
// EXIST: out
// NUMBER: 2
@@ -0,0 +1,24 @@
fun foo() {
<caret>
}
// EXIST: class
// EXIST: do
// EXIST: false
// EXIST: for
// EXIST: fun
// EXIST: if
// EXIST: null
// EXIST: object
// EXIST: package
// EXIST: return
// EXIST: super
// EXIST: throw
// EXIST: trait
// EXIST: true
// EXIST: try
// EXIST: val
// EXIST: var
// EXIST: when
// EXIST: while
// NUMBER: 19
@@ -0,0 +1,12 @@
class C(<caret>)
// EXIST: in
/*TODO*/
// EXIST: val
// EXIST: var
// EXIST: public
// EXIST: private
// EXIST: protected
// EXIST: internal
// EXIST: override
// NUMBER: 8
@@ -0,0 +1,17 @@
fun foo() = <caret>
// EXIST: do
// EXIST: false
// EXIST: for
// EXIST: fun
// EXIST: if
// EXIST: null
// EXIST: object
// EXIST: package
// EXIST: super
// EXIST: throw
// EXIST: true
// EXIST: try
// EXIST: when
// EXIST: while
// NUMBER: 14
@@ -0,0 +1,5 @@
fun <caret>() {
}
// NUMBER: 0
@@ -0,0 +1,5 @@
fun <caret>.
// NUMBER: 0
// For KT-1894
@@ -0,0 +1,8 @@
fun foo() {
val test : <caret>
}
/*TODO: Is 'package' type qualifier syntax correct?*/
// EXIST: package
// EXIST: dynamic
// NUMBER: 2
@@ -0,0 +1,18 @@
val prop: Int
get() = <caret>
// EXIST: do
// EXIST: false
// EXIST: for
// EXIST: fun
// EXIST: if
// EXIST: null
// EXIST: object
// EXIST: package
// EXIST: super
// EXIST: throw
// EXIST: true
// EXIST: try
// EXIST: when
// EXIST: while
// NUMBER: 14
@@ -0,0 +1,13 @@
package TestData
class TestSample() {
fun test(<caret>) {
}
}
/* TODO: they all are not correct */
// EXIST: val
// EXIST: var
// EXIST: in
// EXIST: out
// NUMBER: 4
@@ -0,0 +1,7 @@
// for: KT-2170
open class Foo {
p<caret> val foo = 1
}
// EXIST: private, public, protected
// NUMBER: 3
@@ -0,0 +1,7 @@
class Test<<caret>
fun testing() {}
// EXIST: in
// EXIST: out
// NUMBER: 2
@@ -0,0 +1,18 @@
fun foo(p: Int = <caret>)
// EXIST: do
// EXIST: false
// EXIST: for
// EXIST: fun
// EXIST: if
// EXIST: null
// EXIST: object
// EXIST: package
// EXIST: return
// EXIST: super
// EXIST: throw
// EXIST: true
// EXIST: try
// EXIST: when
// EXIST: while
// NUMBER: 15
@@ -0,0 +1,17 @@
var a : Int = <caret>
// EXIST: do
// EXIST: false
// EXIST: for
// EXIST: fun
// EXIST: if
// EXIST: null
// EXIST: object
// EXIST: package
// EXIST: super
// EXIST: throw
// EXIST: true
// EXIST: try
// EXIST: when
// EXIST: while
// NUMBER: 14
@@ -0,0 +1,5 @@
val e.<caret>
// NUMBER: 0
// For KT-1950
@@ -0,0 +1,7 @@
class TestClass {
fun test() {
"<caret>"
}
}
// NUMBER: 0
@@ -0,0 +1,10 @@
fun test(<caret>) {
}
/* TODO: they all are not correct */
// EXIST: val
// EXIST: var
// EXIST: in
// EXIST: out
// NUMBER: 4
@@ -0,0 +1,29 @@
package Test
<caret>
// EXIST: abstract
// EXIST: annotation
// EXIST: class
// EXIST: enum
// EXIST: final
// EXIST: fun
// EXIST: import
// EXIST: in
/*why?*/
// EXIST: inner
// EXIST: internal
// EXIST: object
// EXIST: open
// EXIST: out
/*why?*/
// EXIST: override
// EXIST: private
// EXIST: protected
// EXIST: public
// EXIST: trait
// EXIST: val
// EXIST: var
// EXIST: vararg
/*why?*/
// NUMBER: 22
@@ -0,0 +1,14 @@
fun foo(): String.() -> Unit {
return (@label {
f {
<caret>
}
})
}
fun f(p: Any.() -> Unit){}
// INVOCATION_COUNT: 1
// EXIST: { lookupString: "this", itemText: "this", tailText: null, typeText: "Any", attributes: "bold" }
// ABSENT: "this@f"
// EXIST: { lookupString: "this@label", itemText: "this", tailText: "@label", typeText: "String", attributes: "bold" }
@@ -0,0 +1,5 @@
class TestClass {
// <caret>
}
// NUMBER: 0
@@ -0,0 +1,14 @@
fun foo() {
@myFor
for (i in 1..10) {
while (x()) {
fun localFun(a: Int) {
if (a > 0) {
br<caret>
}
}
}
}
}
// NUMBER: 0
@@ -0,0 +1,12 @@
fun foo() {
@myFor
for (i in 1..10) {
while (x()) {
"abc".filter {
br<caret>
}
}
}
}
// NUMBER: 0
@@ -0,0 +1,3 @@
P<caret>
// NUMBER: 0
@@ -0,0 +1,14 @@
fun foo() {
@myFor
for (i in 1..10) {
while (x()) {
fun localFun(a: Int) {
if (a > 0) {
con<caret>
}
}
}
}
}
// NUMBER: 0
@@ -0,0 +1,5 @@
fun foo(f<caret>
fun test() { }
// NUMBER: 0
@@ -0,0 +1,6 @@
fun foo(v: String) {
if (v !<caret>)
}
// EXIST: in
// EXIST: is
@@ -0,0 +1,9 @@
// test that sinple prefix matching is used for keywords
p<caret>
// EXIST: package
// EXIST: private
// EXIST: protected
// EXIST: public
// NUMBER: 4
@@ -0,0 +1,34 @@
class Some {
var a : Int
<caret>
}
// EXIST: abstract
// EXIST: annotation
// EXIST: by
// EXIST: class
// EXIST: enum
// EXIST: final
// EXIST: fun
// EXIST: get
// EXIST: in
/*why?*/
// EXIST: inner
// EXIST: internal
// EXIST: object
// EXIST: open
// EXIST: out
/*why?*/
// EXIST: override
// EXIST: private
// EXIST: protected
// EXIST: public
// EXIST: set
// EXIST: trait
// EXIST: val
// EXIST: var
// EXIST: vararg
/*why?*/
// EXIST: constructor
// EXIST: init
// NUMBER: 26
@@ -0,0 +1,34 @@
class Some {
var a : Int = 1
<caret>
}
// EXIST: abstract
// EXIST: annotation
// EXIST: as
// EXIST: class
// EXIST: enum
// EXIST: final
// EXIST: fun
// EXIST: get
// EXIST: in
/*why?*/
// EXIST: inner
// EXIST: internal
// EXIST: object
// EXIST: open
// EXIST: out
/*why?*/
// EXIST: override
// EXIST: private
// EXIST: protected
// EXIST: public
// EXIST: set
// EXIST: trait
// EXIST: val
// EXIST: var
// EXIST: vararg
/*why?*/
// EXIST: constructor
// EXIST: init
// NUMBER: 26
@@ -0,0 +1,36 @@
class Some {
var a : Int
get() = 0
<caret>
}
// EXIST: abstract
// EXIST: annotation
// EXIST: as
// EXIST: class
// EXIST: enum
// EXIST: final
// EXIST: fun
// EXIST: get
/*TODO*/
// EXIST: in
/*why?*/
// EXIST: inner
// EXIST: internal
// EXIST: object
// EXIST: open
// EXIST: out
/*why?*/
// EXIST: override
// EXIST: private
// EXIST: protected
// EXIST: public
// EXIST: set
// EXIST: trait
// EXIST: val
// EXIST: var
// EXIST: vararg
/*why?*/
// EXIST: constructor
// EXIST: init
// NUMBER: 26
@@ -0,0 +1,13 @@
class Outer {
inner class Inner {
fun String.foo() {
this@<caret>
}
}
}
// ABSENT: this
// EXIST: { lookupString: "this@foo", itemText: "this", tailText: "@foo", typeText: "String", attributes: "bold" }
// 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: 3
@@ -0,0 +1,5 @@
val String.foo: Int
get() = this@<caret>.length()
// EXIST: "this@foo"
// NUMBER: 1
@@ -0,0 +1,14 @@
fun foo() {
takeHandler1 {
takeHandler2({ ret<caret> })
}
}
inline fun takeHandler1(handler: () -> Unit){}
inline fun takeHandler2(handler: () -> Unit){}
// INVOCATION_COUNT: 1
// EXIST: { lookupString: "return", itemText: "return", tailText: null, attributes: "bold" }
// EXIST: { lookupString: "return@takeHandler1", itemText: "return", tailText: "@takeHandler1", attributes: "bold" }
// EXIST: { lookupString: "return@takeHandler2", itemText: "return", tailText: "@takeHandler2", attributes: "bold" }
// NUMBER: 3
@@ -0,0 +1,13 @@
fun foo() {
takeHandler1 {
takeHandler2 { <caret> }
}
}
fun takeHandler1(handler: () -> Unit){}
inline fun takeHandler2(handler: () -> Unit){}
// INVOCATION_COUNT: 1
// ABSENT: return
// EXIST: { lookupString: "return@takeHandler1", itemText: "return", tailText: "@takeHandler1", attributes: "bold" }
// EXIST: { lookupString: "return@takeHandler2", itemText: "return", tailText: "@takeHandler2", attributes: "bold" }
@@ -0,0 +1,13 @@
fun foo() {
takeHandler1 {
takeHandler2 { <caret> }
}
}
fun takeHandler1(handler: () -> Unit){}
fun takeHandler2(handler: () -> Unit){}
// INVOCATION_COUNT: 1
// ABSENT: return
// ABSENT: return@takeHandler1
// EXIST: { lookupString: "return@takeHandler2", itemText: "return", tailText: "@takeHandler2", attributes: "bold" }
@@ -0,0 +1,12 @@
fun foo() {
takeHandler @label {
<caret>
}
}
fun takeHandler(handler: () -> Unit){}
// INVOCATION_COUNT: 1
// ABSENT: return
// ABSENT: "return@takeHandler"
// EXIST: { lookupString: "return@label", itemText: "return", tailText: "@label", attributes: "bold" }
@@ -0,0 +1,12 @@
fun foo() {
takeHandler @label {
<caret>
}
}
inline fun takeHandler(handler: () -> Unit){}
// INVOCATION_COUNT: 1
// EXIST: { lookupString: "return", itemText: "return", tailText: null, attributes: "bold" }
// ABSENT: "return@takeHandler"
// EXIST: { lookupString: "return@label", itemText: "return", tailText: "@label", attributes: "bold" }
@@ -0,0 +1,13 @@
fun foo() {
takeHandler1 {
takeHandler2({ return@<caret> })
}
}
inline fun takeHandler1(handler: () -> Unit){}
inline fun takeHandler2(handler: () -> Unit){}
// INVOCATION_COUNT: 1
// EXIST: { lookupString: "return@takeHandler1", itemText: "return", tailText: "@takeHandler1", attributes: "bold" }
// EXIST: { lookupString: "return@takeHandler2", itemText: "return", tailText: "@takeHandler2", attributes: "bold" }
// NUMBER: 2
@@ -0,0 +1,6 @@
val property: Int
get() {
<caret>
}
// EXIST: return
@@ -0,0 +1,3 @@
fun foo(p: Int?): Int = p ?: <caret>
// ABSENT: return
@@ -0,0 +1,9 @@
inline fun run (p: () -> Unit) {}
fun foo() = run {
<caret>
}
// INVOCATION_COUNT: 1
// EXIST: { lookupString: "return@run", itemText: "return", tailText: "@run", attributes: "bold" }
// ABSENT: return
@@ -0,0 +1,28 @@
class Outer {
class Nested {
inner class Inner {
fun String.foo() {
takeHandler1 {
takeHandler2({
takeHandler3 { this<caret> }
})
}
}
}
}
}
fun takeHandler1(handler: Int.() -> Unit){}
fun takeHandler2(handler: Char.() -> Unit){}
fun takeHandler3(handler: Char.() -> Unit){}
// INVOCATION_COUNT: 1
// EXIST: { lookupString: "this", itemText: "this", tailText: null, typeText: "Char", attributes: "bold" }
// ABSENT: "this@takeHandler3"
// 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"
// NUMBER: 6
@@ -0,0 +1,12 @@
fun is1(): Boolean{}
fun is2(): Boolean{}
class Outer {
inner class Inner {
fun String.foo() {
is<caret>
}
}
}
// NUMBER: 0
@@ -0,0 +1,28 @@
<caret>
// EXIST: abstract
// EXIST: annotation
// EXIST: class
// EXIST: enum
// EXIST: final
// EXIST: fun
// EXIST: import
// EXIST: in
/*why?*/
// EXIST: inner
// EXIST: internal
// EXIST: object
// EXIST: open
// EXIST: out
/*why?*/
// EXIST: override
// EXIST: package
// EXIST: private
// EXIST: protected
// EXIST: public
// EXIST: trait
// EXIST: val
// EXIST: var
// EXIST: vararg
/*why?*/
// NUMBER: 23