Skip to content

Commit

Permalink
[20][test] RecordPatternTests#test25 and #test28 failing when run wit…
Browse files Browse the repository at this point in the history
…h javac #786

The resolution for the time being is to skip both the tests for Javac Runs as Javac crashes with the given code.
  • Loading branch information
jarthana authored Feb 28, 2023
2 parents 0075a44 + 35748b7 commit 215fb88
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2534,6 +2534,9 @@ protected void runJavac(
if (newOptions.indexOf(" -implicit") < 0) {
newOptions = newOptions.concat(" -implicit:none");
}
if (classLibraries == null) {
classLibraries = this.classpaths;
}
if (classLibraries != null) {
List<String> filteredLibs = new ArrayList<>();
for (String lib : classLibraries) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,10 @@ public void test22() {
"two\n" +
"Returns: 0\n" +
"one\n" +
"Returns: 5");
"Returns: 5",
getCompilerOptions(true),
new String[] {"--enable-preview"},
JavacTestOptions.SKIP); // Javac crashes. Let's skip for no
}
// Nested record pattern with a method invocation in a 'when' clause
public void test23 () {
Expand Down Expand Up @@ -898,7 +901,6 @@ public void test25() {
this.extraLibPath,
JavaCore.VERSION_20,
true);
// new String[] {libPath}
this.runConformTest(
new String[] {
"p/X.java",
Expand All @@ -922,11 +924,9 @@ public void test25() {
+ "}\n"
},
"1",
null,
true,
getCompilerOptions(true),
new String[] {"--enable-preview"},
null,
null);
JavacTestOptions.SKIP); // Too complicated to pass extra lib to Javac, let's skip
} catch (IOException e) {
System.err.println("RecordPatternTest.test25() could not write to current working directory " + currentWorkingDirectoryPath);
} finally {
Expand Down Expand Up @@ -1058,12 +1058,7 @@ public void test28() {
+ "record ColoredPoint(Point p, Color c) {}\n"
+ "record Rectangle(ColoredPoint upperLeft, ColoredPoint lowerRight) {}"
},
"5",
null,
true,
new String[] {"--enable-preview"},
null,
null);
"5");
}
// Test that a simple type pattern dominates a following record pattern of the same type
public void test29() {
Expand Down

0 comments on commit 215fb88

Please sign in to comment.