Bug 161674 - org.eclipse.jdt.core.tests.model.ReconcilerTests.testDeleteTwoMethods fails with IBM Java
Summary: org.eclipse.jdt.core.tests.model.ReconcilerTests.testDeleteTwoMethods fails w...
Status: VERIFIED DUPLICATE of bug 161555
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: Power PC Linux-GTK
: P3 normal (vote)
Target Milestone: 3.2.2   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-19 21:12 EDT by Corey Ashford CLA
Modified: 2007-01-16 04:44 EST (History)
0 users

See Also:


Attachments
Adds new method that allows for multiple expected results and uses it. (2.31 KB, patch)
2006-10-19 21:17 EDT, Corey Ashford CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Corey Ashford CLA 2006-10-19 21:12:02 EDT
The reason it fails is because the delta of deleted methods comes out in order opposite of the expected order.  The test deletes the two methods foo and bar, and then looks to see if the delta has foo and bar in that particular order.  With IBM  java, they come out in the opposite order and because the test is so rigid, it fails the assertion.

I suspect that similar problems may eventually show up in other similar tests as well, but the IBM Java compiler isn't showing a different order for those so they pass.
Comment 1 Corey Ashford CLA 2006-10-19 21:17:14 EDT
Created attachment 52361 [details]
Adds new method that allows for multiple expected results and uses it.

This patch adds a new method, AbstractJavaModelTests.assertDeltas with a new formal parameter profile, which allows for multiple legal expected results.  If the actual matches any of the expected results, no error will occur.

This method is used in a modified testDeleteTwoMethods to look for both possible, legal deltas.
Comment 2 Olivier Thomann CLA 2006-10-19 21:33:36 EDT

*** This bug has been marked as a duplicate of 161555 ***
Comment 3 Maxime Daniel CLA 2007-01-16 04:44:34 EST
Verified for 3.2.2 using build M20070112-1200.