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 junit.framework.Test;
|
||||
import junit.framework.TestCase;
|
||||
import junit.framework.TestResult;
|
||||
import junit.framework.TestSuite;
|
||||
import org.jetbrains.jet.compiler.CompileSession;
|
||||
import org.jetbrains.jet.lang.descriptors.ClassDescriptor;
|
||||
@@ -82,8 +81,7 @@ public class TestlibTest extends CodegenTestCase {
|
||||
TestCase.class.getClassLoader()));
|
||||
|
||||
JetTypeMapper typeMapper = new JetTypeMapper(classFileFactory.state.getStandardLibrary(), session.getMyBindingContext());
|
||||
MyTestSuite suite = new MyTestSuite();
|
||||
suite.setLoader(loader);
|
||||
TestSuite suite = new TestSuite("stdlib_test");
|
||||
try {
|
||||
for(JetFile jetFile : session.getSourceFileNamespaces()) {
|
||||
for(JetDeclaration decl : jetFile.getDeclarations()) {
|
||||
@@ -136,22 +134,4 @@ public class TestlibTest extends CodegenTestCase {
|
||||
super.setUp();
|
||||
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>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<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="library" name="junit 3.8" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user