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 26344 Details for
Bug 103466
Stack Overflow: Requesting Java AST from selection
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Regression test
patch103466_org.eclipse.jdt.core.tests.model.txt (text/plain), 3.34 KB, created by
Jerome Lanneluc
on 2005-08-22 11:23:46 EDT
(
hide
)
Description:
Regression test
Filename:
MIME Type:
Creator:
Jerome Lanneluc
Created:
2005-08-22 11:23:46 EDT
Size:
3.34 KB
patch
obsolete
>Index: src/org/eclipse/jdt/core/tests/model/NameLookupTests2.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/NameLookupTests2.java,v >retrieving revision 1.17 >diff -u -r1.17 NameLookupTests2.java >--- src/org/eclipse/jdt/core/tests/model/NameLookupTests2.java 22 Apr 2005 14:44:40 -0000 1.17 >+++ src/org/eclipse/jdt/core/tests/model/NameLookupTests2.java 22 Aug 2005 14:04:32 -0000 >@@ -10,15 +10,12 @@ > *******************************************************************************/ > package org.eclipse.jdt.core.tests.model; > >+import java.io.IOException; > import java.util.ArrayList; > > import org.eclipse.core.runtime.CoreException; > import org.eclipse.core.runtime.Path; > import org.eclipse.jdt.core.*; >-import org.eclipse.jdt.core.IClasspathEntry; >-import org.eclipse.jdt.core.IJavaProject; >-import org.eclipse.jdt.core.IPackageFragment; >-import org.eclipse.jdt.core.JavaCore; > import org.eclipse.jdt.internal.core.IJavaElementRequestor; > import org.eclipse.jdt.internal.core.JavaProject; > import org.eclipse.jdt.internal.core.NameLookup; >@@ -35,9 +32,20 @@ > super(name); > } > >+ // Use this static initializer to specify subset for tests >+ // All specified tests which do not belong to the class are skipped... >+ static { >+// org.eclipse.jdt.internal.core.search.matching.MatchLocator.PRINT_BUFFER = false; >+// TESTS_PREFIX = "testArray"; >+// TESTS_NAMES = new String[] { "testFindBinaryTypeWithDollarName" }; >+// TESTS_NUMBERS = new int[] { 8 }; >+// TESTS_RANGE = new int[] { 6, -1 }; >+ } >+ > public static Test suite() { >- return new Suite(NameLookupTests2.class); >+ return buildTestSuite(NameLookupTests2.class); > } >+ > private NameLookup getNameLookup(JavaProject project) throws JavaModelException { > return project.newNameLookup((WorkingCopyOwner)null); > } >@@ -191,7 +199,7 @@ > * Ensure that finding a package fragment with a working copy opened returns one element only > * (regression test for bug 89624 Open on selection proposes twice the same entry) > */ >-public void testFingPackageFragementWithWorkingCopy() throws CoreException { >+public void testFindPackageFragementWithWorkingCopy() throws CoreException { > this.workingCopies = new ICompilationUnit[1]; > try { > JavaProject project = (JavaProject)createJavaProject("P"); >@@ -213,6 +221,34 @@ > } > } > /* >+ * Ensure that a member type with a name ending with a dollar and a number is found >+ * (regression test for bug 103466 Stack Overflow: Requesting Java AST from selection) >+ */ >+public void testFindBinaryTypeWithDollarName() throws CoreException, IOException { >+ try { >+ IJavaProject project = createJavaProject("P"); >+ addLibrary(project, "lib.jar", "libsrc.zip", >+ new String[] { >+ "p/X.java", >+ "package p;\n" + >+ "public class X {\n" + >+ " public class $1 {\n" + >+ " public class $2 {\n" + >+ " }\n" + >+ " }\n" + >+ "}" >+ }, >+ "1.4"); >+ IType type = getNameLookup((JavaProject) project).findType("p.X$$1", false, NameLookup.ACCEPT_ALL); >+ assertTypesEqual( >+ "Unexpected type", >+ "p.X$$1\n", >+ new IType[] {type}); >+ } finally { >+ deleteProject("P"); >+ } >+} >+/* > * Performance test for looking up package fragments > * (see bug 72683 Slow code assist in Display view) > */
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 103466
:
26343
| 26344