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 3428 - alternate result for K-NumericAdd-40
Summary: alternate result for K-NumericAdd-40
Status: CLOSED FIXED
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: 0.9.4
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Frans Englich
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-06 00:25 UTC by Andrew Eisenberg
Modified: 2006-07-18 18:17 UTC (History)
0 users

See Also:


Attachments

Description Andrew Eisenberg 2006-07-06 00:25:35 UTC
This test case, () + (1, 2), expects the error XPTY0004. It should also allow the empty sequence as an expected result.

XQuery, in section 3.4, Arithmetic Expressions, says:

"If the atomized operand is an empty sequence, the result of the arithmetic expression is an empty sequence, and the implementation need not evaluate the other operand or apply the operator."
Comment 1 Frans Englich 2006-07-06 10:01:59 UTC
Fixed, by wrapping with fn:empty() and also allowing "true".

I did the same to K-NumericAdd-38 which differs from -40 by having the operands in the opposite order.

Feel free to change status to CLOSED if in agreement.