Re: X-Hive LS implementation report

Sander Bos wrote:

>
>Dear Curt,
>
>  
>
>>HasFeature04 and HasFeature05 will be modified to only be applicable 
>>when hasFeature("Core", "3.0") is true.  GetFeature02 already 
>>had that 
>>precondition.
>>    
>>
>
>I am not sure what is going on here now. I now have as HasFeature04.xml:
>
>  
>
I accidently introduced typos (apparently I'm not great early in the 
morning either) and have committed another set of changes to 
HasFeature04 and HasFeature05.

The test preconditions (that is the <implementationAttribute/> and 
<hasFeature/> that appear before the first variable definition result in 
code in the test constructor that will throw an exception if the 
precondition cannot be satisfied.  The generated constructor for 
GetFeature2 looks like:

   /**
    * Constructor
    * @param factory document factory, may not be null
    * @throws org.w3c.domts.DOMTestIncompatibleException Thrown if test 
is not compatible with parser configuration
    */
   public GetFeature2(DOMTestDocumentBuilderFactory factory)  throws 
org.w3c.domts.DOMTestIncompatibleException {
      super(factory);
      if (factory.hasFeature("Core", "3.0") != true) {
         throw new org.w3c.domts.DOMTestIncompatibleException("Core", 
"3.0");
      }
   }


If an exception is thrown in the test constructor, the test is not added 
to the test suite and does not count in the pass/fail counts.

Received on Tuesday, 30 December 2003 09:53:04 UTC