leptris 1.9.232.0-arm-linux → 1.9.237.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.
Files changed (32) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +25 -0
  3. data/Rakefile +1 -1
  4. data/ext/leptris/native/native.c +144 -3
  5. data/lib/leptris/version.rb +1 -1
  6. data/lib/leptris/xml/document.rb +20 -3
  7. data/lib/leptris/xml/ffi.rb +91 -62
  8. data/lib/leptris/xml/native.so +0 -0
  9. data/lib/libleptris.so +0 -0
  10. data/vendor-src/README.md +1 -1
  11. data/vendor-src/libleptris/CHANGELOG.md +113 -4
  12. data/vendor-src/libleptris/CMakeLists.txt +1 -1
  13. data/vendor-src/libleptris/benchmarks/dom/bench_leptris.c +14 -6
  14. data/vendor-src/libleptris/src/include/leptris.h +27 -0
  15. data/vendor-src/libleptris/src/leptris/dom/element_modify.c +20 -0
  16. data/vendor-src/libleptris/src/leptris/leptris_internal.h +5 -0
  17. data/vendor-src/libleptris/src/leptris/xpath/evaluator.c +7 -0
  18. data/vendor-src/libleptris/src/leptris/xpath/evaluator_operators.c +38 -4
  19. data/vendor-src/libleptris/src/leptris/xpath/evaluator_types.c +5 -1
  20. data/vendor-src/libleptris/src/leptris/xpath/functions.c +86 -7
  21. data/vendor-src/libleptris/src/leptris/xpath/functions_ext31.c +237 -24
  22. data/vendor-src/libleptris/src/leptris/xpath/xpath_public.c +16 -1
  23. data/vendor-src/libleptris/test/dom/test_dom.cpp +80 -0
  24. data/vendor-src/libleptris/test/xquery/qt3/fn/count.xml +3117 -0
  25. data/vendor-src/libleptris/test/xquery/qt3/fn/empty.xml +502 -0
  26. data/vendor-src/libleptris/test/xquery/qt3/fn/exists.xml +537 -0
  27. data/vendor-src/libleptris/test/xquery/qt3/fn/head.xml +90 -0
  28. data/vendor-src/libleptris/test/xquery/qt3/fn/tail.xml +68 -0
  29. data/vendor-src/libleptris/test/xquery/test_qt3.cpp +124 -93
  30. data/vendor-src/libleptris/test/xquery/test_xquery.cpp +28 -0
  31. data/vendor-src/libleptris/vcpkg.json +1 -1
  32. metadata +6 -1
