suite.addTestSuite(class) won't work if passed TestCase instance has TestCase.class loaded by different classloader. It does so very silently (this is a note to reified generics haters)
This commit is contained in:
@@ -74,11 +74,10 @@ public class TestlibTest extends CodegenTestCase {
|
|||||||
|
|
||||||
ClassFileFactory classFileFactory = session.generate();
|
ClassFileFactory classFileFactory = session.generate();
|
||||||
|
|
||||||
URLClassLoader dependenciesClassLoader = new URLClassLoader(new URL[] { junitJar.toURI().toURL() });
|
GeneratedClassLoader loader = new GeneratedClassLoader(
|
||||||
GeneratedClassLoader loader;
|
classFileFactory,
|
||||||
URLClassLoader parentClassLoader = new URLClassLoader(new URL[]{
|
new URLClassLoader(new URL[]{ForTestCompileStdlib.stdlibJarForTests().toURI().toURL(), junitJar.toURI().toURL()},
|
||||||
ForTestCompileStdlib.stdlibJarForTests().toURI().toURL()}, dependenciesClassLoader);
|
TestCase.class.getClassLoader()));
|
||||||
loader = new GeneratedClassLoader(classFileFactory, parentClassLoader);
|
|
||||||
|
|
||||||
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 TestSuite("StandardLibrary");
|
||||||
|
|||||||
Reference in New Issue
Block a user