Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 81436 Details for
Bug 207754
[AST][DOM] source range of ParenthesizedExpression does not include the parenthesis
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
test case for a)
fix_207754.txt (text/plain), 2.71 KB, created by
Benno Baumgartner
on 2007-10-29 07:18:24 EDT
(
hide
)
Description:
test case for a)
Filename:
MIME Type:
Creator:
Benno Baumgartner
Created:
2007-10-29 07:18:24 EDT
Size:
2.71 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.ui.tests >Index: ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest.java,v >retrieving revision 1.102 >diff -u -r1.102 CleanUpTest.java >--- ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest.java 12 Oct 2007 11:03:21 -0000 1.102 >+++ ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest.java 29 Oct 2007 11:17:58 -0000 >@@ -5077,7 +5077,7 @@ > > public void testRemoveParenthesisBug190188() throws Exception { > >- IPackageFragment pack1= fSourceFolder.createPackageFragment("test", false, null); >+ IPackageFragment pack1= fSourceFolder.createPackageFragment("test1", false, null); > StringBuffer buf= new StringBuffer(); > buf.append("package test1;\n"); > buf.append("public class E1 {\n"); >@@ -5085,7 +5085,7 @@ > buf.append(" (new Object()).toString();\n"); > buf.append(" }\n"); > buf.append("}\n"); >- ICompilationUnit cu1= pack1.createCompilationUnit("E.java", buf.toString(), false, null); >+ ICompilationUnit cu1= pack1.createCompilationUnit("E1.java", buf.toString(), false, null); > > enable(CleanUpConstants.EXPRESSIONS_USE_PARENTHESES); > enable(CleanUpConstants.EXPRESSIONS_USE_PARENTHESES_NEVER); >@@ -5101,6 +5101,32 @@ > assertRefactoringResultAsExpected(new ICompilationUnit[] { cu1 }, new String[] { buf.toString() }); > } > >+ public void testRemoveParenthesisBug207332() throws Exception { >+ >+ IPackageFragment pack1= fSourceFolder.createPackageFragment("test1", false, null); >+ StringBuffer buf= new StringBuffer(); >+ buf.append("package test1;\n"); >+ buf.append("public class E1 {\n"); >+ buf.append(" protected String foo(String string) {\n"); >+ buf.append(" return (\"\" + string + \"\") + (\"\");\n"); >+ buf.append(" }\n"); >+ buf.append("}\n"); >+ ICompilationUnit cu1= pack1.createCompilationUnit("E1.java", buf.toString(), false, null); >+ >+ enable(CleanUpConstants.EXPRESSIONS_USE_PARENTHESES); >+ enable(CleanUpConstants.EXPRESSIONS_USE_PARENTHESES_NEVER); >+ >+ buf= new StringBuffer(); >+ buf.append("package test1;\n"); >+ buf.append("public class E1 {\n"); >+ buf.append(" protected String foo(String string) {\n"); >+ buf.append(" return \"\" + string + \"\" + \"\";\n"); >+ buf.append(" }\n"); >+ buf.append("}\n"); >+ >+ assertRefactoringResultAsExpected(new ICompilationUnit[] { cu1 }, new String[] { buf.toString() }); >+ } >+ > public void testRemoveQualifier01() throws Exception { > IPackageFragment pack1= fSourceFolder.createPackageFragment("test1", false, null); > StringBuffer buf= new StringBuffer();
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 207754
: 81436 |
81468
|
81469
|
81740