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