diff --git a/compiler/android-tests/tests/org/jetbrains/jet/compiler/android/CodegenTestsOnAndroidGenerator.java b/compiler/android-tests/tests/org/jetbrains/jet/compiler/android/CodegenTestsOnAndroidGenerator.java index 8184c54aac5..8991b4226bb 100644 --- a/compiler/android-tests/tests/org/jetbrains/jet/compiler/android/CodegenTestsOnAndroidGenerator.java +++ b/compiler/android-tests/tests/org/jetbrains/jet/compiler/android/CodegenTestsOnAndroidGenerator.java @@ -55,6 +55,7 @@ public class CodegenTestsOnAndroidGenerator extends UsefulTestCase { private final String generatorName = "CodegenTestsOnAndroidGenerator"; private JetCoreEnvironment environmentWithMockJdk = JetTestUtils.createEnvironmentWithMockJdkAndIdeaAnnotations(myTestRootDisposable, ConfigurationKind.JDK_ONLY); + private JetCoreEnvironment environmentWithMockJdkAndExternalAnnotations = JetTestUtils.createEnvironmentWithMockJdkAndIdeaAnnotations(myTestRootDisposable, ConfigurationKind.JDK_AND_ANNOTATIONS); private JetCoreEnvironment environmentWithFullJdk = JetTestUtils.createEnvironmentWithFullJdk(myTestRootDisposable); private JetCoreEnvironment environmentWithFullJdkAndJUnit; @@ -135,6 +136,7 @@ public class CodegenTestsOnAndroidGenerator extends UsefulTestCase { Set excludedFiles = SpecialFiles.getExcludedFiles(); Set filesCompiledWithoutStdLib = SpecialFiles.getFilesCompiledWithoutStdLib(); Set filesCompiledWithJUnit = SpecialFiles.getFilesCompiledWithJUnit(); + Set filesCompiledWithExternalAnnotations = SpecialFiles.getFilesCompiledWithExternalAnnotations(); for (File file : files) { if (excludedFiles.contains(file.getName())) { continue; @@ -156,6 +158,9 @@ public class CodegenTestsOnAndroidGenerator extends UsefulTestCase { else if (filesCompiledWithJUnit.contains(file.getName())) { factory = getFactoryFromText(file.getAbsolutePath(), text, environmentWithFullJdkAndJUnit); } + else if (filesCompiledWithExternalAnnotations.contains(file.getName())) { + factory = getFactoryFromText(file.getAbsolutePath(), text, environmentWithMockJdkAndExternalAnnotations); + } else { factory = getFactoryFromText(file.getAbsolutePath(), text, environmentWithFullJdk); } diff --git a/compiler/android-tests/tests/org/jetbrains/jet/compiler/android/SpecialFiles.java b/compiler/android-tests/tests/org/jetbrains/jet/compiler/android/SpecialFiles.java index c396df5e23b..3ff4331ed04 100644 --- a/compiler/android-tests/tests/org/jetbrains/jet/compiler/android/SpecialFiles.java +++ b/compiler/android-tests/tests/org/jetbrains/jet/compiler/android/SpecialFiles.java @@ -31,11 +31,18 @@ public class SpecialFiles { private static final Set excludedFiles = Sets.newHashSet(); private static final Set filesCompiledWithoutStdLib = Sets.newHashSet(); private static final Set filesCompiledWithJUnit = Sets.newHashSet(); + private static final Set filesCompiledWithExternalAnnotations = Sets.newHashSet(); static { fillExcludedFiles(); fillFilesCompiledWithoutStdLib(); fillFilesCompiledWithJUnit(); + fillFilesCompiledWithExternalAnnotations(); + } + + + public static Set getFilesCompiledWithExternalAnnotations() { + return filesCompiledWithExternalAnnotations; } public static Set getFilesCompiledWithJUnit() { @@ -49,15 +56,18 @@ public class SpecialFiles { public static Set getFilesCompiledWithoutStdLib() { return filesCompiledWithoutStdLib; } - + private static void fillFilesCompiledWithJUnit() { filesCompiledWithJUnit.add("kt2334.kt"); } + private static void fillFilesCompiledWithExternalAnnotations() { + filesCompiledWithExternalAnnotations.add("kt1980.kt"); + } + private static void fillFilesCompiledWithoutStdLib() { filesCompiledWithoutStdLib.add("kt1953_class.kt"); // Exception in code filesCompiledWithoutStdLib.add("basicmethodSuperClass.jet"); // Exception in code - filesCompiledWithoutStdLib.add("kt1980.kt"); // OVERLOAD_RESOLUTION_AMBIGUITY filesCompiledWithoutStdLib.add("kt503.jet"); // OVERLOAD_RESOLUTION_AMBIGUITY filesCompiledWithoutStdLib.add("kt504.jet"); // OVERLOAD_RESOLUTION_AMBIGUITY filesCompiledWithoutStdLib.add("kt772.jet"); // OVERLOAD_RESOLUTION_AMBIGUITY