From 1441f742bbd024bdc46063aa1e5976df5cf55e23 Mon Sep 17 00:00:00 2001 From: Natalia Date: Thu, 6 Sep 2012 12:44:49 +0400 Subject: [PATCH] Android test: tests with mock jdk now run with jdk annotations --- .../android/CodegenTestsOnAndroidGenerator.java | 7 +------ .../jetbrains/jet/compiler/android/SpecialFiles.java | 12 +----------- 2 files changed, 2 insertions(+), 17 deletions(-) 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 8991b4226bb..4b533e4787d 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 @@ -54,8 +54,7 @@ public class CodegenTestsOnAndroidGenerator extends UsefulTestCase { private final String baseTestClassName = "AbstractCodegenTestCaseOnAndroid"; 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 environmentWithMockJdk = JetTestUtils.createEnvironmentWithMockJdkAndIdeaAnnotations(myTestRootDisposable, ConfigurationKind.JDK_AND_ANNOTATIONS); private JetCoreEnvironment environmentWithFullJdk = JetTestUtils.createEnvironmentWithFullJdk(myTestRootDisposable); private JetCoreEnvironment environmentWithFullJdkAndJUnit; @@ -136,7 +135,6 @@ 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; @@ -158,9 +156,6 @@ 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 3ff4331ed04..4e41fa498b6 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,20 +31,13 @@ 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() { return filesCompiledWithJUnit; } @@ -61,11 +54,8 @@ public class SpecialFiles { filesCompiledWithJUnit.add("kt2334.kt"); } - private static void fillFilesCompiledWithExternalAnnotations() { - filesCompiledWithExternalAnnotations.add("kt1980.kt"); - } - private static void fillFilesCompiledWithoutStdLib() { + filesCompiledWithoutStdLib.add("kt1980.kt"); filesCompiledWithoutStdLib.add("kt1953_class.kt"); // Exception in code filesCompiledWithoutStdLib.add("basicmethodSuperClass.jet"); // Exception in code filesCompiledWithoutStdLib.add("kt503.jet"); // OVERLOAD_RESOLUTION_AMBIGUITY