[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    tests/kxpathtests/tests
From:       Frans Englich <frans.englich () telia ! com>
Date:       2006-05-31 22:04:02
Message-ID: 1149113042.686626.1496.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 547124 by englich:

More fixes from the Saxon runs.


 M  +4 -4      declarefunction.xml  
 M  +4 -5      functions-aggregate.xml  
 M  +11 -1     functions-qnames-constructors.xml  


--- trunk/tests/kxpathtests/tests/declarefunction.xml #547123:547124
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <test-collection xmlns="tag:kde.org,2004:KXQTS:InputCatalog">
-	<test-case type="ebv" description ="The 'XPath Data Types' namespace is not \
reserved." +	<test-case type="ebv" description ="The 'XPath Data Types' namespace is \
not reserved anymore, although it was in older drafts."  >declare namespace test = \
"http://www.w3.org/2005/xpath-datatypes";  declare function test:myFunction()
 		{ 1};
@@ -588,7 +588,7 @@
 	   description="A more realistic case involving fn:error()."
 >
 declare namespace my = "http://example.com/MyNamespace/";
-declare variable $my:error-qname := QName("my:qName", \
"http://example.com/MyErrorNS"); +declare variable $my:error-qname := \
QName("http://example.com/MyErrorNS", "my:qName");  
 declare function my:error($msg as xs:string) as empty-sequence()
 {
@@ -601,7 +601,7 @@
 	   description="A more realistic case involving fn:error(), #2."
 >
 declare namespace my = "http://example.com/MyNamespace/";
-declare variable $my:error-qname := QName("my:qName", \
"http://example.com/MyErrorNS"); +declare variable $my:error-qname := \
QName("http://example.com/MyErrorNS", "my:qName");  
 declare function my:error($choice, $msg as xs:string) as empty-sequence()
 {
@@ -617,7 +617,7 @@
 	   description="A more realistic case involving fn:error(), #3."
 >
 declare namespace my = "http://example.com/MyNamespace/";
-declare variable $my:error-qname := QName("my:qName", \
"http://example.com/MyErrorNS"); +declare variable $my:error-qname := \
QName("http://example.com/MyErrorNS", "my:qName");  
 declare function my:error($choice, $msg as xs:string) as empty-sequence()
 {
--- trunk/tests/kxpathtests/tests/functions-aggregate.xml #547123:547124
@@ -100,7 +100,7 @@
 		<test-case type="ebv">max((xs:untypedAtomic("3"), 1, 2)) instance of \
xs:double</test-case>  <test-case type="ebv">max((1, xs:float(2), \
xs:untypedAtomic("3"))) eq 3</test-case>  <test-case type="ebv">max((1, xs:float(2), \
                xs:untypedAtomic("3"))) instance of xs:double</test-case>
-		<test-case type="ebv">max((1, xs:float(2), xs:decimal(3))) instance of \
xs:decimal</test-case> +		<test-case type="ebv">max((1, xs:float(2), xs:decimal(3))) \
instance of xs:float</test-case>  <test-case type="ebv">max((1, \
xs:untypedAtomic("3"), xs:float(2))) instance of xs:double</test-case>  <test-case \
type="ebv">string(max((1, xs:untypedAtomic("NaN"), xs:float(2)))) eq \
"NaN"</test-case>  <test-case type="ebv">string(max((xs:float("NaN"), \
xs:untypedAtomic("3"), xs:float(2)))) eq "NaN"</test-case> @@ -132,15 +132,14 @@
 		<test-case errorCode="FORG0006" type="fail-statically"
 			>max(("a string", QName("example.com/", "ncname")))</test-case>
 		<test-case type="ebv">max((5, 5.0e0)) eq 5.0e0</test-case>
-		<!-- Unclear whether these are correct, await Michael
 		<test-case type="ebv">max((5, 5.0e0)) instance of xs:double</test-case>
+		<test-case type="ebv">max((5, 3.0e0)) instance of xs:integer</test-case>
 		<test-case type="ebv">max((5.0e0, 5)) instance of xs:double</test-case>
 		<test-case type="ebv">max((3, 5.0e0)) instance of xs:double</test-case>
 		<test-case type="ebv">max((5.0e0, 3)) instance of xs:double</test-case>
 		<test-case type="ebv">max((1, 1, 1, 1, 1.0)) instance of xs:decimal</test-case>
 		<test-case type="ebv">max((1.0, 1, 1, 1, 1)) instance of xs:decimal</test-case>
 		<test-case type="ebv">max((1.0, 1, 1.0, 1, 1)) instance of xs:decimal</test-case>
-		-->
 		<test-case type="ebv">max((5.0e0, 5)) eq 5.0e0</test-case>
 		<test-case type="ebv">max((3, 5.0e0)) eq 5.0e0</test-case>
 		<test-case type="ebv">max((5.0e0, 3)) eq 5.0e0</test-case>
@@ -174,13 +173,13 @@
 		<test-case type="ebv">min((xs:untypedAtomic("1"), 3, 2)) instance of \
xs:double</test-case>  <test-case type="ebv">min((3, xs:float(2), \
xs:untypedAtomic("1"))) eq 1</test-case>  <test-case type="ebv">min((3, xs:float(2), \
                xs:untypedAtomic("1"))) instance of xs:double</test-case>
-		<test-case type="ebv">min((1, xs:float(2), xs:decimal(3))) instance of \
xs:decimal</test-case> +		<test-case type="ebv">min((1, xs:float(2), xs:decimal(3))) \
instance of xs:float</test-case>  <test-case type="ebv">min((3, \
xs:untypedAtomic("1"), xs:float(2))) instance of xs:double</test-case>  <test-case \
type="ebv">string(min((1, xs:untypedAtomic("NaN"), xs:float(2)))) eq \
"NaN"</test-case>  <test-case type="ebv">string(min((xs:float("NaN"), \
xs:untypedAtomic("3"), xs:float(2)))) eq "NaN"</test-case>  <test-case \
type="ebv">min((xs:float("NaN"), xs:untypedAtomic("3"), xs:float(2)))  instance of \
                xs:float</test-case>
-		<test-case type="ebv">min((xs:float("NaN"), 1, 1, 2, xs:double("NaN"))) instance \
of xs:double</test-case> +		<test-case type="ebv">min((xs:float("NaN"), 1, 1, 2, \
xs:double("NaN"))) instance of xs:float</test-case>  <test-case \
type="ebv">min((xs:double("NaN"), 1, 1, 2, xs:float("NaN"))) instance of \
xs:double</test-case>  <test-case type="ebv">string(min((xs:double("NaN"), \
xs:double("NaN")))) eq "NaN"</test-case>  <test-case \
                type="ebv">string(min((xs:float("NaN"), xs:float("NaN")))) eq \
                "NaN"</test-case>
--- trunk/tests/kxpathtests/tests/functions-qnames-constructors.xml #547123:547124
@@ -23,7 +23,17 @@
 		<test-case errorCode="XPST0017" \
type="fail-statically">QName("http://www.example.com/"), "ncname", \
"error")</test-case>  <test-case \
type="ebv">QName("http://www.w3.org/2005/xpath-functions", "prefix:local")  eq \
                xs:QName("fn:local")</test-case>
-		<test-case errorCode="FOCA0002" \
type="fail-statically">QName("http://www.example.com/", "1asd:error")</test-case> \
+				<test-case description="A QName cannot start with a digit." \
+					errorCode="FOCA0002" type="fail-statically" \
+		>QName("http://www.example.com/", "1asd:error")</test-case> +
+		<test-case errorCode="FOCA0002" type="fail-statically"
+		>QName("", "error:ncname")</test-case>
+		<test-case errorCode="FOCA0002" type="fail-statically"
+		>QName((), "error:ncname")</test-case>
+
+	<test-case errorCode="FOCA0002" type="fail-statically" description="URI/QName \
arguments appearing in wrong order, leading to an invalid QName.">QName("my:qName", \
"http://example.com/MyErrorNS")</test-case> +
 		<test-case type="ebv">QName("", "local") eq xs:QName("local")</test-case>
 		<test-case type="ebv">QName((), "local") eq xs:QName("local")</test-case>
 		<test-case type="ebv">QName((), "prefix:local") eq xs:QName("local")</test-case>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic