Inadequate bytecode testing: unfolded option on empty sequence
Many of the W3C test cases can be defeated by an optimiser that does early evaluation: for example all the starts-with tests in which one of the operands is an empty sequence actually write the operand as "()", which means there are no tests for the case where the operand value is found to be an empty sequence at run-time. We compensate for this with the -unfolded option in the test driver, which modifies the query so that literals are replaced by expressions that return the relevant value at run-time but cannot be eagerly evaluated.
But the -unfolded option has no effect on the literal value "()", because the mechanism relies on trace code injection, and the trace code injector is not called when we generate this expression. This means that the dynamic-empty-sequence case is often untested. This particularly affects tests for byte code generation.
Please register to edit this issue