Bug 153950

Summary: org.aspectj Restructure - Phase 2.1: Improve compiler test coverage
Product: [Tools] AspectJ Reporter: Matthew Webster <matthew_webster>
Component: BuildAssignee: aspectj inbox <aspectj-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3    
Version: DEVELOPMENT   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Matthew Webster CLA 2006-08-15 14:15:17 EDT
A recent discussion revealed that all compiler tests should be able to be run under any JDK. The harness looks in the test specification and skips a test if its requirements are not met e.g. options=”-1.5”. Unfortunately this approach causes problems when running under JUnit:
1. We need to compensate for this in AjcTestCase because the test method will proceed and we can get NPEs
2. Many tests perform additional logic
3. Currently large numbers of tests are excluded by JDK

Ideally we should be able to include all tests regardless of JDK so that the total number executed is always the same and consistent. However we need the convenience and flexibility of running a single test/testcase/suite within Eclipse (which can only be done today if the tests project is compiled with Java 5 because of XML). This means that even if we solve the problem of skipping tests we still need to separate those that need Java 5 so that the correct JDK is selected for the launch configuration.

One solution, as with other projects, is to create an org.aspectj.tests5 fragment which. This would share package names and XML specifications with the host but use a different JUnit testcase name e.g. XLint5Tests. Most tests would remain JDK 1.3 compatible.