diff options
author | Jay Arthanareeswaran | 2019-10-25 11:19:04 +0000 |
---|---|---|
committer | Jay Arthanareeswaran | 2019-10-25 11:19:04 +0000 |
commit | 36720082d19ab84b6ffe9f7834b13ea59f77c7b7 (patch) | |
tree | 4dccab2704ab4ada6219ddcb8a034da1e5afa77b | |
parent | 813ec98c92f68db13e7a2878c71aba07c8f93493 (diff) | |
download | eclipse.jdt.core-36720082d19ab84b6ffe9f7834b13ea59f77c7b7.tar.gz eclipse.jdt.core-36720082d19ab84b6ffe9f7834b13ea59f77c7b7.tar.xz eclipse.jdt.core-36720082d19ab84b6ffe9f7834b13ea59f77c7b7.zip |
Bug 552388: Fix failing test with compliance specific expectationI20191026-1800I20191025-1805
Change-Id: Ic7cd48f69db5c23c09085175985352b231f85c32
Signed-off-by: Jay Arthanareeswaran <jarthana@in.ibm.com>
-rw-r--r-- | org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericsRegressionTest.java | 46 |
1 files changed, 35 insertions, 11 deletions
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericsRegressionTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericsRegressionTest.java index d687cd1c4d..3da8538480 100644 --- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericsRegressionTest.java +++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericsRegressionTest.java @@ -6536,6 +6536,40 @@ public void testBug552388() { "----------\n"); } public void testBug552388b() { + String output = this.complianceLevel > ClassFileConstants.JDK1_6 ? + "----------\n" + + "1. ERROR in A.java (at line 17)\n" + + " foo(l);\n" + + " ^^^\n" + + "The method foo(List<A<?>.C>) in the type A<T> is not applicable for the arguments (List<A<T>.C>)\n" + + "----------\n" + + "2. ERROR in A.java (at line 33)\n" + + " foo2(l); \n" + + " ^^^^\n" + + "The method foo2(List<A<?>>) in the type A<T> is not applicable for the arguments (List<A<T>>)\n" + + "----------\n" + : + "----------\n" + + "1. ERROR in A.java (at line 16)\n" + + " List<C> l = new ArrayList<>();\n" + + " ^^^^^^^^^\n" + + "\'<>\' operator is not allowed for source level below 1.7\n" + + "----------\n" + + "2. ERROR in A.java (at line 17)\n" + + " foo(l);\n" + + " ^^^\n" + + "The method foo(List<A<?>.C>) in the type A<T> is not applicable for the arguments (List<A<T>.C>)\n" + + "----------\n" + + "3. ERROR in A.java (at line 32)\n" + + " List<A<T>> l = new ArrayList<>();\n" + + " ^^^^^^^^^\n" + + "\'<>\' operator is not allowed for source level below 1.7\n" + + "----------\n" + + "4. ERROR in A.java (at line 33)\n" + + " foo2(l); \n" + + " ^^^^\n" + + "The method foo2(List<A<?>>) in the type A<T> is not applicable for the arguments (List<A<T>>)\n" + + "----------\n"; runNegativeTest( new String[] { "A.java", @@ -6577,17 +6611,7 @@ public void testBug552388b() { " \n" + "}\n" }, - "----------\n" + - "1. ERROR in A.java (at line 17)\n" + - " foo(l);\n" + - " ^^^\n" + - "The method foo(List<A<?>.C>) in the type A<T> is not applicable for the arguments (List<A<T>.C>)\n" + - "----------\n" + - "2. ERROR in A.java (at line 33)\n" + - " foo2(l); \n" + - " ^^^^\n" + - "The method foo2(List<A<?>>) in the type A<T> is not applicable for the arguments (List<A<T>>)\n" + - "----------\n"); + output); } } |