aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Herrmann2018-04-24 05:57:35 -0400
committerStephan Herrmann2018-04-24 06:00:33 -0400
commit99ddc081d78986e26b6b8dc6de9550825324c529 (patch)
tree4dc4bf66222422a7a73932cc288a0d4fadd3b13d /org.eclipse.jdt.core.tests.model
parent74d3bf3304f82a48f3c1a8d63f1abcde3c2c4533 (diff)
downloadeclipse.jdt.core-master.zip
eclipse.jdt.core-master.tar.gz
eclipse.jdt.core-master.tar.xz
Bug 533884 - [10] var type in an enhanced for loop is not resolvedHEADI20180425-0250I20180424-2000master
properly - fix test c when running on JRE below 9 Change-Id: I92d9857a09fd222613335a636f65918348a32114
Diffstat (limited to 'org.eclipse.jdt.core.tests.model')
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/TypeResolveTests.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/TypeResolveTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/TypeResolveTests.java
index 80f3795..1c3a336 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/TypeResolveTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/TypeResolveTests.java
@@ -1496,7 +1496,10 @@ public void testBug533884c() throws Exception {
IJavaElement[] elements = unit.codeSelect(source.lastIndexOf(select), select.length());
assertEquals("should not be empty", 1, elements.length);
ILocalVariable variable = (ILocalVariable) elements[0];
- assertEquals("incorrect type", "Ljava.io.FileInputStream;", variable.getTypeSignature());
+ if (isJRE9)
+ assertEquals("incorrect type", "Ljava.io.FileInputStream;", variable.getTypeSignature());
+ else
+ assertEquals("incorrect type", "LFileInputStream;", variable.getTypeSignature()); // unresolved because JRT lib not available
} finally {
deleteProject("P");
}