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 23102 Details for
Bug 100062
[formatting] Code formatter is broken on test case from bug 99999
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Corresponding regression test
patch_100062_tests.txt (text/plain), 3.18 KB, created by
Olivier Thomann
on 2005-06-14 16:34:53 EDT
(
hide
)
Description:
Corresponding regression test
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2005-06-14 16:34:53 EDT
Size:
3.18 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.163 >diff -u -r1.163 FormatterRegressionTests.java >--- src/org/eclipse/jdt/core/tests/formatter/FormatterRegressionTests.java 8 Jun 2005 23:04:47 -0000 1.163 >+++ src/org/eclipse/jdt/core/tests/formatter/FormatterRegressionTests.java 14 Jun 2005 20:34:33 -0000 >@@ -62,7 +62,7 @@ > return suite; > } > junit.framework.TestSuite suite = new Suite(FormatterRegressionTests.class.getName()); >- suite.addTest(new FormatterRegressionTests("test582")); //$NON-NLS-1$ >+ suite.addTest(new FormatterRegressionTests("test583")); //$NON-NLS-1$ > return suite; > } > >@@ -8152,4 +8152,27 @@ > JavaCore.setOptions(javaCoreOptions); > } > } >+ >+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=100062 >+ public void test583() { >+ 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, "test583", "A.java", CodeFormatter.K_COMPILATION_UNIT, false);//$NON-NLS-1$ //$NON-NLS-2$ >+ } finally { >+ JavaCore.setOptions(javaCoreOptions); >+ } >+ } > } >Index: workspace/Formatter/test583/A_in.java >=================================================================== >RCS file: workspace/Formatter/test583/A_in.java >diff -N workspace/Formatter/test583/A_in.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ workspace/Formatter/test583/A_in.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,7 @@ >+package p; >+public class X<T> { >+ public class B {} >+ public static void main (String[] args) { >+ p.X<?>.B[] b = new p.X<?>.B[1]; >+ } >+ } >Index: workspace/Formatter/test583/A_out.java >=================================================================== >RCS file: workspace/Formatter/test583/A_out.java >diff -N workspace/Formatter/test583/A_out.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ workspace/Formatter/test583/A_out.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,10 @@ >+package p; >+ >+public class X<T> { >+ public class B { >+ } >+ >+ public static void main(String[] args) { >+ p.X<?>.B[] b = new p.X<?>.B[1]; >+ } >+}
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 100062
: 23102 |
23103