From 07fb4f9a0bb4ed9d0f359b85fe0b0c38503ab9a5 Mon Sep 17 00:00:00 2001 From: "Archie L. Cobbs" Date: Mon, 6 Feb 2023 20:28:08 +0000 Subject: [PATCH] 7167356: (javac) investigate failing tests in JavacParserTest Reviewed-by: vromero --- test/langtools/tools/javac/parser/JavacParserTest.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/test/langtools/tools/javac/parser/JavacParserTest.java b/test/langtools/tools/javac/parser/JavacParserTest.java index 8781ccb4451..6e742d259a1 100644 --- a/test/langtools/tools/javac/parser/JavacParserTest.java +++ b/test/langtools/tools/javac/parser/JavacParserTest.java @@ -866,11 +866,7 @@ public class JavacParserTest extends TestCase { + expectedValues, values, expectedValues); } - /* - * The following tests do not work just yet with nb-javac nor javac, - * they need further investigation, see CR: 7167356 - */ - + @Test void testPositionBrokenSource126732a() throws IOException { String[] commands = new String[]{ "return Runnable()", @@ -910,6 +906,7 @@ public class JavacParserTest extends TestCase { } } + @Test void testPositionBrokenSource126732b() throws IOException { String[] commands = new String[]{ "break", @@ -951,6 +948,7 @@ public class JavacParserTest extends TestCase { } } + @Test void testStartPositionEnumConstantInit() throws IOException { String code = "package t; enum Test { AAA; }"; @@ -964,7 +962,7 @@ public class JavacParserTest extends TestCase { int start = (int) t.getSourcePositions().getStartPosition(cut, enumAAA.getInitializer()); - assertEquals("testStartPositionEnumConstantInit", -1, start); + assertEquals("testStartPositionEnumConstantInit", 23, start); } @Test