Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Herrmann2017-11-05 22:48:41 +0000
committerStephan Herrmann2017-11-07 11:23:58 +0000
commit922e76f860ca2f7ff1a9623fc6eb87b3b2728f15 (patch)
treeed89ff12f23a248070cd28bfb57194bbb9f445f7 /org.eclipse.jdt.core.tests.builder
parent9e61b7501514d568abbf1508a9804ec6711f0eed (diff)
downloadeclipse.jdt.core-922e76f860ca2f7ff1a9623fc6eb87b3b2728f15.tar.gz
eclipse.jdt.core-922e76f860ca2f7ff1a9623fc6eb87b3b2728f15.tar.xz
eclipse.jdt.core-922e76f860ca2f7ff1a9623fc6eb87b3b2728f15.zip
Bug 486013: [1.9][tests] Test case issues
- support running all tests with -Dcompliance=9 Change-Id: Icb9770575b0e4faf11cad9d8c28238348297cec2
Diffstat (limited to 'org.eclipse.jdt.core.tests.builder')
-rw-r--r--org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/TestingEnvironment.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/TestingEnvironment.java b/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/TestingEnvironment.java
index e6d2a97da9..32e8febc70 100644
--- a/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/TestingEnvironment.java
+++ b/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/TestingEnvironment.java
@@ -199,11 +199,15 @@ public void addClassFolder(IPath projectPath, IPath classFolderPath, boolean isE
requiredComplianceFlag = AbstractCompilerTest.F_1_8;
compilerVersion = CompilerOptions.VERSION_1_8;
}
+ else if ("9".equals(compliance)) {
+ requiredComplianceFlag = AbstractCompilerTest.F_9;
+ compilerVersion = CompilerOptions.VERSION_9;
+ }
else if (!"1.4".equals(compliance) && !"1.3".equals(compliance)) {
throw new UnsupportedOperationException("Test framework doesn't support compliance level: " + compliance);
}
if (requiredComplianceFlag != 0) {
- if ((AbstractCompilerTest.getPossibleComplianceLevels() & requiredComplianceFlag) == 0)
+ if (CompilerOptions.versionToJdkLevel(System.getProperty("java.specification.version")) < requiredComplianceFlag)
throw new RuntimeException("This test requires a " + compliance + " JRE");
IJavaProject javaProject = JavaCore.create(project);
Map options = new HashMap();

Back to the top