This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 4842 - [XQTS] Rounding of arguments to fn:subsequence not adequately tested
Summary: [XQTS] Rounding of arguments to fn:subsequence not adequately tested
Status: CLOSED FIXED
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: 1.0.2
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Frans Englich
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-09 15:32 UTC by Oliver Hallam
Modified: 2007-07-13 13:03 UTC (History)
0 users

See Also:


Attachments

Description Oliver Hallam 2007-07-09 15:32:44 UTC
Our implenetation of fn:subsequence was incorrectly using fs:ceiling rather than fs:round to round the arguments.  This was solving the problem in bug 4841, and with the adjusted formal semantics rules (in bug 4841) was not causing any tests to fail.

Perhaps a few more tests should be added to XQTS to check rounding of arguments, eg:

fn:subsequence((1,2,3), 1.1, 1) should give 1
fn:subsequence((1,2,3), 1.8, 1) should give 2
fn:subsequence((1,2,3), 1.4, 1.4) should give 1
fn:subsequence((1,2,3), 1.5, 1.5) should give (2, 3)
Comment 1 Oliver Hallam 2007-07-11 10:02:49 UTC
Also in relation to bug 4841, there is no test that tests a filter expression with a non integer predicate, such as the example given in FS 4.3.2:
//a[3.4] should return ()

and similarly (1,2,3,4,5)[3.4] should return ()
Comment 2 Frans Englich 2007-07-13 12:27:08 UTC
I've added the tests you suggested. XQTS_current.zip is updated.

If the resolution is satisfactory, feel free to change status to CLOSED.