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 26052 Details for
Bug 106834
IMethodBinding#isEqualTo(..) wrong with overloaded parameterized methods
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Regression test
patch_106834_tests_model.txt (text/plain), 3.13 KB, created by
Olivier Thomann
on 2005-08-12 11:33:50 EDT
(
hide
)
Description:
Regression test
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2005-08-12 11:33:50 EDT
Size:
3.13 KB
patch
obsolete
>Index: src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java,v >retrieving revision 1.168 >diff -u -r1.168 ASTConverter15Test.java >--- src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java 20 Jul 2005 18:27:51 -0000 1.168 >+++ src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java 12 Aug 2005 15:31:21 -0000 >@@ -39,7 +39,7 @@ > } > > static { >-// TESTS_NUMBERS = new int[] { 194 }; >+// TESTS_NUMBERS = new int[] { 195 }; > // TESTS_NAMES = new String[] {"test0189"}; > } > public static Test suite() { >@@ -5839,4 +5839,44 @@ > ArrayType arrayType = (ArrayType) type; > assertEquals("Should be 1", 1, arrayType.getDimensions()); > } >+ >+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=106834 >+ public void test0195() throws JavaModelException { >+ this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/); >+ String contents = >+ "public class X {\n" + >+ " <S extends Number, T> void take(S e, T f) {}\n" + >+ " <S extends Number, T> void take(T e, S f) {}\n" + >+ " <S extends Number, T extends S> void take(T e, S f) {}\n" + >+ "}"; >+ ASTNode node = buildAST( >+ contents, >+ this.workingCopy); >+ assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); >+ CompilationUnit unit = (CompilationUnit) node; >+ node = getASTNode(unit, 0, 0); >+ assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType()); >+ MethodDeclaration methodDeclaration = (MethodDeclaration) node; >+ IMethodBinding methodBinding = methodDeclaration.resolveBinding(); >+ >+ node = getASTNode(unit, 0, 1); >+ assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType()); >+ MethodDeclaration methodDeclaration2 = (MethodDeclaration) node; >+ IMethodBinding methodBinding2 = methodDeclaration2.resolveBinding(); >+ >+ node = getASTNode(unit, 0, 2); >+ assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType()); >+ MethodDeclaration methodDeclaration3 = (MethodDeclaration) node; >+ IMethodBinding methodBinding3 = methodDeclaration3.resolveBinding(); >+ >+ assertFalse("Bindings are equals", methodBinding.isEqualTo(methodBinding2)); >+ assertFalse("Bindings are equals", methodBinding2.isEqualTo(methodBinding)); >+ assertFalse("Bindings are equals", methodBinding3.isEqualTo(methodBinding)); >+ assertFalse("Bindings are equals", methodBinding3.isEqualTo(methodBinding2)); >+ assertFalse("Bindings are equals", methodBinding2.isEqualTo(methodBinding3)); >+ assertFalse("Bindings are equals", methodBinding.isEqualTo(methodBinding3)); >+ assertTrue("Bindings are not equals", methodBinding3.isEqualTo(methodBinding3)); >+ assertTrue("Bindings are not equals", methodBinding2.isEqualTo(methodBinding2)); >+ assertTrue("Bindings are not equals", methodBinding.isEqualTo(methodBinding)); >+ } > } >\ No newline at end of file
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 106834
:
26051
| 26052