Bug 533884 - [10] var type in an enhanced for loop is not resolved
properly
- fix test c when running on JRE below 9
Change-Id: I92d9857a09fd222613335a636f65918348a32114
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 @@
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");
}