From 91da7e4e1663c3f3a76527c5eede034f7403d3ac Mon Sep 17 00:00:00 2001 From: Maxim Shafirov Date: Fri, 3 Feb 2012 19:39:13 +0400 Subject: [PATCH] Hopefully, fix tests (they needn't to be executed actually) --- .../tests/org/jetbrains/jet/codegen/TestlibTest.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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());