Tests: add runtime (and runtime sources) to some tests that rely on being able to resolve references to built ins

This commit is contained in:
Pavel V. Talanov
2015-12-10 17:22:45 +03:00
parent 539b84b561
commit a667aa2f71
50 changed files with 81 additions and 16 deletions
@@ -2,6 +2,7 @@
// ACTION: Create extension function 'Foo'
// ACTION: Rename reference
// ERROR: Unresolved reference: Foo
// WITH_RUNTIME
fun test() {
val a = 2.<caret>Foo(1)
@@ -2,6 +2,7 @@
// ACTION: Create extension function 'Foo'
// ACTION: Rename reference
// ERROR: Unresolved reference: Foo
// WITH_RUNTIME
class A<T>(val items: List<T>) {
fun test() = items.<caret>Foo<Int, String>(2, "2")
@@ -1,4 +1,5 @@
// "Create extension function 'plus'" "true"
// WITH_RUNTIME
class A<T>(val n: T)
@@ -1,4 +1,5 @@
// "Create extension function 'plus'" "true"
// WITH_RUNTIME
class A<T>(val n: T)
@@ -1,4 +1,5 @@
// "Create extension function '!u00A0'" "true"
// WITH_RUNTIME
fun test() {
val t: Int = 1 <caret>`!u00A0` 2
@@ -1,4 +1,5 @@
// "Create extension function '!u00A0'" "true"
// WITH_RUNTIME
fun test() {
val t: Int = 1 `!u00A0` 2
@@ -1,4 +1,5 @@
// "Create extension function 'foo'" "true"
// WITH_RUNTIME
fun test() {
val a: Int = Unit.<caret>foo(2)
@@ -1,4 +1,5 @@
// "Create extension function 'foo'" "true"
// WITH_RUNTIME
fun test() {
val a: Int = Unit.foo(2)
@@ -1,4 +1,5 @@
// "Create extension function 'foo'" "true"
// WITH_RUNTIME
class A<T>(val n: T)
@@ -1,4 +1,5 @@
// "Create extension function 'foo'" "true"
// WITH_RUNTIME
class A<T>(val n: T)
@@ -1,4 +1,5 @@
// "Create extension function 'foo'" "true"
// WITH_RUNTIME
class A<T>(val items: List<T>) {
fun test(): Int {
@@ -1,4 +1,5 @@
// "Create extension function 'foo'" "true"
// WITH_RUNTIME
class A<T>(val items: List<T>) {
fun test(): Int {
@@ -1,4 +1,5 @@
// "Create extension function 'foo'" "true"
// WITH_RUNTIME
class A<T>(val items: List<T>) {
fun test(): Int {
@@ -1,4 +1,5 @@
// "Create extension function 'foo'" "true"
// WITH_RUNTIME
class A<T>(val items: List<T>) {
fun test(): Int {
@@ -1,4 +1,5 @@
// "Create extension function 'foo'" "true"
// WITH_RUNTIME
class A<T>(val items: List<T>) {
fun test(): Int {
@@ -1,4 +1,5 @@
// "Create extension function 'foo'" "true"
// WITH_RUNTIME
class A<T>(val items: List<T>) {
fun test(): Int {
@@ -1,4 +1,5 @@
// "Create extension function 'foo'" "true"
// WITH_RUNTIME
fun <T, U> T.map(f: T.() -> U) = f()
fun consume(s: String) {}
@@ -1,4 +1,5 @@
// "Create extension function 'foo'" "true"
// WITH_RUNTIME
fun <T, U> T.map(f: T.() -> U) = f()
fun consume(s: String) {}
@@ -1,4 +1,5 @@
// "Create extension function 'component2'" "true"
// WITH_RUNTIME
class FooIterator<T> {
operator fun hasNext(): Boolean { return false }
operator fun next(): Any {
@@ -1,4 +1,5 @@
// "Create extension function 'component2'" "true"
// WITH_RUNTIME
class FooIterator<T> {
operator fun hasNext(): Boolean { return false }
operator fun next(): Any {
@@ -1,4 +1,5 @@
// "Create extension function 'get'" "true"
// WITH_RUNTIME
fun x (y: Any) {
val z: Any = y<caret>[""]
@@ -1,4 +1,5 @@
// "Create extension function 'get'" "true"
// WITH_RUNTIME
fun x (y: Any) {
val z: Any = y[""]
@@ -1,4 +1,5 @@
// "Create extension function 'invoke'" "true"
// WITH_RUNTIME
class A<T>(val n: T)
@@ -1,4 +1,5 @@
// "Create extension function 'invoke'" "true"
// WITH_RUNTIME
class A<T>(val n: T)
@@ -1,4 +1,5 @@
// "Create extension function 'set'" "true"
// WITH_RUNTIME
class Foo<T> {
fun <T> x (y: Any, w: java.util.ArrayList<T>) {
@@ -1,6 +1,7 @@
import java.util.ArrayList
// "Create extension function 'set'" "true"
// WITH_RUNTIME
class Foo<T> {
fun <T> x (y: Any, w: java.util.ArrayList<T>) {
@@ -1,4 +1,5 @@
// "Create extension function 'unaryMinus'" "true"
// WITH_RUNTIME
fun test() {
val a = <caret>-false
@@ -1,4 +1,5 @@
// "Create extension function 'unaryMinus'" "true"
// WITH_RUNTIME
fun test() {
val a = -false
@@ -1,5 +1,6 @@
// "Create secondary constructor" "false"
// ERROR: Too many arguments for public constructor Any() defined in kotlin.Any
// WITH_RUNTIME
interface T {
@@ -2,6 +2,7 @@
// ERROR: Unresolved reference: foo
// ACTION: Create extension function 'foo'
// ACTION: Replace infix call with ordinary call
// WITH_RUNTIME
fun refer() {
1 <caret>foo 2
}
@@ -2,6 +2,7 @@
// ERROR: Unresolved reference: foo
// ACTION: Create extension function 'foo'
// ACTION: Replace infix call with ordinary call
// WITH_RUNTIME
fun refer() {
1 <caret>foo 2
}
@@ -2,6 +2,7 @@
// ACTION: Create extension property 'foo'
// ACTION: Rename reference
// ERROR: Unresolved reference: foo
// WITH_RUNTIME
class A<T>(val n: T)
@@ -2,6 +2,7 @@
// ERROR: Unresolved reference: foo
// ACTION: Create extension function 'foo'
// ACTION: Replace infix call with ordinary call
// WITH_RUNTIME
fun refer() {
1 <caret>foo 2
}
@@ -1,5 +1,6 @@
// "Create extension property 'foo'" "true"
// ERROR: Property must be initialized
// WITH_RUNTIME
fun test() {
val a: Int = Unit.<caret>foo
@@ -1,5 +1,6 @@
// "Create extension property 'foo'" "true"
// ERROR: Property must be initialized
// WITH_RUNTIME
val Unit.foo: Int
@@ -1,5 +1,6 @@
// "Create extension property 'foo'" "true"
// ERROR: Property must be initialized
// WITH_RUNTIME
class A<T>(val n: T)
@@ -1,5 +1,6 @@
// "Create extension property 'foo'" "true"
// ERROR: Property must be initialized
// WITH_RUNTIME
class A<T>(val n: T)
@@ -1,5 +1,6 @@
// "Create extension property 'foo'" "true"
// ERROR: Property must be initialized
// WITH_RUNTIME
class A<T>(val n: T)
@@ -1,5 +1,6 @@
// "Create extension property 'foo'" "true"
// ERROR: Property must be initialized
// WITH_RUNTIME
class A<T>(val n: T)