leptris 1.9.231.1-arm-linux → 1.9.232.0-arm-linux
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +19 -0
- data/Rakefile +1 -1
- data/ext/leptris/native/native.c +35 -4
- data/lib/leptris/version.rb +1 -1
- data/lib/leptris/xml/ffi.rb +4 -0
- data/lib/leptris/xml/native.so +0 -0
- data/lib/leptris/xml/node.rb +28 -0
- data/lib/libleptris.so +0 -0
- data/vendor-src/README.md +1 -1
- data/vendor-src/libleptris/CHANGELOG.md +15 -0
- data/vendor-src/libleptris/CMakeLists.txt +1 -1
- data/vendor-src/libleptris/src/include/leptris/descriptor.h +5 -1
- data/vendor-src/libleptris/src/include/leptris.h +17 -0
- data/vendor-src/libleptris/src/leptris/descriptor/plan.c +26 -6
- data/vendor-src/libleptris/src/leptris/dom/node.c +24 -7
- data/vendor-src/libleptris/src/leptris/xpath/evaluator_operators.c +22 -8
- data/vendor-src/libleptris/src/leptris/xpath/functions.c +29 -8
- data/vendor-src/libleptris/src/leptris/xpath/functions_ext31.c +30 -1
- data/vendor-src/libleptris/src/leptris/xpath/parser.c +106 -6
- data/vendor-src/libleptris/test/abi/test_descriptor.cpp +68 -0
- data/vendor-src/libleptris/test/dom/test_dom.cpp +56 -0
- data/vendor-src/libleptris/test/xquery/qt3/fn/codepoints-to-string.xml +808 -0
- data/vendor-src/libleptris/test/xquery/qt3/fn/deep-equal.xml +2709 -0
- data/vendor-src/libleptris/test/xquery/qt3/fn/distinct-values.xml +1223 -0
- data/vendor-src/libleptris/test/xquery/qt3/fn/index-of.xml +493 -0
- data/vendor-src/libleptris/test/xquery/qt3/fn/insert-before.xml +399 -0
- data/vendor-src/libleptris/test/xquery/qt3/fn/remove.xml +480 -0
- data/vendor-src/libleptris/test/xquery/qt3/fn/reverse.xml +653 -0
- data/vendor-src/libleptris/test/xquery/qt3/fn/string-to-codepoints.xml +452 -0
- data/vendor-src/libleptris/test/xquery/qt3/fn/subsequence.xml +1041 -0
- data/vendor-src/libleptris/test/xquery/test_qt3.cpp +179 -1
- data/vendor-src/libleptris/test/xquery/test_xquery.cpp +27 -0
- data/vendor-src/libleptris/vcpkg.json +1 -1
- metadata +11 -2
|
@@ -0,0 +1,1223 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="us-ascii"?>
|
|
2
|
+
<test-set xmlns="http://www.w3.org/2010/09/qt-fots-catalog" name="fn-distinct-values">
|
|
3
|
+
<description>Tests for the distinct-values() function</description>
|
|
4
|
+
<link type="spec" document="http://www.w3.org/TR/xpath-functions-30/"
|
|
5
|
+
idref="func-distinct-values"/>
|
|
6
|
+
|
|
7
|
+
<test-case name="fn-distinct-valuesint1args-1">
|
|
8
|
+
<description> Evaluates The "distinct-values" function with the arguments set as follows: $arg = xs:int(lower bound) </description>
|
|
9
|
+
<created by="Carmelo Montanez" on="2004-12-13"/>
|
|
10
|
+
<test>fn:distinct-values((xs:int("-2147483648")))</test>
|
|
11
|
+
<result>
|
|
12
|
+
<assert-eq>-2147483648</assert-eq>
|
|
13
|
+
</result>
|
|
14
|
+
</test-case>
|
|
15
|
+
|
|
16
|
+
<test-case name="fn-distinct-valuesint1args-2">
|
|
17
|
+
<description> Evaluates The "distinct-values" function with the arguments set as follows: $arg = xs:int(mid range) </description>
|
|
18
|
+
<created by="Carmelo Montanez" on="2004-12-13"/>
|
|
19
|
+
<test>fn:distinct-values((xs:int("-1873914410")))</test>
|
|
20
|
+
<result>
|
|
21
|
+
<assert-eq>-1873914410</assert-eq>
|
|
22
|
+
</result>
|
|
23
|
+
</test-case>
|
|
24
|
+
|
|
25
|
+
<test-case name="fn-distinct-valuesint1args-3">
|
|
26
|
+
<description> Evaluates The "distinct-values" function with the arguments set as follows: $arg = xs:int(upper bound) </description>
|
|
27
|
+
<created by="Carmelo Montanez" on="2004-12-13"/>
|
|
28
|
+
<test>fn:distinct-values((xs:int("2147483647")))</test>
|
|
29
|
+
<result>
|
|
30
|
+
<assert-eq>2147483647</assert-eq>
|
|
31
|
+
</result>
|
|
32
|
+
</test-case>
|
|
33
|
+
|
|
34
|
+
<test-case name="fn-distinct-valuesintg1args-1">
|
|
35
|
+
<description> Evaluates The "distinct-values" function with the arguments set as follows: $arg = xs:integer(lower bound) </description>
|
|
36
|
+
<created by="Carmelo Montanez" on="2004-12-13"/>
|
|
37
|
+
<test>fn:distinct-values((xs:integer("-999999999999999999")))</test>
|
|
38
|
+
<result>
|
|
39
|
+
<assert-eq>-999999999999999999</assert-eq>
|
|
40
|
+
</result>
|
|
41
|
+
</test-case>
|
|
42
|
+
|
|
43
|
+
<test-case name="fn-distinct-valuesintg1args-2">
|
|
44
|
+
<description> Evaluates The "distinct-values" function with the arguments set as follows: $arg = xs:integer(mid range) </description>
|
|
45
|
+
<created by="Carmelo Montanez" on="2004-12-13"/>
|
|
46
|
+
<test>fn:distinct-values((xs:integer("830993497117024304")))</test>
|
|
47
|
+
<result>
|
|
48
|
+
<assert-eq>830993497117024304</assert-eq>
|
|
49
|
+
</result>
|
|
50
|
+
</test-case>
|
|
51
|
+
|
|
52
|
+
<test-case name="fn-distinct-valuesintg1args-3">
|
|
53
|
+
<description> Evaluates The "distinct-values" function with the arguments set as follows: $arg = xs:integer(upper bound) </description>
|
|
54
|
+
<created by="Carmelo Montanez" on="2004-12-13"/>
|
|
55
|
+
<test>fn:distinct-values((xs:integer("999999999999999999")))</test>
|
|
56
|
+
<result>
|
|
57
|
+
<assert-eq>999999999999999999</assert-eq>
|
|
58
|
+
</result>
|
|
59
|
+
</test-case>
|
|
60
|
+
|
|
61
|
+
<test-case name="fn-distinct-valuesdec1args-1">
|
|
62
|
+
<description> Evaluates The "distinct-values" function with the arguments set as follows: $arg = xs:decimal(lower bound) </description>
|
|
63
|
+
<created by="Carmelo Montanez" on="2004-12-13"/>
|
|
64
|
+
<test>fn:distinct-values((xs:decimal("-999999999999999999")))</test>
|
|
65
|
+
<result>
|
|
66
|
+
<assert-eq>-999999999999999999</assert-eq>
|
|
67
|
+
</result>
|
|
68
|
+
</test-case>
|
|
69
|
+
|
|
70
|
+
<test-case name="fn-distinct-valuesdec1args-2">
|
|
71
|
+
<description> Evaluates The "distinct-values" function with the arguments set as follows: $arg = xs:decimal(mid range) </description>
|
|
72
|
+
<created by="Carmelo Montanez" on="2004-12-13"/>
|
|
73
|
+
<test>fn:distinct-values((xs:decimal("617375191608514839")))</test>
|
|
74
|
+
<result>
|
|
75
|
+
<assert-eq>617375191608514839</assert-eq>
|
|
76
|
+
</result>
|
|
77
|
+
</test-case>
|
|
78
|
+
|
|
79
|
+
<test-case name="fn-distinct-valuesdec1args-3">
|
|
80
|
+
<description> Evaluates The "distinct-values" function with the arguments set as follows: $arg = xs:decimal(upper bound) </description>
|
|
81
|
+
<created by="Carmelo Montanez" on="2004-12-13"/>
|
|
82
|
+
<test>fn:distinct-values((xs:decimal("999999999999999999")))</test>
|
|
83
|
+
<result>
|
|
84
|
+
<assert-eq>999999999999999999</assert-eq>
|
|
85
|
+
</result>
|
|
86
|
+
</test-case>
|
|
87
|
+
|
|
88
|
+
<test-case name="fn-distinct-valuesdbl1args-1">
|
|
89
|
+
<description> Evaluates The "distinct-values" function with the arguments set as follows: $arg = xs:double(lower bound) </description>
|
|
90
|
+
<created by="Carmelo Montanez" on="2004-12-13"/>
|
|
91
|
+
<test>fn:distinct-values((xs:double("-1.7976931348623157E308")))</test>
|
|
92
|
+
<result>
|
|
93
|
+
<assert-eq>-1.7976931348623157E308</assert-eq>
|
|
94
|
+
</result>
|
|
95
|
+
</test-case>
|
|
96
|
+
|
|
97
|
+
<test-case name="fn-distinct-valuesdbl1args-2">
|
|
98
|
+
<description> Evaluates The "distinct-values" function with the arguments set as follows: $arg = xs:double(mid range) </description>
|
|
99
|
+
<created by="Carmelo Montanez" on="2004-12-13"/>
|
|
100
|
+
<test>fn:distinct-values((xs:double("0")))</test>
|
|
101
|
+
<result>
|
|
102
|
+
<assert-eq>0</assert-eq>
|
|
103
|
+
</result>
|
|
104
|
+
</test-case>
|
|
105
|
+
|
|
106
|
+
<test-case name="fn-distinct-valuesdbl1args-3">
|
|
107
|
+
<description> Evaluates The "distinct-values" function with the arguments set as follows: $arg = xs:double(upper bound) </description>
|
|
108
|
+
<created by="Carmelo Montanez" on="2004-12-13"/>
|
|
109
|
+
<test>fn:distinct-values((xs:double("1.7976931348623157E308")))</test>
|
|
110
|
+
<result>
|
|
111
|
+
<assert-eq>1.7976931348623157E308</assert-eq>
|
|
112
|
+
</result>
|
|
113
|
+
</test-case>
|
|
114
|
+
|
|
115
|
+
<test-case name="fn-distinct-valuesflt1args-1">
|
|
116
|
+
<description> Evaluates The "distinct-values" function with the arguments set as follows: $arg = xs:float(lower bound) </description>
|
|
117
|
+
<created by="Carmelo Montanez" on="2004-12-13"/>
|
|
118
|
+
<test>fn:distinct-values((xs:float("-3.4028235E38")))</test>
|
|
119
|
+
<result>
|
|
120
|
+
<assert-eq>xs:float("-3.4028235E38")</assert-eq>
|
|
121
|
+
</result>
|
|
122
|
+
</test-case>
|
|
123
|
+
|
|
124
|
+
<test-case name="fn-distinct-valuesflt1args-2">
|
|
125
|
+
<description> Evaluates The "distinct-values" function with the arguments set as follows: $arg = xs:float(mid range) </description>
|
|
126
|
+
<created by="Carmelo Montanez" on="2004-12-13"/>
|
|
127
|
+
<test>fn:distinct-values((xs:float("0")))</test>
|
|
128
|
+
<result>
|
|
129
|
+
<assert-eq>0</assert-eq>
|
|
130
|
+
</result>
|
|
131
|
+
</test-case>
|
|
132
|
+
|
|
133
|
+
<test-case name="fn-distinct-valuesflt1args-3">
|
|
134
|
+
<description> Evaluates The "distinct-values" function with the arguments set as follows: $arg = xs:float(upper bound) </description>
|
|
135
|
+
<created by="Carmelo Montanez" on="2004-12-13"/>
|
|
136
|
+
<test>fn:distinct-values((xs:float("3.4028235E38")))</test>
|
|
137
|
+
<result>
|
|
138
|
+
<assert-eq>xs:float("3.4028235E38")</assert-eq>
|
|
139
|
+
</result>
|
|
140
|
+
</test-case>
|
|
141
|
+
|
|
142
|
+
<test-case name="fn-distinct-valueslng1args-1">
|
|
143
|
+
<description> Evaluates The "distinct-values" function with the arguments set as follows: $arg = xs:long(lower bound) </description>
|
|
144
|
+
<created by="Carmelo Montanez" on="2004-12-13"/>
|
|
145
|
+
<test>fn:distinct-values((xs:long("-92233720368547758")))</test>
|
|
146
|
+
<result>
|
|
147
|
+
<assert-eq>-92233720368547758</assert-eq>
|
|
148
|
+
</result>
|
|
149
|
+
</test-case>
|
|
150
|
+
|
|
151
|
+
<test-case name="fn-distinct-valueslng1args-2">
|
|
152
|
+
<description> Evaluates The "distinct-values" function with the arguments set as follows: $arg = xs:long(mid range) </description>
|
|
153
|
+
<created by="Carmelo Montanez" on="2004-12-13"/>
|
|
154
|
+
<test>fn:distinct-values((xs:long("-47175562203048468")))</test>
|
|
155
|
+
<result>
|
|
156
|
+
<assert-eq>-47175562203048468</assert-eq>
|
|
157
|
+
</result>
|
|
158
|
+
</test-case>
|
|
159
|
+
|
|
160
|
+
<test-case name="fn-distinct-valueslng1args-3">
|
|
161
|
+
<description> Evaluates The "distinct-values" function with the arguments set as follows: $arg = xs:long(upper bound) </description>
|
|
162
|
+
<created by="Carmelo Montanez" on="2004-12-13"/>
|
|
163
|
+
<test>fn:distinct-values((xs:long("92233720368547758")))</test>
|
|
164
|
+
<result>
|
|
165
|
+
<assert-eq>92233720368547758</assert-eq>
|
|
166
|
+
</result>
|
|
167
|
+
</test-case>
|
|
168
|
+
|
|
169
|
+
<test-case name="fn-distinct-valuesusht1args-1">
|
|
170
|
+
<description> Evaluates The "distinct-values" function with the arguments set as follows: $arg = xs:unsignedShort(lower bound) </description>
|
|
171
|
+
<created by="Carmelo Montanez" on="2004-12-13"/>
|
|
172
|
+
<test>fn:distinct-values((xs:unsignedShort("0")))</test>
|
|
173
|
+
<result>
|
|
174
|
+
<assert-eq>0</assert-eq>
|
|
175
|
+
</result>
|
|
176
|
+
</test-case>
|
|
177
|
+
|
|
178
|
+
<test-case name="fn-distinct-valuesusht1args-2">
|
|
179
|
+
<description> Evaluates The "distinct-values" function with the arguments set as follows: $arg = xs:unsignedShort(mid range) </description>
|
|
180
|
+
<created by="Carmelo Montanez" on="2004-12-13"/>
|
|
181
|
+
<test>fn:distinct-values((xs:unsignedShort("44633")))</test>
|
|
182
|
+
<result>
|
|
183
|
+
<assert-eq>44633</assert-eq>
|
|
184
|
+
</result>
|
|
185
|
+
</test-case>
|
|
186
|
+
|
|
187
|
+
<test-case name="fn-distinct-valuesusht1args-3">
|
|
188
|
+
<description> Evaluates The "distinct-values" function with the arguments set as follows: $arg = xs:unsignedShort(upper bound) </description>
|
|
189
|
+
<created by="Carmelo Montanez" on="2004-12-13"/>
|
|
190
|
+
<test>fn:distinct-values((xs:unsignedShort("65535")))</test>
|
|
191
|
+
<result>
|
|
192
|
+
<assert-eq>65535</assert-eq>
|
|
193
|
+
</result>
|
|
194
|
+
</test-case>
|
|
195
|
+
|
|
196
|
+
<test-case name="fn-distinct-valuesnint1args-1">
|
|
197
|
+
<description> Evaluates The "distinct-values" function with the arguments set as follows: $arg = xs:negativeInteger(lower bound) </description>
|
|
198
|
+
<created by="Carmelo Montanez" on="2004-12-13"/>
|
|
199
|
+
<test>fn:distinct-values((xs:negativeInteger("-999999999999999999")))</test>
|
|
200
|
+
<result>
|
|
201
|
+
<assert-eq>-999999999999999999</assert-eq>
|
|
202
|
+
</result>
|
|
203
|
+
</test-case>
|
|
204
|
+
|
|
205
|
+
<test-case name="fn-distinct-valuesnint1args-2">
|
|
206
|
+
<description> Evaluates The "distinct-values" function with the arguments set as follows: $arg = xs:negativeInteger(mid range) </description>
|
|
207
|
+
<created by="Carmelo Montanez" on="2004-12-13"/>
|
|
208
|
+
<test>fn:distinct-values((xs:negativeInteger("-297014075999096793")))</test>
|
|
209
|
+
<result>
|
|
210
|
+
<assert-eq>-297014075999096793</assert-eq>
|
|
211
|
+
</result>
|
|
212
|
+
</test-case>
|
|
213
|
+
|
|
214
|
+
<test-case name="fn-distinct-valuesnint1args-3">
|
|
215
|
+
<description> Evaluates The "distinct-values" function with the arguments set as follows: $arg = xs:negativeInteger(upper bound) </description>
|
|
216
|
+
<created by="Carmelo Montanez" on="2004-12-13"/>
|
|
217
|
+
<test>fn:distinct-values((xs:negativeInteger("-1")))</test>
|
|
218
|
+
<result>
|
|
219
|
+
<assert-eq>-1</assert-eq>
|
|
220
|
+
</result>
|
|
221
|
+
</test-case>
|
|
222
|
+
|
|
223
|
+
<test-case name="fn-distinct-valuespint1args-1">
|
|
224
|
+
<description> Evaluates The "distinct-values" function with the arguments set as follows: $arg = xs:positiveInteger(lower bound) </description>
|
|
225
|
+
<created by="Carmelo Montanez" on="2004-12-13"/>
|
|
226
|
+
<test>fn:distinct-values((xs:positiveInteger("1")))</test>
|
|
227
|
+
<result>
|
|
228
|
+
<assert-eq>1</assert-eq>
|
|
229
|
+
</result>
|
|
230
|
+
</test-case>
|
|
231
|
+
|
|
232
|
+
<test-case name="fn-distinct-valuespint1args-2">
|
|
233
|
+
<description> Evaluates The "distinct-values" function with the arguments set as follows: $arg = xs:positiveInteger(mid range) </description>
|
|
234
|
+
<created by="Carmelo Montanez" on="2004-12-13"/>
|
|
235
|
+
<test>fn:distinct-values((xs:positiveInteger("52704602390610033")))</test>
|
|
236
|
+
<result>
|
|
237
|
+
<assert-eq>52704602390610033</assert-eq>
|
|
238
|
+
</result>
|
|
239
|
+
</test-case>
|
|
240
|
+
|
|
241
|
+
<test-case name="fn-distinct-valuespint1args-3">
|
|
242
|
+
<description> Evaluates The "distinct-values" function with the arguments set as follows: $arg = xs:positiveInteger(upper bound) </description>
|
|
243
|
+
<created by="Carmelo Montanez" on="2004-12-13"/>
|
|
244
|
+
<test>fn:distinct-values((xs:positiveInteger("999999999999999999")))</test>
|
|
245
|
+
<result>
|
|
246
|
+
<assert-eq>999999999999999999</assert-eq>
|
|
247
|
+
</result>
|
|
248
|
+
</test-case>
|
|
249
|
+
|
|
250
|
+
<test-case name="fn-distinct-valuesulng1args-1">
|
|
251
|
+
<description> Evaluates The "distinct-values" function with the arguments set as follows: $arg = xs:unsignedLong(lower bound) </description>
|
|
252
|
+
<created by="Carmelo Montanez" on="2004-12-13"/>
|
|
253
|
+
<test>fn:distinct-values((xs:unsignedLong("0")))</test>
|
|
254
|
+
<result>
|
|
255
|
+
<assert-eq>0</assert-eq>
|
|
256
|
+
</result>
|
|
257
|
+
</test-case>
|
|
258
|
+
|
|
259
|
+
<test-case name="fn-distinct-valuesulng1args-2">
|
|
260
|
+
<description> Evaluates The "distinct-values" function with the arguments set as follows: $arg = xs:unsignedLong(mid range) </description>
|
|
261
|
+
<created by="Carmelo Montanez" on="2004-12-13"/>
|
|
262
|
+
<test>fn:distinct-values((xs:unsignedLong("130747108607674654")))</test>
|
|
263
|
+
<result>
|
|
264
|
+
<assert-eq>130747108607674654</assert-eq>
|
|
265
|
+
</result>
|
|
266
|
+
</test-case>
|
|
267
|
+
|
|
268
|
+
<test-case name="fn-distinct-valuesulng1args-3">
|
|
269
|
+
<description> Evaluates The "distinct-values" function with the arguments set as follows: $arg = xs:unsignedLong(upper bound) </description>
|
|
270
|
+
<created by="Carmelo Montanez" on="2004-12-13"/>
|
|
271
|
+
<test>fn:distinct-values((xs:unsignedLong("184467440737095516")))</test>
|
|
272
|
+
<result>
|
|
273
|
+
<assert-eq>184467440737095516</assert-eq>
|
|
274
|
+
</result>
|
|
275
|
+
</test-case>
|
|
276
|
+
|
|
277
|
+
<test-case name="fn-distinct-valuesnpi1args-1">
|
|
278
|
+
<description> Evaluates The "distinct-values" function with the arguments set as follows: $arg = xs:nonPositiveInteger(lower bound) </description>
|
|
279
|
+
<created by="Carmelo Montanez" on="2004-12-13"/>
|
|
280
|
+
<test>fn:distinct-values((xs:nonPositiveInteger("-999999999999999999")))</test>
|
|
281
|
+
<result>
|
|
282
|
+
<assert-eq>-999999999999999999</assert-eq>
|
|
283
|
+
</result>
|
|
284
|
+
</test-case>
|
|
285
|
+
|
|
286
|
+
<test-case name="fn-distinct-valuesnpi1args-2">
|
|
287
|
+
<description> Evaluates The "distinct-values" function with the arguments set as follows: $arg = xs:nonPositiveInteger(mid range) </description>
|
|
288
|
+
<created by="Carmelo Montanez" on="2004-12-13"/>
|
|
289
|
+
<test>fn:distinct-values((xs:nonPositiveInteger("-475688437271870490")))</test>
|
|
290
|
+
<result>
|
|
291
|
+
<assert-eq>-475688437271870490</assert-eq>
|
|
292
|
+
</result>
|
|
293
|
+
</test-case>
|
|
294
|
+
|
|
295
|
+
<test-case name="fn-distinct-valuesnpi1args-3">
|
|
296
|
+
<description> Evaluates The "distinct-values" function with the arguments set as follows: $arg = xs:nonPositiveInteger(upper bound) </description>
|
|
297
|
+
<created by="Carmelo Montanez" on="2004-12-13"/>
|
|
298
|
+
<test>fn:distinct-values((xs:nonPositiveInteger("0")))</test>
|
|
299
|
+
<result>
|
|
300
|
+
<assert-eq>0</assert-eq>
|
|
301
|
+
</result>
|
|
302
|
+
</test-case>
|
|
303
|
+
|
|
304
|
+
<test-case name="fn-distinct-valuesnni1args-1">
|
|
305
|
+
<description> Evaluates The "distinct-values" function with the arguments set as follows: $arg = xs:nonNegativeInteger(lower bound) </description>
|
|
306
|
+
<created by="Carmelo Montanez" on="2004-12-13"/>
|
|
307
|
+
<test>fn:distinct-values((xs:nonNegativeInteger("0")))</test>
|
|
308
|
+
<result>
|
|
309
|
+
<assert-eq>0</assert-eq>
|
|
310
|
+
</result>
|
|
311
|
+
</test-case>
|
|
312
|
+
|
|
313
|
+
<test-case name="fn-distinct-valuesnni1args-2">
|
|
314
|
+
<description> Evaluates The "distinct-values" function with the arguments set as follows: $arg = xs:nonNegativeInteger(mid range) </description>
|
|
315
|
+
<created by="Carmelo Montanez" on="2004-12-13"/>
|
|
316
|
+
<test>fn:distinct-values((xs:nonNegativeInteger("303884545991464527")))</test>
|
|
317
|
+
<result>
|
|
318
|
+
<assert-eq>303884545991464527</assert-eq>
|
|
319
|
+
</result>
|
|
320
|
+
</test-case>
|
|
321
|
+
|
|
322
|
+
<test-case name="fn-distinct-valuesnni1args-3">
|
|
323
|
+
<description> Evaluates The "distinct-values" function with the arguments set as follows: $arg = xs:nonNegativeInteger(upper bound) </description>
|
|
324
|
+
<created by="Carmelo Montanez" on="2004-12-13"/>
|
|
325
|
+
<test>fn:distinct-values((xs:nonNegativeInteger("999999999999999999")))</test>
|
|
326
|
+
<result>
|
|
327
|
+
<assert-eq>999999999999999999</assert-eq>
|
|
328
|
+
</result>
|
|
329
|
+
</test-case>
|
|
330
|
+
|
|
331
|
+
<test-case name="fn-distinct-valuessht1args-1">
|
|
332
|
+
<description> Evaluates The "distinct-values" function with the arguments set as follows: $arg = xs:short(lower bound) </description>
|
|
333
|
+
<created by="Carmelo Montanez" on="2004-12-13"/>
|
|
334
|
+
<test>fn:distinct-values((xs:short("-32768")))</test>
|
|
335
|
+
<result>
|
|
336
|
+
<assert-eq>-32768</assert-eq>
|
|
337
|
+
</result>
|
|
338
|
+
</test-case>
|
|
339
|
+
|
|
340
|
+
<test-case name="fn-distinct-valuessht1args-2">
|
|
341
|
+
<description> Evaluates The "distinct-values" function with the arguments set as follows: $arg = xs:short(mid range) </description>
|
|
342
|
+
<created by="Carmelo Montanez" on="2004-12-13"/>
|
|
343
|
+
<test>fn:distinct-values((xs:short("-5324")))</test>
|
|
344
|
+
<result>
|
|
345
|
+
<assert-eq>-5324</assert-eq>
|
|
346
|
+
</result>
|
|
347
|
+
</test-case>
|
|
348
|
+
|
|
349
|
+
<test-case name="fn-distinct-valuessht1args-3">
|
|
350
|
+
<description> Evaluates The "distinct-values" function with the arguments set as follows: $arg = xs:short(upper bound) </description>
|
|
351
|
+
<created by="Carmelo Montanez" on="2004-12-13"/>
|
|
352
|
+
<test>fn:distinct-values((xs:short("32767")))</test>
|
|
353
|
+
<result>
|
|
354
|
+
<assert-eq>32767</assert-eq>
|
|
355
|
+
</result>
|
|
356
|
+
</test-case>
|
|
357
|
+
|
|
358
|
+
<test-case name="fn-distinct-values-mixed-args-001">
|
|
359
|
+
<description> arg: sequence of integer & decimal </description>
|
|
360
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
361
|
+
<test>fn:distinct-values((1, 2))</test>
|
|
362
|
+
<result>
|
|
363
|
+
<any-of>
|
|
364
|
+
<assert-string-value>2 1</assert-string-value>
|
|
365
|
+
<assert-string-value>1 2</assert-string-value>
|
|
366
|
+
</any-of>
|
|
367
|
+
</result>
|
|
368
|
+
</test-case>
|
|
369
|
+
|
|
370
|
+
<test-case name="fn-distinct-values-mixed-args-002">
|
|
371
|
+
<description> arg: sequence of integer </description>
|
|
372
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
373
|
+
<test>fn:distinct-values(( 1, (1), ((1)) ))</test>
|
|
374
|
+
<result>
|
|
375
|
+
<assert-eq>1</assert-eq>
|
|
376
|
+
</result>
|
|
377
|
+
</test-case>
|
|
378
|
+
|
|
379
|
+
<test-case name="fn-distinct-values-mixed-args-003">
|
|
380
|
+
<description> arg: sequence of integer & double </description>
|
|
381
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
382
|
+
<test>fn:distinct-values(( 1, 1.0e0))</test>
|
|
383
|
+
<result>
|
|
384
|
+
<all-of>
|
|
385
|
+
<assert-count>1</assert-count>
|
|
386
|
+
<assert-eq>1</assert-eq>
|
|
387
|
+
<any-of>
|
|
388
|
+
<assert-type>xs:integer</assert-type>
|
|
389
|
+
<assert-type>xs:double</assert-type>
|
|
390
|
+
</any-of>
|
|
391
|
+
</all-of>
|
|
392
|
+
</result>
|
|
393
|
+
</test-case>
|
|
394
|
+
|
|
395
|
+
<test-case name="fn-distinct-values-mixed-args-004">
|
|
396
|
+
<description> arg: sequence of integer </description>
|
|
397
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
398
|
+
<test>fn:distinct-values(( xs:integer(1), 1))</test>
|
|
399
|
+
<result>
|
|
400
|
+
<assert-eq>1</assert-eq>
|
|
401
|
+
</result>
|
|
402
|
+
</test-case>
|
|
403
|
+
|
|
404
|
+
<test-case name="fn-distinct-values-mixed-args-005">
|
|
405
|
+
<description> arg: sequence of integer & double </description>
|
|
406
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
407
|
+
<test>fn:distinct-values(( 0e0, -0, 0, 1 ))</test>
|
|
408
|
+
<result>
|
|
409
|
+
<assert-permutation>1, 0</assert-permutation>
|
|
410
|
+
</result>
|
|
411
|
+
</test-case>
|
|
412
|
+
|
|
413
|
+
<test-case name="fn-distinct-values-mixed-args-006">
|
|
414
|
+
<description> arg: sequence of string </description>
|
|
415
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
416
|
+
<test>fn:distinct-values(( "cat", 'CAT' ))</test>
|
|
417
|
+
<result>
|
|
418
|
+
<assert-permutation>"cat", "CAT"</assert-permutation>
|
|
419
|
+
</result>
|
|
420
|
+
</test-case>
|
|
421
|
+
|
|
422
|
+
<test-case name="fn-distinct-values-mixed-args-007">
|
|
423
|
+
<description> arg: sequence of string </description>
|
|
424
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
425
|
+
<test>fn:distinct-values(( xs:string("hello"), "hello"))</test>
|
|
426
|
+
<result>
|
|
427
|
+
<assert-string-value>hello</assert-string-value>
|
|
428
|
+
</result>
|
|
429
|
+
</test-case>
|
|
430
|
+
|
|
431
|
+
<test-case name="fn-distinct-values-mixed-args-008">
|
|
432
|
+
<description> arg: sequence of string </description>
|
|
433
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
434
|
+
<test>fn:distinct-values(( xs:string(""), "", ''))</test>
|
|
435
|
+
<result>
|
|
436
|
+
<assert-string-value/>
|
|
437
|
+
</result>
|
|
438
|
+
</test-case>
|
|
439
|
+
|
|
440
|
+
<test-case name="fn-distinct-values-mixed-args-009">
|
|
441
|
+
<description> arg: sequence of integer,decimal,boolean,string </description>
|
|
442
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
443
|
+
<test>fn:distinct-values((1, true(), true(), ()))</test>
|
|
444
|
+
<result>
|
|
445
|
+
<assert-permutation>1, true()</assert-permutation>
|
|
446
|
+
</result>
|
|
447
|
+
</test-case>
|
|
448
|
+
|
|
449
|
+
<test-case name="fn-distinct-values-mixed-args-010">
|
|
450
|
+
<description> arg: sequence of decimal </description>
|
|
451
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
452
|
+
<test>fn:distinct-values((xs:decimal('1.2'), xs:decimal('1.2000000000000001')))</test>
|
|
453
|
+
<result>
|
|
454
|
+
<assert-permutation>1.2000000000000001, 1.2</assert-permutation>
|
|
455
|
+
</result>
|
|
456
|
+
</test-case>
|
|
457
|
+
|
|
458
|
+
<test-case name="fn-distinct-values-mixed-args-011">
|
|
459
|
+
<description> arg: sequence of decimal & string </description>
|
|
460
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
461
|
+
<test>fn:distinct-values((xs:decimal('1.2'), '1.2'))</test>
|
|
462
|
+
<result>
|
|
463
|
+
<assert-permutation>"1.2", 1.2</assert-permutation>
|
|
464
|
+
</result>
|
|
465
|
+
</test-case>
|
|
466
|
+
|
|
467
|
+
<test-case name="fn-distinct-values-mixed-args-012">
|
|
468
|
+
<description> arg: sequence of decimal & float </description>
|
|
469
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
470
|
+
<test>fn:distinct-values((xs:decimal('1.2'), xs:float('1.2')))</test>
|
|
471
|
+
<result>
|
|
472
|
+
<assert-string-value>1.2</assert-string-value>
|
|
473
|
+
</result>
|
|
474
|
+
</test-case>
|
|
475
|
+
|
|
476
|
+
<test-case name="fn-distinct-values-mixed-args-013">
|
|
477
|
+
<description> arg: sequence of decimal & double </description>
|
|
478
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
479
|
+
<test>fn:distinct-values((xs:decimal('1.2'), xs:double('1.2')))</test>
|
|
480
|
+
<result>
|
|
481
|
+
<assert-string-value>1.2</assert-string-value>
|
|
482
|
+
</result>
|
|
483
|
+
</test-case>
|
|
484
|
+
|
|
485
|
+
<test-case name="fn-distinct-values-mixed-args-014">
|
|
486
|
+
<description> arg: sequence of float & string </description>
|
|
487
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
488
|
+
<test>fn:distinct-values((xs:float('NaN'), 'NaN'))</test>
|
|
489
|
+
<result>
|
|
490
|
+
<assert-string-value>NaN NaN</assert-string-value>
|
|
491
|
+
</result>
|
|
492
|
+
</test-case>
|
|
493
|
+
|
|
494
|
+
<test-case name="fn-distinct-values-mixed-args-015">
|
|
495
|
+
<description> arg: sequence of float & string </description>
|
|
496
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
497
|
+
<test>fn:distinct-values((xs:float('INF'), 'INF'))</test>
|
|
498
|
+
<result>
|
|
499
|
+
<assert-string-value>INF INF</assert-string-value>
|
|
500
|
+
</result>
|
|
501
|
+
</test-case>
|
|
502
|
+
|
|
503
|
+
<test-case name="fn-distinct-values-mixed-args-016">
|
|
504
|
+
<description> arg: sequence of float & string </description>
|
|
505
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
506
|
+
<test>fn:distinct-values((xs:float('-INF'), '-INF'))</test>
|
|
507
|
+
<result>
|
|
508
|
+
<assert-string-value>-INF -INF</assert-string-value>
|
|
509
|
+
</result>
|
|
510
|
+
</test-case>
|
|
511
|
+
|
|
512
|
+
<test-case name="fn-distinct-values-mixed-args-017">
|
|
513
|
+
<description> arg: sequence of float & float </description>
|
|
514
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
515
|
+
<test>fn:distinct-values((xs:float('INF'), xs:float('INF')))</test>
|
|
516
|
+
<result>
|
|
517
|
+
<assert-string-value>INF</assert-string-value>
|
|
518
|
+
</result>
|
|
519
|
+
</test-case>
|
|
520
|
+
|
|
521
|
+
<test-case name="fn-distinct-values-mixed-args-018">
|
|
522
|
+
<description> arg: sequence of float & float </description>
|
|
523
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
524
|
+
<test>fn:distinct-values((xs:float('-INF'), xs:float('INF')))</test>
|
|
525
|
+
<result>
|
|
526
|
+
<assert-permutation>xs:float('-INF'), xs:float('INF')</assert-permutation>
|
|
527
|
+
</result>
|
|
528
|
+
</test-case>
|
|
529
|
+
|
|
530
|
+
<test-case name="fn-distinct-values-mixed-args-019">
|
|
531
|
+
<description> arg: sequence of float & float </description>
|
|
532
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
533
|
+
<test>fn:distinct-values((xs:float('NaN'), xs:float('NaN')))</test>
|
|
534
|
+
<result>
|
|
535
|
+
<assert-string-value>NaN</assert-string-value>
|
|
536
|
+
</result>
|
|
537
|
+
</test-case>
|
|
538
|
+
|
|
539
|
+
<test-case name="fn-distinct-values-mixed-args-020">
|
|
540
|
+
<description> arg: sequence of float & float </description>
|
|
541
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
542
|
+
<test>fn:distinct-values((xs:float('NaN'), xs:float('NaN')))</test>
|
|
543
|
+
<result>
|
|
544
|
+
<assert-string-value>NaN</assert-string-value>
|
|
545
|
+
</result>
|
|
546
|
+
</test-case>
|
|
547
|
+
|
|
548
|
+
<test-case name="fn-distinct-values-mixed-args-021">
|
|
549
|
+
<description> arg: sequence of float & double </description>
|
|
550
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
551
|
+
<test>fn:distinct-values((xs:float('NaN'), xs:double('NaN')))</test>
|
|
552
|
+
<result>
|
|
553
|
+
<assert-string-value>NaN</assert-string-value>
|
|
554
|
+
</result>
|
|
555
|
+
</test-case>
|
|
556
|
+
|
|
557
|
+
<test-case name="fn-distinct-values-mixed-args-022">
|
|
558
|
+
<description> arg: sequence of float & double </description>
|
|
559
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
560
|
+
<test>fn:distinct-values((xs:float('INF'), xs:double('INF')))</test>
|
|
561
|
+
<result>
|
|
562
|
+
<assert-string-value>INF</assert-string-value>
|
|
563
|
+
</result>
|
|
564
|
+
</test-case>
|
|
565
|
+
|
|
566
|
+
<test-case name="fn-distinct-values-mixed-args-023">
|
|
567
|
+
<description> arg: sequence of float & double </description>
|
|
568
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
569
|
+
<test>fn:distinct-values((xs:float('-INF'), xs:double('-INF')))</test>
|
|
570
|
+
<result>
|
|
571
|
+
<assert-string-value>-INF</assert-string-value>
|
|
572
|
+
</result>
|
|
573
|
+
</test-case>
|
|
574
|
+
|
|
575
|
+
<test-case name="fn-distinct-values-mixed-args-024">
|
|
576
|
+
<description> arg: sequence of double & double </description>
|
|
577
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
578
|
+
<test>fn:distinct-values((xs:double('-INF'), xs:double('INF')))</test>
|
|
579
|
+
<result>
|
|
580
|
+
<any-of>
|
|
581
|
+
<assert-string-value>INF -INF</assert-string-value>
|
|
582
|
+
<assert-string-value>-INF INF</assert-string-value>
|
|
583
|
+
</any-of>
|
|
584
|
+
</result>
|
|
585
|
+
</test-case>
|
|
586
|
+
|
|
587
|
+
<test-case name="fn-distinct-values-mixed-args-025">
|
|
588
|
+
<description> arg: sequence of double & double </description>
|
|
589
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
590
|
+
<test>fn:distinct-values((xs:double('NaN'), xs:double('NaN')))</test>
|
|
591
|
+
<result>
|
|
592
|
+
<assert-string-value>NaN</assert-string-value>
|
|
593
|
+
</result>
|
|
594
|
+
</test-case>
|
|
595
|
+
|
|
596
|
+
<test-case name="fn-distinct-values-mixed-args-026">
|
|
597
|
+
<description> arg: sequence of double & double </description>
|
|
598
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
599
|
+
<test>fn:distinct-values((xs:double('NaN'), xs:double('NaN')))</test>
|
|
600
|
+
<result>
|
|
601
|
+
<assert-string-value>NaN</assert-string-value>
|
|
602
|
+
</result>
|
|
603
|
+
</test-case>
|
|
604
|
+
|
|
605
|
+
<test-case name="fn-distinct-values-mixed-args-027">
|
|
606
|
+
<description> arg: sequence of string </description>
|
|
607
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
608
|
+
<test>fn:distinct-values(("NaN", "-NaN"))</test>
|
|
609
|
+
<result>
|
|
610
|
+
<any-of>
|
|
611
|
+
<assert-string-value>NaN -NaN</assert-string-value>
|
|
612
|
+
<assert-string-value>-NaN NaN</assert-string-value>
|
|
613
|
+
</any-of>
|
|
614
|
+
</result>
|
|
615
|
+
</test-case>
|
|
616
|
+
|
|
617
|
+
<test-case name="fn-distinct-values-mixed-args-028">
|
|
618
|
+
<description> arg: sequence of string </description>
|
|
619
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
620
|
+
<test>fn:distinct-values(("-INF", "INF"))</test>
|
|
621
|
+
<result>
|
|
622
|
+
<any-of>
|
|
623
|
+
<assert-string-value>INF -INF</assert-string-value>
|
|
624
|
+
<assert-string-value>-INF INF</assert-string-value>
|
|
625
|
+
</any-of>
|
|
626
|
+
</result>
|
|
627
|
+
</test-case>
|
|
628
|
+
|
|
629
|
+
<test-case name="fn-distinct-values-mixed-args-029">
|
|
630
|
+
<description> arg: sequence of boolean </description>
|
|
631
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
632
|
+
<test>fn:distinct-values((xs:boolean('true'), true()))</test>
|
|
633
|
+
<result>
|
|
634
|
+
<assert-true/>
|
|
635
|
+
</result>
|
|
636
|
+
</test-case>
|
|
637
|
+
|
|
638
|
+
<test-case name="fn-distinct-values-mixed-args-030">
|
|
639
|
+
<description> arg: sequence of boolean </description>
|
|
640
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
641
|
+
<test>fn:distinct-values((xs:boolean('true'), xs:boolean('1')))</test>
|
|
642
|
+
<result>
|
|
643
|
+
<assert-true/>
|
|
644
|
+
</result>
|
|
645
|
+
</test-case>
|
|
646
|
+
|
|
647
|
+
<test-case name="fn-distinct-values-mixed-args-031">
|
|
648
|
+
<description> arg: sequence of boolean </description>
|
|
649
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
650
|
+
<test>fn:distinct-values((xs:boolean('false'), xs:boolean('0')))</test>
|
|
651
|
+
<result>
|
|
652
|
+
<assert-false/>
|
|
653
|
+
</result>
|
|
654
|
+
</test-case>
|
|
655
|
+
|
|
656
|
+
<test-case name="fn-distinct-values-mixed-args-032">
|
|
657
|
+
<description> arg: sequence of boolean </description>
|
|
658
|
+
<created by="Pulkita Tyagi" on="2005-05-26"/>
|
|
659
|
+
<test>fn:distinct-values(( true(), false(), () ))</test>
|
|
660
|
+
<result>
|
|
661
|
+
<assert-permutation>true(), false()</assert-permutation>
|
|
662
|
+
</result>
|
|
663
|
+
</test-case>
|
|
664
|
+
|
|
665
|
+
<test-case name="fn-distinct-values-mixed-args-033">
|
|
666
|
+
<description>Mixed args, different numerics compare equal</description>
|
|
667
|
+
<created by="Josh Spiegel" on="2015-04-08"/>
|
|
668
|
+
<test>
|
|
669
|
+
count(distinct-values((
|
|
670
|
+
xs:integer(1),
|
|
671
|
+
xs:gDay("---15"),
|
|
672
|
+
xs:gDay("---10"),
|
|
673
|
+
xs:decimal(1)
|
|
674
|
+
)))
|
|
675
|
+
</test>
|
|
676
|
+
<result>
|
|
677
|
+
<assert-eq>3</assert-eq>
|
|
678
|
+
</result>
|
|
679
|
+
</test-case>
|
|
680
|
+
|
|
681
|
+
<test-case name="K-SeqDistinctValuesFunc-1">
|
|
682
|
+
<description> A test whose essence is: `distinct-values()`. </description>
|
|
683
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
684
|
+
<test>distinct-values()</test>
|
|
685
|
+
<result>
|
|
686
|
+
<error code="XPST0017"/>
|
|
687
|
+
</result>
|
|
688
|
+
</test-case>
|
|
689
|
+
|
|
690
|
+
<test-case name="K-SeqDistinctValuesFunc-2">
|
|
691
|
+
<description> Invoke fn:distinct-values() with a collation argument, although the function does not perform string comparison. For that reason, output is valid as well. </description>
|
|
692
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
693
|
+
<test>deep-equal(distinct-values((1, 2, 3), "http://www.example.com/COLLATION/NOT/SUPPORTED"), (1, 2, 3))</test>
|
|
694
|
+
<result>
|
|
695
|
+
<any-of>
|
|
696
|
+
<assert-true/>
|
|
697
|
+
<error code="FOCH0002"/>
|
|
698
|
+
</any-of>
|
|
699
|
+
</result>
|
|
700
|
+
</test-case>
|
|
701
|
+
|
|
702
|
+
<test-case name="K-SeqDistinctValuesFunc-3">
|
|
703
|
+
<description> A test whose essence is: `distinct-values("a string", "http://www.w3.org/2005/xpath-functions/collation/codepoint", "wrong param")`. </description>
|
|
704
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
705
|
+
<test>distinct-values("a string", "http://www.w3.org/2005/xpath-functions/collation/codepoint", "wrong param")</test>
|
|
706
|
+
<result>
|
|
707
|
+
<error code="XPST0017"/>
|
|
708
|
+
</result>
|
|
709
|
+
</test-case>
|
|
710
|
+
|
|
711
|
+
<test-case name="K-SeqDistinctValuesFunc-4">
|
|
712
|
+
<description> A test whose essence is: `distinct-values("a string", "http://www.w3.org/2005/xpath-functions/collation/codepoint") eq "a string"`. </description>
|
|
713
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
714
|
+
<test>distinct-values("a string", "http://www.w3.org/2005/xpath-functions/collation/codepoint") eq "a string"</test>
|
|
715
|
+
<result>
|
|
716
|
+
<assert-true/>
|
|
717
|
+
</result>
|
|
718
|
+
</test-case>
|
|
719
|
+
|
|
720
|
+
<test-case name="K-SeqDistinctValuesFunc-5">
|
|
721
|
+
<description> A test whose essence is: `empty(distinct-values(()))`. </description>
|
|
722
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
723
|
+
<test>empty(distinct-values(()))</test>
|
|
724
|
+
<result>
|
|
725
|
+
<any-of>
|
|
726
|
+
<assert-true/>
|
|
727
|
+
<error code="XPST0005"/>
|
|
728
|
+
</any-of>
|
|
729
|
+
</result>
|
|
730
|
+
</test-case>
|
|
731
|
+
|
|
732
|
+
<test-case name="K-SeqDistinctValuesFunc-6">
|
|
733
|
+
<description> A test whose essence is: `deep-equal(distinct-values( ("1", 1, 2, 1, 1, 3, 1, 1, 3, xs:anyURI("example.com/"), xs:anyURI("example.com/"))), ("1", 1, 2, 3, xs:anyURI("example.com/")))`. </description>
|
|
734
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
735
|
+
<dependency type="spec" value="XQ10+"/>
|
|
736
|
+
<test>
|
|
737
|
+
declare function local:canon($arg) {
|
|
738
|
+
for $i in
|
|
739
|
+
for $s in $arg
|
|
740
|
+
return string($s)
|
|
741
|
+
order by $i
|
|
742
|
+
return $i
|
|
743
|
+
};
|
|
744
|
+
deep-equal(
|
|
745
|
+
local:canon(
|
|
746
|
+
distinct-values(("1", 1, 2, 1, 1, 3, 1, 1, 3, xs:anyURI("example.com/"), xs:anyURI("example.com/")))),
|
|
747
|
+
local:canon(("1", 1, 2, 3, xs:anyURI("example.com/"))))
|
|
748
|
+
</test>
|
|
749
|
+
<result>
|
|
750
|
+
<assert-true/>
|
|
751
|
+
</result>
|
|
752
|
+
</test-case>
|
|
753
|
+
|
|
754
|
+
<test-case name="K-SeqDistinctValuesFunc-7">
|
|
755
|
+
<description> A test whose essence is: `distinct-values((1, 1))`. </description>
|
|
756
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
757
|
+
<test>distinct-values((1, 1))</test>
|
|
758
|
+
<result>
|
|
759
|
+
<any-of>
|
|
760
|
+
<assert-eq>1</assert-eq>
|
|
761
|
+
<error code="XPTY0004"/>
|
|
762
|
+
</any-of>
|
|
763
|
+
</result>
|
|
764
|
+
</test-case>
|
|
765
|
+
|
|
766
|
+
<test-case name="K-SeqDistinctValuesFunc-8">
|
|
767
|
+
<description> A test whose essence is: `distinct-values((-3, -3))`. </description>
|
|
768
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
769
|
+
<test>distinct-values((-3, -3))</test>
|
|
770
|
+
<result>
|
|
771
|
+
<any-of>
|
|
772
|
+
<assert-eq>-3</assert-eq>
|
|
773
|
+
<error code="XPTY0004"/>
|
|
774
|
+
</any-of>
|
|
775
|
+
</result>
|
|
776
|
+
</test-case>
|
|
777
|
+
|
|
778
|
+
<test-case name="K-SeqDistinctValuesFunc-9">
|
|
779
|
+
<description> A test whose essence is: `count(distinct-values((1, 2.0, 3, 2))) eq 3`. </description>
|
|
780
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
781
|
+
<test>count(distinct-values((1, 2.0, 3, 2))) eq 3</test>
|
|
782
|
+
<result>
|
|
783
|
+
<assert-true/>
|
|
784
|
+
</result>
|
|
785
|
+
</test-case>
|
|
786
|
+
|
|
787
|
+
<test-case name="K-SeqDistinctValuesFunc-10">
|
|
788
|
+
<description> A test whose essence is: `deep-equal(distinct-values((1, 2.0, 3, 2)), (1, 2.0, 3))`. </description>
|
|
789
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
790
|
+
<test>deep-equal(distinct-values((1, 2.0, 3, 2)), (1, 2.0, 3))</test>
|
|
791
|
+
<result>
|
|
792
|
+
<assert-true/>
|
|
793
|
+
</result>
|
|
794
|
+
</test-case>
|
|
795
|
+
|
|
796
|
+
<test-case name="K-SeqDistinctValuesFunc-11">
|
|
797
|
+
<description> A test whose essence is: `exists(distinct-values((1, 2, 3, 1)))`. </description>
|
|
798
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
799
|
+
<test>exists(distinct-values((1, 2, 3, 1)))</test>
|
|
800
|
+
<result>
|
|
801
|
+
<assert-true/>
|
|
802
|
+
</result>
|
|
803
|
+
</test-case>
|
|
804
|
+
|
|
805
|
+
<test-case name="K-SeqDistinctValuesFunc-12">
|
|
806
|
+
<description> A test whose essence is: `not(empty(distinct-values((1, 1))))`. </description>
|
|
807
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
808
|
+
<test>not(empty(distinct-values((1, 1))))</test>
|
|
809
|
+
<result>
|
|
810
|
+
<assert-true/>
|
|
811
|
+
</result>
|
|
812
|
+
</test-case>
|
|
813
|
+
|
|
814
|
+
<test-case name="K-SeqDistinctValuesFunc-13">
|
|
815
|
+
<description> A test whose essence is: `count(distinct-values((1, 2, 2, current-time()))) eq 3`. </description>
|
|
816
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
817
|
+
<test>count(distinct-values((1, 2, 2, current-time()))) eq 3</test>
|
|
818
|
+
<result>
|
|
819
|
+
<assert-true/>
|
|
820
|
+
</result>
|
|
821
|
+
</test-case>
|
|
822
|
+
|
|
823
|
+
<test-case name="K-SeqDistinctValuesFunc-14">
|
|
824
|
+
<description> A test whose essence is: `count(distinct-values(())) eq 0`. </description>
|
|
825
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
826
|
+
<test>count(distinct-values(())) eq 0</test>
|
|
827
|
+
<result>
|
|
828
|
+
<any-of>
|
|
829
|
+
<assert-true/>
|
|
830
|
+
<error code="XPST0005"/>
|
|
831
|
+
</any-of>
|
|
832
|
+
</result>
|
|
833
|
+
</test-case>
|
|
834
|
+
|
|
835
|
+
<test-case name="K-SeqDistinctValuesFunc-15">
|
|
836
|
+
<description> fn:distinct-values() applied on an argument of cardinality exactly-one. </description>
|
|
837
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
838
|
+
<test>count(distinct-values(current-time())) eq 1</test>
|
|
839
|
+
<result>
|
|
840
|
+
<assert-true/>
|
|
841
|
+
</result>
|
|
842
|
+
</test-case>
|
|
843
|
+
|
|
844
|
+
<test-case name="K2-SeqDistinctValuesFunc-1">
|
|
845
|
+
<description> Invoke fn:distinct-values() with an invalid collation. </description>
|
|
846
|
+
<created by="Frans Englich" on="2007-11-26"/>
|
|
847
|
+
<test>fn:distinct-values(("1", "2", "3"), "http://www.example.com/COLLATION/NOT/SUPPORTED")</test>
|
|
848
|
+
<result>
|
|
849
|
+
<error code="FOCH0002"/>
|
|
850
|
+
</result>
|
|
851
|
+
</test-case>
|
|
852
|
+
|
|
853
|
+
<test-case name="fn-distinct-values-1">
|
|
854
|
+
<description> Test Bugzilla #5183, [FO] Effect of type promotion in fn:distinct-values </description>
|
|
855
|
+
<created by="Andrew Eisenberg" on="2009-12-24"/>
|
|
856
|
+
<dependency type="spec" value="XQ10+"/>
|
|
857
|
+
<test>
|
|
858
|
+
let $input := (xs:float('1.0'), xs:decimal('1.0000000000100000000001'),
|
|
859
|
+
xs:double( '1.00000000001'), xs:float('2.0'),
|
|
860
|
+
xs:decimal('2.0000000000100000000001'), xs:double( '2.00000000001')),
|
|
861
|
+
$distinct := distinct-values($input)
|
|
862
|
+
return ( (every $n in $input satisfies $n = $distinct) and
|
|
863
|
+
(every $bool in (for $d1 at $p in $distinct, $d2 in $distinct [position() > $p] return $d1 eq $d2) satisfies not($bool)) )</test>
|
|
864
|
+
<result>
|
|
865
|
+
<assert-true/>
|
|
866
|
+
</result>
|
|
867
|
+
</test-case>
|
|
868
|
+
|
|
869
|
+
<test-case name="fn-distinct-values-2">
|
|
870
|
+
<description>distinct-values() on a somewhat larger set of values</description>
|
|
871
|
+
<created by="Michael Kay" on="2011-07-01"/>
|
|
872
|
+
<test>distinct-values((1 to 300, 100 to 400, 29, 145, 20 to 50, for $x in (30 to 40) return xs:string($x), "foo", "bar"))</test>
|
|
873
|
+
<result>
|
|
874
|
+
<assert-permutation>1 to 400, "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "foo", "bar"</assert-permutation>
|
|
875
|
+
</result>
|
|
876
|
+
</test-case>
|
|
877
|
+
|
|
878
|
+
|
|
879
|
+
<test-case name="cbcl-distinct-values-001">
|
|
880
|
+
<description> Test fn:distinct-values on a mixture of numeric types containing several NaN values. </description>
|
|
881
|
+
<created by="Oliver Hallam" on="2008-04-30"/>
|
|
882
|
+
<test>count(distinct-values((xs:integer("3"), xs:float("3"), xs:float("NaN"), xs:double("3"), xs:double("NaN"), xs:decimal("3"), xs:float("3"))))</test>
|
|
883
|
+
<result>
|
|
884
|
+
<assert-string-value>2</assert-string-value>
|
|
885
|
+
</result>
|
|
886
|
+
</test-case>
|
|
887
|
+
|
|
888
|
+
|
|
889
|
+
<test-case name="cbcl-distinct-values-002">
|
|
890
|
+
<description> test fn:distinct-values with a mix of types </description>
|
|
891
|
+
<created by="Tim Mills" on="2008-06-02"/>
|
|
892
|
+
<dependency type="spec" value="XQ10"/>
|
|
893
|
+
<test>
|
|
894
|
+
declare function local:create($arg) as xs:anyAtomicType* {
|
|
895
|
+
( if ($arg castable as xs:untypedAtomic)
|
|
896
|
+
then $arg cast as xs:untypedAtomic else () ),
|
|
897
|
+
( if ($arg castable as xs:dateTime)
|
|
898
|
+
then $arg cast as xs:dateTime else () ),
|
|
899
|
+
( if ($arg castable as xs:date)
|
|
900
|
+
then $arg cast as xs:date else () ),
|
|
901
|
+
( if ($arg castable as xs:time)
|
|
902
|
+
then $arg cast as xs:time else () ),
|
|
903
|
+
( if ($arg castable as xs:time)
|
|
904
|
+
then $arg cast as xs:time else () ),
|
|
905
|
+
( if ($arg castable as xs:duration)
|
|
906
|
+
then $arg cast as xs:duration else () ),
|
|
907
|
+
( if ($arg castable as xs:yearMonthDuration)
|
|
908
|
+
then $arg cast as xs:yearMonthDuration else () ),
|
|
909
|
+
( if ($arg castable as xs:dayTimeDuration)
|
|
910
|
+
then $arg cast as xs:dayTimeDuration else () ),
|
|
911
|
+
( if ($arg castable as xs:float)
|
|
912
|
+
then $arg cast as xs:float else () ),
|
|
913
|
+
( if ($arg castable as xs:double)
|
|
914
|
+
then $arg cast as xs:double else () ),
|
|
915
|
+
( if ($arg castable as xs:decimal)
|
|
916
|
+
then $arg cast as xs:decimal else () ),
|
|
917
|
+
( if ($arg castable as xs:integer)
|
|
918
|
+
then $arg cast as xs:integer else () ),
|
|
919
|
+
( if ($arg castable as xs:nonPositiveInteger)
|
|
920
|
+
then $arg cast as xs:nonPositiveInteger else () ),
|
|
921
|
+
( if ($arg castable as xs:negativeInteger)
|
|
922
|
+
then $arg cast as xs:negativeInteger else () ),
|
|
923
|
+
( if ($arg castable as xs:long)
|
|
924
|
+
then $arg cast as xs:long else () ),
|
|
925
|
+
( if ($arg castable as xs:int)
|
|
926
|
+
then $arg cast as xs:int else () ),
|
|
927
|
+
( if ($arg castable as xs:short)
|
|
928
|
+
then $arg cast as xs:short else () ),
|
|
929
|
+
( if ($arg castable as xs:byte)
|
|
930
|
+
then $arg cast as xs:byte else () ),
|
|
931
|
+
( if ($arg castable as xs:byte)
|
|
932
|
+
then $arg cast as xs:byte else () ),
|
|
933
|
+
( if ($arg castable as xs:nonNegativeInteger)
|
|
934
|
+
then $arg cast as xs:nonNegativeInteger else () ),
|
|
935
|
+
( if ($arg castable as xs:unsignedLong)
|
|
936
|
+
then $arg cast as xs:unsignedLong else () ),
|
|
937
|
+
( if ($arg castable as xs:unsignedInt)
|
|
938
|
+
then $arg cast as xs:unsignedInt else () ),
|
|
939
|
+
( if ($arg castable as xs:unsignedShort)
|
|
940
|
+
then $arg cast as xs:unsignedShort else () ),
|
|
941
|
+
( if ($arg castable as xs:unsignedByte)
|
|
942
|
+
then $arg cast as xs:unsignedByte else () ),
|
|
943
|
+
( if ($arg castable as xs:positiveInteger)
|
|
944
|
+
then $arg cast as xs:positiveInteger else () ),
|
|
945
|
+
( if ($arg castable as xs:gYearMonth)
|
|
946
|
+
then $arg cast as xs:gYearMonth else () ),
|
|
947
|
+
( if ($arg castable as xs:gYear)
|
|
948
|
+
then $arg cast as xs:gYear else () ),
|
|
949
|
+
( if ($arg castable as xs:gMonthDay)
|
|
950
|
+
then $arg cast as xs:gMonthDay else () ),
|
|
951
|
+
( if ($arg castable as xs:gDay)
|
|
952
|
+
then $arg cast as xs:gDay else () ),
|
|
953
|
+
( if ($arg castable as xs:gMonth)
|
|
954
|
+
then $arg cast as xs:gMonth else () ),
|
|
955
|
+
( if ($arg castable as xs:string)
|
|
956
|
+
then $arg cast as xs:string else () ),
|
|
957
|
+
( if ($arg castable as xs:normalizedString)
|
|
958
|
+
then $arg cast as xs:normalizedString else () ),
|
|
959
|
+
( if ($arg castable as xs:token)
|
|
960
|
+
then $arg cast as xs:token else () ),
|
|
961
|
+
( if ($arg castable as xs:language)
|
|
962
|
+
then $arg cast as xs:language else () ),
|
|
963
|
+
( if ($arg castable as xs:NMTOKEN)
|
|
964
|
+
then $arg cast as xs:NMTOKEN else () ),
|
|
965
|
+
( if ($arg castable as xs:Name)
|
|
966
|
+
then $arg cast as xs:Name else () ),
|
|
967
|
+
( if ($arg castable as xs:NCName)
|
|
968
|
+
then $arg cast as xs:NCName else () ),
|
|
969
|
+
( if ($arg castable as xs:ID)
|
|
970
|
+
then $arg cast as xs:ID else () ),
|
|
971
|
+
( if ($arg castable as xs:IDREF)
|
|
972
|
+
then $arg cast as xs:IDREF else () ),
|
|
973
|
+
( if ($arg castable as xs:ENTITY)
|
|
974
|
+
then $arg cast as xs:ENTITY else () ),
|
|
975
|
+
( if ($arg castable as xs:boolean)
|
|
976
|
+
then $arg cast as xs:boolean else () ),
|
|
977
|
+
( if ($arg castable as xs:base64Binary)
|
|
978
|
+
then $arg cast as xs:base64Binary else () ),
|
|
979
|
+
( if ($arg castable as xs:hexBinary)
|
|
980
|
+
then $arg cast as xs:hexBinary else () ),
|
|
981
|
+
( if ($arg castable as xs:QName)
|
|
982
|
+
then $arg cast as xs:QName else () )
|
|
983
|
+
};
|
|
984
|
+
for $value in fn:distinct-values( ( local:create(0), local:create(-1), local:create(1), local:create(3.141),
|
|
985
|
+
local:create(3.141e0), local:create(3.333), local:create(3.141e0), local:create(3.333e2),
|
|
986
|
+
local:create('NaN'), local:create('zero'), local:create('false'), local:create('true'),
|
|
987
|
+
local:create('http://www.example.com/'), local:create('2008-06-01'), local:create('1972-06-01Z'),
|
|
988
|
+
local:create('2008-06-01T12:00:00'), local:create('1972-06-01T12:00:00+01:00'),
|
|
989
|
+
local:create('00:00:00'), local:create('12:00:00'), local:create('2008'), local:create('1972Z'),
|
|
990
|
+
local:create('--06'), local:create('--12Z'), local:create('2008-06'), local:create('1972-12Z'),
|
|
991
|
+
local:create('--06-01'), local:create('--12-15Z'), local:create('---01'), local:create('---15Z'),
|
|
992
|
+
local:create('P20Y15M'), local:create('P10Y15M'), local:create('-P2DT15H0M0S'),
|
|
993
|
+
local:create('-P1DT15H0M0S'), local:create(fn:QName("http://www.example.com/example", "person")),
|
|
994
|
+
local:create(fn:QName("http://www.example.com/example", "ht:person")), local:create('-P2DT15H0M0S'),
|
|
995
|
+
local:create('FFFEFDFC'), local:create('aGVsbG8=') ))
|
|
996
|
+
order by string($value) return $value</test>
|
|
997
|
+
<result>
|
|
998
|
+
<any-of>
|
|
999
|
+
<assert-string-value>---01 ---01 ---15Z ---15Z --06 --06 --06-01 --06-01 --12-15Z --12-15Z --12Z --12Z -1 -1 -P1DT15H -P1DT15H0M0S -P2DT15H -P2DT15H0M0S 0 0 00:00:00 00:00:00 1 1 12:00:00 12:00:00 1972-06-01T12:00:00+01:00 1972-06-01T12:00:00+01:00 1972-06-01Z 1972-06-01Z 1972-12Z 1972-12Z 1972Z 1972Z 2008 2008 2008 2008 2008 2008-06 2008-06 2008-06-01 2008-06-01 2008-06-01T12:00:00 2008-06-01T12:00:00 3 3.141 3.141 3.141 3.333 3.333 3.333 333 333.3 333.3 333.3 FFFEFDFC FFFEFDFC FFFEFDFC NaN NaN P10Y15M P11Y3M P20Y15M P21Y3M aGVsbG8= aGVsbG8= false false ht:person ht:person http://www.example.com/ person true true true zero zero</assert-string-value>
|
|
1000
|
+
<assert-string-value>---01 ---01 ---15Z ---15Z --06 --06 --06-01 --06-01 --12-15Z --12-15Z --12Z --12Z -1 -1 -P1DT15H -P1DT15H0M0S -P2DT15H -P2DT15H0M0S 0 0 00:00:00 00:00:00 1 1 12:00:00 12:00:00 1972-06-01T12:00:00+01:00 1972-06-01T12:00:00+01:00 1972-06-01Z 1972-06-01Z 1972-12Z 1972-12Z 1972Z 1972Z 2008 2008 2008 2008 2008 2008-06 2008-06 2008-06-01 2008-06-01 2008-06-01T12:00:00 2008-06-01T12:00:00 3 3.141 3.141 3.141 3.333 3.333 3.333 333 333.3 333.3 333.3 FFFEFDFC FFFEFDFC FFFEFDFC NaN NaN P10Y15M P11Y3M P20Y15M P21Y3M aGVsbG8= aGVsbG8= false false ht:person http://www.example.com/ person person true true true zero zero</assert-string-value>
|
|
1001
|
+
<assert-string-value>---01 ---01 ---15Z ---15Z --06 --06 --06-01 --06-01 --12-15Z --12-15Z --12Z --12Z -1 -1 -P1DT15H -P1DT15H0M0S -P2DT15H -P2DT15H0M0S 0 0 00:00:00 00:00:00 1 1 12:00:00 12:00:00 1972-06-01T12:00:00+01:00 1972-06-01T12:00:00+01:00 1972-06-01Z 1972-06-01Z 1972-12Z 1972-12Z 1972Z 1972Z 2008 2008 2008 2008 2008 2008-06 2008-06 2008-06-01 2008-06-01 2008-06-01T12:00:00 2008-06-01T12:00:00 3 3.141 3.141 3.141 3.333 3.333 3.333 333 333.3 333.3 333.3 FFFEFDFC FFFEFDFC FFFEFDFC FFFEFDFC NaN NaN NaN P10Y15M P10Y15M P11Y3M P20Y15M P20Y15M P21Y3M aGVsbG8= aGVsbG8= false false false ht:person http://www.example.com/ person person true true true true zero zero zero</assert-string-value>
|
|
1002
|
+
</any-of>
|
|
1003
|
+
</result>
|
|
1004
|
+
</test-case>
|
|
1005
|
+
|
|
1006
|
+
<test-case name="cbcl-distinct-values-002b">
|
|
1007
|
+
<description> test fn:distinct-values with a mix of types </description>
|
|
1008
|
+
<created by="Tim Mills" on="2008-06-02"/>
|
|
1009
|
+
<dependency type="spec" value="XQ30+"/>
|
|
1010
|
+
<test>
|
|
1011
|
+
declare function local:create($arg) as xs:anyAtomicType* {
|
|
1012
|
+
( if ($arg castable as xs:untypedAtomic) then $arg cast as xs:untypedAtomic else () ),
|
|
1013
|
+
( if ($arg castable as xs:dateTime) then $arg cast as xs:dateTime else () ),
|
|
1014
|
+
( if ($arg castable as xs:date) then $arg cast as xs:date else () ),
|
|
1015
|
+
( if ($arg castable as xs:time) then $arg cast as xs:time else () ),
|
|
1016
|
+
( if ($arg castable as xs:time) then $arg cast as xs:time else () ),
|
|
1017
|
+
( if ($arg castable as xs:duration) then $arg cast as xs:duration else () ),
|
|
1018
|
+
( if ($arg castable as xs:yearMonthDuration) then $arg cast as xs:yearMonthDuration else () ),
|
|
1019
|
+
( if ($arg castable as xs:dayTimeDuration) then $arg cast as xs:dayTimeDuration else () ),
|
|
1020
|
+
( if ($arg castable as xs:float) then $arg cast as xs:float else () ),
|
|
1021
|
+
( if ($arg castable as xs:double) then $arg cast as xs:double else () ),
|
|
1022
|
+
( if ($arg castable as xs:decimal) then $arg cast as xs:decimal else () ),
|
|
1023
|
+
( if ($arg castable as xs:integer) then $arg cast as xs:integer else () ),
|
|
1024
|
+
( if ($arg castable as xs:nonPositiveInteger) then $arg cast as xs:nonPositiveInteger else () ),
|
|
1025
|
+
( if ($arg castable as xs:negativeInteger) then $arg cast as xs:negativeInteger else () ),
|
|
1026
|
+
( if ($arg castable as xs:long) then $arg cast as xs:long else () ),
|
|
1027
|
+
( if ($arg castable as xs:int) then $arg cast as xs:int else () ),
|
|
1028
|
+
( if ($arg castable as xs:short) then $arg cast as xs:short else () ),
|
|
1029
|
+
( if ($arg castable as xs:byte) then $arg cast as xs:byte else () ),
|
|
1030
|
+
( if ($arg castable as xs:byte) then $arg cast as xs:byte else () ),
|
|
1031
|
+
( if ($arg castable as xs:nonNegativeInteger) then $arg cast as xs:nonNegativeInteger else () ),
|
|
1032
|
+
( if ($arg castable as xs:unsignedLong) then $arg cast as xs:unsignedLong else () ),
|
|
1033
|
+
( if ($arg castable as xs:unsignedInt) then $arg cast as xs:unsignedInt else () ),
|
|
1034
|
+
( if ($arg castable as xs:unsignedShort) then $arg cast as xs:unsignedShort else () ),
|
|
1035
|
+
( if ($arg castable as xs:unsignedByte) then $arg cast as xs:unsignedByte else () ),
|
|
1036
|
+
( if ($arg castable as xs:positiveInteger) then $arg cast as xs:positiveInteger else () ),
|
|
1037
|
+
( if ($arg castable as xs:gYearMonth) then $arg cast as xs:gYearMonth else () ),
|
|
1038
|
+
( if ($arg castable as xs:gYear) then $arg cast as xs:gYear else () ),
|
|
1039
|
+
( if ($arg castable as xs:gMonthDay) then $arg cast as xs:gMonthDay else () ),
|
|
1040
|
+
( if ($arg castable as xs:gDay) then $arg cast as xs:gDay else () ),
|
|
1041
|
+
( if ($arg castable as xs:gMonth) then $arg cast as xs:gMonth else () ),
|
|
1042
|
+
( if ($arg castable as xs:string) then $arg cast as xs:string else () ),
|
|
1043
|
+
( if ($arg castable as xs:normalizedString) then $arg cast as xs:normalizedString else () ),
|
|
1044
|
+
( if ($arg castable as xs:token) then $arg cast as xs:token else () ),
|
|
1045
|
+
( if ($arg castable as xs:language) then $arg cast as xs:language else () ),
|
|
1046
|
+
( if ($arg castable as xs:NMTOKEN) then $arg cast as xs:NMTOKEN else () ),
|
|
1047
|
+
( if ($arg castable as xs:Name) then $arg cast as xs:Name else () ),
|
|
1048
|
+
( if ($arg castable as xs:NCName) then $arg cast as xs:NCName else () ),
|
|
1049
|
+
( if ($arg castable as xs:ID) then $arg cast as xs:ID else () ),
|
|
1050
|
+
( if ($arg castable as xs:IDREF) then $arg cast as xs:IDREF else () ),
|
|
1051
|
+
( if ($arg castable as xs:ENTITY) then $arg cast as xs:ENTITY else () ),
|
|
1052
|
+
( if ($arg castable as xs:boolean) then $arg cast as xs:boolean else () ),
|
|
1053
|
+
( if ($arg castable as xs:base64Binary) then $arg cast as xs:base64Binary else () ),
|
|
1054
|
+
( if ($arg castable as xs:hexBinary) then $arg cast as xs:hexBinary else () ),
|
|
1055
|
+
( if ($arg castable as xs:QName) then $arg cast as xs:QName else () )
|
|
1056
|
+
};
|
|
1057
|
+
for $value in fn:distinct-values( (
|
|
1058
|
+
local:create(0), local:create(-1), local:create(1), local:create(3.141),
|
|
1059
|
+
local:create(3.141e0), local:create(3.333), local:create(3.141e0),
|
|
1060
|
+
local:create(3.333e2), local:create('NaN'), local:create('zero'),
|
|
1061
|
+
local:create('false'), local:create('true'), local:create('http://www.example.com/'),
|
|
1062
|
+
local:create('2008-06-01'), local:create('1972-06-01Z'), local:create('2008-06-01T12:00:00'),
|
|
1063
|
+
local:create('1972-06-01T12:00:00+01:00'), local:create('00:00:00'), local:create('12:00:00'),
|
|
1064
|
+
local:create('2008'), local:create('1972Z'), local:create('--06'), local:create('--12Z'),
|
|
1065
|
+
local:create('2008-06'), local:create('1972-12Z'), local:create('--06-01'),
|
|
1066
|
+
local:create('--12-15Z'), local:create('---01'), local:create('---15Z'),
|
|
1067
|
+
local:create('P20Y15M'), local:create('P10Y15M'), local:create('-P2DT15H0M0S'),
|
|
1068
|
+
local:create('-P1DT15H0M0S'), local:create(fn:QName("http://www.example.com/example", "person")),
|
|
1069
|
+
local:create(fn:QName("http://www.example.com/example", "ht:person")),
|
|
1070
|
+
local:create('-P2DT15H0M0S'), local:create('FFFEFDFC'), local:create('aGVsbG8=') ))
|
|
1071
|
+
order by string($value) return $value</test>
|
|
1072
|
+
<result>
|
|
1073
|
+
<assert-string-value>---01 ---01 ---15Z ---15Z --06 --06 --06-01 --06-01 --12-15Z --12-15Z --12Z --12Z -1 -1 -P1DT15H -P1DT15H0M0S -P2DT15H -P2DT15H0M0S 0 0 00:00:00 00:00:00 1 1 12:00:00 12:00:00 1972-06-01T12:00:00+01:00 1972-06-01T12:00:00+01:00 1972-06-01Z 1972-06-01Z 1972-12Z 1972-12Z 1972Z 1972Z 2008 2008 2008 2008 2008 2008-06 2008-06 2008-06-01 2008-06-01 2008-06-01T12:00:00 2008-06-01T12:00:00 3 3.141 3.141 3.141 3.333 3.333 3.333 333 333.3 333.3 333.3 FFFEFDFC FFFEFDFC FFFEFDFC FFFEFDFC NaN NaN NaN P10Y15M P10Y15M P11Y3M P20Y15M P20Y15M P21Y3M aGVsbG8= aGVsbG8= false false false ht:person http://www.example.com/ person person true true true true zero zero zero</assert-string-value>
|
|
1074
|
+
</result>
|
|
1075
|
+
</test-case>
|
|
1076
|
+
|
|
1077
|
+
|
|
1078
|
+
<test-case name="cbcl-distinct-values-003">
|
|
1079
|
+
<description> Test with static context dependant values </description>
|
|
1080
|
+
<created by="Nick Jones" on="2008-06-13"/>
|
|
1081
|
+
<modified by="Tim Mills" on="2013-03-15" change="Bug 21222" />
|
|
1082
|
+
<test>distinct-values(
|
|
1083
|
+
(xs:dateTime("2008-01-01T13:00:00"),
|
|
1084
|
+
adjust-dateTime-to-timezone(xs:dateTime("2008-01-01T13:00:00"))))</test>
|
|
1085
|
+
<result>
|
|
1086
|
+
<assert-count>1</assert-count>
|
|
1087
|
+
</result>
|
|
1088
|
+
</test-case>
|
|
1089
|
+
|
|
1090
|
+
|
|
1091
|
+
<test-case name="cbcl-distinct-values-004">
|
|
1092
|
+
<description> test fn:distinct-values with xs:date </description>
|
|
1093
|
+
<created by="Tim Mills" on="2008-06-02"/>
|
|
1094
|
+
<dependency type="spec" value="XQ10+"/>
|
|
1095
|
+
<test>for $value in fn:distinct-values(( xs:date('2008-06-01'), xs:date('2008-06-01'), xs:date('2012-06-01'), xs:date('1918-11-11Z'), xs:date('1972-06-01Z'), xs:date('1972-06-01Z') )) order by $value return $value</test>
|
|
1096
|
+
<result>
|
|
1097
|
+
<assert-string-value>1918-11-11Z 1972-06-01Z 2008-06-01 2012-06-01</assert-string-value>
|
|
1098
|
+
</result>
|
|
1099
|
+
</test-case>
|
|
1100
|
+
|
|
1101
|
+
|
|
1102
|
+
<test-case name="cbcl-distinct-values-005">
|
|
1103
|
+
<description> test fn:distinct-values with xs:dateTime </description>
|
|
1104
|
+
<created by="Tim Mills" on="2008-06-02"/>
|
|
1105
|
+
<dependency type="spec" value="XQ10+"/>
|
|
1106
|
+
<test>for $value in fn:distinct-values(( xs:dateTime('2008-06-01T12:00:00'), xs:dateTime('2008-06-01T12:00:00'), xs:dateTime('2008-06-01T00:00:00'), xs:dateTime('2008-06-02T00:00:00'), xs:dateTime('1918-11-11T11:00:00Z'), xs:dateTime('1972-06-01T13:00:00Z'), xs:dateTime('1972-06-01T13:00:00Z') )) order by $value return $value</test>
|
|
1107
|
+
<result>
|
|
1108
|
+
<assert-string-value>1918-11-11T11:00:00Z 1972-06-01T13:00:00Z 2008-06-01T00:00:00 2008-06-01T12:00:00 2008-06-02T00:00:00</assert-string-value>
|
|
1109
|
+
</result>
|
|
1110
|
+
</test-case>
|
|
1111
|
+
|
|
1112
|
+
|
|
1113
|
+
<test-case name="cbcl-distinct-values-006">
|
|
1114
|
+
<description> test fn:distinct-values with xs:time </description>
|
|
1115
|
+
<created by="Tim Mills" on="2008-06-02"/>
|
|
1116
|
+
<dependency type="spec" value="XQ10+"/>
|
|
1117
|
+
<test>for $value in fn:distinct-values(( xs:time('12:00:00'), xs:time('11:00:00'), xs:time('12:00:00'))) order by $value return $value</test>
|
|
1118
|
+
<result>
|
|
1119
|
+
<assert-string-value>11:00:00 12:00:00</assert-string-value>
|
|
1120
|
+
</result>
|
|
1121
|
+
</test-case>
|
|
1122
|
+
|
|
1123
|
+
|
|
1124
|
+
<test-case name="cbcl-distinct-values-007">
|
|
1125
|
+
<description> test fn:distinct-values with xs:time </description>
|
|
1126
|
+
<created by="Tim Mills" on="2008-06-02"/>
|
|
1127
|
+
<dependency type="spec" value="XQ10+"/>
|
|
1128
|
+
<test>for $value at $p in ( for $time in fn:distinct-values(( xs:time('12:00:00'), xs:time('12:00:00'), xs:time('20:00:00'), xs:time('01:00:00+12:00'), xs:time('02:00:00+13:00'))) order by $time return $time ) return adjust-time-to-timezone($value, (xs:dayTimeDuration("PT0S")[$p]))</test>
|
|
1129
|
+
<result>
|
|
1130
|
+
<assert-string-value>13:00:00Z 12:00:00 20:00:00</assert-string-value>
|
|
1131
|
+
</result>
|
|
1132
|
+
</test-case>
|
|
1133
|
+
|
|
1134
|
+
|
|
1135
|
+
<test-case name="cbcl-distinct-values-008">
|
|
1136
|
+
<description> test fn:distinct-values with xs:hexBinary </description>
|
|
1137
|
+
<created by="Tim Mills" on="2008-06-13"/>
|
|
1138
|
+
<dependency type="spec" value="XQ10+"/>
|
|
1139
|
+
<test>for $value in fn:distinct-values(( xs:hexBinary('FFFF'), xs:hexBinary('FFFF'), xs:hexBinary('FFFE'), xs:hexBinary('FF'))) order by string($value) return $value</test>
|
|
1140
|
+
<result>
|
|
1141
|
+
<assert-string-value>FF FFFE FFFF</assert-string-value>
|
|
1142
|
+
</result>
|
|
1143
|
+
</test-case>
|
|
1144
|
+
|
|
1145
|
+
|
|
1146
|
+
<test-case name="cbcl-distinct-values-009">
|
|
1147
|
+
<description> test fn:distinct-values with xs:base64Binary </description>
|
|
1148
|
+
<created by="Tim Mills" on="2008-06-13"/>
|
|
1149
|
+
<dependency type="spec" value="XQ10+"/>
|
|
1150
|
+
<test>for $value in fn:distinct-values(( xs:base64Binary('aGVsbG8NCg=='), xs:base64Binary('aGVsbG8NCg=='), xs:base64Binary('aGFsbG8NCg=='), xs:base64Binary('aGkNCg=='))) order by string($value) return $value</test>
|
|
1151
|
+
<result>
|
|
1152
|
+
<assert-string-value>aGFsbG8NCg== aGVsbG8NCg== aGkNCg==</assert-string-value>
|
|
1153
|
+
</result>
|
|
1154
|
+
</test-case>
|
|
1155
|
+
|
|
1156
|
+
|
|
1157
|
+
<test-case name="cbcl-distinct-values-010">
|
|
1158
|
+
<description> test fn:distinct-values with xs:untypedAtomic </description>
|
|
1159
|
+
<created by="Tim Mills" on="2008-06-13"/>
|
|
1160
|
+
<dependency type="spec" value="XQ10+"/>
|
|
1161
|
+
<test>for $value in fn:distinct-values(( xs:untypedAtomic('a'), xs:untypedAtomic('a'), xs:untypedAtomic('b'), xs:untypedAtomic(''))) order by string($value) return $value</test>
|
|
1162
|
+
<result>
|
|
1163
|
+
<assert-string-value> a b</assert-string-value>
|
|
1164
|
+
</result>
|
|
1165
|
+
</test-case>
|
|
1166
|
+
|
|
1167
|
+
|
|
1168
|
+
<test-case name="cbcl-distinct-values-011">
|
|
1169
|
+
<description> test fn:distinct-values with xs:string </description>
|
|
1170
|
+
<created by="Tim Mills" on="2008-06-13"/>
|
|
1171
|
+
<dependency type="spec" value="XQ10+"/>
|
|
1172
|
+
<test>for $value in fn:distinct-values(( xs:string('a'), xs:string('a'), xs:string('b'), xs:string(''))) order by string($value) return $value</test>
|
|
1173
|
+
<result>
|
|
1174
|
+
<assert-string-value> a b</assert-string-value>
|
|
1175
|
+
</result>
|
|
1176
|
+
</test-case>
|
|
1177
|
+
|
|
1178
|
+
|
|
1179
|
+
<test-case name="cbcl-distinct-values-012">
|
|
1180
|
+
<description> test fn:distinct-values with xs:gYear </description>
|
|
1181
|
+
<created by="Tim Mills" on="2008-06-13"/>
|
|
1182
|
+
<dependency type="spec" value="XQ10+"/>
|
|
1183
|
+
<test>for $value in fn:distinct-values(( xs:gYear('2008'), xs:gYear('2008'), xs:gYear('1972'))) order by string($value) return $value</test>
|
|
1184
|
+
<result>
|
|
1185
|
+
<assert-string-value>1972 2008</assert-string-value>
|
|
1186
|
+
</result>
|
|
1187
|
+
</test-case>
|
|
1188
|
+
|
|
1189
|
+
|
|
1190
|
+
<test-case name="cbcl-distinct-values-013">
|
|
1191
|
+
<description> test fn:distinct-values with durations </description>
|
|
1192
|
+
<created by="Tim Mills" on="2008-06-13"/>
|
|
1193
|
+
<dependency type="spec" value="XQ10+"/>
|
|
1194
|
+
<test>for $value in fn:distinct-values(( xs:dayTimeDuration('P0D'), xs:yearMonthDuration('P0Y'), xs:duration('P0Y'), xs:duration('P0Y'), xs:yearMonthDuration('P0Y'), xs:dayTimeDuration('P0D'), xs:dayTimeDuration('P1D'), xs:yearMonthDuration('P1Y'), xs:duration('P1Y'))) order by string($value) return $value</test>
|
|
1195
|
+
<result>
|
|
1196
|
+
<assert-string-value>P1D P1Y PT0S</assert-string-value>
|
|
1197
|
+
</result>
|
|
1198
|
+
</test-case>
|
|
1199
|
+
|
|
1200
|
+
|
|
1201
|
+
<test-case name="cbcl-distinct-values-014">
|
|
1202
|
+
<description> test fn:distinct-values with xs:gMnnthDay </description>
|
|
1203
|
+
<created by="Tim Mills" on="2008-06-13"/>
|
|
1204
|
+
<dependency type="spec" value="XQ10+"/>
|
|
1205
|
+
<test>for $value in fn:distinct-values(( xs:gMonthDay('--06-16'), xs:gMonthDay('--06-16'), xs:gMonthDay('--12-15'))) order by string($value) return $value</test>
|
|
1206
|
+
<result>
|
|
1207
|
+
<assert-string-value>--06-16 --12-15</assert-string-value>
|
|
1208
|
+
</result>
|
|
1209
|
+
</test-case>
|
|
1210
|
+
|
|
1211
|
+
|
|
1212
|
+
<test-case name="cbcl-distinct-values-016">
|
|
1213
|
+
<description> Tests distinct values with unknown, but unneeded collation </description>
|
|
1214
|
+
<created by="Nick Jones" on="2008-06-16"/>
|
|
1215
|
+
<test>for $x in 65 to 75 return distinct-values(1 to 10,codepoints-to-string($x to $x+10))</test>
|
|
1216
|
+
<result>
|
|
1217
|
+
<any-of>
|
|
1218
|
+
<assert-string-value>1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10</assert-string-value>
|
|
1219
|
+
<error code="FOCH0002"/>
|
|
1220
|
+
</any-of>
|
|
1221
|
+
</result>
|
|
1222
|
+
</test-case>
|
|
1223
|
+
</test-set>
|