[Test] Update or drop some IDE tests about experimental coroutines
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
// "Make block type suspend" "true"
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.coroutines.experimental.suspendCoroutine
|
||||
import kotlin.coroutines.experimental.createCoroutine
|
||||
import kotlin.coroutines.suspendCoroutine
|
||||
import kotlin.coroutines.createCoroutine
|
||||
|
||||
suspend fun <T> suspending(): T {
|
||||
val block: () -> T = { null!! }
|
||||
return suspendCoroutine { block.<caret>createCoroutine(it) }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// "Make block type suspend" "true"
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.coroutines.experimental.suspendCoroutine
|
||||
import kotlin.coroutines.experimental.createCoroutine
|
||||
import kotlin.coroutines.suspendCoroutine
|
||||
import kotlin.coroutines.createCoroutine
|
||||
|
||||
suspend fun <T> suspending(): T {
|
||||
val block: suspend () -> T = { null!! }
|
||||
return suspendCoroutine { block.createCoroutine(it) }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// "Make block type suspend" "true"
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.coroutines.experimental.suspendCoroutine
|
||||
import kotlin.coroutines.experimental.startCoroutine
|
||||
import kotlin.coroutines.suspendCoroutine
|
||||
import kotlin.coroutines.startCoroutine
|
||||
|
||||
suspend fun <T> suspending(block: () -> T): T = suspendCoroutine { block.<caret>startCoroutine(it) }
|
||||
suspend fun <T> suspending(block: () -> T): T = suspendCoroutine { block.<caret>startCoroutine(it) }
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// "Make block type suspend" "true"
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.coroutines.experimental.suspendCoroutine
|
||||
import kotlin.coroutines.experimental.startCoroutine
|
||||
import kotlin.coroutines.suspendCoroutine
|
||||
import kotlin.coroutines.startCoroutine
|
||||
|
||||
suspend fun <T> suspending(block: suspend () -> T): T = suspendCoroutine { block.startCoroutine(it) }
|
||||
suspend fun <T> suspending(block: suspend () -> T): T = suspendCoroutine { block.startCoroutine(it) }
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
org.jetbrains.kotlin.idea.inspections.migration.ObsoleteExperimentalCoroutinesInspection
|
||||
@@ -1,9 +0,0 @@
|
||||
// "Fix experimental coroutines usage" "true"
|
||||
// ERROR: Using 'buildIterator(noinline suspend SequenceScope<T>.() -> Unit): Iterator<T>' is an error. Use 'iterator { }' function instead.
|
||||
// WITH_RUNTIME
|
||||
import kotlin.coroutines.<caret>experimental.buildIterator
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val lazySeq = buildIterator<Int> {
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
// "Fix experimental coroutines usage" "true"
|
||||
// ERROR: Using 'buildIterator(noinline suspend SequenceScope<T>.() -> Unit): Iterator<T>' is an error. Use 'iterator { }' function instead.
|
||||
// WITH_RUNTIME<caret>
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val lazySeq = buildIterator<Int> {
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
// "Fix experimental coroutines usage" "true"
|
||||
// WITH_RUNTIME
|
||||
package some
|
||||
|
||||
import kotlin.coroutines.experimental.buildSequence
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val lazySeq = <caret>buildSequence<Int> {
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
// "Fix experimental coroutines usage" "true"
|
||||
// WITH_RUNTIME
|
||||
package some
|
||||
|
||||
import kotlin.coroutines.experimental.buildSequence
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val lazySeq = sequence<Int> {
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
// "Fix experimental coroutines usage" "true"
|
||||
// ERROR: Unresolved reference: buildSequence
|
||||
import kotlin.coroutines.<caret>experimental.buildSequence
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val lazySeq = buildSequence<Int> {
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
// "Fix experimental coroutines usage" "true"
|
||||
// ERROR: Unresolved reference: buildSequence
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val lazySeq = buildSequence<Int> {
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
// "Fix experimental coroutines usages in the project" "true"
|
||||
// WITH_RUNTIME
|
||||
package migrate
|
||||
|
||||
import kotlin.coroutines.experimental.buildIterator
|
||||
import kotlin.coroutines.experimental.buildSequence
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val one = <caret>buildSequence {
|
||||
yield(1)
|
||||
}
|
||||
|
||||
val two = buildIterator {
|
||||
yield(1)
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
// "Fix experimental coroutines usages in the project" "true"
|
||||
// WITH_RUNTIME
|
||||
package migrate
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val one = sequence {
|
||||
yield(1)
|
||||
}
|
||||
|
||||
val two = iterator {
|
||||
yield(1)
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
// "Fix experimental coroutines usage" "true"
|
||||
// SHOULD_BE_AVAILABLE_AFTER_EXECUTION
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.coroutines.experimental.Continuation
|
||||
|
||||
fun test(con: Continuation<Int>) {
|
||||
con.<caret>resume(12)
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
// "Fix experimental coroutines usage" "true"
|
||||
// SHOULD_BE_AVAILABLE_AFTER_EXECUTION
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.coroutines.experimental.Continuation
|
||||
import kotlin.coroutines.resume
|
||||
|
||||
fun test(con: Continuation<Int>) {
|
||||
con.<caret>resume(12)
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
// "Fix experimental coroutines usage" "true"
|
||||
// SHOULD_BE_AVAILABLE_AFTER_EXECUTION
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.coroutines.experimental.Continuation
|
||||
|
||||
fun test(con: Continuation<Int>) {
|
||||
con.<caret>resumeWithException(RuntimeException("Haha"))
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
// "Fix experimental coroutines usage" "true"
|
||||
// SHOULD_BE_AVAILABLE_AFTER_EXECUTION
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.coroutines.experimental.Continuation
|
||||
import kotlin.coroutines.resumeWithException
|
||||
|
||||
fun test(con: Continuation<Int>) {
|
||||
con.<caret>resumeWithException(RuntimeException("Haha"))
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
// "Fix experimental coroutines usage" "true"
|
||||
|
||||
import kotlin.coroutines.<caret>experimental.*
|
||||
@@ -1,3 +0,0 @@
|
||||
// "Fix experimental coroutines usage" "true"
|
||||
|
||||
import kotlin.coroutines.*
|
||||
@@ -1,4 +0,0 @@
|
||||
// "Fix experimental coroutines usage" "true"
|
||||
// ERROR: Unresolved reference: kotlinx
|
||||
|
||||
import kotlinx.coroutines.<caret>experimental.delay
|
||||
@@ -1,4 +0,0 @@
|
||||
// "Fix experimental coroutines usage" "true"
|
||||
// ERROR: Unresolved reference: kotlinx
|
||||
|
||||
import kotlinx.coroutines.delay
|
||||
Reference in New Issue
Block a user