Skip to content

Commit

Permalink
Improve rename tests so they can work with Javac too
Browse files Browse the repository at this point in the history
The current code being tested has syntax errors. Those errors prevents
Javac from properly setting up bindings (and it's not obvious that Javac
is more wrong than ECJ, so there are little chance Javac gets changed to
behave like ECJ).
Those syntax errors do not seem so relevant for the case being covered.
So we get rid of them to focus on the "correct" case and allow Javac to
work with it.
  • Loading branch information
mickaelistria authored and rgrunber committed Sep 4, 2024
1 parent 31ef430 commit a5ddf36
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ public void testRenameTypeParameterInMethod() throws JavaModelException, BadLoca
"package test1;\n",
"public class B<T> {\n",
" private T t;\n",
" public <U|* extends Number> inspect(U u) { return u; }\n",
" public <U|* extends Number> U inspect(U u) { return u; }\n",
"}\n"
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,7 @@ public void testRenameTypeParameterInMethod() throws JavaModelException, BadLoca
"package test1;\n",
"public class B<T> {\n",
" private T t;\n",
" public <U|* extends Number> inspect(U u) { return u; }\n",
" public <U|* extends Number> U inspect(U u) { return u; }\n",
"}\n"
};

Expand All @@ -791,7 +791,7 @@ public void testRenameTypeParameterInMethod() throws JavaModelException, BadLoca
"package test1;\n" +
"public class B<T> {\n" +
" private T t;\n" +
" public <UU extends Number> inspect(UU u) { return u; }\n" +
" public <UU extends Number> UU inspect(UU u) { return u; }\n" +
"}\n"
);
}
Expand Down

0 comments on commit a5ddf36

Please sign in to comment.