[Bug 21655] New: [QT3TS] K2-SeqExprCastable-3, 4

https://www.w3.org/Bugs/Public/show_bug.cgi?id=21655

            Bug ID: 21655
           Summary: [QT3TS] K2-SeqExprCastable-3, 4
    Classification: Unclassified
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XQuery 3 & XPath 3 Test Suite
          Assignee: oneil@saxonica.com
          Reporter: tim@cbcl.co.uk
        QA Contact: public-qt-comments@w3.org

XQuery 3.0 states that:

"The expression E castable as T returns true if the result of evaluating E can
be successfully cast into the target type T by using a cast expression;
otherwise it returns false. If evaluation of E fails with a dynamic error, the
castable expression returns false. The castable expression can be used as a
predicate to avoid errors at evaluation time. It can also be used to select an
appropriate type for processing of a given value, as illustrated in the
following example:"

Neither of the tests K2-SeqExprCastable-3 and -4 expect false, yet in each case
the argument to castable raises an error.


   <test-case name="K2-SeqExprCastable-3">
      <description> Combine operator div with castable as. </description>
      <created by="Frans Englich" on="2007-11-26"/>
      <test>(1 div 0) castable as xs:string</test>
      <result>
          <any-of>
            <assert-true/><!-- permitted by errors-and-optimization -->
            <error code="FOAR0001"/>
          </any-of>
      </result>
   </test-case>

   <test-case name="K2-SeqExprCastable-4">
      <description> Combine operator div with castable as(#2). </description>
      <created by="Frans Englich" on="2007-11-26"/>
      <test>concat("2007-01-3", 1 div 0) castable as xs:date</test>
      <result>
         <error code="FOAR0001"/>
      </result>
   </test-case>

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Wednesday, 10 April 2013 09:11:09 UTC