Re: QT3 to XSLT3 test conversion

> I propose to commit the "unfolded" version of the converted tests unless anyone objects.

I assume you mean in addition to the original tests?  If so, sounds great.

Thanks,
Josh


> On Jan 20, 2016, at 7:16 AM, Michael Kay <mike@saxonica.com> wrote:
> 
> I have modified the stylesheet for converting QT3 tests to XSLT3 tests by wrapping all string literals and numeric literals in a function call that is designed to force run-time evaluation. So the test
> 
> 2 + 2
> 
> becomes
> 
> unfolded:literal(2) + unfolded:literal(2)
> 
> where the function unfolded-literal is designed to prevent optimization by constant-folding (it returns the value of its argument provided the current date is after 2000-01-01).
> 
> The reason for doing this is that we were getting very poor coverage of some run-time paths in our product (for example, nearly all the casting tests are written to work on literals). This has nothing to do with W3C's requirements for demonstrating implementability, of course, but it has everything to do with the reason we invest in the test suite.
> 
> The augmentation of the query is done by using the XQueryX version of the tests as the source, and adding a couple of template rule overrides to the XQueryX-to-XQuery stylesheet. We've done the same thing in the past by internal mods to our parser but this is more reusable.
> 
> The conversion stylesheet does this extra step optionally based on parameters, but I propose to commit the "unfolded" version of the converted tests unless anyone objects.
> 
> Michael Kay
> Saxonica
> 

Received on Wednesday, 20 January 2016 15:37:11 UTC