Re: early version of the XML Query Test Suite

Xavier Franc wriote
 >I think it would be better if results were presented in a form like
 >hereafter,
 >where each result item is labelled with its expected type.
 >
 ><result-items>
 ><item type="xs:decimal">-100000000000000000</item>
 ><item type="xs:decimal">-10000000000000000</item>
 ><item type="xs:decimal">-1000000000000000</item>
 >...
 ></result-items>

Michael Rys wrote:
> There is no serialization mandated that can produce such a result. The
> way to test for the type of the result is to use instance of.

You don't need to be able to serialize it, as long as the test driver
can map the above "annotated expected output" to a serialized form.
E.g. a trivial filter that removes the annotations.

Of course that doesn't give you very much - but it does allow a
test driver that *can* handle unserialized data model values to also
check the types.  Many implementations will provide a way to set
an unserialized result sequence, and in that case the suggested
annotated expected output can provide better testing.  In other
cases, it is still easy to just remove the annotations.
-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/

Received on Monday, 15 August 2005 22:07:12 UTC