diff options
Diffstat (limited to 'integration-tests/gradle/src/main/kotlin/org')
-rw-r--r-- | integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/TestEnvironment.kt | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/TestEnvironment.kt b/integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/TestEnvironment.kt new file mode 100644 index 00000000..6e393a6d --- /dev/null +++ b/integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/TestEnvironment.kt @@ -0,0 +1,14 @@ +package org.jetbrains.dokka.it.gradle + +object TestEnvironment { + val isExhaustive = checkNotNull(System.getenv("isExhaustive")) { + "Missing `isExhaustive` environment variable" + }.toBoolean() +} + +/** + * Will only return values if [TestEnvironment.isExhaustive] is set to true + */ +inline fun <reified T> ifExhaustive(vararg values: T): Array<out T> { + return if (TestEnvironment.isExhaustive) values else emptyArray() +} |