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 23730 Details for
Bug 101247
[formatter] Fails to format some labelled statements
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Corresponding regression test
patch_101230_tests.txt (text/plain), 3.19 KB, created by
Olivier Thomann
on 2005-06-22 10:11:37 EDT
(
hide
)
Description:
Corresponding regression test
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2005-06-22 10:11:37 EDT
Size:
3.19 KB
patch
obsolete
>Index: src/org/eclipse/jdt/core/tests/formatter/FormatterRegressionTests.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterRegressionTests.java,v >retrieving revision 1.164 >diff -u -r1.164 FormatterRegressionTests.java >--- src/org/eclipse/jdt/core/tests/formatter/FormatterRegressionTests.java 15 Jun 2005 14:54:33 -0000 1.164 >+++ src/org/eclipse/jdt/core/tests/formatter/FormatterRegressionTests.java 22 Jun 2005 14:11:10 -0000 >@@ -62,7 +62,7 @@ > return suite; > } > junit.framework.TestSuite suite = new Suite(FormatterRegressionTests.class.getName()); >- suite.addTest(new FormatterRegressionTests("test583")); //$NON-NLS-1$ >+ suite.addTest(new FormatterRegressionTests("test584")); //$NON-NLS-1$ > return suite; > } > >@@ -8175,4 +8175,27 @@ > JavaCore.setOptions(javaCoreOptions); > } > } >+ >+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=101230 >+ public void test584() { >+ Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings(); >+ DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options); >+ Hashtable javaCoreOptions = JavaCore.getOptions(); >+ try { >+ Hashtable newJavaCoreOptions = JavaCore.getOptions(); >+ newJavaCoreOptions.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_5); >+ newJavaCoreOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5); >+ newJavaCoreOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5); >+ JavaCore.setOptions(newJavaCoreOptions); >+ >+ Map compilerOptions = new HashMap(); >+ compilerOptions.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_5); >+ compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5); >+ compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5); >+ DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions); >+ runTest(codeFormatter, "test584", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$ >+ } finally { >+ JavaCore.setOptions(javaCoreOptions); >+ } >+ } > } >Index: workspace/Formatter/test584/A_in.java >=================================================================== >RCS file: workspace/Formatter/test584/A_in.java >diff -N workspace/Formatter/test584/A_in.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ workspace/Formatter/test584/A_in.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,6 @@ >+public class X { >+ public static void main(String[] args) { >+ if(true) throw new RuntimeException("X"); >+ loop: System.out.println("X"); >+ } >+ } >Index: workspace/Formatter/test584/A_out.java >=================================================================== >RCS file: workspace/Formatter/test584/A_out.java >diff -N workspace/Formatter/test584/A_out.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ workspace/Formatter/test584/A_out.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,7 @@ >+public class X { >+ public static void main(String[] args) { >+ if (true) >+ throw new RuntimeException("X"); >+ loop: System.out.println("X"); >+ } >+}
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 101247
:
23729
| 23730