diff --git a/compiler/tests/org/jetbrains/jet/codegen/TestlibTest.java b/compiler/tests/org/jetbrains/jet/codegen/TestlibTest.java index d30797cdb6c..67742df3558 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/TestlibTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/TestlibTest.java @@ -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());