Yet another attempt to fix tests
This commit is contained in:
@@ -90,13 +90,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());
|
||||||
TestSuite suite = new TestSuite("StandardLibrary") {
|
TestSuite suite = new MyTestSuite(loader);
|
||||||
@Override
|
|
||||||
public void run(TestResult result) {
|
|
||||||
super.run(result);
|
|
||||||
loader.dispose();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
try {
|
try {
|
||||||
for(JetFile jetFile : session.getSourceFileNamespaces()) {
|
for(JetFile jetFile : session.getSourceFileNamespaces()) {
|
||||||
for(JetDeclaration decl : jetFile.getDeclarations()) {
|
for(JetDeclaration decl : jetFile.getDeclarations()) {
|
||||||
@@ -149,4 +143,19 @@ public class TestlibTest extends CodegenTestCase {
|
|||||||
super.setUp();
|
super.setUp();
|
||||||
createEnvironmentWithFullJdk();
|
createEnvironmentWithFullJdk();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static class MyTestSuite extends TestSuite {
|
||||||
|
private final GeneratedClassLoader loader;
|
||||||
|
|
||||||
|
public MyTestSuite(GeneratedClassLoader loader) {
|
||||||
|
super("StandardLibrary");
|
||||||
|
this.loader = loader;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run(TestResult result) {
|
||||||
|
super.run(result);
|
||||||
|
loader.dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user