Android test: tests with mock jdk now run with jdk annotations
This commit is contained in:
+1
-6
@@ -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<String> excludedFiles = SpecialFiles.getExcludedFiles();
|
||||
Set<String> filesCompiledWithoutStdLib = SpecialFiles.getFilesCompiledWithoutStdLib();
|
||||
Set<String> filesCompiledWithJUnit = SpecialFiles.getFilesCompiledWithJUnit();
|
||||
Set<String> 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);
|
||||
}
|
||||
|
||||
@@ -31,20 +31,13 @@ public class SpecialFiles {
|
||||
private static final Set<String> excludedFiles = Sets.newHashSet();
|
||||
private static final Set<String> filesCompiledWithoutStdLib = Sets.newHashSet();
|
||||
private static final Set<String> filesCompiledWithJUnit = Sets.newHashSet();
|
||||
private static final Set<String> filesCompiledWithExternalAnnotations = Sets.newHashSet();
|
||||
|
||||
static {
|
||||
fillExcludedFiles();
|
||||
fillFilesCompiledWithoutStdLib();
|
||||
fillFilesCompiledWithJUnit();
|
||||
fillFilesCompiledWithExternalAnnotations();
|
||||
}
|
||||
|
||||
|
||||
public static Set<String> getFilesCompiledWithExternalAnnotations() {
|
||||
return filesCompiledWithExternalAnnotations;
|
||||
}
|
||||
|
||||
public static Set<String> 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
|
||||
|
||||
Reference in New Issue
Block a user