Add mock runtime to diagnostic tests.

Mock runtime contains function from file Standard.kt
This commit is contained in:
Stanislav Erokhin
2016-01-24 11:24:03 +03:00
parent 6ac73eb760
commit d7438d9f2b
6 changed files with 39 additions and 8 deletions
@@ -17,10 +17,12 @@
package org.jetbrains.kotlin.test
enum class ConfigurationKind(
val withRuntime: Boolean,
val withReflection: Boolean
val withRuntime: Boolean = false,
val withMockRuntime: Boolean = false,
val withReflection: Boolean = false
) {
JDK_ONLY(withRuntime = false, withReflection = false),
NO_KOTLIN_REFLECT(withRuntime = true, withReflection = false),
JDK_ONLY(),
MOCK_RUNTIME(withMockRuntime = true),
NO_KOTLIN_REFLECT(withRuntime = true),
ALL(withRuntime = true, withReflection = true),
}
@@ -448,6 +448,9 @@ public class KotlinTestUtils {
JvmContentRootsKt.addJvmClasspathRoot(configuration, ForTestCompileRuntime.runtimeJarForTests());
JvmContentRootsKt.addJvmClasspathRoot(configuration, ForTestCompileRuntime.kotlinTestJarForTests());
}
else if (configurationKind.getWithMockRuntime()) {
JvmContentRootsKt.addJvmClasspathRoot(configuration, ForTestCompileRuntime.mockRuntimeJarForTests());
}
if (configurationKind.getWithReflection()) {
JvmContentRootsKt.addJvmClasspathRoot(configuration, ForTestCompileRuntime.reflectJarForTests());
}