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 11827 Details for
Bug 66216
Sort Members is broken.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
New regression tests. Apply on HEAD
patch_for_66216_tests.txt (text/plain), 6.48 KB, created by
Olivier Thomann
on 2004-06-09 15:31:45 EDT
(
hide
)
Description:
New regression tests. Apply on HEAD
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2004-06-09 15:31:45 EDT
Size:
6.48 KB
patch
obsolete
>Index: src/org/eclipse/jdt/core/tests/model/SortCompilationUnitElementsTests.java >=================================================================== >RCS file: /data/cvs/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/SortCompilationUnitElementsTests.java,v >retrieving revision 1.21 >diff -u -r1.21 SortCompilationUnitElementsTests.java >--- src/org/eclipse/jdt/core/tests/model/SortCompilationUnitElementsTests.java 17 Feb 2004 10:46:00 -0000 1.21 >+++ src/org/eclipse/jdt/core/tests/model/SortCompilationUnitElementsTests.java 9 Jun 2004 19:28:25 -0000 >@@ -10,8 +10,6 @@ > *******************************************************************************/ > package org.eclipse.jdt.core.tests.model; > >-import java.lang.reflect.Method; >- > import junit.framework.Test; > import junit.framework.TestSuite; > >@@ -72,19 +70,11 @@ > } > > public static Test suite() { >- TestSuite suite = new Suite(SortCompilationUnitElementsTests.class.getName()); >- > if (true) { >- Class c = SortCompilationUnitElementsTests.class; >- Method[] methods = c.getMethods(); >- for (int i = 0, max = methods.length; i < max; i++) { >- if (methods[i].getName().startsWith("test")) { //$NON-NLS-1$ >- suite.addTest(new SortCompilationUnitElementsTests(methods[i].getName())); >- } >- } >- } else { >- suite.addTest(new SortCompilationUnitElementsTests("test014")); //$NON-NLS-1$ >- } >+ return new Suite(SortCompilationUnitElementsTests.class); >+ } >+ TestSuite suite = new Suite(SortCompilationUnitElementsTests.class.getName()); >+ suite.addTest(new SortCompilationUnitElementsTests("test016")); //$NON-NLS-1$ > return suite; > } > public void tearDownSuite() throws Exception { >@@ -988,6 +978,174 @@ > " \n" + > " static int i; // end of static field declaration\n" + > " int j;\n" + >+ "}"; >+ sortUnit(this.getCompilationUnit("/P/src/X.java"), expectedResult); >+ } finally { >+ this.deleteFile("/P/src/X.java"); >+ } >+} >+/** >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=66216 >+ */ >+public void test016() throws CoreException { >+ try { >+ this.createFile( >+ "/P/src/X.java", >+ "public class X {\n" + >+ " \n" + >+ " public void c() {\n" + >+ " \n" + >+ " }\n" + >+ " \n" + >+ " public void b() {\n" + >+ " \n" + >+ " }\n" + >+ " \n" + >+ " public void a() {\n" + >+ " class E {\n" + >+ " // this is the line that breaks the Sort Members.\n" + >+ " // comment this fix the problem.\n" + >+ " int x, y;\n" + >+ " }\n" + >+ " \n" + >+ " \n" + >+ " new Object() {\n" + >+ " // it breaks in an anonymous class also.\n" + >+ " // comment this fix the problem.\n" + >+ " int x, y;\n" + >+ " }; \n" + >+ " \n" + >+ " \n" + >+ " class D {\n" + >+ " // this appears to break also.\n" + >+ " }\n" + >+ " } \n" + >+ " \n" + >+ " private class F {\n" + >+ " // but this works fine\n" + >+ " int x, y;\n" + >+ " }\n" + >+ "}" >+ ); >+ String expectedResult = >+ "public class X {\n" + >+ " \n" + >+ " private class F {\n" + >+ " // but this works fine\n" + >+ " int x, y;\n" + >+ " }\n" + >+ " \n" + >+ " public void a() {\n" + >+ " class E {\n" + >+ " // this is the line that breaks the Sort Members.\n" + >+ " // comment this fix the problem.\n" + >+ " int x, y;\n" + >+ " }\n" + >+ " \n" + >+ " \n" + >+ " new Object() {\n" + >+ " // it breaks in an anonymous class also.\n" + >+ " // comment this fix the problem.\n" + >+ " int x, y;\n" + >+ " }; \n" + >+ " \n" + >+ " \n" + >+ " class D {\n" + >+ " // this appears to break also.\n" + >+ " }\n" + >+ " } \n" + >+ " \n" + >+ " public void b() {\n" + >+ " \n" + >+ " }\n" + >+ " \n" + >+ " public void c() {\n" + >+ " \n" + >+ " }\n" + >+ "}"; >+ sortUnit(this.getCompilationUnit("/P/src/X.java"), expectedResult); >+ } finally { >+ this.deleteFile("/P/src/X.java"); >+ } >+} >+/** >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=66216 >+ */ >+public void test017() throws CoreException { >+ try { >+ this.createFile( >+ "/P/src/X.java", >+ "public class X {\n" + >+ " \n" + >+ " public void c() {\n" + >+ " \n" + >+ " }\n" + >+ " \n" + >+ " public void b() {\n" + >+ " \n" + >+ " }\n" + >+ " \n" + >+ " public void a() {\n" + >+ " class E {\n" + >+ " // this is the line that breaks the Sort Members.\n" + >+ " // comment this fix the problem.\n" + >+ " int x, y; // my comment\n" + >+ " }\n" + >+ " \n" + >+ " \n" + >+ " new Object() {\n" + >+ " // it breaks in an anonymous class also.\n" + >+ " // comment this fix the problem.\n" + >+ " int x, y; // my comment\n" + >+ " }; \n" + >+ " \n" + >+ " \n" + >+ " class D {\n" + >+ " // this appears to break also.\n" + >+ " }\n" + >+ " } \n" + >+ " \n" + >+ " private class F {\n" + >+ " // but this works fine\n" + >+ " int x, y;\n" + >+ " }\n" + >+ "}" >+ ); >+ String expectedResult = >+ "public class X {\n" + >+ " \n" + >+ " private class F {\n" + >+ " // but this works fine\n" + >+ " int x, y;\n" + >+ " }\n" + >+ " \n" + >+ " public void a() {\n" + >+ " class E {\n" + >+ " // this is the line that breaks the Sort Members.\n" + >+ " // comment this fix the problem.\n" + >+ " int x, y; // my comment\n" + >+ " }\n" + >+ " \n" + >+ " \n" + >+ " new Object() {\n" + >+ " // it breaks in an anonymous class also.\n" + >+ " // comment this fix the problem.\n" + >+ " int x, y; // my comment\n" + >+ " }; \n" + >+ " \n" + >+ " \n" + >+ " class D {\n" + >+ " // this appears to break also.\n" + >+ " }\n" + >+ " } \n" + >+ " \n" + >+ " public void b() {\n" + >+ " \n" + >+ " }\n" + >+ " \n" + >+ " public void c() {\n" + >+ " \n" + >+ " }\n" + > "}"; > sortUnit(this.getCompilationUnit("/P/src/X.java"), expectedResult); > } finally {
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 66216
:
11816
| 11827