Bug 198483 - BuilderTests: need expectingUniqueCompiledClasses method
Summary: BuilderTests: need expectingUniqueCompiledClasses method
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.3.1   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-01 02:58 EDT by Walter Harley CLA
Modified: 2008-09-16 09:44 EDT (History)
2 users (show)

See Also:


Attachments
Proposed patch to test code (1.69 KB, patch)
2007-08-01 02:58 EDT, Walter Harley CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.