Skip to content

Commit 6493102

Browse files
committed
7167356: (javac) investigate failing tests in JavacParserTest
Backport-of: 07fb4f9a0bb4ed9d0f359b85fe0b0c38503ab9a5
1 parent 71471c1 commit 6493102

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

test/langtools/tools/javac/parser/JavacParserTest.java

+4-6
Original file line numberDiff line numberDiff line change
@@ -859,11 +859,7 @@ public Void visitErroneous(ErroneousTree node, Void p) {
859859
+ expectedValues, values, expectedValues);
860860
}
861861

862-
/*
863-
* The following tests do not work just yet with nb-javac nor javac,
864-
* they need further investigation, see CR: 7167356
865-
*/
866-
862+
@Test
867863
void testPositionBrokenSource126732a() throws IOException {
868864
String[] commands = new String[]{
869865
"return Runnable()",
@@ -903,6 +899,7 @@ void testPositionBrokenSource126732a() throws IOException {
903899
}
904900
}
905901

902+
@Test
906903
void testPositionBrokenSource126732b() throws IOException {
907904
String[] commands = new String[]{
908905
"break",
@@ -944,6 +941,7 @@ void testPositionBrokenSource126732b() throws IOException {
944941
}
945942
}
946943

944+
@Test
947945
void testStartPositionEnumConstantInit() throws IOException {
948946

949947
String code = "package t; enum Test { AAA; }";
@@ -957,7 +955,7 @@ void testStartPositionEnumConstantInit() throws IOException {
957955
int start = (int) t.getSourcePositions().getStartPosition(cut,
958956
enumAAA.getInitializer());
959957

960-
assertEquals("testStartPositionEnumConstantInit", -1, start);
958+
assertEquals("testStartPositionEnumConstantInit", 23, start);
961959
}
962960

963961
@Test

0 commit comments

Comments
 (0)