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 50218 Details for
Bug 157333
calling delete on enum constant deletes entire Enum
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Regression test
patch_157333_tests.txt (text/plain), 2.05 KB, created by
Olivier Thomann
on 2006-09-14 20:23:53 EDT
(
hide
)
Description:
Regression test
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2006-09-14 20:23:53 EDT
Size:
2.05 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/model/DeleteTests.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/DeleteTests.java,v >retrieving revision 1.18 >diff -u -r1.18 DeleteTests.java >--- src/org/eclipse/jdt/core/tests/model/DeleteTests.java 14 Sep 2006 23:49:11 -0000 1.18 >+++ src/org/eclipse/jdt/core/tests/model/DeleteTests.java 15 Sep 2006 00:27:06 -0000 >@@ -13,9 +13,6 @@ > import java.io.IOException; > > import org.eclipse.core.resources.*; >-import org.eclipse.core.resources.IFolder; >-import org.eclipse.core.resources.IWorkspaceRunnable; >-import org.eclipse.core.resources.ResourcesPlugin; > import org.eclipse.core.runtime.CoreException; > import org.eclipse.core.runtime.IProgressMonitor; > import org.eclipse.core.runtime.OperationCanceledException; >@@ -48,7 +45,7 @@ > // Use this static initializer to specify subset for tests > // All specified tests which do not belong to the class are skipped... > static { >-// TESTS_NAMES = new String[] { "testDeleteField4" }; >+// TESTS_NAMES = new String[] { "testDeleteField5" }; > // TESTS_NUMBERS = new int[] { 2, 12 }; > // TESTS_RANGE = new int[] { 16, -1 }; > } >@@ -458,6 +455,31 @@ > } > } > /** >+ * Delete enum >+ */ >+public void testDeleteField5() throws CoreException { >+ try { >+ this.createJavaProject("P1", new String[] {""}, new String[] {"JCL15_LIB"}, null, "", "1.5"); >+ createFile( >+ "P1/X.java", >+ "public enum X {\n" + >+ " A, B, C\n" + >+ "}" >+ ); >+ ICompilationUnit cu = getCompilationUnit("P1/X.java"); >+ IField field = cu.getType("X").getField("A"); >+ field.delete(false, null); >+ assertSourceEquals( >+ "Unexpected source", >+ "public enum X {\n" + >+ " B, C\n" + >+ "}", >+ cu.getSource()); >+ } finally { >+ deleteProject("P1"); >+ } >+} >+/** > * Ensures that an import declaration can be deleted. > */ > public void testDeleteImportDeclaration() throws CoreException {
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 157333
:
50217
| 50218