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 22916 Details for
Bug 98378
[search] Can't find declarations in hierarchy of interface.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Test cases added to JavaSearchBugsTests
v00-model.txt (text/plain), 2.95 KB, created by
Frederic Fusier
on 2005-06-13 08:44:36 EDT
(
hide
)
Description:
Test cases added to JavaSearchBugsTests
Filename:
MIME Type:
Creator:
Frederic Fusier
Created:
2005-06-13 08:44:36 EDT
Size:
2.95 KB
patch
obsolete
>Index: src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests.java,v >retrieving revision 1.46 >diff -u -r1.46 JavaSearchBugsTests.java >--- src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests.java 8 Jun 2005 16:53:11 -0000 1.46 >+++ src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests.java 13 Jun 2005 12:41:11 -0000 >@@ -45,7 +45,7 @@ > // org.eclipse.jdt.internal.codeassist.SelectionEngine.DEBUG = true; > // TESTS_PREFIX = "testBug75816"; > // TESTS_NAMES = new String[] { "testBug82208_SearchAllTypeNames_CLASS" }; >-// TESTS_NUMBERS = new int[] { 96761, 96763 }; >+// TESTS_NUMBERS = new int[] { 98378 }; > // TESTS_RANGE = new int[] { 83304, -1 }; > } > >@@ -3556,4 +3556,50 @@ > deleteFolder(pathRef); > } > } >+ >+ /** >+ * Bug 98378: [search] does not find method references in anonymous class of imported jarred plugin >+ * @see "http://bugs.eclipse.org/bugs/show_bug.cgi?id=98378" >+ */ >+ public void testBug98378() throws CoreException { >+ workingCopies = new ICompilationUnit[2]; >+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b98378/X.java", >+ "package b98378;\n" + >+ "public class X implements java.lang.CharSequence {\n" + >+ " public int length() {\n" + >+ " return 1;\n" + >+ " }\n" + >+ "}" >+ ); >+ workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b98378/Y.java", >+ "package b98378;\n" + >+ "public class Y {\n" + >+ " public int length() {\n" + >+ " return -1;\n" + >+ " }\n" + >+ "}\n" >+ ); >+ String jclPath = getExternalJCLPathString("1.5"); >+ IType type = getClassFile("JavaSearchBugs", jclPath, "java.lang", "CharSequence.class").getType(); >+ IMethod method = type.getMethod("length", new String[] {}); >+ search(method, DECLARATIONS, SearchEngine.createHierarchyScope(type, this.wcOwner)); >+ this.discard = false; >+ assertSearchResults( >+ jclPath + " int java.lang.CharSequence.length() EXACT_MATCH\n" + >+ jclPath + " int java.lang.String.length() EXACT_MATCH" >+ ); >+ } >+ public void testBug98378b() throws CoreException { >+ assertNotNull("There should be working copies!", workingCopies); >+ assertEquals("Invalid number of working copies kept between tests!", 2, workingCopies.length); >+ String jclPath = getExternalJCLPathString("1.5"); >+ IType type = getClassFile("JavaSearchBugs", jclPath, "java.lang", "CharSequence.class").getType(); >+ IMethod method = type.getMethod("length", new String[] {}); >+ search(method, DECLARATIONS|IGNORE_DECLARING_TYPE|IGNORE_RETURN_TYPE, SearchEngine.createHierarchyScope(type, this.wcOwner)); >+ assertSearchResults( >+ "src/b98378/X.java int b98378.X.length() [length] EXACT_MATCH\n" + >+ jclPath + " int java.lang.CharSequence.length() EXACT_MATCH\n" + >+ jclPath + " int java.lang.String.length() EXACT_MATCH" >+ ); >+ } > }
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 98378
:
22914
| 22916 |
23039
|
23040