Create From Usage: Move "Create function"-related tests to separate directory

This commit is contained in:
Alexey Sedunov
2014-09-29 16:36:57 +04:00
parent 0f43d4d07c
commit a6ba3a569d
138 changed files with 526 additions and 504 deletions
@@ -0,0 +1,11 @@
// "Create function 'invoke' from usage" "true"
class A<T>(val n: T)
fun test(): A<String> {
return 1(2, "2")
}
fun Int.invoke(i: Int, s: String): A<String> {
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
@@ -0,0 +1,12 @@
// "Create function 'invoke' from usage" "true"
class A<T>(val n: T) {
fun invoke(arg: T, s: String): B<String> {
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}
class B<T>(val m: T)
fun test(): B<String> {
return A(1)(2, "2")
}
@@ -0,0 +1,12 @@
// "Create function 'invoke' from usage" "true"
class A<T>(val n: T) {
fun <V> invoke(u: T, s: String): B<V> {
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}
class B<T>(val m: T)
fun test<U, V>(u: U): B<V> {
return A(u)(u, "u")
}
@@ -0,0 +1,11 @@
// "Create function 'invoke' from usage" "true"
class A<T>(val n: T) {
fun invoke(abc: T, ghi: A<T>, def: String): A<T> {
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}
fun test() {
val a: A<Int> = A(1)(abc = 1, ghi = A(2), def = "s")
}
@@ -0,0 +1,7 @@
// "Create function 'invoke' from usage" "true"
class A<T>(val n: T)
fun test(): A<String> {
return <caret>1(2, "2")
}
@@ -0,0 +1,8 @@
// "Create function 'invoke' from usage" "true"
class A<T>(val n: T)
class B<T>(val m: T)
fun test(): B<String> {
return A(1)<caret>(2, "2")
}
@@ -0,0 +1,8 @@
// "Create function 'invoke' from usage" "true"
class A<T>(val n: T)
class B<T>(val m: T)
fun test<U, V>(u: U): B<V> {
return A(u)<caret>(u, "u")
}
@@ -0,0 +1,7 @@
// "Create function 'invoke' from usage" "true"
class A<T>(val n: T)
fun test() {
val a: A<Int> = A(1)<caret>(abc = 1, ghi = A(2), def = "s")
}