Create from usage: Added tests.
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
// "Create method 'iterator' from usage" "true"
|
||||
class Foo<T> {
|
||||
fun iterator(): Iterator<T> {
|
||||
throw Exception("not implemented") //To change body of created methods use File | Settings | File Templates.
|
||||
}
|
||||
}
|
||||
fun foo() {
|
||||
for (i: Int in Foo<Int>()) { }
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// "Create method 'iterator' from usage" "true"
|
||||
class Foo<T> {
|
||||
fun iterator(): Iterator<String> {
|
||||
throw Exception("not implemented") //To change body of created methods use File | Settings | File Templates.
|
||||
}
|
||||
}
|
||||
fun foo() {
|
||||
for (i in Foo<Int>()) {
|
||||
bar(i)
|
||||
}
|
||||
}
|
||||
fun bar(i: String) { }
|
||||
@@ -0,0 +1,5 @@
|
||||
// "Create method 'iterator' from usage" "true"
|
||||
class Foo<T>
|
||||
fun foo() {
|
||||
for (i: Int in Foo<caret><Int>()) { }
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Create method 'iterator' from usage" "true"
|
||||
class Foo<T>
|
||||
fun foo() {
|
||||
for (i in Foo<caret><Int>()) {
|
||||
bar(i)
|
||||
}
|
||||
}
|
||||
fun bar(i: String) { }
|
||||
Reference in New Issue
Block a user