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 24477 Details for
Bug 100772
[1.5][search] Search for declarations in hierarchy reports too many matches
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Addtional test cases on JavaSearchBugsTests
v03-model.txt (text/plain), 10.37 KB, created by
Frederic Fusier
on 2005-07-08 12:05:05 EDT
(
hide
)
Description:
Addtional test cases on JavaSearchBugsTests
Filename:
MIME Type:
Creator:
Frederic Fusier
Created:
2005-07-08 12:05:05 EDT
Size:
10.37 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.48.2.1 >diff -u -r1.48.2.1 JavaSearchBugsTests.java >--- src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests.java 8 Jul 2005 11:27:17 -0000 1.48.2.1 >+++ src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests.java 8 Jul 2005 14:42:30 -0000 >@@ -44,9 +44,9 @@ > static { > // org.eclipse.jdt.internal.core.search.BasicSearchEngine.VERBOSE = true; > // org.eclipse.jdt.internal.codeassist.SelectionEngine.DEBUG = true; >-// TESTS_PREFIX = "testBug97547"; >+// TESTS_PREFIX = "testBug100772_MultipleClasses"; > // TESTS_NAMES = new String[] { "testBug100772_ClassAndSubclass04" }; >-// TESTS_NUMBERS = new int[] { 100695, 100772 }; >+// TESTS_NUMBERS = new int[] { 100772 }; > // TESTS_RANGE = new int[] { 83304, -1 }; > } > >@@ -3892,7 +3892,7 @@ > ); > IType type = workingCopies[0].getType("Test"); > IMethod method = type.getMethods()[0]; >- search(method, UI_DECLARATIONS, SearchEngine.createHierarchyScope(type)); >+ search(method, UI_DECLARATIONS); > this.discard = false; > assertSearchResults( > "src/b100772/Test.java void b100772.Test.foo(T) [foo] EXACT_MATCH\n" + >@@ -3904,7 +3904,7 @@ > assertEquals("Invalid number of working copies kept between tests!", 1, workingCopies.length); > IType type = workingCopies[0].getType("Test"); > IMethod method = type.getMethods()[0]; >- search(method, DECLARATIONS, SearchEngine.createHierarchyScope(type)); >+ search(method, DECLARATIONS); > this.discard = false; > assertSearchResults( > "src/b100772/Test.java void b100772.Test.foo(T) [foo] EXACT_MATCH\n" + >@@ -3916,7 +3916,7 @@ > assertEquals("Invalid number of working copies kept between tests!", 1, workingCopies.length); > IType type = workingCopies[0].getType("Test"); > IMethod method = type.getMethods()[1]; >- search(method, UI_DECLARATIONS, SearchEngine.createHierarchyScope(type)); >+ search(method, UI_DECLARATIONS); > this.discard = false; > assertSearchResults( > "src/b100772/Test.java void b100772.Test.foo(Class) [foo] EXACT_MATCH" >@@ -3928,7 +3928,7 @@ > assertEquals("Invalid number of working copies kept between tests!", 1, workingCopies.length); > IType type = workingCopies[0].getType("Sub"); > IMethod method = type.getMethods()[0]; >- search(method, UI_DECLARATIONS, SearchEngine.createHierarchyScope(type)); >+ search(method, UI_DECLARATIONS); > this.discard = false; > assertSearchResults( > "src/b100772/Test.java void b100772.Test.foo(T) [foo] EXACT_MATCH\n" + >@@ -3940,7 +3940,7 @@ > assertEquals("Invalid number of working copies kept between tests!", 1, workingCopies.length); > IType type = workingCopies[0].getType("Sub"); > IMethod method = type.getMethods()[1]; >- search(method, UI_DECLARATIONS, SearchEngine.createHierarchyScope(type)); >+ search(method, UI_DECLARATIONS); > assertSearchResults( > "src/b100772/Test.java void b100772.Sub.foo(Exception) [foo] EXACT_MATCH" > ); >@@ -3965,7 +3965,7 @@ > ); > IType type = workingCopies[0].getType("Test"); > IMethod method = type.getMethods()[0]; >- search(method, UI_DECLARATIONS, SearchEngine.createHierarchyScope(type)); >+ search(method, UI_DECLARATIONS); > this.discard = false; > assertSearchResults( > "src/b100772/Test.java void b100772.Test.foo(T) [foo] EXACT_MATCH\n" + >@@ -3978,7 +3978,7 @@ > assertEquals("Invalid number of working copies kept between tests!", 1, workingCopies.length); > IType type = workingCopies[0].getType("Test"); > IMethod method = type.getMethods()[0]; >- search(method, DECLARATIONS, SearchEngine.createHierarchyScope(type)); >+ search(method, DECLARATIONS); > this.discard = false; > assertSearchResults( > "src/b100772/Test.java void b100772.Test.foo(T) [foo] EXACT_MATCH\n" + >@@ -3991,7 +3991,7 @@ > assertEquals("Invalid number of working copies kept between tests!", 1, workingCopies.length); > IType type = workingCopies[0].getType("Test"); > IMethod method = type.getMethods()[1]; >- search(method, UI_DECLARATIONS, SearchEngine.createHierarchyScope(type)); >+ search(method, UI_DECLARATIONS); > this.discard = false; > assertSearchResults( > "src/b100772/Test.java void b100772.Test.foo(Class) [foo] EXACT_MATCH\n" + >@@ -4038,7 +4038,7 @@ > assertEquals("Invalid number of working copies kept between tests!", 1, workingCopies.length); > IType type = workingCopies[0].getType("X"); > IMethod method = type.getMethods()[1]; >- search(method, UI_DECLARATIONS, SearchEngine.createHierarchyScope(type)); >+ search(method, UI_DECLARATIONS); > this.discard = false; > assertSearchResults( > "src/b100772/Test.java void b100772.Test.foo(Class) [foo] EXACT_MATCH\n" + >@@ -4055,6 +4055,120 @@ > "src/b100772/Test.java void b100772.X.foo(Exception) [foo] EXACT_MATCH" > ); > } >+ public void testBug100772_MultipleClasses01() throws CoreException { >+ workingCopies = new ICompilationUnit[3]; >+ workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b100772/I.java", >+ "package b100772;\n" + >+ "public interface I<T> {\n" + >+ " public void foo(T t);\n" + >+ "}\n" + >+ "interface J extends I<String> {\n" + >+ " public void foo(String s);\n" + >+ "}\n" + >+ "class K implements J {\n" + >+ " public void foo(String s) {}\n" + >+ " public void foo(Exception e) {}\n" + >+ "}\n" >+ ); >+ workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b100772/X.java", >+ "package b100772;\n" + >+ "public class X<T> {\n" + >+ " public void foo(T t) {}\n" + >+ "}\n" + >+ "class Y extends X<String> {\n" + >+ " public void foo(String t) {}\n" + >+ " public void foo(Exception t) {}\n" + >+ "}\n" >+ ); >+ workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/b100772/Test.java", >+ "package b100772;\n" + >+ "public class Test<T> {\n" + >+ " public void foo(T t) {}\n" + >+ "}\n" + >+ "class Sub extends Test<String> {\n" + >+ " public void foo(String t) {}\n" + >+ " public void foo(Exception t) {}\n" + >+ "}\n" >+ ); >+ IType type = workingCopies[2].getType("Test"); >+ IMethod method = type.getMethods()[0]; >+ search(method, UI_DECLARATIONS); >+ this.discard = false; >+ assertSearchResults( >+ "src/b100772/I.java void b100772.I.foo(T) [foo] EXACT_MATCH\n" + >+ "src/b100772/I.java void b100772.J.foo(String) [foo] EXACT_MATCH\n" + >+ "src/b100772/I.java void b100772.K.foo(String) [foo] EXACT_MATCH\n" + >+ "src/b100772/Test.java void b100772.Test.foo(T) [foo] EXACT_MATCH\n" + >+ "src/b100772/Test.java void b100772.Sub.foo(String) [foo] EXACT_MATCH\n" + >+ "src/b100772/X.java void b100772.X.foo(T) [foo] EXACT_MATCH\n" + >+ "src/b100772/X.java void b100772.Y.foo(String) [foo] EXACT_MATCH" >+ ); >+ } >+ public void testBug100772_MultipleClasses02() throws CoreException { >+ assertNotNull("There should be working copies!", workingCopies); >+ assertEquals("Invalid number of working copies kept between tests!", 3, workingCopies.length); >+ IType type = workingCopies[2].getType("Test"); >+ IMethod method = type.getMethods()[0]; >+ search(method, UI_DECLARATIONS, SearchEngine.createHierarchyScope(type)); >+ this.discard = false; >+ assertSearchResults( >+ "src/b100772/Test.java void b100772.Test.foo(T) [foo] EXACT_MATCH\n" + >+ "src/b100772/Test.java void b100772.Sub.foo(String) [foo] EXACT_MATCH" >+ ); >+ } >+ public void testBug100772_MultipleClasses03() throws CoreException { >+ assertNotNull("There should be working copies!", workingCopies); >+ assertEquals("Invalid number of working copies kept between tests!", 3, workingCopies.length); >+ IType type = workingCopies[2].getType("Sub"); >+ IMethod method = type.getMethods()[0]; >+ search(method, UI_DECLARATIONS); >+ this.discard = false; >+ assertSearchResults( >+ "src/b100772/I.java void b100772.I.foo(T) [foo] EXACT_MATCH\n" + >+ "src/b100772/I.java void b100772.J.foo(String) [foo] EXACT_MATCH\n" + >+ "src/b100772/I.java void b100772.K.foo(String) [foo] EXACT_MATCH\n" + >+ "src/b100772/Test.java void b100772.Test.foo(T) [foo] EXACT_MATCH\n" + >+ "src/b100772/Test.java void b100772.Sub.foo(String) [foo] EXACT_MATCH\n" + >+ "src/b100772/X.java void b100772.X.foo(T) [foo] EXACT_MATCH\n" + >+ "src/b100772/X.java void b100772.Y.foo(String) [foo] EXACT_MATCH" >+ ); >+ } >+ public void testBug100772_MultipleClasses04() throws CoreException { >+ assertNotNull("There should be working copies!", workingCopies); >+ assertEquals("Invalid number of working copies kept between tests!", 3, workingCopies.length); >+ IType type = workingCopies[2].getType("Sub"); >+ IMethod method = type.getMethods()[0]; >+ search(method, UI_DECLARATIONS, SearchEngine.createHierarchyScope(type)); >+ this.discard = false; >+ assertSearchResults( >+ "src/b100772/Test.java void b100772.Test.foo(T) [foo] EXACT_MATCH\n" + >+ "src/b100772/Test.java void b100772.Sub.foo(String) [foo] EXACT_MATCH" >+ ); >+ } >+ public void testBug100772_MultipleClasses05() throws CoreException { >+ assertNotNull("There should be working copies!", workingCopies); >+ assertEquals("Invalid number of working copies kept between tests!", 3, workingCopies.length); >+ IType type = workingCopies[2].getType("Sub"); >+ IMethod method = type.getMethods()[1]; >+ search(method, UI_DECLARATIONS); >+ this.discard = false; >+ assertSearchResults( >+ "src/b100772/I.java void b100772.K.foo(Exception) [foo] EXACT_MATCH\n" + >+ "src/b100772/Test.java void b100772.Sub.foo(Exception) [foo] EXACT_MATCH\n" + >+ "src/b100772/X.java void b100772.Y.foo(Exception) [foo] EXACT_MATCH" >+ ); >+ } >+ public void testBug100772_MultipleClasses06() throws CoreException { >+ assertNotNull("There should be working copies!", workingCopies); >+ assertEquals("Invalid number of working copies kept between tests!", 3, workingCopies.length); >+ IType type = workingCopies[2].getType("Sub"); >+ IMethod method = type.getMethods()[1]; >+ search(method, UI_DECLARATIONS, SearchEngine.createHierarchyScope(type)); >+ this.discard = false; >+ assertSearchResults( >+ "src/b100772/Test.java void b100772.Sub.foo(Exception) [foo] EXACT_MATCH" >+ ); >+ } > public void testBug100772_Complex01() throws CoreException { > workingCopies = new ICompilationUnit[1]; > workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b100772/Test.java",
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 100772
:
23641
|
24462
|
24463
|
24476
| 24477