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