Switch coroutine tests to release coroutines

This commit is contained in:
Ilya Gorbunov
2018-09-05 16:05:28 +03:00
parent df9f77909b
commit 2821c357a1
9 changed files with 10 additions and 16 deletions
+1 -1
View File
@@ -70,7 +70,7 @@ compileKotlin {
} }
compileTestKotlin { compileTestKotlin {
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package", "-Xmulti-platform", "-XXLanguage:-ReleaseCoroutines", "-Xuse-experimental=kotlin.ExperimentalUnsignedTypes"] kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package", "-Xmulti-platform", "-XXLanguage:+ReleaseCoroutines", "-Xuse-experimental=kotlin.ExperimentalUnsignedTypes"]
} }
compileJava9Sources(project, 'kotlin.stdlib.jdk7') compileJava9Sources(project, 'kotlin.stdlib.jdk7')
+1 -1
View File
@@ -73,7 +73,7 @@ compileKotlin {
} }
compileTestKotlin { compileTestKotlin {
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package", "-Xmulti-platform", "-XXLanguage:-ReleaseCoroutines", "-Xuse-experimental=kotlin.ExperimentalUnsignedTypes"] kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package", "-Xmulti-platform", "-XXLanguage:+ReleaseCoroutines", "-Xuse-experimental=kotlin.ExperimentalUnsignedTypes"]
} }
compileJava9Sources(project, 'kotlin.stdlib.jdk8') compileJava9Sources(project, 'kotlin.stdlib.jdk8')
+1 -1
View File
@@ -68,7 +68,7 @@ compileKotlin {
} }
compileTestKotlin { compileTestKotlin {
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package", "-Xmulti-platform", "-XXLanguage:-ReleaseCoroutines", "-Xuse-experimental=kotlin.ExperimentalUnsignedTypes"] kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package", "-Xmulti-platform", "-XXLanguage:+ReleaseCoroutines", "-Xuse-experimental=kotlin.ExperimentalUnsignedTypes"]
} }
kotlin.experimental.coroutines 'enable' kotlin.experimental.coroutines 'enable'
+1 -1
View File
@@ -71,7 +71,7 @@ compileKotlin {
} }
compileTestKotlin { compileTestKotlin {
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package", "-Xnormalize-constructor-calls=enable", "-Xmulti-platform", "-XXLanguage:-ReleaseCoroutines", "-Xuse-experimental=kotlin.ExperimentalUnsignedTypes"] kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package", "-Xnormalize-constructor-calls=enable", "-Xmulti-platform", "-XXLanguage:+ReleaseCoroutines", "-Xuse-experimental=kotlin.ExperimentalUnsignedTypes"]
} }
kotlin.experimental.coroutines 'enable' kotlin.experimental.coroutines 'enable'
+1 -1
View File
@@ -189,7 +189,7 @@ compileTestKotlin2Js {
kotlinOptions { kotlinOptions {
moduleKind = "umd" moduleKind = "umd"
freeCompilerArgs += [ freeCompilerArgs += [
"-XXLanguage:-ReleaseCoroutines", "-XXLanguage:+ReleaseCoroutines",
"-Xuse-experimental=kotlin.ExperimentalUnsignedTypes" "-Xuse-experimental=kotlin.ExperimentalUnsignedTypes"
] ]
} }
+1 -1
View File
@@ -257,7 +257,7 @@ compileTestKotlin {
kotlinOptions { kotlinOptions {
freeCompilerArgs += [ freeCompilerArgs += [
"-Xuse-experimental=kotlin.ExperimentalUnsignedTypes", "-Xuse-experimental=kotlin.ExperimentalUnsignedTypes",
"-XXLanguage:-ReleaseCoroutines" "-XXLanguage:+ReleaseCoroutines"
] ]
} }
} }
@@ -6,7 +6,7 @@
package test.coroutines package test.coroutines
import kotlin.test.* import kotlin.test.*
import kotlin.coroutines.experimental.* import kotlin.coroutines.*
class CoroutineContextTest { class CoroutineContextTest {
data class CtxA(val i: Int) : AbstractCoroutineContextElement(CtxA) { data class CtxA(val i: Int) : AbstractCoroutineContextElement(CtxA) {
@@ -7,7 +7,7 @@ package test.coroutines
import test.assertStaticAndRuntimeTypeIs import test.assertStaticAndRuntimeTypeIs
import kotlin.test.* import kotlin.test.*
import kotlin.coroutines.experimental.* import kotlin.coroutines.*
/** /**
* Test to ensure that coroutine machinery does not call equals/hashCode/toString anywhere. * Test to ensure that coroutine machinery does not call equals/hashCode/toString anywhere.
@@ -45,13 +45,9 @@ class CoroutinesReferenceValuesTest {
bad.startCoroutine(object : Continuation<BadClass> { bad.startCoroutine(object : Continuation<BadClass> {
override val context: CoroutineContext = EmptyCoroutineContext override val context: CoroutineContext = EmptyCoroutineContext
override fun resume(value: BadClass) { override fun resumeWith(result_: SuccessOrFailure<BadClass>) {
assertTrue(result == null) assertTrue(result == null)
result = value result = result_.getOrThrow()
}
override fun resumeWithException(exception: Throwable) {
throw exception
} }
}) })
assertTrue(result is BadClass) assertTrue(result is BadClass)
@@ -6,8 +6,6 @@
package test.coroutines package test.coroutines
import kotlin.test.* import kotlin.test.*
import kotlin.coroutines.experimental.buildSequence
import kotlin.coroutines.experimental.buildIterator
class SequenceBuilderTest { class SequenceBuilderTest {
@Test @Test