Bug 161674

Summary: org.eclipse.jdt.core.tests.model.ReconcilerTests.testDeleteTwoMethods fails with IBM Java
Product: [Eclipse Project] JDT Reporter: Corey Ashford <cjashfor>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: VERIFIED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 3.3   
Target Milestone: 3.2.2   
Hardware: Power PC   
OS: Linux-GTK   
Whiteboard:
Attachments:
Description Flags
Adds new method that allows for multiple expected results and uses it. none

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.