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 47927 Details for
Bug 152725
[1.6][formatter] Code formatter does not format 1.5 code when source level is 1.6
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Regression tests for 3.2 maintenance branch
patch_152725_tests.txt (text/plain), 3.06 KB, created by
Olivier Thomann
on 2006-08-15 12:16:44 EDT
(
hide
)
Description:
Regression tests for 3.2 maintenance branch
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2006-08-15 12:16:44 EDT
Size:
3.06 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.191.4.3 >diff -u -r1.191.4.3 FormatterRegressionTests.java >--- src/org/eclipse/jdt/core/tests/formatter/FormatterRegressionTests.java 15 Aug 2006 16:16:20 -0000 1.191.4.3 >+++ src/org/eclipse/jdt/core/tests/formatter/FormatterRegressionTests.java 15 Aug 2006 16:19:59 -0000 >@@ -54,7 +54,7 @@ > private long time; > > static { >-// TESTS_NUMBERS = new int[] { 620 } ; >+// TESTS_NUMBERS = new int[] { 622 } ; > } > public static Test suite() { > return buildModelTestSuite(FormatterRegressionTests.class); >@@ -8808,4 +8808,26 @@ > JavaCore.setOptions(javaCoreOptions); > } > } >+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=152725 >+ public void test622() { >+ 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_6); >+ newJavaCoreOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_6); >+ newJavaCoreOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_6); >+ JavaCore.setOptions(newJavaCoreOptions); >+ >+ Map compilerOptions = new HashMap(); >+ compilerOptions.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_6); >+ compilerOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_6); >+ compilerOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_6); >+ DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences, compilerOptions); >+ runTest(codeFormatter, "test622", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$ >+ } finally { >+ JavaCore.setOptions(javaCoreOptions); >+ } >+ } > } >Index: workspace/Formatter/test622/A_out.java >=================================================================== >RCS file: workspace/Formatter/test622/A_out.java >diff -N workspace/Formatter/test622/A_out.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ workspace/Formatter/test622/A_out.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,6 @@ >+public enum Enum_16 { >+ ONE, TWO, THREE; >+ String foo(String str) { >+ return ""; >+ } >+} >Index: workspace/Formatter/test622/A_in.java >=================================================================== >RCS file: workspace/Formatter/test622/A_in.java >diff -N workspace/Formatter/test622/A_in.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ workspace/Formatter/test622/A_in.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,4 @@ >+public enum Enum_16 { >+ONE,TWO,THREE; >+String foo(String str){return"";} >+}
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 152725
:
47402
|
47926
| 47927