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 59286 Details for
Bug 124622
[formatter] Comments in switch-case wrong aligned in some cases
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Regression tests
patch_124622_tests.txt (text/plain), 6.08 KB, created by
Olivier Thomann
on 2007-02-19 12:33:47 EST
(
hide
)
Description:
Regression tests
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2007-02-19 12:33:47 EST
Size:
6.08 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/formatter/FormatterRegressionTests.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterRegressionTests.java,v >retrieving revision 1.207 >diff -u -r1.207 FormatterRegressionTests.java >--- src/org/eclipse/jdt/core/tests/formatter/FormatterRegressionTests.java 8 Feb 2007 15:16:59 -0000 1.207 >+++ src/org/eclipse/jdt/core/tests/formatter/FormatterRegressionTests.java 19 Feb 2007 17:31:48 -0000 >@@ -54,7 +54,7 @@ > private long time; > > static { >-// TESTS_NUMBERS = new int[] { 650 }; >+// TESTS_NUMBERS = new int[] { 141, 656, 657, 658 }; > // TESTS_RANGE = new int[] { 650, -1 }; > } > public static Test suite() { >@@ -1417,6 +1417,7 @@ > preferences.tab_char = DefaultCodeFormatterOptions.SPACE; > preferences.indent_switchstatements_compare_to_cases = false; > preferences.indent_switchstatements_compare_to_switch = false; >+ preferences.indent_breaks_compare_to_cases = false; > DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences); > runTest(codeFormatter, "test141", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$ > } >@@ -9214,4 +9215,28 @@ > DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences); > runTest(codeFormatter, "test655", "A.java");//$NON-NLS-1$ //$NON-NLS-2$ > } >+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=124622 >+ public void test656() { >+ final Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings(); >+ DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options); >+ DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences); >+ runTest(codeFormatter, "test656", "A.java");//$NON-NLS-1$ //$NON-NLS-2$ >+ } >+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=124622 >+ public void test657() { >+ final Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings(); >+ DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options); >+ DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences); >+ runTest(codeFormatter, "test657", "A.java");//$NON-NLS-1$ //$NON-NLS-2$ >+ } >+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=124622 >+ public void test658() { >+ DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings()); >+ preferences.tab_char = DefaultCodeFormatterOptions.SPACE; >+ preferences.indent_switchstatements_compare_to_cases = false; >+ preferences.indent_switchstatements_compare_to_switch = false; >+ preferences.indent_breaks_compare_to_cases = false; >+ DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences); >+ runTest(codeFormatter, "test658", "A.java");//$NON-NLS-1$ //$NON-NLS-2$ >+ } > } >Index: workspace/Formatter/test656/A_out.java >=================================================================== >RCS file: workspace/Formatter/test656/A_out.java >diff -N workspace/Formatter/test656/A_out.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ workspace/Formatter/test656/A_out.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,14 @@ >+public class Test { >+ public static void main(String[] args) { >+ switch (0) { >+ >+ /** My Comment */ >+ case 0: >+ break; >+ >+ /** My Comment */ >+ case 1: >+ break; >+ } >+ } >+} >Index: workspace/Formatter/test657/A_in.java >=================================================================== >RCS file: workspace/Formatter/test657/A_in.java >diff -N workspace/Formatter/test657/A_in.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ workspace/Formatter/test657/A_in.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,14 @@ >+public class Test { >+ public static void main(String[] args) { >+ switch (0) { >+ >+ /** My Comment */ >+ case 0: >+ return; >+ >+ /** My Comment */ >+ case 1: >+ break; >+ } >+ } >+} >Index: workspace/Formatter/test658/A_out.java >=================================================================== >RCS file: workspace/Formatter/test658/A_out.java >diff -N workspace/Formatter/test658/A_out.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ workspace/Formatter/test658/A_out.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,10 @@ >+package test1; >+public class A { >+ public void foo(int i) { >+ switch (x) { >+ case 1 : >+ break; >+ default : >+ } >+ } >+} >Index: workspace/Formatter/test658/A_in.java >=================================================================== >RCS file: workspace/Formatter/test658/A_in.java >diff -N workspace/Formatter/test658/A_in.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ workspace/Formatter/test658/A_in.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,10 @@ >+package test1; >+public class A { >+ public void foo(int i) { >+ switch (x) { >+ case 1 : >+ break; >+ default : >+ } >+ } >+} >Index: workspace/Formatter/test657/A_out.java >=================================================================== >RCS file: workspace/Formatter/test657/A_out.java >diff -N workspace/Formatter/test657/A_out.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ workspace/Formatter/test657/A_out.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,14 @@ >+public class Test { >+ public static void main(String[] args) { >+ switch (0) { >+ >+ /** My Comment */ >+ case 0: >+ return; >+ >+ /** My Comment */ >+ case 1: >+ break; >+ } >+ } >+} >Index: workspace/Formatter/test656/A_in.java >=================================================================== >RCS file: workspace/Formatter/test656/A_in.java >diff -N workspace/Formatter/test656/A_in.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ workspace/Formatter/test656/A_in.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,14 @@ >+public class Test { >+ public static void main(String[] args) { >+ switch (0) { >+ >+ /** My Comment */ >+ case 0: >+ break; >+ >+ /** My Comment */ >+ case 1: >+ break; >+ } >+ } >+}
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 124622
:
59285
| 59286