@@ -0,0 +1,537 @@
1
+ <?xml version="1.0" encoding="us-ascii"?>
2
+ <test-set xmlns="http://www.w3.org/2010/09/qt-fots-catalog" name="fn-exists">
3
+ <description>Tests for the iexists() function</description>
4
+ <link type="spec" document="http://www.w3.org/TR/xpath-functions-30/"
5
+ idref="func-exists"/>
6
+
7
+ <test-case name="fn-existsint1args-1">
8
+ <description> Evaluates The "exists" 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:exists((xs:int("-2147483648")))</test>
11
+ <result>
12
+ <assert-true/>
13
+ </result>
14
+ </test-case>
15
+
16
+ <test-case name="fn-existsint1args-2">
17
+ <description> Evaluates The "exists" 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:exists((xs:int("-1873914410")))</test>
20
+ <result>
21
+ <assert-true/>
22
+ </result>
23
+ </test-case>
24
+
25
+ <test-case name="fn-existsint1args-3">
26
+ <description> Evaluates The "exists" 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:exists((xs:int("2147483647")))</test>
29
+ <result>
30
+ <assert-true/>
31
+ </result>
32
+ </test-case>
33
+
34
+ <test-case name="fn-existsintg1args-1">
35
+ <description> Evaluates The "exists" 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:exists((xs:integer("-999999999999999999")))</test>
38
+ <result>
39
+ <assert-true/>
40
+ </result>
41
+ </test-case>
42
+
43
+ <test-case name="fn-existsintg1args-2">
44
+ <description> Evaluates The "exists" 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:exists((xs:integer("830993497117024304")))</test>
47
+ <result>
48
+ <assert-true/>
49
+ </result>
50
+ </test-case>
51
+
52
+ <test-case name="fn-existsintg1args-3">
53
+ <description> Evaluates The "exists" 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:exists((xs:integer("999999999999999999")))</test>
56
+ <result>
57
+ <assert-true/>
58
+ </result>
59
+ </test-case>
60
+
61
+ <test-case name="fn-existsdec1args-1">
62
+ <description> Evaluates The "exists" 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:exists((xs:decimal("-999999999999999999")))</test>
65
+ <result>
66
+ <assert-true/>
67
+ </result>
68
+ </test-case>
69
+
70
+ <test-case name="fn-existsdec1args-2">
71
+ <description> Evaluates The "exists" 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:exists((xs:decimal("617375191608514839")))</test>
74
+ <result>
75
+ <assert-true/>
76
+ </result>
77
+ </test-case>
78
+
79
+ <test-case name="fn-existsdec1args-3">
80
+ <description> Evaluates The "exists" 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:exists((xs:decimal("999999999999999999")))</test>
83
+ <result>
84
+ <assert-true/>
85
+ </result>
86
+ </test-case>
87
+
88
+ <test-case name="fn-existsdbl1args-1">
89
+ <description> Evaluates The "exists" 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:exists((xs:double("-1.7976931348623157E308")))</test>
92
+ <result>
93
+ <assert-true/>
94
+ </result>
95
+ </test-case>
96
+
97
+ <test-case name="fn-existsdbl1args-2">
98
+ <description> Evaluates The "exists" 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:exists((xs:double("0")))</test>
101
+ <result>
102
+ <assert-true/>
103
+ </result>
104
+ </test-case>
105
+
106
+ <test-case name="fn-existsdbl1args-3">
107
+ <description> Evaluates The "exists" 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:exists((xs:double("1.7976931348623157E308")))</test>
110
+ <result>
111
+ <assert-true/>
112
+ </result>
113
+ </test-case>
114
+
115
+ <test-case name="fn-existsflt1args-1">
116
+ <description> Evaluates The "exists" 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:exists((xs:float("-3.4028235E38")))</test>
119
+ <result>
120
+ <assert-true/>
121
+ </result>
122
+ </test-case>
123
+
124
+ <test-case name="fn-existsflt1args-2">
125
+ <description> Evaluates The "exists" 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:exists((xs:float("0")))</test>
128
+ <result>
129
+ <assert-true/>
130
+ </result>
131
+ </test-case>
132
+
133
+ <test-case name="fn-existsflt1args-3">
134
+ <description> Evaluates The "exists" 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:exists((xs:float("3.4028235E38")))</test>
137
+ <result>
138
+ <assert-true/>
139
+ </result>
140
+ </test-case>
141
+
142
+ <test-case name="fn-existslng1args-1">
143
+ <description> Evaluates The "exists" 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:exists((xs:long("-92233720368547758")))</test>
146
+ <result>
147
+ <assert-true/>
148
+ </result>
149
+ </test-case>
150
+
151
+ <test-case name="fn-existslng1args-2">
152
+ <description> Evaluates The "exists" 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:exists((xs:long("-47175562203048468")))</test>
155
+ <result>
156
+ <assert-true/>
157
+ </result>
158
+ </test-case>
159
+
160
+ <test-case name="fn-existslng1args-3">
161
+ <description> Evaluates The "exists" 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:exists((xs:long("92233720368547758")))</test>
164
+ <result>
165
+ <assert-true/>
166
+ </result>
167
+ </test-case>
168
+
169
+ <test-case name="fn-existsusht1args-1">
170
+ <description> Evaluates The "exists" 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:exists((xs:unsignedShort("0")))</test>
173
+ <result>
174
+ <assert-true/>
175
+ </result>
176
+ </test-case>
177
+
178
+ <test-case name="fn-existsusht1args-2">
179
+ <description> Evaluates The "exists" 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:exists((xs:unsignedShort("44633")))</test>
182
+ <result>
183
+ <assert-true/>
184
+ </result>
185
+ </test-case>
186
+
187
+ <test-case name="fn-existsusht1args-3">
188
+ <description> Evaluates The "exists" 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:exists((xs:unsignedShort("65535")))</test>
191
+ <result>
192
+ <assert-true/>
193
+ </result>
194
+ </test-case>
195
+
196
+ <test-case name="fn-existsnint1args-1">
197
+ <description> Evaluates The "exists" 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:exists((xs:negativeInteger("-999999999999999999")))</test>
200
+ <result>
201
+ <assert-true/>
202
+ </result>
203
+ </test-case>
204
+
205
+ <test-case name="fn-existsnint1args-2">
206
+ <description> Evaluates The "exists" 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:exists((xs:negativeInteger("-297014075999096793")))</test>
209
+ <result>
210
+ <assert-true/>
211
+ </result>
212
+ </test-case>
213
+
214
+ <test-case name="fn-existsnint1args-3">
215
+ <description> Evaluates The "exists" 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:exists((xs:negativeInteger("-1")))</test>
218
+ <result>
219
+ <assert-true/>
220
+ </result>
221
+ </test-case>
222
+
223
+ <test-case name="fn-existspint1args-1">
224
+ <description> Evaluates The "exists" 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:exists((xs:positiveInteger("1")))</test>
227
+ <result>
228
+ <assert-true/>
229
+ </result>
230
+ </test-case>
231
+
232
+ <test-case name="fn-existspint1args-2">
233
+ <description> Evaluates The "exists" 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:exists((xs:positiveInteger("52704602390610033")))</test>
236
+ <result>
237
+ <assert-true/>
238
+ </result>
239
+ </test-case>
240
+
241
+ <test-case name="fn-existspint1args-3">
242
+ <description> Evaluates The "exists" 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:exists((xs:positiveInteger("999999999999999999")))</test>
245
+ <result>
246
+ <assert-true/>
247
+ </result>
248
+ </test-case>
249
+
250
+ <test-case name="fn-existsulng1args-1">
251
+ <description> Evaluates The "exists" 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:exists((xs:unsignedLong("0")))</test>
254
+ <result>
255
+ <assert-true/>
256
+ </result>
257
+ </test-case>
258
+
259
+ <test-case name="fn-existsulng1args-2">
260
+ <description> Evaluates The "exists" 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:exists((xs:unsignedLong("130747108607674654")))</test>
263
+ <result>
264
+ <assert-true/>
265
+ </result>
266
+ </test-case>
267
+
268
+ <test-case name="fn-existsulng1args-3">
269
+ <description> Evaluates The "exists" 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:exists((xs:unsignedLong("184467440737095516")))</test>
272
+ <result>
273
+ <assert-true/>
274
+ </result>
275
+ </test-case>
276
+
277
+ <test-case name="fn-existsnpi1args-1">
278
+ <description> Evaluates The "exists" 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:exists((xs:nonPositiveInteger("-999999999999999999")))</test>
281
+ <result>
282
+ <assert-true/>
283
+ </result>
284
+ </test-case>
285
+
286
+ <test-case name="fn-existsnpi1args-2">
287
+ <description> Evaluates The "exists" 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:exists((xs:nonPositiveInteger("-475688437271870490")))</test>
290
+ <result>
291
+ <assert-true/>
292
+ </result>
293
+ </test-case>
294
+
295
+ <test-case name="fn-existsnpi1args-3">
296
+ <description> Evaluates The "exists" 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:exists((xs:nonPositiveInteger("0")))</test>
299
+ <result>
300
+ <assert-true/>
301
+ </result>
302
+ </test-case>
303
+
304
+ <test-case name="fn-existsnni1args-1">
305
+ <description> Evaluates The "exists" 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:exists((xs:nonNegativeInteger("0")))</test>
308
+ <result>
309
+ <assert-true/>
310
+ </result>
311
+ </test-case>
312
+
313
+ <test-case name="fn-existsnni1args-2">
314
+ <description> Evaluates The "exists" 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:exists((xs:nonNegativeInteger("303884545991464527")))</test>
317
+ <result>
318
+ <assert-true/>
319
+ </result>
320
+ </test-case>
321
+
322
+ <test-case name="fn-existsnni1args-3">
323
+ <description> Evaluates The "exists" 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:exists((xs:nonNegativeInteger("999999999999999999")))</test>
326
+ <result>
327
+ <assert-true/>
328
+ </result>
329
+ </test-case>
330
+
331
+ <test-case name="fn-existssht1args-1">
332
+ <description> Evaluates The "exists" 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:exists((xs:short("-32768")))</test>
335
+ <result>
336
+ <assert-true/>
337
+ </result>
338
+ </test-case>
339
+
340
+ <test-case name="fn-existssht1args-2">
341
+ <description> Evaluates The "exists" 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:exists((xs:short("-5324")))</test>
344
+ <result>
345
+ <assert-true/>
346
+ </result>
347
+ </test-case>
348
+
349
+ <test-case name="fn-existssht1args-3">
350
+ <description> Evaluates The "exists" 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:exists((xs:short("32767")))</test>
353
+ <result>
354
+ <assert-true/>
355
+ </result>
356
+ </test-case>
357
+
358
+ <test-case name="K-SeqExistsFunc-1">
359
+ <description> A test whose essence is: `exists(1, 2)`. </description>
360
+ <created by="Frans Englich" on="2007-11-26"/>
361
+ <test>exists(1, 2)</test>
362
+ <result>
363
+ <error code="XPST0017"/>
364
+ </result>
365
+ </test-case>
366
+
367
+ <test-case name="K-SeqExistsFunc-2">
368
+ <description> A test whose essence is: `exists()`. </description>
369
+ <created by="Frans Englich" on="2007-11-26"/>
370
+ <test>exists()</test>
371
+ <result>
372
+ <error code="XPST0017"/>
373
+ </result>
374
+ </test-case>
375
+
376
+ <test-case name="K-SeqExistsFunc-3">
377
+ <description> A test whose essence is: `not(exists(()))`. </description>
378
+ <created by="Frans Englich" on="2007-11-26"/>
379
+ <test>not(exists(()))</test>
380
+ <result>
381
+ <assert-true/>
382
+ </result>
383
+ </test-case>
384
+
385
+ <test-case name="K-SeqExistsFunc-4">
386
+ <description> A test whose essence is: `exists(1)`. </description>
387
+ <created by="Frans Englich" on="2007-11-26"/>
388
+ <test>exists(1)</test>
389
+ <result>
390
+ <assert-true/>
391
+ </result>
392
+ </test-case>
393
+
394
+ <test-case name="K-SeqExistsFunc-5">
395
+ <description> A test whose essence is: `exists((1))`. </description>
396
+ <created by="Frans Englich" on="2007-11-26"/>
397
+ <test>exists((1))</test>
398
+ <result>
399
+ <assert-true/>
400
+ </result>
401
+ </test-case>
402
+
403
+ <test-case name="K-SeqExistsFunc-6">
404
+ <description> A test whose essence is: `exists((1, 2, 3))`. </description>
405
+ <created by="Frans Englich" on="2007-11-26"/>
406
+ <test>exists((1, 2, 3))</test>
407
+ <result>
408
+ <assert-true/>
409
+ </result>
410
+ </test-case>
411
+
412
+ <test-case name="K-SeqExistsFunc-7">
413
+ <description> A test whose essence is: `not(exists(()))`. </description>
414
+ <created by="Frans Englich" on="2007-11-26"/>
415
+ <test>not(exists(()))</test>
416
+ <result>
417
+ <assert-true/>
418
+ </result>
419
+ </test-case>
420
+
421
+ <test-case name="K-SeqExistsFunc-8">
422
+ <description> A test whose essence is: `not(exists( ((), (), (), ()) ))`. </description>
423
+ <created by="Frans Englich" on="2007-11-26"/>
424
+ <test>not(exists( ((), (), (), ()) ))</test>
425
+ <result>
426
+ <assert-true/>
427
+ </result>
428
+ </test-case>
429
+
430
+ <test-case name="K-SeqExistsFunc-9">
431
+ <description> A test whose essence is: `exists(reverse((1, 2, 3)))`. </description>
432
+ <created by="Frans Englich" on="2007-11-26"/>
433
+ <test>exists(reverse((1, 2, 3)))</test>
434
+ <result>
435
+ <assert-true/>
436
+ </result>
437
+ </test-case>
438
+
439
+ <test-case name="K-SeqExistsFunc-10">
440
+ <description> The Dynamic Context property 'current dateTime' must have an explicit timezone when presented as a xs:dateTime. </description>
441
+ <created by="Frans Englich" on="2007-11-26"/>
442
+ <test>exists(timezone-from-dateTime(current-dateTime()))</test>
443
+ <result>
444
+ <assert-true/>
445
+ </result>
446
+ </test-case>
447
+
448
+ <test-case name="K-SeqExistsFunc-11">
449
+ <description> The Dynamic Context property 'current dateTime' must have an explicit timezone when presented as a xs:date. </description>
450
+ <created by="Frans Englich" on="2007-11-26"/>
451
+ <test>exists(timezone-from-date(current-date()))</test>
452
+ <result>
453
+ <assert-true/>
454
+ </result>
455
+ </test-case>
456
+
457
+ <test-case name="K-SeqExistsFunc-12">
458
+ <description> The Dynamic Context property 'current dateTime' must have an explicit timezone when presented as a xs:time. </description>
459
+ <created by="Frans Englich" on="2007-11-26"/>
460
+ <test>exists(timezone-from-time(current-time()))</test>
461
+ <result>
462
+ <assert-true/>
463
+ </result>
464
+ </test-case>
465
+
466
+ <test-case name="K-SeqExistsFunc-13">
467
+ <description> fn:empty combined with fn:remove. </description>
468
+ <created by="Frans Englich" on="2007-11-26"/>
469
+ <test>empty(remove(current-time(), 1))</test>
470
+ <result>
471
+ <assert-true/>
472
+ </result>
473
+ </test-case>
474
+
475
+ <test-case name="K-SeqExistsFunc-14">
476
+ <description> fn:empty combined with fn:remove and fn:not. </description>
477
+ <created by="Frans Englich" on="2007-11-26"/>
478
+ <test>not(empty(remove((current-time(), 1), 1)))</test>
479
+ <result>
480
+ <assert-true/>
481
+ </result>
482
+ </test-case>
483
+
484
+
485
+ <test-case name="cbcl-exists-001">
486
+ <description> test fn:exists on a mix of values and expressions </description>
487
+ <created by="Tim Mills" on="2008-04-11"/>
488
+ <dependency type="spec" value="XQ10+"/>
489
+ <test>
490
+ declare function local:generate($arg as xs:integer?) { if ($arg = 0) then (1, 2, 3) else $arg };
491
+ fn:exists( ( (), local:generate( () ), local:generate( 0 ), (1 to 10000000), local:generate( () ), local:generate(1)) )</test>
492
+ <result>
493
+ <assert-true/>
494
+ </result>
495
+ </test-case>
496
+
497
+
498
+ <test-case name="cbcl-exists-002">
499
+ <description> Tests aggregation optimizations for exists </description>
500
+ <created by="Nick Jones" on="2008-06-09"/>
501
+ <test>exists(for $x in (1 to 10)[. mod 2 = 0] return "blah")</test>
502
+ <result>
503
+ <assert-true/>
504
+ </result>
505
+ </test-case>
506
+
507
+
508
+ <test-case name="cbcl-exists-003">
509
+ <description> Tests exists on text node </description>
510
+ <created by="Nick Jones" on="2008-06-17"/>
511
+ <dependency type="spec" value="XQ10+"/>
512
+ <test>exists(text {(1 to 10)[. mod 2 = 0]})</test>
513
+ <result>
514
+ <assert-true/>
515
+ </result>
516
+ </test-case>
517
+
518
+
519
+ <test-case name="cbcl-exists-004">
520
+ <description> Test on optimization as aggregate function </description>
521
+ <created by="Nick Jones" on="2008-06-17"/>
522
+ <test>exists(for $x in (1 to 10)[. mod 2 = 0] return true())</test>
523
+ <result>
524
+ <assert-true/>
525
+ </result>
526
+ </test-case>
527
+
528
+
529
+ <test-case name="cbcl-exists-005">
530
+ <description> Tests exists on a map expression </description>
531
+ <created by="Nick Jones" on="2008-06-17"/>
532
+ <test>exists(for $x in (1 to 10)[. mod 2 = 0] return floor($x))</test>
533
+ <result>
534
+ <assert-true/>
535
+ </result>
536
+ </test-case>
537
+ </test-set>
@@ -0,0 +1,90 @@
1
+ <?xml version="1.0" encoding="us-ascii"?>
2
+ <test-set xmlns="http://www.w3.org/2010/09/qt-fots-catalog" name="fn-head" covers-30="fn-head">
3
+ <description>Tests for the head() function</description>
4
+ <link type="spec" document="http://www.w3.org/TR/xpath-functions-30/"
5
+ idref="func-head"/>
6
+ <dependency type="spec" value="XP30+ XQ30+"/>
7
+
8
+ <test-case name="head-001">
9
+ <description> head() of a simple sequence </description>
10
+ <created by="Michael Kay" on="2010-02-18"/>
11
+ <test>head(3 to 10)</test>
12
+ <result>
13
+ <assert-eq>3</assert-eq>
14
+ </result>
15
+ </test-case>
16
+
17
+ <test-case name="head-002">
18
+ <description> head() of a simple sequence </description>
19
+ <created by="Michael Kay" on="2010-02-18"/>
20
+ <test>head(("a", "b", current-dateTime()))</test>
21
+ <result>
22
+ <assert-eq>"a"</assert-eq>
23
+ </result>
24
+ </test-case>
25
+
26
+ <test-case name="head-003">
27
+ <description> head() of a node sequence </description>
28
+ <created by="Michael Kay" on="2010-02-18"/>
29
+ <environment ref="works-mod"/>
30
+ <test>let $a := /works return head($a/*)/string(@name)</test>
31
+ <result>
32
+ <assert-string-value>Jane Doe 1</assert-string-value>
33
+ </result>
34
+ </test-case>
35
+
36
+ <test-case name="head-004">
37
+ <description> head() of a singleton sequence </description>
38
+ <created by="Michael Kay" on="2010-02-18"/>
39
+ <environment ref="works-mod"/>
40
+ <test>let $a := /works return name(head($a))</test>
41
+ <result>
42
+ <assert-string-value>works</assert-string-value>
43
+ </result>
44
+ </test-case>
45
+
46
+ <test-case name="head-005">
47
+ <description> head() of an empty sequence </description>
48
+ <created by="Michael Kay" on="2010-02-18"/>
49
+ <environment ref="works-mod"/>
50
+ <test>head(/works/cucumber)</test>
51
+ <result>
52
+ <assert-empty/>
53
+ </result>
54
+ </test-case>
55
+
56
+ <test-case name="head-006">
57
+ <description> head() preserves identity </description>
58
+ <created by="Michael Kay" on="2010-02-18"/>
59
+ <environment ref="works-mod"/>
60
+ <test>let $a := /works/* return (head($a) is $a[1])</test>
61
+ <result>
62
+ <assert-true/>
63
+ </result>
64
+ </test-case>
65
+
66
+ <test-case name="head-007">
67
+ <description> dynamic call on head() </description>
68
+ <created by="Michael Kay" on="2015-02-04"/>
69
+ <dependency type="feature" value="higherOrderFunctions"/>
70
+ <test>
71
+ let $f := if (current-date() gt xs:date('1900-01-01')) then head#1 else count#1
72
+ return $f(5 to 10)</test>
73
+ <result>
74
+ <assert-eq>5</assert-eq>
75
+ </result>
76
+ </test-case>
77
+
78
+ <test-case name="head-008">
79
+ <description> dynamic call on head(), returning empty </description>
80
+ <created by="Michael Kay" on="2015-02-04"/>
81
+ <environment ref="works-mod"/>
82
+ <dependency type="feature" value="higherOrderFunctions"/>
83
+ <test>
84
+ let $f := if (current-date() gt xs:date('1900-01-01')) then head#1 else (abs#1, abs#1, abs#1, abs#1)
85
+ return $f[1](/works/cucumber)</test>
86
+ <result>
87
+ <assert-empty/>
88
+ </result>
89
+ </test-case>
90
+ </test-set>