Skip to content

Commit

Permalink
Remove some TODOs from Java feature tests
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Kriegisch <[email protected]>
  • Loading branch information
kriegaex committed Mar 23, 2024
1 parent 5a223d4 commit 6555674
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ 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.
// Fixed since Java 21, see features1921/java21/RecordPatternsPreview1ExhaustivenessAspect.aj.
default -> System.out.println("z");
}
Expand All @@ -22,7 +21,6 @@ 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.
// Fixed since Java 21, see features1921/java21/RecordPatternsPreview1ExhaustivenessAspect.aj.
default -> System.out.println("d");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ static void exhaustiveSwitch() {
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.
// Fixed since Java 21, see features1921/java21/RecordPatternsPreview1ExhaustivenessOK1.java.
default -> System.out.println("z");
}
Expand All @@ -19,7 +18,6 @@ static void exhaustiveSwitch() {
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.
// Fixed since Java 21, see features1921/java21/RecordPatternsPreview1ExhaustivenessOK1.java.
default -> System.out.println("d");
}
Expand Down
1 change: 0 additions & 1 deletion tests/features1921/java21/StringPatternsPreview1.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ public class StringPatternsPreview1 {
public static void main(String[] args) {
// Embedded expressions can be strings
String firstName = "Bill", lastName = "Duck";
// TODO: Due to https://github.com/eclipse-jdt/eclipse.jdt.core/issues/1719, this is currently rendered incorrectly
System.out.println(STR."\{firstName} \{lastName}");

// Embedded expressions can perform arithmetic
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ public void testNamedAspectWithSimpleMainMethod() {
runTest("named aspect with simple main method");
}

/**
* Still not implemented with the Java 21 release Eclipse 2023-12 (4.30),
* see <a href="https://github.com/eclipse-jdt/eclipse.jdt.core/issues/1106">GitHub issue 1106</a>.
*/
public void testUnnamedClassWithSimpleMainMethod() {
runTest("unnamed class with simple main method");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
<!-- Java 21 final, Java 17, 18, 19, 20 preview -->
<ajc-test dir="features1920/java20" vm="21" title="switch pattern matching preview 4 error">
<compile files="SwitchPatternPreview4Error.java" options="-21">
<!-- TODO: Add correct compiler error message, as soon as JDT Core supports it -->
<message kind="error" file="SwitchPatternPreview4Error.java" text="This case label is dominated by one of the preceding case labels"/>
</compile>
</ajc-test>
Expand Down Expand Up @@ -89,7 +88,6 @@
<!-- Java 21 final, Java 17, 18, 19, 20 preview -->
<ajc-test dir="features198/java17" vm="21" title="switch pattern matching error">
<compile files="SwitchPatternError.java" options="-21">
<!-- TODO: Add correct compiler error message, as soon as JDT Core supports it -->
<message kind="error" file="SwitchPatternError.java" text="This case label is dominated by one of the preceding case labels"/>
</compile>
</ajc-test>
Expand All @@ -105,7 +103,6 @@
<!-- Java 21 final, Java 17, 18, 19, 20 preview -->
<ajc-test dir="features1919/java19" vm="21" title="switch pattern matching preview 3 error 2">
<compile files="SwitchPatternPreview3Error2.java" options="-21">
<!-- TODO: Add correct compiler error message, as soon as JDT Core supports it -->
<message kind="error" file="SwitchPatternPreview3Error2.java" text="This case label is dominated by one of the preceding case labels"/>
</compile>
</ajc-test>
Expand Down Expand Up @@ -256,7 +253,6 @@
</ajc-test>

<!-- Java 21 preview -->
<!-- TODO: Activate after https://github.com/eclipse-jdt/eclipse.jdt.core/issues/893 is done -->
<ajc-test dir="features1921/java21" vm="21" title="unnamed patterns">
<compile files="UnnamedPatternsPreview1.java" options="--enable-preview -21"/>
<run class="UnnamedPatternsPreview1" vmargs="--enable-preview">
Expand All @@ -278,7 +274,6 @@
</ajc-test>

<!-- Java 21 preview -->
<!-- TODO: Activate after https://github.com/eclipse-jdt/eclipse.jdt.core/issues/893 is done -->
<ajc-test dir="features1921/java21" vm="21" title="unnamed patterns aspect">
<compile files="UnnamedPatternsPreview1Aspect.aj" options="--enable-preview -21"/>
<run class="UnnamedPatternsPreview1Aspect" vmargs="--enable-preview">
Expand Down Expand Up @@ -358,7 +353,6 @@
</ajc-test>

<!-- Java 21 preview -->
<!-- TODO: Activate after https://github.com/eclipse-jdt/eclipse.jdt.core/issues/1106 is done -->
<ajc-test dir="features1921/java21" vm="21" title="unnamed class with simple main method">
<compile files="UnnamedClassWithSimpleMainMethodPreview1.java" options="--enable-preview -21"/>
<run class="UnnamedClassWithSimpleMainMethodPreview1" vmargs="--enable-preview">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
<suite>

<!-- Java 22 final, 21 preview -->
<!-- TODO: Activate after https://github.com/eclipse-jdt/eclipse.jdt.core/issues/893 is done -->
<ajc-test dir="features1921/java21" vm="22" title="unnamed patterns">
<compile files="UnnamedPatternsPreview1.java" options="-22"/>
<run class="UnnamedPatternsPreview1">
Expand All @@ -42,7 +41,6 @@
</ajc-test>

<!-- Java 22 final, 21 preview -->
<!-- TODO: Activate after https://github.com/eclipse-jdt/eclipse.jdt.core/issues/893 is done -->
<ajc-test dir="features1921/java21" vm="22" title="unnamed patterns aspect">
<compile files="UnnamedPatternsPreview1Aspect.aj" options="-22"/>
<run class="UnnamedPatternsPreview1Aspect">
Expand Down Expand Up @@ -189,7 +187,6 @@
</ajc-test>

<!-- Java 21, 22 preview -->
<!-- TODO: Activate after https://github.com/eclipse-jdt/eclipse.jdt.core/issues/1106 is done -->
<ajc-test dir="features1921/java21" vm="22" title="unnamed class with simple main method">
<compile files="UnnamedClassWithSimpleMainMethodPreview1.java" options="-22 --enable-preview"/>
<run class="UnnamedClassWithSimpleMainMethodPreview1" vmargs="--enable-preview">
Expand Down

0 comments on commit 6555674

Please sign in to comment.