Create From Usage: Move "Create function"-related tests to separate directory
This commit is contained in:
@@ -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")
|
||||
}
|
||||
+12
@@ -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")
|
||||
}
|
||||
+11
@@ -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")
|
||||
}
|
||||
+8
@@ -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")
|
||||
}
|
||||
+7
@@ -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")
|
||||
}
|
||||
Reference in New Issue
Block a user