Give up on cleaning loader properly
This commit is contained in:
Generated
-9
@@ -1,9 +0,0 @@
|
|||||||
<component name="libraryTable">
|
|
||||||
<library name="junit 3.8">
|
|
||||||
<CLASSES>
|
|
||||||
<root url="jar://$PROJECT_DIR$/ideaSDK/lib/junit.jar!/" />
|
|
||||||
</CLASSES>
|
|
||||||
<JAVADOC />
|
|
||||||
<SOURCES />
|
|
||||||
</library>
|
|
||||||
</component>
|
|
||||||
@@ -5,7 +5,6 @@ import com.intellij.openapi.vfs.local.CoreLocalFileSystem;
|
|||||||
import gnu.trove.THashSet;
|
import gnu.trove.THashSet;
|
||||||
import junit.framework.Test;
|
import junit.framework.Test;
|
||||||
import junit.framework.TestCase;
|
import junit.framework.TestCase;
|
||||||
import junit.framework.TestResult;
|
|
||||||
import junit.framework.TestSuite;
|
import junit.framework.TestSuite;
|
||||||
import org.jetbrains.jet.compiler.CompileSession;
|
import org.jetbrains.jet.compiler.CompileSession;
|
||||||
import org.jetbrains.jet.lang.descriptors.ClassDescriptor;
|
import org.jetbrains.jet.lang.descriptors.ClassDescriptor;
|
||||||
@@ -82,8 +81,7 @@ public class TestlibTest extends CodegenTestCase {
|
|||||||
TestCase.class.getClassLoader()));
|
TestCase.class.getClassLoader()));
|
||||||
|
|
||||||
JetTypeMapper typeMapper = new JetTypeMapper(classFileFactory.state.getStandardLibrary(), session.getMyBindingContext());
|
JetTypeMapper typeMapper = new JetTypeMapper(classFileFactory.state.getStandardLibrary(), session.getMyBindingContext());
|
||||||
MyTestSuite suite = new MyTestSuite();
|
TestSuite suite = new TestSuite("stdlib_test");
|
||||||
suite.setLoader(loader);
|
|
||||||
try {
|
try {
|
||||||
for(JetFile jetFile : session.getSourceFileNamespaces()) {
|
for(JetFile jetFile : session.getSourceFileNamespaces()) {
|
||||||
for(JetDeclaration decl : jetFile.getDeclarations()) {
|
for(JetDeclaration decl : jetFile.getDeclarations()) {
|
||||||
@@ -136,22 +134,4 @@ public class TestlibTest extends CodegenTestCase {
|
|||||||
super.setUp();
|
super.setUp();
|
||||||
createEnvironmentWithFullJdk();
|
createEnvironmentWithFullJdk();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static class MyTestSuite extends TestSuite {
|
|
||||||
private GeneratedClassLoader loader;
|
|
||||||
|
|
||||||
public MyTestSuite() {
|
|
||||||
super("StandardLibrary");
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLoader(GeneratedClassLoader loader) {
|
|
||||||
this.loader = loader;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void run(TestResult result) {
|
|
||||||
super.run(result);
|
|
||||||
loader.dispose();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
+9
-1
@@ -8,8 +8,16 @@
|
|||||||
</content>
|
</content>
|
||||||
<orderEntry type="inheritedJdk" />
|
<orderEntry type="inheritedJdk" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="module-library" exported="">
|
||||||
|
<library>
|
||||||
|
<CLASSES>
|
||||||
|
<root url="jar://$MODULE_DIR$/lib/junit-4.9.jar!/" />
|
||||||
|
</CLASSES>
|
||||||
|
<JAVADOC />
|
||||||
|
<SOURCES />
|
||||||
|
</library>
|
||||||
|
</orderEntry>
|
||||||
<orderEntry type="module" module-name="stdlib" exported="" />
|
<orderEntry type="module" module-name="stdlib" exported="" />
|
||||||
<orderEntry type="library" name="junit 3.8" level="project" />
|
|
||||||
</component>
|
</component>
|
||||||
</module>
|
</module>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user