store CompilerDependencies in JetCoreEnvironment

This commit is contained in:
Stepan Koltsov
2012-05-01 22:59:42 +04:00
parent ba7a94e17d
commit b109ac5ad4
18 changed files with 48 additions and 50 deletions
@@ -21,7 +21,6 @@ import gnu.trove.THashSet;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
import org.jetbrains.jet.CompileCompilerDependenciesTest;
import org.jetbrains.jet.codegen.forTestCompile.ForTestCompileRuntime;
import org.jetbrains.jet.cli.jvm.compiler.CompileEnvironmentConfiguration;
import org.jetbrains.jet.cli.jvm.compiler.KotlinToJVMBytecodeCompiler;
@@ -32,8 +31,6 @@ import org.jetbrains.jet.lang.psi.JetDeclaration;
import org.jetbrains.jet.lang.psi.JetFile;
import org.jetbrains.jet.lang.resolve.BindingContext;
import org.jetbrains.jet.lang.resolve.DescriptorUtils;
import org.jetbrains.jet.lang.resolve.java.CompilerDependencies;
import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode;
import org.jetbrains.jet.lang.types.JetType;
import org.jetbrains.jet.parsing.JetParsingTest;
@@ -75,7 +72,6 @@ public class TestlibTest extends CodegenTestCase {
private TestSuite doBuildSuite() {
try {
CompilerDependencies compilerDependencies = CompileCompilerDependenciesTest.compilerDependenciesForTests(CompilerSpecialMode.REGULAR, false);
File junitJar = new File("libraries/lib/junit-4.9.jar");
if (!junitJar.exists()) {
@@ -84,14 +80,14 @@ public class TestlibTest extends CodegenTestCase {
myEnvironment.addToClasspath(junitJar);
myEnvironment.addToClasspath(compilerDependencies.getRuntimeJar());
myEnvironment.addToClasspath(myEnvironment.getCompilerDependencies().getRuntimeJar());
CoreLocalFileSystem localFileSystem = myEnvironment.getLocalFileSystem();
myEnvironment.addSources(localFileSystem.findFileByPath(JetParsingTest.getTestDataDir() + "/../../libraries/stdlib/test"));
myEnvironment.addSources(localFileSystem.findFileByPath(JetParsingTest.getTestDataDir() + "/../../libraries/kunit/src"));
GenerationState generationState = KotlinToJVMBytecodeCompiler
.analyzeAndGenerate(new CompileEnvironmentConfiguration(myEnvironment, compilerDependencies, MessageCollector.PLAIN_TEXT_TO_SYSTEM_ERR), false);
.analyzeAndGenerate(new CompileEnvironmentConfiguration(myEnvironment, MessageCollector.PLAIN_TEXT_TO_SYSTEM_ERR), false);
if (generationState == null) {
throw new RuntimeException("There were compilation errors");