aboutsummaryrefslogtreecommitdiffstats
path: root/tests/features1919
diff options
context:
space:
mode:
authorAlexander Kriegisch <Alexander@Kriegisch.name>2023-11-05 10:03:23 +0700
committerAlexander Kriegisch <Alexander@Kriegisch.name>2023-11-05 10:03:23 +0700
commit70f3c09bcdd80f682b098f22da8b6285211e46da (patch)
tree1587bbbd3259fd6ff70030ca0a6b6d6ff337a470 /tests/features1919
parentf0c0088286c17f8a5bf6fa8a00b01a7f46568cf4 (diff)
downloadaspectj-70f3c09bcdd80f682b098f22da8b6285211e46da.tar.gz
aspectj-70f3c09bcdd80f682b098f22da8b6285211e46da.zip
Enable some tests after J19 problems were fixed for J21
Two test classes which had redundant default clauses for switch with record patterns were copied from the java19 to the java21 directory and the redundant clauses deactivated, i.e. the test now run as originally intended. For older JDK versions, the old tests still stay active in order to document the old state of affairs. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Diffstat (limited to 'tests/features1919')
-rw-r--r--tests/features1919/java19/RecordPatternsPreview1ExhaustivenessAspect.aj6
-rw-r--r--tests/features1919/java19/RecordPatternsPreview1ExhaustivenessOK1.java6
2 files changed, 8 insertions, 4 deletions
diff --git a/tests/features1919/java19/RecordPatternsPreview1ExhaustivenessAspect.aj b/tests/features1919/java19/RecordPatternsPreview1ExhaustivenessAspect.aj
index 4fad25327..37c73788f 100644
--- a/tests/features1919/java19/RecordPatternsPreview1ExhaustivenessAspect.aj
+++ b/tests/features1919/java19/RecordPatternsPreview1ExhaustivenessAspect.aj
@@ -13,7 +13,8 @@ public aspect RecordPatternsPreview1ExhaustivenessAspect {
switch (pair) {
case Pair<I>(I i, C c) -> System.out.println("x");
case Pair<I>(I i, D d) -> System.out.println("y");
- // TODO: Remove redundant default clause when https://github.com/eclipse-jdt/eclipse.jdt.core/issues/455 has been fixed
+ // TODO: Remove redundant default clause when https://github.com/eclipse-jdt/eclipse.jdt.core/issues/455 has been fixed.
+ // Fixed since Java 21, see features1921/java21/RecordPatternsPreview1ExhaustivenessAspect.aj.
default -> System.out.println("z");
}
@@ -21,7 +22,8 @@ public aspect RecordPatternsPreview1ExhaustivenessAspect {
case Pair<I>(C c, I i) -> System.out.println("a");
case Pair<I>(D d, C c) -> System.out.println("b");
case Pair<I>(D d1, D d2) -> System.out.println("c");
- // TODO: remove redundant default clause when https://github.com/eclipse-jdt/eclipse.jdt.core/issues/455 has been fixed
+ // TODO: remove redundant default clause when https://github.com/eclipse-jdt/eclipse.jdt.core/issues/455 has been fixed.
+ // Fixed since Java 21, see features1921/java21/RecordPatternsPreview1ExhaustivenessAspect.aj.
default -> System.out.println("d");
}
}
diff --git a/tests/features1919/java19/RecordPatternsPreview1ExhaustivenessOK1.java b/tests/features1919/java19/RecordPatternsPreview1ExhaustivenessOK1.java
index e815c512d..1d1d9d4f3 100644
--- a/tests/features1919/java19/RecordPatternsPreview1ExhaustivenessOK1.java
+++ b/tests/features1919/java19/RecordPatternsPreview1ExhaustivenessOK1.java
@@ -10,7 +10,8 @@ public class RecordPatternsPreview1ExhaustivenessOK1 {
switch (p2) {
case Pair<I>(I i, C c) -> System.out.println("x");
case Pair<I>(I i, D d) -> System.out.println("y");
- // TODO: Remove redundant default clause when https://github.com/eclipse-jdt/eclipse.jdt.core/issues/455 has been fixed
+ // TODO: Remove redundant default clause when https://github.com/eclipse-jdt/eclipse.jdt.core/issues/455 has been fixed.
+ // Fixed since Java 21, see features1921/java21/RecordPatternsPreview1ExhaustivenessOK1.java.
default -> System.out.println("z");
}
@@ -18,7 +19,8 @@ public class RecordPatternsPreview1ExhaustivenessOK1 {
case Pair<I>(C c, I i) -> System.out.println("a");
case Pair<I>(D d, C c) -> System.out.println("b");
case Pair<I>(D d1, D d2) -> System.out.println("c");
- // TODO: remove redundant default clause when https://github.com/eclipse-jdt/eclipse.jdt.core/issues/455 has been fixed
+ // TODO: Remove redundant default clause when https://github.com/eclipse-jdt/eclipse.jdt.core/issues/455 has been fixed.
+ // Fixed since Java 21, see features1921/java21/RecordPatternsPreview1ExhaustivenessOK1.java.
default -> System.out.println("d");
}
}