1 | /**************************************************************************** |
2 | ** |
3 | ** Copyright (C) 2016 The Qt Company Ltd. |
4 | ** Contact: https://www.qt.io/licensing/ |
5 | ** |
6 | ** This file is part of the autotests of the Qt Toolkit. |
7 | ** |
8 | ** $QT_BEGIN_LICENSE:GPL-EXCEPT$ |
9 | ** Commercial License Usage |
10 | ** Licensees holding valid commercial Qt licenses may use this file in |
11 | ** accordance with the commercial license agreement provided with the |
12 | ** Software or, alternatively, in accordance with the terms contained in |
13 | ** a written agreement between you and The Qt Company. For licensing terms |
14 | ** and conditions see https://www.qt.io/terms-conditions. For further |
15 | ** information use the contact form at https://www.qt.io/contact-us. |
16 | ** |
17 | ** GNU General Public License Usage |
18 | ** Alternatively, this file may be used under the terms of the GNU |
19 | ** General Public License version 3 as published by the Free Software |
20 | ** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT |
21 | ** included in the packaging of this file. Please review the following |
22 | ** information to ensure the GNU General Public License requirements will |
23 | ** be met: https://www.gnu.org/licenses/gpl-3.0.html. |
24 | ** |
25 | ** $QT_END_LICENSE$ |
26 | ** |
27 | ****************************************************************************/ |
28 | |
29 | #include <QtDebug> |
30 | |
31 | #include <private/qacceltreeresourceloader_p.h> |
32 | #include <private/qnetworkaccessdelegator_p.h> |
33 | |
34 | #include "Global.h" |
35 | #include "TestBaseLine.h" |
36 | #include "TestGroup.h" |
37 | |
38 | #include "XSDTestSuiteHandler.h" |
39 | #include "XSDTSTestCase.h" |
40 | |
41 | using namespace QPatternistSDK; |
42 | |
43 | extern QNetworkAccessManager s_networkManager; |
44 | |
45 | XSDTestSuiteHandler::XSDTestSuiteHandler(const QUrl &catalogFile) : m_ts(0) |
46 | , m_catalogFile(catalogFile) |
47 | , m_inSchemaTest(false) |
48 | , m_inInstanceTest(false) |
49 | , m_inTestGroup(false) |
50 | , m_inDescription(false) |
51 | , m_schemaBlacklisted(false) |
52 | , m_counter(0) |
53 | { |
54 | Q_ASSERT(!m_catalogFile.isRelative()); |
55 | m_ts = new TestSuite(); |
56 | m_topLevelGroup = new TestGroup(m_ts); |
57 | m_topLevelGroup->setTitle("XML Schema Test Suite" ); |
58 | m_ts->appendChild(item: m_topLevelGroup); |
59 | |
60 | // exclude these test cases, as they break our current state machine |
61 | m_blackList << QLatin1String("addB099" ) |
62 | << QLatin1String("addB118" ) |
63 | << QLatin1String("elemJ003" ) |
64 | << QLatin1String("elemJ011" ) |
65 | << QLatin1String("elemZ004" ) |
66 | << QLatin1String("elemZ020" ) |
67 | << QLatin1String("groupH021v" ) |
68 | << QLatin1String("groupJ009v" ) |
69 | << QLatin1String("name00101m2" ) |
70 | << QLatin1String("schL5" ) |
71 | << QLatin1String("ste110" ) |
72 | << QLatin1String("stZ007" ) |
73 | << QLatin1String("stZ047" ) |
74 | << QLatin1String("stZ055" ) |
75 | << QLatin1String("addB049" ) |
76 | << QLatin1String("addB068" ) |
77 | << QLatin1String("addB078" ) |
78 | << QLatin1String("addB078A" ) |
79 | << QLatin1String("addB078B" ) |
80 | << QLatin1String("addB167" ) |
81 | << QLatin1String("addB191" ) |
82 | << QLatin1String("isDefault060_2" ) |
83 | << QLatin1String("isDefault069" ) |
84 | << QLatin1String("annotB025" ) |
85 | << QLatin1String("base64Binary_enumeration003_1321" ) |
86 | << QLatin1String("anyURI_a001_1336" ) |
87 | << QLatin1String("anyURI_a001_1336" ) |
88 | << QLatin1String("anyURI_a003_1338" ) |
89 | << QLatin1String("anyURI_a004_1339" ) |
90 | << QLatin1String("anyURI_b004_1354" ) |
91 | << QLatin1String("anyURI_b004_1354" ) |
92 | << QLatin1String("anyURI_b006_1356" ) |
93 | << QLatin1String("QName_length001_1357" ) |
94 | << QLatin1String("QName_length003_1359" ) |
95 | << QLatin1String("QName_minLength003_1362" ) |
96 | << QLatin1String("QName_maxLength001_1364" ) |
97 | << QLatin1String("NOTATION_length001_1372" ) |
98 | << QLatin1String("NOTATION_length003_1374" ) |
99 | << QLatin1String("NOTATION_minLength003_1377" ) |
100 | << QLatin1String("NOTATION_maxLength001_1379" ) |
101 | << QLatin1String("hexBinary003_2069" ) |
102 | << QLatin1String("QName009_2092" ) |
103 | << QLatin1String("dtZ107447_a_2245" ) |
104 | << QLatin1String("elemE001" ) |
105 | << QLatin1String("elemE002" ) |
106 | << QLatin1String("elemE003" ) |
107 | << QLatin1String("elemE004" ) |
108 | << QLatin1String("elemE005" ) |
109 | << QLatin1String("elemT026" ) |
110 | << QLatin1String("elemT027" ) |
111 | << QLatin1String("elemT028" ) |
112 | << QLatin1String("elemT029" ) |
113 | << QLatin1String("elemT054" ) |
114 | << QLatin1String("elemT055" ) |
115 | << QLatin1String("elemT056" ) |
116 | << QLatin1String("elemT057" ) |
117 | << QLatin1String("elemZ006" ) |
118 | << QLatin1String("elemZ007" ) |
119 | << QLatin1String("elemZ026" ) |
120 | << QLatin1String("elemZ027_c" ) |
121 | << QLatin1String("elemZ028c" ) |
122 | << QLatin1String("elemZ028d" ) |
123 | << QLatin1String("elemZ028f1" ) |
124 | << QLatin1String("elemZ028f1" ) |
125 | << QLatin1String("elemZ028f2" ) |
126 | << QLatin1String("elemZ028f2" ) |
127 | << QLatin1String("elemZ028f3" ) |
128 | << QLatin1String("elemZ028f3" ) |
129 | << QLatin1String("elemZ031" ) |
130 | << QLatin1String("errF001" ) |
131 | << QLatin1String("idC019" ) |
132 | << QLatin1String("idL100" ) |
133 | << QLatin1String("idZ011" ) |
134 | << QLatin1String("idZ015" ) |
135 | << QLatin1String("mgO013" ) |
136 | << QLatin1String("particlesA012" ) |
137 | << QLatin1String("particlesA013" ) |
138 | << QLatin1String("particlesA014" ) |
139 | << QLatin1String("particlesA015" ) |
140 | << QLatin1String("particlesHa161" ) |
141 | << QLatin1String("particlesHb008" ) |
142 | << QLatin1String("particlesHb011" ) |
143 | << QLatin1String("particlesIe003" ) |
144 | << QLatin1String("particlesIg003" ) |
145 | << QLatin1String("particlesIg004" ) |
146 | << QLatin1String("particlesJb003" ) |
147 | << QLatin1String("particlesJd003" ) |
148 | << QLatin1String("particlesJf003" ) |
149 | << QLatin1String("particlesJk003" ) |
150 | << QLatin1String("particlesOb001" ) |
151 | << QLatin1String("particlesOb002" ) |
152 | << QLatin1String("particlesOb004" ) |
153 | << QLatin1String("particlesOb008" ) |
154 | << QLatin1String("particlesOb009" ) |
155 | << QLatin1String("particlesOb013" ) |
156 | << QLatin1String("particlesOb018" ) |
157 | << QLatin1String("particlesQ005" ) |
158 | << QLatin1String("particlesS002" ) |
159 | << QLatin1String("particlesT002" ) |
160 | << QLatin1String("particlesT009" ) |
161 | << QLatin1String("particlesT014" ) |
162 | << QLatin1String("particlesV001" ) |
163 | << QLatin1String("particlesV002" ) |
164 | << QLatin1String("particlesV020" ) |
165 | << QLatin1String("particlesZ001" ) |
166 | << QLatin1String("particlesZ005" ) |
167 | << QLatin1String("particlesZ007" ) |
168 | << QLatin1String("particlesZ023" ) |
169 | << QLatin1String("particlesZ024" ) |
170 | << QLatin1String("particlesZ026" ) |
171 | << QLatin1String("particlesZ028" ) |
172 | << QLatin1String("particlesZ033_c" ) |
173 | << QLatin1String("particlesZ033_d" ) |
174 | << QLatin1String("particlesZ033_e" ) |
175 | << QLatin1String("particlesZ033_f" ) |
176 | << QLatin1String("particlesZ033_g" ) |
177 | << QLatin1String("particlesZ034_a1" ) |
178 | << QLatin1String("particlesZ034_a2" ) |
179 | << QLatin1String("particlesZ034_a3" ) |
180 | << QLatin1String("particlesZ034_b" ) |
181 | << QLatin1String("particlesZ035_a" ) |
182 | << QLatin1String("particlesZ035_b" ) |
183 | << QLatin1String("particlesZ036_a" ) |
184 | << QLatin1String("particlesZ036_b1" ) |
185 | << QLatin1String("particlesZ036_b2" ) |
186 | << QLatin1String("particlesZ036_c" ) |
187 | /* |
188 | << QLatin1String("reC65") |
189 | << QLatin1String("reC66") |
190 | << QLatin1String("reC67") |
191 | << QLatin1String("reC68") |
192 | << QLatin1String("reF58") |
193 | << QLatin1String("reG50") |
194 | << QLatin1String("reJ11") |
195 | << QLatin1String("reJ13") |
196 | << QLatin1String("reJ19") |
197 | << QLatin1String("reJ21") |
198 | << QLatin1String("reJ23") |
199 | << QLatin1String("reJ25") |
200 | << QLatin1String("reJ29") |
201 | << QLatin1String("reJ31") |
202 | << QLatin1String("reJ33") |
203 | << QLatin1String("reJ35") |
204 | << QLatin1String("reJ61") |
205 | << QLatin1String("reJ69") |
206 | << QLatin1String("reJ75") |
207 | << QLatin1String("reJ77") |
208 | << QLatin1String("reL98") |
209 | << QLatin1String("reL99") |
210 | << QLatin1String("reM98") |
211 | << QLatin1String("reN99") |
212 | << QLatin1String("reS21") |
213 | << QLatin1String("reS42") |
214 | << QLatin1String("reT63") |
215 | << QLatin1String("reT84") |
216 | << QLatin1String("reDG2") |
217 | << QLatin1String("RegexTest_9") |
218 | << QLatin1String("RegexTest_11") |
219 | << QLatin1String("RegexTest_14") |
220 | << QLatin1String("RegexTest_15") |
221 | << QLatin1String("RegexTest_16") |
222 | << QLatin1String("RegexTest_17") |
223 | << QLatin1String("RegexTest_23") |
224 | << QLatin1String("RegexTest_24") |
225 | << QLatin1String("RegexTest_25") |
226 | << QLatin1String("RegexTest_26") |
227 | << QLatin1String("RegexTest_27") |
228 | << QLatin1String("RegexTest_28") |
229 | << QLatin1String("RegexTest_30") |
230 | << QLatin1String("RegexTest_30") |
231 | << QLatin1String("RegexTest_33") |
232 | << QLatin1String("RegexTest_34") |
233 | << QLatin1String("RegexTest_34") |
234 | << QLatin1String("RegexTest_43") |
235 | << QLatin1String("RegexTest_44") |
236 | << QLatin1String("RegexTest_45") |
237 | << QLatin1String("RegexTest_46") |
238 | << QLatin1String("RegexTest_47") |
239 | << QLatin1String("RegexTest_48") |
240 | << QLatin1String("RegexTest_49") |
241 | << QLatin1String("RegexTest_50") |
242 | << QLatin1String("RegexTest_51") |
243 | << QLatin1String("RegexTest_52") |
244 | << QLatin1String("RegexTest_53") |
245 | << QLatin1String("RegexTest_54") |
246 | << QLatin1String("RegexTest_55") |
247 | << QLatin1String("RegexTest_56") |
248 | << QLatin1String("RegexTest_57") |
249 | << QLatin1String("RegexTest_57") |
250 | << QLatin1String("RegexTest_58") |
251 | << QLatin1String("RegexTest_58") |
252 | << QLatin1String("RegexTest_65") |
253 | << QLatin1String("RegexTest_113") |
254 | << QLatin1String("RegexTest_116") |
255 | << QLatin1String("RegexTest_119") |
256 | << QLatin1String("RegexTest_120") |
257 | << QLatin1String("RegexTest_121") |
258 | << QLatin1String("RegexTest_141") |
259 | << QLatin1String("RegexTest_142") |
260 | << QLatin1String("RegexTest_143") |
261 | << QLatin1String("RegexTest_145") |
262 | << QLatin1String("RegexTest_146") |
263 | << QLatin1String("RegexTest_147") |
264 | << QLatin1String("RegexTest_148") |
265 | << QLatin1String("RegexTest_149") |
266 | << QLatin1String("RegexTest_150") |
267 | << QLatin1String("RegexTest_151") |
268 | << QLatin1String("RegexTest_152") |
269 | << QLatin1String("RegexTest_154") |
270 | << QLatin1String("RegexTest_155") |
271 | << QLatin1String("RegexTest_156") |
272 | << QLatin1String("RegexTest_157") |
273 | << QLatin1String("RegexTest_158") |
274 | << QLatin1String("RegexTest_163") |
275 | << QLatin1String("RegexTest_164") |
276 | << QLatin1String("RegexTest_165") |
277 | << QLatin1String("RegexTest_166") |
278 | << QLatin1String("RegexTest_167") |
279 | << QLatin1String("RegexTest_168") |
280 | << QLatin1String("RegexTest_169") |
281 | << QLatin1String("RegexTest_170") |
282 | << QLatin1String("RegexTest_171") |
283 | << QLatin1String("RegexTest_172") |
284 | << QLatin1String("RegexTest_173") |
285 | << QLatin1String("RegexTest_174") |
286 | << QLatin1String("RegexTest_178") |
287 | << QLatin1String("RegexTest_194") |
288 | << QLatin1String("RegexTest_194") |
289 | << QLatin1String("RegexTest_195") |
290 | << QLatin1String("RegexTest_195") |
291 | << QLatin1String("RegexTest_196") |
292 | << QLatin1String("RegexTest_196") |
293 | << QLatin1String("RegexTest_197") |
294 | << QLatin1String("RegexTest_198") |
295 | << QLatin1String("RegexTest_199") |
296 | << QLatin1String("RegexTest_200") |
297 | << QLatin1String("RegexTest_200") |
298 | << QLatin1String("RegexTest_201") |
299 | << QLatin1String("RegexTest_201") |
300 | << QLatin1String("RegexTest_202") |
301 | << QLatin1String("RegexTest_202") |
302 | << QLatin1String("RegexTest_203") |
303 | << QLatin1String("RegexTest_204") |
304 | << QLatin1String("RegexTest_205") |
305 | << QLatin1String("RegexTest_206") |
306 | << QLatin1String("RegexTest_207") |
307 | << QLatin1String("RegexTest_208") |
308 | << QLatin1String("RegexTest_209") |
309 | << QLatin1String("RegexTest_209") |
310 | << QLatin1String("RegexTest_210") |
311 | << QLatin1String("RegexTest_210") |
312 | << QLatin1String("RegexTest_211") |
313 | << QLatin1String("RegexTest_211") |
314 | << QLatin1String("RegexTest_212") |
315 | << QLatin1String("RegexTest_213") |
316 | << QLatin1String("RegexTest_214") |
317 | << QLatin1String("RegexTest_215") |
318 | << QLatin1String("RegexTest_216") |
319 | << QLatin1String("RegexTest_217") |
320 | << QLatin1String("RegexTest_218") |
321 | << QLatin1String("RegexTest_220") |
322 | << QLatin1String("RegexTest_221") |
323 | << QLatin1String("RegexTest_222") |
324 | << QLatin1String("RegexTest_226") |
325 | << QLatin1String("RegexTest_230") |
326 | << QLatin1String("RegexTest_232") |
327 | << QLatin1String("RegexTest_233") |
328 | << QLatin1String("RegexTest_294") |
329 | << QLatin1String("RegexTest_294") |
330 | << QLatin1String("RegexTest_295") |
331 | << QLatin1String("RegexTest_295") |
332 | << QLatin1String("RegexTest_299") |
333 | << QLatin1String("RegexTest_300") |
334 | << QLatin1String("RegexTest_301") |
335 | << QLatin1String("RegexTest_302") |
336 | << QLatin1String("RegexTest_303") |
337 | << QLatin1String("RegexTest_304") |
338 | << QLatin1String("RegexTest_305") |
339 | << QLatin1String("RegexTest_306") |
340 | << QLatin1String("RegexTest_307") |
341 | << QLatin1String("RegexTest_308") |
342 | << QLatin1String("RegexTest_309") |
343 | << QLatin1String("RegexTest_310") |
344 | << QLatin1String("RegexTest_311") |
345 | << QLatin1String("RegexTest_312") |
346 | << QLatin1String("RegexTest_313") |
347 | << QLatin1String("RegexTest_314") |
348 | << QLatin1String("RegexTest_315") |
349 | << QLatin1String("RegexTest_315") |
350 | << QLatin1String("RegexTest_316") |
351 | << QLatin1String("RegexTest_316") |
352 | << QLatin1String("RegexTest_317") |
353 | << QLatin1String("RegexTest_317") |
354 | << QLatin1String("RegexTest_440") |
355 | << QLatin1String("RegexTest_441") |
356 | << QLatin1String("RegexTest_442") |
357 | << QLatin1String("RegexTest_443") |
358 | << QLatin1String("RegexTest_448") |
359 | << QLatin1String("RegexTest_449") |
360 | << QLatin1String("RegexTest_450") |
361 | << QLatin1String("RegexTest_451") |
362 | << QLatin1String("RegexTest_458") |
363 | << QLatin1String("RegexTest_464") |
364 | << QLatin1String("RegexTest_464") |
365 | << QLatin1String("RegexTest_465") |
366 | << QLatin1String("RegexTest_469") |
367 | << QLatin1String("RegexTest_470") |
368 | << QLatin1String("RegexTest_471") |
369 | << QLatin1String("RegexTest_472") |
370 | << QLatin1String("RegexTest_473") |
371 | << QLatin1String("RegexTest_477") |
372 | << QLatin1String("RegexTest_478") |
373 | << QLatin1String("RegexTest_478") |
374 | << QLatin1String("RegexTest_479") |
375 | << QLatin1String("RegexTest_480") |
376 | << QLatin1String("RegexTest_481") |
377 | << QLatin1String("RegexTest_482") |
378 | << QLatin1String("RegexTest_482") |
379 | << QLatin1String("RegexTest_483") |
380 | << QLatin1String("RegexTest_483") |
381 | << QLatin1String("RegexTest_484") |
382 | << QLatin1String("RegexTest_487") |
383 | << QLatin1String("RegexTest_516") |
384 | << QLatin1String("RegexTest_516") |
385 | << QLatin1String("RegexTest_517") |
386 | << QLatin1String("RegexTest_517") |
387 | << QLatin1String("RegexTest_518") |
388 | << QLatin1String("RegexTest_518") |
389 | << QLatin1String("RegexTest_519") |
390 | << QLatin1String("RegexTest_519") |
391 | << QLatin1String("RegexTest_521") |
392 | << QLatin1String("RegexTest_523") |
393 | << QLatin1String("RegexTest_524") |
394 | << QLatin1String("RegexTest_524") |
395 | << QLatin1String("RegexTest_586") |
396 | << QLatin1String("RegexTest_587") |
397 | << QLatin1String("RegexTest_592") |
398 | << QLatin1String("RegexTest_593") |
399 | << QLatin1String("RegexTest_594") |
400 | << QLatin1String("RegexTest_595") |
401 | << QLatin1String("RegexTest_596") |
402 | << QLatin1String("RegexTest_597") |
403 | << QLatin1String("RegexTest_598") |
404 | << QLatin1String("RegexTest_599") |
405 | << QLatin1String("RegexTest_600") |
406 | << QLatin1String("RegexTest_601") |
407 | << QLatin1String("RegexTest_602") |
408 | << QLatin1String("RegexTest_603") |
409 | << QLatin1String("RegexTest_604") |
410 | << QLatin1String("RegexTest_605") |
411 | << QLatin1String("RegexTest_648") |
412 | << QLatin1String("RegexTest_655") |
413 | << QLatin1String("RegexTest_688") |
414 | << QLatin1String("RegexTest_696") |
415 | << QLatin1String("RegexTest_697") |
416 | << QLatin1String("RegexTest_698") |
417 | << QLatin1String("RegexTest_700") |
418 | << QLatin1String("RegexTest_701") |
419 | << QLatin1String("RegexTest_702") |
420 | << QLatin1String("RegexTest_703") |
421 | << QLatin1String("RegexTest_704") |
422 | << QLatin1String("RegexTest_705") |
423 | << QLatin1String("RegexTest_706") |
424 | << QLatin1String("RegexTest_707") |
425 | << QLatin1String("RegexTest_717") |
426 | << QLatin1String("RegexTest_718") |
427 | << QLatin1String("RegexTest_719") |
428 | << QLatin1String("RegexTest_724") |
429 | << QLatin1String("RegexTest_725") |
430 | << QLatin1String("RegexTest_726") |
431 | << QLatin1String("RegexTest_727") |
432 | << QLatin1String("RegexTest_728") |
433 | << QLatin1String("RegexTest_729") |
434 | << QLatin1String("RegexTest_730") |
435 | << QLatin1String("RegexTest_731") |
436 | << QLatin1String("RegexTest_732") |
437 | << QLatin1String("RegexTest_733") |
438 | << QLatin1String("RegexTest_743") |
439 | << QLatin1String("RegexTest_755") |
440 | << QLatin1String("RegexTest_756") |
441 | << QLatin1String("RegexTest_761") |
442 | << QLatin1String("RegexTest_762") |
443 | << QLatin1String("RegexTest_781") |
444 | << QLatin1String("RegexTest_782") |
445 | << QLatin1String("RegexTest_783") |
446 | << QLatin1String("RegexTest_790") |
447 | << QLatin1String("RegexTest_791") |
448 | << QLatin1String("RegexTest_824") |
449 | << QLatin1String("RegexTest_826") |
450 | << QLatin1String("RegexTest_827") |
451 | << QLatin1String("RegexTest_836") |
452 | << QLatin1String("RegexTest_837") |
453 | << QLatin1String("RegexTest_841") |
454 | << QLatin1String("RegexTest_842") |
455 | << QLatin1String("RegexTest_843") |
456 | << QLatin1String("RegexTest_844") |
457 | << QLatin1String("RegexTest_845") |
458 | << QLatin1String("RegexTest_846") |
459 | << QLatin1String("RegexTest_847") |
460 | << QLatin1String("RegexTest_848") |
461 | << QLatin1String("RegexTest_851") |
462 | << QLatin1String("RegexTest_852") |
463 | << QLatin1String("RegexTest_853") |
464 | << QLatin1String("RegexTest_854") |
465 | << QLatin1String("RegexTest_855") |
466 | << QLatin1String("RegexTest_856") |
467 | << QLatin1String("RegexTest_857") |
468 | << QLatin1String("RegexTest_861") |
469 | << QLatin1String("RegexTest_862") |
470 | << QLatin1String("RegexTest_863") |
471 | << QLatin1String("RegexTest_864") |
472 | << QLatin1String("RegexTest_865") |
473 | << QLatin1String("RegexTest_866") |
474 | << QLatin1String("RegexTest_870") |
475 | << QLatin1String("RegexTest_879") |
476 | << QLatin1String("RegexTest_880") |
477 | << QLatin1String("RegexTest_888") |
478 | << QLatin1String("RegexTest_889") |
479 | << QLatin1String("RegexTest_890") |
480 | << QLatin1String("RegexTest_891") |
481 | << QLatin1String("RegexTest_892") |
482 | << QLatin1String("RegexTest_893") |
483 | << QLatin1String("RegexTest_894") |
484 | << QLatin1String("RegexTest_895") |
485 | << QLatin1String("RegexTest_896") |
486 | << QLatin1String("RegexTest_897") |
487 | << QLatin1String("RegexTest_898") |
488 | << QLatin1String("RegexTest_899") |
489 | << QLatin1String("RegexTest_900") |
490 | << QLatin1String("RegexTest_901") |
491 | << QLatin1String("RegexTest_902") |
492 | << QLatin1String("RegexTest_903") |
493 | << QLatin1String("RegexTest_904") |
494 | << QLatin1String("RegexTest_905") |
495 | << QLatin1String("RegexTest_906") |
496 | << QLatin1String("RegexTest_907") |
497 | << QLatin1String("RegexTest_908") |
498 | << QLatin1String("RegexTest_909") |
499 | << QLatin1String("RegexTest_910") |
500 | << QLatin1String("RegexTest_911") |
501 | << QLatin1String("RegexTest_912") |
502 | << QLatin1String("RegexTest_913") |
503 | << QLatin1String("RegexTest_914") |
504 | << QLatin1String("RegexTest_915") |
505 | << QLatin1String("RegexTest_916") |
506 | << QLatin1String("RegexTest_917") |
507 | << QLatin1String("RegexTest_918") |
508 | << QLatin1String("RegexTest_919") |
509 | << QLatin1String("RegexTest_920") |
510 | << QLatin1String("RegexTest_921") |
511 | << QLatin1String("RegexTest_922") |
512 | << QLatin1String("RegexTest_923") |
513 | << QLatin1String("RegexTest_924") |
514 | << QLatin1String("RegexTest_925") |
515 | << QLatin1String("RegexTest_926") |
516 | << QLatin1String("RegexTest_928") |
517 | << QLatin1String("RegexTest_929") |
518 | << QLatin1String("RegexTest_930") |
519 | << QLatin1String("RegexTest_936") |
520 | << QLatin1String("RegexTest_937") |
521 | << QLatin1String("RegexTest_938") |
522 | << QLatin1String("RegexTest_939") |
523 | << QLatin1String("RegexTest_940") |
524 | << QLatin1String("RegexTest_941") |
525 | << QLatin1String("RegexTest_942") |
526 | << QLatin1String("RegexTest_943") |
527 | << QLatin1String("RegexTest_944") |
528 | << QLatin1String("RegexTest_945") |
529 | << QLatin1String("RegexTest_946") |
530 | << QLatin1String("RegexTest_949") |
531 | << QLatin1String("RegexTest_950") |
532 | << QLatin1String("RegexTest_951") |
533 | << QLatin1String("RegexTest_952") |
534 | << QLatin1String("RegexTest_953") |
535 | << QLatin1String("RegexTest_954") |
536 | << QLatin1String("RegexTest_955") |
537 | << QLatin1String("RegexTest_956") |
538 | << QLatin1String("RegexTest_957") |
539 | << QLatin1String("RegexTest_958") |
540 | << QLatin1String("RegexTest_959") |
541 | << QLatin1String("RegexTest_960") |
542 | << QLatin1String("RegexTest_961") |
543 | << QLatin1String("RegexTest_962") |
544 | << QLatin1String("RegexTest_963") |
545 | << QLatin1String("RegexTest_964") |
546 | << QLatin1String("RegexTest_976") |
547 | << QLatin1String("RegexTest_977") |
548 | << QLatin1String("RegexTest_988") |
549 | << QLatin1String("RegexTest_989") |
550 | << QLatin1String("RegexTest_990") |
551 | << QLatin1String("RegexTest_991") |
552 | << QLatin1String("RegexTest_994") |
553 | << QLatin1String("RegexTest_995") |
554 | << QLatin1String("RegexTest_996") |
555 | << QLatin1String("RegexTest_997") |
556 | << QLatin1String("RegexTest_1000") |
557 | << QLatin1String("RegexTest_1001") |
558 | << QLatin1String("RegexTest_1002") |
559 | << QLatin1String("RegexTest_1003") |
560 | << QLatin1String("RegexTest_1004") |
561 | << QLatin1String("RegexTest_1007") |
562 | << QLatin1String("RegexTest_1008") |
563 | << QLatin1String("RegexTest_1009") |
564 | << QLatin1String("RegexTest_1010") |
565 | << QLatin1String("RegexTest_1011") |
566 | << QLatin1String("RegexTest_1012") |
567 | << QLatin1String("RegexTest_1013") |
568 | << QLatin1String("RegexTest_1014") |
569 | << QLatin1String("RegexTest_1015") |
570 | << QLatin1String("RegexTest_1016") |
571 | << QLatin1String("RegexTest_1017") |
572 | << QLatin1String("RegexTest_1018") |
573 | << QLatin1String("RegexTest_1019") |
574 | << QLatin1String("RegexTest_1070") |
575 | << QLatin1String("RegexTest_1071") |
576 | << QLatin1String("RegexTest_1076") |
577 | << QLatin1String("RegexTest_1077") |
578 | << QLatin1String("RegexTest_1078") |
579 | << QLatin1String("RegexTest_1079") |
580 | << QLatin1String("RegexTest_1080") |
581 | << QLatin1String("RegexTest_1081") |
582 | << QLatin1String("RegexTest_1082") |
583 | << QLatin1String("RegexTest_1083") |
584 | << QLatin1String("RegexTest_1084") |
585 | << QLatin1String("RegexTest_1085") |
586 | << QLatin1String("RegexTest_1086") |
587 | << QLatin1String("RegexTest_1087") |
588 | << QLatin1String("RegexTest_1088") |
589 | << QLatin1String("RegexTest_1089") |
590 | << QLatin1String("RegexTest_1132") |
591 | << QLatin1String("RegexTest_1139") |
592 | << QLatin1String("RegexTest_1172") |
593 | << QLatin1String("RegexTest_1180") |
594 | << QLatin1String("RegexTest_1181") |
595 | << QLatin1String("RegexTest_1182") |
596 | << QLatin1String("RegexTest_1184") |
597 | << QLatin1String("RegexTest_1185") |
598 | << QLatin1String("RegexTest_1186") |
599 | << QLatin1String("RegexTest_1187") |
600 | << QLatin1String("RegexTest_1188") |
601 | << QLatin1String("RegexTest_1189") |
602 | << QLatin1String("RegexTest_1190") |
603 | << QLatin1String("RegexTest_1191") |
604 | << QLatin1String("RegexTest_1201") |
605 | << QLatin1String("RegexTest_1202") |
606 | << QLatin1String("RegexTest_1203") |
607 | << QLatin1String("RegexTest_1208") |
608 | << QLatin1String("RegexTest_1209") |
609 | << QLatin1String("RegexTest_1210") |
610 | << QLatin1String("RegexTest_1211") |
611 | << QLatin1String("RegexTest_1212") |
612 | << QLatin1String("RegexTest_1213") |
613 | << QLatin1String("RegexTest_1214") |
614 | << QLatin1String("RegexTest_1215") |
615 | << QLatin1String("RegexTest_1216") |
616 | << QLatin1String("RegexTest_1217") |
617 | << QLatin1String("RegexTest_1227") |
618 | << QLatin1String("RegexTest_1239") |
619 | << QLatin1String("RegexTest_1240") |
620 | << QLatin1String("RegexTest_1245") |
621 | << QLatin1String("RegexTest_1246") |
622 | << QLatin1String("RegexTest_1265") |
623 | << QLatin1String("RegexTest_1266") |
624 | << QLatin1String("RegexTest_1267") |
625 | << QLatin1String("RegexTest_1274") |
626 | << QLatin1String("RegexTest_1275") |
627 | << QLatin1String("RegexTest_1308") |
628 | << QLatin1String("RegexTest_1310") |
629 | << QLatin1String("RegexTest_1311") |
630 | << QLatin1String("RegexTest_1320") |
631 | << QLatin1String("RegexTest_1321") |
632 | << QLatin1String("RegexTest_1322") |
633 | << QLatin1String("RegexTest_1323") |
634 | << QLatin1String("RegexTest_1324") |
635 | << QLatin1String("RegexTest_1325") |
636 | << QLatin1String("RegexTest_1326") |
637 | << QLatin1String("RegexTest_1327") |
638 | << QLatin1String("RegexTest_1328") |
639 | << QLatin1String("RegexTest_1329") |
640 | << QLatin1String("RegexTest_1330") |
641 | << QLatin1String("RegexTest_1331") |
642 | << QLatin1String("RegexTest_1332") |
643 | << QLatin1String("RegexTest_1335") |
644 | << QLatin1String("RegexTest_1336") |
645 | << QLatin1String("RegexTest_1337") |
646 | << QLatin1String("RegexTest_1338") |
647 | << QLatin1String("RegexTest_1339") |
648 | << QLatin1String("RegexTest_1340") |
649 | << QLatin1String("RegexTest_1341") |
650 | << QLatin1String("RegexTest_1345") |
651 | << QLatin1String("RegexTest_1346") |
652 | << QLatin1String("RegexTest_1347") |
653 | << QLatin1String("RegexTest_1348") |
654 | << QLatin1String("RegexTest_1349") |
655 | << QLatin1String("RegexTest_1350") |
656 | << QLatin1String("RegexTest_1354") |
657 | << QLatin1String("RegexTest_1363") |
658 | << QLatin1String("RegexTest_1364") |
659 | << QLatin1String("RegexTest_1365") |
660 | << QLatin1String("RegexTest_1372") |
661 | << QLatin1String("RegexTest_1373") |
662 | << QLatin1String("RegexTest_1374") |
663 | << QLatin1String("RegexTest_1375") |
664 | << QLatin1String("RegexTest_1376") |
665 | << QLatin1String("RegexTest_1377") |
666 | << QLatin1String("RegexTest_1378") |
667 | << QLatin1String("RegexTest_1379") |
668 | << QLatin1String("RegexTest_1380") |
669 | << QLatin1String("RegexTest_1381") |
670 | << QLatin1String("RegexTest_1382") |
671 | << QLatin1String("RegexTest_1383") |
672 | << QLatin1String("RegexTest_1384") |
673 | << QLatin1String("RegexTest_1385") |
674 | << QLatin1String("RegexTest_1386") |
675 | << QLatin1String("RegexTest_1387") |
676 | << QLatin1String("RegexTest_1388") |
677 | << QLatin1String("RegexTest_1389") |
678 | << QLatin1String("RegexTest_1390") |
679 | << QLatin1String("RegexTest_1391") |
680 | << QLatin1String("RegexTest_1392") |
681 | << QLatin1String("RegexTest_1393") |
682 | << QLatin1String("RegexTest_1394") |
683 | << QLatin1String("RegexTest_1395") |
684 | << QLatin1String("RegexTest_1396") |
685 | << QLatin1String("RegexTest_1397") |
686 | << QLatin1String("RegexTest_1398") |
687 | << QLatin1String("RegexTest_1399") |
688 | << QLatin1String("RegexTest_1400") |
689 | << QLatin1String("RegexTest_1401") |
690 | << QLatin1String("RegexTest_1402") |
691 | << QLatin1String("RegexTest_1403") |
692 | << QLatin1String("RegexTest_1404") |
693 | << QLatin1String("RegexTest_1405") |
694 | << QLatin1String("RegexTest_1406") |
695 | << QLatin1String("RegexTest_1407") |
696 | << QLatin1String("RegexTest_1408") |
697 | << QLatin1String("RegexTest_1409") |
698 | << QLatin1String("RegexTest_1410") |
699 | << QLatin1String("RegexTest_1412") |
700 | << QLatin1String("RegexTest_1413") |
701 | << QLatin1String("RegexTest_1414") |
702 | << QLatin1String("RegexTest_1420") |
703 | << QLatin1String("RegexTest_1421") |
704 | << QLatin1String("RegexTest_1422") |
705 | << QLatin1String("RegexTest_1423") |
706 | << QLatin1String("RegexTest_1424") |
707 | << QLatin1String("RegexTest_1425") |
708 | << QLatin1String("RegexTest_1426") |
709 | << QLatin1String("RegexTest_1427") |
710 | << QLatin1String("RegexTest_1428") |
711 | << QLatin1String("RegexTest_1429") |
712 | << QLatin1String("RegexTest_1430") |
713 | << QLatin1String("RegexTest_1433") |
714 | << QLatin1String("RegexTest_1434") |
715 | << QLatin1String("RegexTest_1435") |
716 | << QLatin1String("RegexTest_1436") |
717 | << QLatin1String("RegexTest_1437") |
718 | << QLatin1String("RegexTest_1438") |
719 | << QLatin1String("RegexTest_1439") |
720 | << QLatin1String("RegexTest_1440") |
721 | << QLatin1String("RegexTest_1441") |
722 | << QLatin1String("RegexTest_1442") |
723 | << QLatin1String("RegexTest_1443") |
724 | << QLatin1String("RegexTest_1444") |
725 | << QLatin1String("RegexTest_1445") |
726 | << QLatin1String("RegexTest_1446") |
727 | << QLatin1String("RegexTest_1447") |
728 | << QLatin1String("RegexTest_1448") |
729 | << QLatin1String("RegexTest_1451") |
730 | << QLatin1String("RegexTest_1452") |
731 | << QLatin1String("RegexTest_1453") |
732 | << QLatin1String("RegexTest_1454") |
733 | << QLatin1String("RegexTest_1455") |
734 | << QLatin1String("RegexTest_1456") |
735 | << QLatin1String("RegexTest_1472") |
736 | << QLatin1String("RegexTest_1473") |
737 | << QLatin1String("RegexTest_1474") |
738 | << QLatin1String("RegexTest_1475") |
739 | << QLatin1String("RegexTest_1478") |
740 | << QLatin1String("RegexTest_1479") |
741 | << QLatin1String("RegexTest_1480") |
742 | << QLatin1String("RegexTest_1481") |
743 | << QLatin1String("RegexTest_1484") |
744 | << QLatin1String("RegexTest_1485") |
745 | << QLatin1String("RegexTest_1486") |
746 | << QLatin1String("RegexTest_1487") |
747 | << QLatin1String("RegexTest_1488") |
748 | << QLatin1String("RegexTest_1491") |
749 | << QLatin1String("RegexTest_1492") |
750 | << QLatin1String("RegexTest_1493") |
751 | << QLatin1String("RegexTest_1494") |
752 | << QLatin1String("RegexTest_1495") |
753 | << QLatin1String("RegexTest_1496") |
754 | << QLatin1String("RegexTest_1497") |
755 | << QLatin1String("RegexTest_1498") |
756 | << QLatin1String("RegexTest_1499") |
757 | << QLatin1String("RegexTest_1500") |
758 | << QLatin1String("RegexTest_1501") |
759 | << QLatin1String("RegexTest_1502") |
760 | << QLatin1String("RegexTest_1503") |
761 | << QLatin1String("RegexTest_1543") |
762 | << QLatin1String("RegexTest_1544") |
763 | << QLatin1String("reZ001") |
764 | */ |
765 | << QLatin1String("schA2" ) |
766 | << QLatin1String("schA5" ) |
767 | << QLatin1String("schA7" ) |
768 | << QLatin1String("schD8" ) |
769 | << QLatin1String("schG3" ) |
770 | << QLatin1String("schG6" ) |
771 | << QLatin1String("schG9" ) |
772 | << QLatin1String("schG11" ) |
773 | << QLatin1String("schG12" ) |
774 | << QLatin1String("schU1" ) |
775 | << QLatin1String("schU3" ) |
776 | << QLatin1String("schU4" ) |
777 | << QLatin1String("schU5" ) |
778 | << QLatin1String("schZ004" ) |
779 | << QLatin1String("schZ005" ) |
780 | << QLatin1String("schZ012_a" ) |
781 | << QLatin1String("stZ041" ) |
782 | << QLatin1String("wildZ010" ); |
783 | } |
784 | |
785 | bool XSDTestSuiteHandler::startElement(const QStringRef &namespaceURI, const QStringRef &localName, |
786 | const QStringRef & /*qName*/, const QXmlStreamAttributes &atts) |
787 | { |
788 | if(namespaceURI != QString::fromLatin1(str: "http://www.w3.org/XML/2004/xml-schema-test-suite/" )) |
789 | return true; |
790 | |
791 | if (localName == QLatin1String("testSet" )) { |
792 | m_currentTestSet = new TestGroup(m_topLevelGroup); |
793 | Q_ASSERT(m_currentTestSet); |
794 | m_currentTestSet->setTitle(atts.value(qualifiedName: "name" ).toString()); |
795 | m_topLevelGroup->appendChild(item: m_currentTestSet); |
796 | } else if (localName == QLatin1String("testGroup" )) { |
797 | m_currentTestGroup = new TestGroup(m_currentTestSet); |
798 | Q_ASSERT(m_currentTestGroup); |
799 | m_currentTestGroup->setTitle(atts.value(qualifiedName: "name" ).toString()); |
800 | m_currentTestSet->appendChild(item: m_currentTestGroup); |
801 | m_inTestGroup = true; |
802 | } else if (localName == QLatin1String("schemaTest" )) { |
803 | if (m_blackList.contains(value: atts.value(qualifiedName: "name" ).toString())) { |
804 | m_currentTestCase = 0; |
805 | m_schemaBlacklisted = true; |
806 | return true; |
807 | } |
808 | m_schemaBlacklisted = false; |
809 | |
810 | m_currentTestCase = new XSDTSTestCase(TestCase::Standard, m_currentTestGroup, XSDTSTestCase::SchemaTest); |
811 | Q_ASSERT(m_currentTestCase); |
812 | m_counter++; |
813 | m_currentTestCase->setName(QString::number(m_counter) + atts.value(qualifiedName: "name" )); |
814 | m_currentTestGroup->appendChild(item: m_currentTestCase); |
815 | m_currentTestCase->setParent(m_currentTestGroup); |
816 | |
817 | m_inSchemaTest = true; |
818 | } else if (localName == QLatin1String("instanceTest" )) { |
819 | if (m_schemaBlacklisted) { |
820 | m_currentTestCase = 0; |
821 | return true; |
822 | } |
823 | |
824 | m_currentTestCase = new XSDTSTestCase(TestCase::Standard, m_currentTestGroup, XSDTSTestCase::InstanceTest); |
825 | Q_ASSERT(m_currentTestCase); |
826 | m_counter++; |
827 | m_currentTestCase->setName(QString::number(m_counter) + atts.value(qualifiedName: "name" )); |
828 | m_currentTestGroup->appendChild(item: m_currentTestCase); |
829 | |
830 | m_inInstanceTest = true; |
831 | } else if (localName == QLatin1String("schemaDocument" ) || localName == QLatin1String("instanceDocument" )) { |
832 | if (m_inSchemaTest) { |
833 | m_currentTestCase->setSchemaUri(QUrl(atts.value(qualifiedName: "xlink:href" ).toString())); |
834 | if (m_currentSchemaLink.isEmpty()) // we only use the first schema document for validation |
835 | m_currentSchemaLink = atts.value(qualifiedName: "xlink:href" ).toString(); |
836 | } |
837 | if (m_inInstanceTest) { |
838 | m_currentTestCase->setInstanceUri(QUrl(atts.value(qualifiedName: "xlink:href" ).toString())); |
839 | m_currentTestCase->setSchemaUri(QUrl(m_currentSchemaLink)); |
840 | } |
841 | } else if (localName == QLatin1String("expected" ) && (m_inSchemaTest || m_inInstanceTest)) { |
842 | TestBaseLine *baseLine = new TestBaseLine(TestBaseLine::SchemaIsValid); |
843 | if (atts.value(qualifiedName: "validity" ) == QLatin1String("valid" )) { |
844 | baseLine->setDetails(QLatin1String("true" )); |
845 | m_currentTestCase->setName(m_currentTestCase->name() + QLatin1String(" tokoe:valid" )); |
846 | } else { |
847 | baseLine->setDetails(QLatin1String("false" )); |
848 | m_currentTestCase->setName(m_currentTestCase->name() + QLatin1String(" tokoe:invalid" )); |
849 | } |
850 | |
851 | m_currentTestCase->addBaseLine(lines: baseLine); |
852 | } else if (localName == QLatin1String("documentation" ) && m_inTestGroup) { |
853 | m_inDescription = true; |
854 | } |
855 | |
856 | return true; |
857 | } |
858 | |
859 | bool XSDTestSuiteHandler::endElement(const QStringRef &/*namespaceURI*/, |
860 | const QStringRef &localName, |
861 | const QStringRef &/*qName*/) |
862 | { |
863 | if (localName == QLatin1String("testGroup" )) { |
864 | m_inTestGroup = false; |
865 | m_currentTestGroup->setDescription(m_documentation); |
866 | m_documentation.clear(); |
867 | m_currentSchemaLink.clear(); |
868 | |
869 | if (m_currentTestGroup->childCount() == 0) |
870 | m_currentTestSet->removeLast(); |
871 | } else if (localName == QLatin1String("schemaTest" )) |
872 | m_inSchemaTest = false; |
873 | else if (localName == QLatin1String("instanceTest" )) |
874 | m_inInstanceTest = false; |
875 | else if (localName == QLatin1String("documentation" )) |
876 | m_inDescription = false; |
877 | |
878 | return true; |
879 | } |
880 | |
881 | bool XSDTestSuiteHandler::characters(const QStringRef &ch) |
882 | { |
883 | if (m_inDescription) |
884 | m_documentation += ch; |
885 | |
886 | return true; |
887 | } |
888 | |
889 | TestSuite *XSDTestSuiteHandler::testSuite() const |
890 | { |
891 | return m_ts; |
892 | } |
893 | |
894 | // vim: et:ts=4:sw=4:sts=4 |
895 | |
896 | |