Hopefully, fix tests (they needn't to be executed actually)

This commit is contained in:
Maxim Shafirov
2012-02-03 19:39:13 +04:00
parent cc19a21ff3
commit 91da7e4e16
@@ -29,6 +29,14 @@ import java.util.Set;
public class TestlibTest extends CodegenTestCase {
public static Test suite() {
try {
Class.forName("test.collections.CollectionTest");
System.out.println("Tests in Kotlin found in classpath. This test suite shall not be run, since testlib tests will run normally.");
return new TestSuite("Empty.StandardLibrary");
}
catch (Throwable e) {
System.out.println("Tests in Kotlin haven't been found in classpath. This test suite is valid.");
}
return new TestlibTest().buildSuite();
}
@@ -78,7 +86,7 @@ public class TestlibTest extends CodegenTestCase {
final GeneratedClassLoader loader = new GeneratedClassLoader(
classFileFactory,
new URLClassLoader(new URL[]{ForTestCompileStdlib.stdlibJarForTests().toURI().toURL(), junitJar.toURI().toURL()},
new URLClassLoader(new URL[]{ForTestCompileStdlib.stdlibJarForTests().toURI().toURL()},
TestCase.class.getClassLoader()));
JetTypeMapper typeMapper = new JetTypeMapper(classFileFactory.state.getStandardLibrary(), session.getMyBindingContext());