Project

Profile

Help

Bug #4976

closed

Inadequate bytecode testing: unfolded option on empty sequence

Added by Michael Kay over 1 year ago. Updated 2 months ago.

Status:
Resolved
Priority:
Low
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
2021-04-23
Due date:
% Done:

0%

Estimated time:
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

Description

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

Also available in: Atom PDF