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 3347 - Tests expect FOAR0002 where it should be FOCA0002
Summary: Tests expect FOAR0002 where it should be FOCA0002
Status: CLOSED INVALID
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-06-18 20:15 UTC by Marc Van Cappellen
Modified: 2006-06-28 16:00 UTC (History)
1 user (show)

See Also:


Attachments

Description Marc Van Cappellen 2006-06-18 20:15:51 UTC
http://www.w3.org/TR/xquery-operators/#func-numeric-integer-divide says:

If the divisor is (positive or negative) zero, then an error is raised [err:FOAR0001]. If either operand is NaN or if $arg1 is INF or -INF then an error is raised [err:FOAR0002].

As such the following tests should expect FOCA0002 rather than FOAR0002.
K-NumericIntegerDivide-31.xq
K-NumericIntegerDivide-32.xq
K-NumericIntegerDivide-33.xq
K-NumericIntegerDivide-34.xq

Thanks,
Marc
Comment 1 Frans Englich 2006-06-27 15:21:32 UTC
Hi Marc,

I'm having a hard time following here. Here's the queries for the tests:

K-NumericIntegerDivide-31: 1 idiv xs:float("NaN")
K-NumericIntegerDivide-32: xs:float("NaN") idiv 1
K-NumericIntegerDivide-33: xs:float("INF") idiv xs:float(3)
K-NumericIntegerDivide-34: xs:float("-INF") idiv xs:float(3)

All these four currently expect FOAR0002, only.

In the first two, one of the operands is NaN, and in the second two one of the operands is negative/positive infinity. Therefore, I find FOAR0002 justified, because: "If either operand is NaN or if $arg1 is INF or -INF then an error is raised [err:FOAR0002]."

But that's exactly what you quoted, so I'm confused. None of the operands are "(positive or negative) zero" so FOAR0001 is ruled out. How do you reach the conclusion that FOCA0002 should be issued, instead of FOAR0002?

Thanks for the report.

Frans
Comment 2 Marc Van Cappellen 2006-06-28 07:08:25 UTC
Frans,

I understand you're having a hard time to understand.
Don't know what I was going on in my brain, but I guess I was really confusing myself.

I have marked this bug as INVALID and appologize for the "noise".

Tx,
Marc
Comment 3 Frans Englich 2006-06-28 16:00:19 UTC
No problem at all.

Changing status to CLOSED.