Create From Usage: Move "Create function"-related tests to separate directory
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
// "Create function 'get' from usage" "true"
|
||||
class Foo<T> {
|
||||
fun x (y: Foo<Iterable<T>>) {
|
||||
val z: Iterable<T> = y[""]
|
||||
}
|
||||
|
||||
fun get(s: String): T {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// "Create function 'get' from usage" "true"
|
||||
class Foo<T> {
|
||||
fun <T> x (y: Foo<List<T>>, w: java.util.ArrayList<T>) {
|
||||
val z: Iterable<T> = y["", w]
|
||||
}
|
||||
|
||||
fun get(s: String, w: T): T {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// "Create function 'get' from usage" "true"
|
||||
class Foo<T> {
|
||||
fun get(s: String, w: T): T {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
}
|
||||
fun <T> x (y: Foo<List<T>>, w: java.util.ArrayList<T>) {
|
||||
val z: Iterable<T> = y["", w]
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// "Create function 'get' from usage" "true"
|
||||
class Foo<T> {
|
||||
fun get(s: String, w: T): Any {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
}
|
||||
fun <T> x (y: Foo<List<T>>, w: java.util.ArrayList<T>) {
|
||||
val z = y["", w]
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
// "Create function 'get' from usage" "true"
|
||||
import java.util.ArrayList
|
||||
|
||||
class Foo<T> {
|
||||
fun bar(arg: String) { }
|
||||
fun <T, V> x (y: Foo<List<T>>, w: ArrayList<V>) {
|
||||
val z = y["", w]
|
||||
bar(z)
|
||||
}
|
||||
|
||||
fun <V> get(s: String, w: ArrayList<V>): String {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Create function 'get' from usage" "true"
|
||||
fun x (y: Any) {
|
||||
val z: Any = y[""]
|
||||
}
|
||||
|
||||
fun Any.get(s: String): Any {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// "Create function 'get' from usage" "true"
|
||||
class Foo<T> {
|
||||
fun <S> x (y: Foo<Iterable<S>>) {
|
||||
val z: Iterable<S> = y[""]
|
||||
}
|
||||
|
||||
fun get(s: String): T {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// "Create function 'get' from usage" "true"
|
||||
class Foo<T, S: Iterable<T>> {
|
||||
fun <U> x (y: Foo<U, Iterable<U>>) {
|
||||
val z: U = y[""]
|
||||
}
|
||||
|
||||
fun get(s: String): T {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// "Create function 'get' from usage" "true"
|
||||
class Foo<T> {
|
||||
fun <T, V> x (y: Foo<Iterable<T>>, w: Iterable<V>) {
|
||||
val z: Iterable<T> = y["", w]
|
||||
}
|
||||
|
||||
fun <V> get(s: String, w: Iterable<V>): T {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// "Create function 'get' from usage" "true"
|
||||
import java.util.ArrayList
|
||||
|
||||
class Foo<T> {
|
||||
fun <T, V> x (y: Foo<List<T>>, w: ArrayList<V>, v: T) {
|
||||
val z: Iterable<T> = y["", w, v]
|
||||
}
|
||||
|
||||
fun <V, T1> get(s: String, w: ArrayList<V>, v: T1): T {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// "Create function 'get' from usage" "true"
|
||||
import java.util.ArrayList
|
||||
|
||||
class Foo<T> {
|
||||
fun x (y: Foo<List<T>>, w: ArrayList<T>) {
|
||||
val z: Iterable<T> = y["", w]
|
||||
}
|
||||
|
||||
fun get(s: String, w: T): T {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// "Create function 'get' from usage" "true"
|
||||
import java.util.ArrayList
|
||||
|
||||
class Foo<S> {
|
||||
fun <T> x (y: Foo<List<T>>, w: ArrayList<T>) {
|
||||
val z: Iterable<T> = y["", w]
|
||||
}
|
||||
|
||||
fun get(s: String, w: S): S {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Create function 'get' from usage" "true"
|
||||
class Foo<T> {
|
||||
fun x (y: Foo<Iterable<T>>) {
|
||||
val z: Iterable<T> = y<caret>[""]
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// "Create function 'get' from usage" "true"
|
||||
class Foo<T> {
|
||||
fun <T> x (y: Foo<List<T>>, w: java.util.ArrayList<T>) {
|
||||
val z: Iterable<T> = y<caret>["", w]
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
// "Create function 'get' from usage" "true"
|
||||
class Foo<T>
|
||||
fun <T> x (y: Foo<List<T>>, w: java.util.ArrayList<T>) {
|
||||
val z: Iterable<T> = y<caret>["", w]
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
// "Create function 'get' from usage" "true"
|
||||
class Foo<T>
|
||||
fun <T> x (y: Foo<List<T>>, w: java.util.ArrayList<T>) {
|
||||
val z = y<caret>["", w]
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// "Create function 'get' from usage" "true"
|
||||
import java.util.ArrayList
|
||||
|
||||
class Foo<T> {
|
||||
fun bar(arg: String) { }
|
||||
fun <T, V> x (y: Foo<List<T>>, w: ArrayList<V>) {
|
||||
val z = y<caret>["", w]
|
||||
bar(z)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// "Create function 'get' from usage" "true"
|
||||
fun x (y: Any) {
|
||||
val z: Any = y<caret>[""]
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Create function 'get' from usage" "true"
|
||||
class Foo<T> {
|
||||
fun <S> x (y: Foo<Iterable<S>>) {
|
||||
val z: Iterable<S> = y<caret>[""]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Create function 'get' from usage" "true"
|
||||
class Foo<T, S: Iterable<T>> {
|
||||
fun <U> x (y: Foo<U, Iterable<U>>) {
|
||||
val z: U = y<caret>[""]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Create function 'get' from usage" "true"
|
||||
class Foo<T> {
|
||||
fun <T, V> x (y: Foo<Iterable<T>>, w: Iterable<V>) {
|
||||
val z: Iterable<T> = y<caret>["", w]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Create function 'get' from usage" "true"
|
||||
import java.util.ArrayList
|
||||
|
||||
class Foo<T> {
|
||||
fun <T, V> x (y: Foo<List<T>>, w: ArrayList<V>, v: T) {
|
||||
val z: Iterable<T> = y<caret>["", w, v]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Create function 'get' from usage" "true"
|
||||
import java.util.ArrayList
|
||||
|
||||
class Foo<T> {
|
||||
fun x (y: Foo<List<T>>, w: ArrayList<T>) {
|
||||
val z: Iterable<T> = y<caret>["", w]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Create function 'get' from usage" "true"
|
||||
import java.util.ArrayList
|
||||
|
||||
class Foo<S> {
|
||||
fun <T> x (y: Foo<List<T>>, w: ArrayList<T>) {
|
||||
val z: Iterable<T> = y<caret>["", w]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user