diff --git a/build.xml b/build.xml
index 6f192bc1015..479e28cb07b 100644
--- a/build.xml
+++ b/build.xml
@@ -1051,7 +1051,7 @@
+ depends="builtins,stdlib,kotlin-test,core,reflection,pack-runtime,pack-runtime-sources,mock-runtime-for-test"/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/compiler/testData/diagnostics/tests/smartCasts/lambdaDeclaresAndModifiesWithDirectEq.txt b/compiler/testData/diagnostics/tests/smartCasts/lambdaDeclaresAndModifiesWithDirectEq.txt
index ec4095500ea..74aa1b3b0f6 100644
--- a/compiler/testData/diagnostics/tests/smartCasts/lambdaDeclaresAndModifiesWithDirectEq.txt
+++ b/compiler/testData/diagnostics/tests/smartCasts/lambdaDeclaresAndModifiesWithDirectEq.txt
@@ -6,8 +6,8 @@ public fun run(/*0*/ f: () -> kotlin.Unit): kotlin.Int
public final class My {
public constructor My()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
- public final fun foo(/*0*/ arg: kotlin.Int?): kotlin.Int
+ public final fun foo(/*0*/ arg: kotlin.Int?): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
- public final fun kotlin.Int?.bar(): kotlin.Int
+ public final fun kotlin.Int?.bar(): kotlin.Unit
}
diff --git a/compiler/tests/org/jetbrains/kotlin/checkers/KotlinMultiFileTestWithWithJava.java b/compiler/tests/org/jetbrains/kotlin/checkers/KotlinMultiFileTestWithWithJava.java
index cbc7a286eab..bce8685174c 100644
--- a/compiler/tests/org/jetbrains/kotlin/checkers/KotlinMultiFileTestWithWithJava.java
+++ b/compiler/tests/org/jetbrains/kotlin/checkers/KotlinMultiFileTestWithWithJava.java
@@ -79,7 +79,7 @@ public abstract class KotlinMultiFileTestWithWithJava extends KotlinLiteFi
@NotNull
protected CompilerConfiguration createCompilerConfiguration(File javaFilesDir) {
return KotlinTestUtils.compilerConfigurationForTests(
- ConfigurationKind.JDK_ONLY,
+ ConfigurationKind.MOCK_RUNTIME,
TestJdkKind.MOCK_JDK,
Collections.singletonList(KotlinTestUtils.getAnnotationsJar()),
Collections.singletonList(javaFilesDir)
diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/forTestCompile/ForTestCompileRuntime.java b/compiler/tests/org/jetbrains/kotlin/codegen/forTestCompile/ForTestCompileRuntime.java
index c299ccf0079..fc7698b9d9e 100644
--- a/compiler/tests/org/jetbrains/kotlin/codegen/forTestCompile/ForTestCompileRuntime.java
+++ b/compiler/tests/org/jetbrains/kotlin/codegen/forTestCompile/ForTestCompileRuntime.java
@@ -36,6 +36,11 @@ public class ForTestCompileRuntime {
return assertExists(new File("dist/kotlinc/lib/kotlin-runtime.jar"));
}
+ @NotNull
+ public static File mockRuntimeJarForTests() {
+ return assertExists(new File("dist/kotlin-mock-runtime-for-test.jar"));
+ }
+
@NotNull
public static File kotlinTestJarForTests() {
return assertExists(new File("dist/kotlinc/lib/kotlin-test.jar"));
diff --git a/compiler/tests/org/jetbrains/kotlin/test/ConfigurationKind.kt b/compiler/tests/org/jetbrains/kotlin/test/ConfigurationKind.kt
index ec877f3b8c3..fc4d6e19ff7 100644
--- a/compiler/tests/org/jetbrains/kotlin/test/ConfigurationKind.kt
+++ b/compiler/tests/org/jetbrains/kotlin/test/ConfigurationKind.kt
@@ -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),
}
diff --git a/compiler/tests/org/jetbrains/kotlin/test/KotlinTestUtils.java b/compiler/tests/org/jetbrains/kotlin/test/KotlinTestUtils.java
index b2f227e26ad..598848a2fde 100644
--- a/compiler/tests/org/jetbrains/kotlin/test/KotlinTestUtils.java
+++ b/compiler/tests/org/jetbrains/kotlin/test/KotlinTestUtils.java
@@ -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());
}