RE: Proposal for categorizing

What is currently in the schema is the ability to state as the immediate child of the <test> element as series of implementation conditionals that all must be true for the test to be appropriate.  For
example, if you have a test that requires DOM Level 2, an binding that uses signed numbers and an implementation that expand entity references, you could state that with:

<test name="mySampleTest">
	<hasFeature feature="Core" version="2.0"/>
	<signed/>
	<!--  not sure of the exact name, follows JAXP's naming  -->
	<expandsEntityReferences/>
	<!--  body of test follows    -->
</test>

These conditionals would result in a static method that could get called to determine if the test should be instantiated, something like:

static bool isApplicable(DocumentBuilderFactory* factory,DOMImplementation impl) {
	bool isApplicable = true;
	isApplicable &= impl.hasFeature("Core","2.0");
	//
	//   Java bindings are always signed	
	isApplicable &= true;
	isApplicable &= factory.expandsEntityReferences();
	return isApplicable;
}

If that method return false, then the test would not be added to the list of tests to be run for that particular implementation.

There isn't an equivalent of an explicit resultTesting attribute, however
you could infer it by looking at the presence of specific types of 
assertions in the test.

There is also a <metadata/> element that could contain arbitrary information
that is not essential to running the tests (such as authorship and
references to specific parts of the DOM spec) that we haven't fleshed
out yet.

Received on Wednesday, 13 June 2001 16:09:58 UTC