Remove non default coroutines options from Gradle tests
They don't have any effect anyway
This commit is contained in:
committed by
Ilya Gorbunov
parent
a3d78f769b
commit
9df949c039
+2
-67
@@ -16,83 +16,18 @@
|
||||
|
||||
package org.jetbrains.kotlin.gradle
|
||||
|
||||
import org.jetbrains.kotlin.gradle.util.getFileByName
|
||||
import org.jetbrains.kotlin.gradle.util.modify
|
||||
import org.junit.Test
|
||||
import java.io.File
|
||||
|
||||
class CoroutinesIT : BaseGradleIT() {
|
||||
companion object {
|
||||
private const val LOCAL_PROPERTIES = "local.properties"
|
||||
private const val GRADLE_PROPERTIES = "gradle.properties"
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testCoroutinesProjectDSL() {
|
||||
val project = Project("coroutinesProjectDSL")
|
||||
project.build("assemble") {
|
||||
assertSuccessful()
|
||||
assertContains("-Xcoroutines=enable")
|
||||
}
|
||||
|
||||
project.projectDir.getFileByName("build.gradle").modify {
|
||||
it.replace("coroutines 'enable'", "coroutines 'error'")
|
||||
}
|
||||
|
||||
project.build("assemble") {
|
||||
assertFailed()
|
||||
assertContains("-Xcoroutines=error")
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testCoroutinesJvmEnabled() {
|
||||
jvmProject.doTest("enable", GRADLE_PROPERTIES)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testCoroutinesJvmWarn() {
|
||||
jvmProject.doTest("warn", GRADLE_PROPERTIES)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testCoroutinesJvmError() {
|
||||
jvmProject.doTest("error", GRADLE_PROPERTIES)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testCoroutinesJvmDefault() {
|
||||
jvmProject.doTest("warn", null)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testCoroutinesJvmLocalProperties() {
|
||||
jvmProject.doTest("enable", LOCAL_PROPERTIES)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testCoroutinesJsLocalProperties() {
|
||||
jsProject.doTest("enable", LOCAL_PROPERTIES)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testCoroutinesJsEnabled() {
|
||||
jsProject.doTest("enable", GRADLE_PROPERTIES)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testCoroutinesJsWarn() {
|
||||
jsProject.doTest("warn", GRADLE_PROPERTIES)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testCoroutinesJsError() {
|
||||
jsProject.doTest("error", GRADLE_PROPERTIES)
|
||||
jvmProject.doTest("default", null)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testCoroutinesJsDefault() {
|
||||
jsProject.doTest("warn", null)
|
||||
jsProject.doTest("default", null)
|
||||
}
|
||||
|
||||
// todo: replace with project that actually uses coroutines after their syntax is finalized
|
||||
|
||||
Reference in New Issue
Block a user