Moved CompilerDependencies.findRtJar() method to PathUtil.

This commit is contained in:
Evgeny Gerashchenko
2012-07-04 15:27:10 +04:00
parent 701ddc6376
commit c833ca251f
5 changed files with 38 additions and 36 deletions
@@ -24,6 +24,7 @@ import org.jetbrains.jet.codegen.forTestCompile.ForTestCompileRuntime;
import org.jetbrains.jet.config.CompilerConfiguration;
import org.jetbrains.jet.lang.resolve.java.CompilerDependencies;
import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode;
import org.jetbrains.jet.utils.PathUtil;
import org.junit.Test;
import java.io.File;
@@ -57,7 +58,7 @@ public class CompileCompilerDependenciesTest {
public static CompilerDependencies compilerDependenciesForTests(@NotNull CompilerSpecialMode compilerSpecialMode, boolean mockJdk) {
return new CompilerDependencies(
compilerSpecialMode,
compilerSpecialMode.includeJdk() ? (mockJdk ? JetTestUtils.findMockJdkRtJar() : CompilerDependencies.findRtJar()) : null,
compilerSpecialMode.includeJdk() ? (mockJdk ? JetTestUtils.findMockJdkRtJar() : PathUtil.findRtJar()) : null,
compilerSpecialMode.includeJdkAnnotations() ? ForTestPackJdkAnnotations.jdkAnnotationsForTests() : null,
compilerSpecialMode.includeKotlinRuntime() ? ForTestCompileRuntime.runtimeJarForTests() : null);
}
@@ -65,7 +66,7 @@ public class CompileCompilerDependenciesTest {
public static CompilerConfiguration compilerConfigurationForTests(@NotNull CompilerSpecialMode compilerSpecialMode, boolean mockJdk) {
List<File> classpath = new ArrayList<File>();
if (compilerSpecialMode.includeJdk()) {
classpath.add(mockJdk ? JetTestUtils.findMockJdkRtJar() : CompilerDependencies.findRtJar());
classpath.add(mockJdk ? JetTestUtils.findMockJdkRtJar() : PathUtil.findRtJar());
}
if (compilerSpecialMode.includeKotlinRuntime()) {
classpath.add(ForTestCompileRuntime.runtimeJarForTests());