Create From Usage: Move "Create function"-related tests to separate directory
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
// "Create function 'inc' from usage" "true"
|
||||
|
||||
class A<T>(val n: T) {
|
||||
fun inc(): A<T> {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
}
|
||||
|
||||
fun test() {
|
||||
var a = A(1)
|
||||
a++
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// "Create function 'minus' from usage" "true"
|
||||
|
||||
class A<T>(val n: T) {
|
||||
fun minus(n: Int): A<T> = throw Exception()
|
||||
|
||||
fun minus(): 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)
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// "Create function 'minus' from usage" "true"
|
||||
|
||||
fun test() {
|
||||
val a = -false
|
||||
}
|
||||
|
||||
fun Boolean.minus(): Any {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// "Create function 'minus' from usage" "true"
|
||||
|
||||
class A<T>(val n: T) {
|
||||
fun minus(): Any {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
}
|
||||
|
||||
fun test() {
|
||||
val a = -A(1)
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// "Create function 'minus' from usage" "true"
|
||||
|
||||
class A<T>(val n: T) {
|
||||
fun minus(): A<T> {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
}
|
||||
|
||||
fun test<U>(u: U) {
|
||||
val a: A<U> = -A(u)
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// "Create function 'inc' from usage" "true"
|
||||
|
||||
class A<T>(val n: T)
|
||||
|
||||
fun test() {
|
||||
var a = A(1)
|
||||
a<caret>++
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// "Create function 'minus' from usage" "true"
|
||||
|
||||
class A<T>(val n: T) {
|
||||
fun minus(n: Int): A<T> = throw Exception()
|
||||
}
|
||||
|
||||
fun test() {
|
||||
val a: A<Int> = <caret>-A(1)
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
// "Create function 'minus' from usage" "true"
|
||||
|
||||
fun test() {
|
||||
val a = <caret>-false
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// "Create function 'minus' from usage" "true"
|
||||
|
||||
class A<T>(val n: T)
|
||||
|
||||
fun test() {
|
||||
val a = <caret>-A(1)
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// "Create function 'minus' from usage" "true"
|
||||
|
||||
class A<T>(val n: T)
|
||||
|
||||
fun test<U>(u: U) {
|
||||
val a: A<U> = <caret>-A(u)
|
||||
}
|
||||
Reference in New Issue
Block a user