inplace introduce: append semicolon if needed (to avoid parsing assignment as local variable)

This commit is contained in:
anna
2011-07-29 17:48:15 +04:00
parent df1e55e537
commit 0cb64bd6ae
10 changed files with 113 additions and 6 deletions

View File

@@ -41,6 +41,35 @@ public class InplaceIntroduceFieldTest extends AbstractInplaceIntroduceTest {
});
}
public void testBeforeAssignment() throws Exception {
doTest(new Pass<AbstractInplaceIntroducer>() {
@Override
public void pass(AbstractInplaceIntroducer inplaceIntroduceFieldPopup) {
}
});
}
public void testBeforeAssignmentReplaceAll() throws Exception {
doTest(new Pass<AbstractInplaceIntroducer>() {
@Override
public void pass(AbstractInplaceIntroducer inplaceIntroduceFieldPopup) {
inplaceIntroduceFieldPopup.setReplaceAllOccurrences(true);
}
});
}
public void testBeforeAssignmentReplaceAllCall() throws Exception {
doTest(new Pass<AbstractInplaceIntroducer>() {
@Override
public void pass(AbstractInplaceIntroducer inplaceIntroduceFieldPopup) {
inplaceIntroduceFieldPopup.setReplaceAllOccurrences(true);
}
});
}
public void testReplaceAll() throws Exception {
doTest(new Pass<AbstractInplaceIntroducer>() {