Use new sequence builders in tests
Coroutine tests will fail when LV=1.2 because there're no such builders in kotlin.coroutines.experimental. #KT-26678
This commit is contained in:
@@ -5,7 +5,6 @@
|
||||
// COMMON_COROUTINES_TEST
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
import COROUTINES_PACKAGE.intrinsics.*
|
||||
|
||||
enum class Foo(vararg expected: String) {
|
||||
A("start", "A", "end"),
|
||||
@@ -30,7 +29,7 @@ fun box(): String {
|
||||
}
|
||||
|
||||
fun getSequence(a: Foo) =
|
||||
buildSequence {
|
||||
sequence {
|
||||
yield("start")
|
||||
when (a) {
|
||||
Foo.A -> {
|
||||
|
||||
Vendored
+1
-2
@@ -5,10 +5,9 @@
|
||||
// COMMON_COROUTINES_TEST
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
import COROUTINES_PACKAGE.intrinsics.*
|
||||
|
||||
val f = run {
|
||||
buildSequence {
|
||||
sequence {
|
||||
if (true) {
|
||||
yield("OK")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user