7167356: (javac) investigate failing tests in JavacParserTest

Reviewed-by: vromero
This commit is contained in:
Archie L. Cobbs 2023-02-06 20:28:08 +00:00 committed by Vicente Romero
parent 3ac2beddba
commit 07fb4f9a0b

View File

@ -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