Bug 198483

Summary: BuilderTests: need expectingUniqueCompiledClasses method
Product: [Eclipse Project] JDT Reporter: Walter Harley <eclipse>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: david_audel, Olivier_Thomann
Version: 3.3   
Target Milestone: 3.3.1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed patch to test code none

Description Walter Harley CLA 2007-08-01 02:58:30 EDT
Created attachment 75101 [details]
Proposed patch to test code

The jdt.core.tests.builder.BuilderTests base class contains various helpful utilities to test whether conditions have been met.  One such is expectingCompiledClasses(), which verifies that specific classes have been compiled.  It does this by using a CompilerRequestor to track compilation.

When annotation processing is active, files may be compiled multiple times during a single build.  But it would still be helpful to have a utility to verify that specific files have been compiled (at least once and possibly more than once).

This method could go in the APT test base, but it needs to call the private method expectingCompiling() in BuilderTests.  Rather than make that method protected, it seems to make sense to just add a expectingUniqueCompiledClasses() method to BuilderTests, so that other clients could use it if they want.

I will attach a proposed patch that does this.  If possible, it would be helpful to release this to both HEAD and 3.3.x maintenance branch, so that we can write new tests in both.
Comment 1 Olivier Thomann CLA 2007-08-02 22:54:56 EDT
Released for 3.4M1.
Released for 3.3.1.
Comment 2 Frederic Fusier CLA 2007-08-07 07:20:33 EDT
Code verified for 3.4M1 using build I20070806-1800.
Comment 3 David Audel CLA 2007-09-03 09:03:38 EDT
Verified for 3.3.1 using build M20070831-2000.