Switch coroutine tests to release coroutines
This commit is contained in:
@@ -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')
|
||||||
|
|||||||
@@ -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')
|
||||||
|
|||||||
@@ -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'
|
||||||
|
|||||||
@@ -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'
|
||||||
|
|||||||
@@ -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"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user