Commit | Line | Data |
---|---|---|
970ed795 | 1 | /****************************************************************************** |
d44e3c4f | 2 | * Copyright (c) 2000-2016 Ericsson Telecom AB |
970ed795 EL |
3 | * All rights reserved. This program and the accompanying materials |
4 | * are made available under the terms of the Eclipse Public License v1.0 | |
5 | * which accompanies this distribution, and is available at | |
6 | * http://www.eclipse.org/legal/epl-v10.html | |
d44e3c4f | 7 | * |
8 | * Contributors: | |
9 | * Balasko, Jeno | |
10 | * Baranyi, Botond | |
11 | * Ormandi, Matyas | |
12 | * Raduly, Csaba | |
13 | * Szabo, Bence Janos | |
14 | * | |
970ed795 EL |
15 | ******************************************************************************/ |
16 | ||
17 | //========================================================================= | |
18 | // References: (XSD_0) XML Schema Part 0: Primer Second Edition | |
19 | // (XSD_1) XML Schema Part 1: Structures Second Edition | |
20 | // (XSD_2) XML Schema Part 2: Datatypes Second Edition | |
21 | // (ETSI_9) ETSI ES 201 873-9 V4.1.2, The Testing and Test Control Notation version 3; | |
22 | // Part 9: Using XML schema with TTCN-3 | |
23 | // Last modified: 2013-12-02 by ethbaat | |
24 | // Temporarily commented out: tc_complex_import_withSL_encDec fails on some platforms because of TR:HR88527 | |
25 | ||
26 | module xmlTest_Testcases | |
27 | { | |
28 | ||
29 | //========================================================================= | |
30 | // Import Part | |
31 | //========================================================================= | |
32 | //import from XSD all; | |
33 | import from PIPEasp_Types all; | |
34 | import from PIPEasp_PortType all; | |
35 | import from PIPEasp_Templates all; | |
36 | import from xmlTest_Shell all; | |
37 | ||
38 | import from www_XmlTest_org_element_anyType_e all; | |
39 | import from www_XmlTest_org_complex_all_e all; | |
40 | import from www_XmlTest_org_complex_extension_e all; | |
41 | import from www_XmlTest_org_complex_restriction_e all; | |
42 | import from www_XmlTest_org_complex_import_e all; | |
43 | import from www_XmlTest_org_complex_any_e all; | |
44 | ||
45 | import from xmlTest_Functions_string all; | |
46 | import from xmlTest_Functions_complex1 all; | |
47 | import from xmlTest_Functions_complex2 all; | |
48 | import from xmlTest_Functions_complex all; | |
49 | import from xmlTest_Functions_element all; | |
50 | import from xmlTest_Functions_list all; | |
51 | ||
52 | ||
53 | //========================================================================= | |
54 | // Module Parameters | |
55 | //========================================================================= | |
56 | ||
57 | // Insert module parameters here if applicable! | |
58 | // You can use the module_param skeleton! | |
59 | ||
60 | //========================================================================= | |
61 | // Data Types | |
62 | //========================================================================= | |
63 | ||
64 | // Insert data type defintions here if applicable! | |
65 | // You can use the data_type skeleton! | |
66 | ||
67 | //========================================================================= | |
68 | // Signatures | |
69 | //========================================================================= | |
70 | ||
71 | // Insert signature definitions here if applicable! | |
72 | // You can use the signature skeleton! | |
73 | ||
74 | //========================================================================= | |
75 | //Port Types | |
76 | //========================================================================= | |
77 | ||
78 | // Insert port type defintions here if applicable! | |
79 | // You can use the port_type skeleton! | |
80 | ||
81 | //========================================================================= | |
82 | //Component Types | |
83 | //========================================================================= | |
84 | ||
85 | type component xmlTest_CT extends Shell_CT {} | |
86 | ||
87 | type component mtc_CT {} | |
88 | //========================================================================= | |
89 | // Constants | |
90 | //========================================================================= | |
91 | ||
92 | ||
93 | //========================================================================= | |
94 | // Templates | |
95 | //========================================================================= | |
96 | ||
97 | // Insert templates here if applicable! | |
98 | // You can use the template skeleton! | |
99 | ||
100 | //========================================================================= | |
101 | // Altsteps | |
102 | //========================================================================= | |
103 | ||
104 | // Insert altsteps here if applicable! | |
105 | // You can use the altstep skeleton! | |
106 | ||
107 | //========================================================================= | |
108 | // Functions | |
109 | //========================================================================= | |
110 | ||
111 | //========================================================================= | |
112 | // f_countDelimiters | |
113 | //========================================================================= | |
114 | function f_countDelimiters(in charstring pl_string, in charstring pl_delimiter, inout integer pl_counter) { | |
115 | pl_counter:=0; | |
116 | var integer pos:=0; | |
117 | var integer vl_size:=lengthof(pl_string); | |
118 | var integer vl_delimsize:=lengthof(pl_delimiter); | |
119 | while(pos<vl_size) { | |
120 | if( substr(pl_string,pos,vl_delimsize)==pl_delimiter) { pl_counter:=pl_counter+1} | |
121 | pos:=pos+1; | |
122 | } | |
123 | }//f_ | |
124 | ||
125 | //========================================================================= | |
126 | // f_compareFiles | |
127 | //========================================================================= | |
128 | //pl_diffLimit: upper limit of acceptable diff lines. 4 means one acceptable difference | |
129 | function f_compareFiles(in charstring pl_file1, in charstring pl_file2, in integer pl_diffLimit) runs on xmlTest_CT { | |
130 | var integer vl_expectedResult:=0 | |
131 | if(pl_diffLimit>0) { vl_expectedResult:=256; } | |
132 | var boolean vl_success:=false; | |
133 | f_shell_command("diff -w " & pl_file1 & " " & pl_file2,"",vl_expectedResult,vl_success); | |
134 | ||
135 | if(v_ASP_PResult.code==0) | |
136 | { | |
137 | setverdict(pass); | |
138 | } | |
139 | else if(v_ASP_PResult.code==256) { | |
140 | var integer vl_counter:=0; | |
141 | f_countDelimiters(v_ASP_PResult.stdout,"\n",vl_counter); | |
142 | log("Counted lines: ",vl_counter, " diffLimit: ", pl_diffLimit) | |
143 | if(vl_counter>pl_diffLimit) { | |
144 | setverdict(fail); | |
145 | } | |
146 | } else { //e.g 512: No such file or directory | |
147 | log("Wrong result code: ",v_ASP_PResult.code, " Expected result code: ", vl_expectedResult) | |
148 | setverdict(fail); | |
149 | } | |
150 | }//f_ | |
151 | ||
152 | ||
153 | //========================================================================= | |
154 | // Testcases | |
155 | //========================================================================= | |
156 | testcase tc_versionTest() runs on xmlTest_CT | |
157 | { | |
158 | f_shellCommandWithVerdict("compiler -v","",0) | |
159 | } | |
160 | ||
161 | testcase tc_xsd2ttcn_versionTest() runs on xmlTest_CT | |
162 | { | |
163 | f_shellCommandWithVerdict("xsd2ttcn -v","",0) | |
164 | } | |
165 | ||
166 | //simple records | |
167 | testcase tc_firstTrial() runs on xmlTest_CT | |
168 | { | |
3f84031e | 169 | f_shellCommandWithVerdict("xsd2ttcn elements.xsd","",c_shell_successWithoutWarningAndError); |
170 | ||
171 | if(getverdict==pass) { | |
172 | f_compareFiles( | |
173 | "www_example_org_elements_e.ttcn","www_example_org_elements.ttcn", c_numOfDiff_headerAndModuleName); | |
174 | } | |
970ed795 EL |
175 | } |
176 | ||
177 | // see http://www.w3.org/TR/xmlschema-0/ 2.1 The Purchase Order Schema | |
178 | // This tc is "passed" but it is generated into noTargetNaespace.ttcn | |
179 | testcase tc_secondTrial() runs on xmlTest_CT | |
180 | { | |
3f84031e | 181 | f_shellCommandWithVerdict("xsd2ttcn po.xsd noTargetNamespace.xsd","",c_shell_successWithoutWarningAndError); |
182 | ||
183 | if(getverdict==pass) { | |
184 | f_compareFiles( | |
185 | "http_www_XmlTest_org_po_e.ttcn","http_www_XmlTest_org_po.ttcn", c_numOfDiff_headerAndModuleName); | |
186 | } | |
970ed795 EL |
187 | } |
188 | testcase tc_empty() runs on xmlTest_CT | |
189 | { | |
190 | f_shellCommandWithVerdict("xsd2ttcn empty.xsd","",c_shell_successWithoutWarningAndError); | |
191 | ||
192 | if(getverdict==pass) { | |
193 | f_compareFiles( | |
194 | "www_XmlTest_org_empty_e.ttcn","www_XmlTest_org_empty.ttcn", c_numOfDiff_headerAndModuleName); | |
195 | } | |
196 | } | |
197 | ||
198 | testcase tc_annotation() runs on xmlTest_CT | |
199 | { | |
3abe9331 | 200 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_annotation.xsd","",c_shell_successWithWarning); |
970ed795 EL |
201 | if(getverdict==pass) { |
202 | f_compareFiles( | |
203 | "www_XmlTest_org_annotation_e.ttcn","www_XmlTest_org_annotation.ttcn", c_numOfDiff_headerModNameAndNamespace); | |
204 | } | |
205 | } | |
206 | ||
207 | testcase tc_annotation1() runs on xmlTest_CT | |
208 | { | |
209 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_annotation1.xsd","",c_shell_successWithoutWarningAndError); | |
3f84031e | 210 | //No f_compareFiles becaulse tc_xml_in_annotation() covering this testcase |
970ed795 EL |
211 | } |
212 | ||
213 | testcase tc_annotation2() runs on xmlTest_CT | |
214 | { | |
215 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_annotation2.xsd","",c_shell_error); | |
3f84031e | 216 | //No f_compareFiles becaulse tc_xml_in_annotation() covering this testcase |
970ed795 EL |
217 | } |
218 | ||
3abe9331 | 219 | testcase tc_xml_in_annotation() runs on xmlTest_CT |
220 | { | |
221 | f_shellCommandWithVerdict("xsd2ttcn xml_in_annotation.xsd","",c_shell_successWithoutWarningAndError); | |
222 | if(getverdict==pass) { | |
223 | f_compareFiles( | |
224 | "www_example_org_xml_in_annotation_e.ttcn","www_example_org_xml_in_annotation.ttcn", c_numOfDiff_headerModNameAndNamespace); | |
225 | } | |
226 | } | |
227 | ||
3f84031e | 228 | //Incorrect version: 1.1, libxml parser prints warning |
970ed795 EL |
229 | testcase tc_version() runs on xmlTest_CT |
230 | { | |
231 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_version.xsd","",c_shell_successWithWarning); | |
232 | } | |
233 | ||
234 | //************************************ | |
235 | // === Converter switch tests: === | |
236 | //************************************ | |
237 | // usage: xsd2ttcn [-cepstVwx] [-f file] schema.xsd ... | |
238 | // or xsd2ttcn -v | |
239 | // | |
240 | // OPTIONS: | |
241 | // -c: disable the generation of comments in TTCN-3 modules | |
242 | // -e: disable the generation of encoding instructions in TTCN-3 modules | |
243 | // -f file: the XSD files are taken from file instead of the command line | |
244 | // -p: do not generate the UsefulTtcn3Types and XSD predefined modules | |
245 | // -q: quiet - disable the issue of status messages | |
246 | // -s: parse and validate only - no TTCN-3 module generation | |
247 | // -t: disable the generation of timing information in TTCN-3 modules | |
248 | // -v: show version information | |
249 | // -w: suppress warnings | |
250 | // -x: disable schema validation but generate TTCN-3 modules | |
251 | ||
252 | //TODO:Not ready yet | |
253 | testcase tc_options_c() runs on xmlTest_CT | |
254 | { | |
3abe9331 | 255 | f_shellCommandWithVerdict("xsd2ttcn -c XmlTest_annotation.xsd","",c_shell_successWithWarning ); |
970ed795 EL |
256 | if(getverdict==pass) { |
257 | f_compareFiles("www_XmlTest_org_annotation_c_e.ttcn","www_XmlTest_org_annotation.ttcn", c_numOfDiff_headerModNameAndNamespace); | |
258 | } | |
259 | } | |
260 | ||
261 | // -e: disable the generation of encoding instructions in TTCN-3 modules | |
262 | testcase tc_options_e() runs on xmlTest_CT | |
263 | { | |
3abe9331 | 264 | f_shellCommandWithVerdict("xsd2ttcn -e XmlTest_annotation.xsd","",c_shell_successWithWarning ); |
970ed795 EL |
265 | if(getverdict==pass) { |
266 | f_compareFiles("www_XmlTest_org_annotation_e_e.ttcn","www_XmlTest_org_annotation.ttcn", c_numOfDiff_headerModNameAndNamespace); | |
267 | } | |
268 | } | |
269 | ||
270 | // -f file: the XSD files are taken from file instead of the command line | |
271 | testcase tc_options_f() runs on xmlTest_CT | |
272 | { | |
3abe9331 | 273 | f_shellCommandWithVerdict("xsd2ttcn -f XmlTest_files1.txt","",c_shell_successWithWarning ); |
970ed795 EL |
274 | if(getverdict==pass) { |
275 | f_compareFiles("www_XmlTest_org_annotation_e.ttcn","www_XmlTest_org_annotation.ttcn", c_numOfDiff_headerModNameAndNamespace); | |
276 | } | |
277 | } | |
278 | ||
3abe9331 | 279 | testcase tc_options_g() runs on xmlTest_CT |
280 | { | |
281 | f_shellCommandWithVerdict("xsd2ttcn -g dont_generate_element_substitution.xsd","",c_shell_successWithoutWarningAndError ); | |
282 | if(getverdict==pass) { | |
283 | f_compareFiles("www_example_org_dont_generate_element_substitution_e.ttcn", | |
284 | "www_example_org_dont_generate_element_substitution.ttcn", c_numOfDiff_headerModNameAndNamespace); | |
285 | } | |
286 | ||
287 | f_shellCommandWithVerdict("xsd2ttcn generate_element_substitution.xsd","",c_shell_successWithoutWarningAndError ); | |
288 | if(getverdict==pass) { | |
289 | f_compareFiles("www_example_org_generate_element_substitution_e.ttcn", | |
290 | "www_example_org_generate_element_substitution.ttcn", c_numOfDiff_headerModNameAndNamespace); | |
291 | } | |
292 | } | |
293 | ||
970ed795 EL |
294 | //-p: do not generate the UsefulTtcn3Types and XSD predefined modules |
295 | testcase tc_options_p() runs on xmlTest_CT | |
296 | { | |
297 | f_shellCommandWithVerdict("mv www_XmlTest_org_annotation.ttcn tmp_www_XmlTest_org_annotation.ttcn","",c_shell_successWithoutWarningAndError ); | |
298 | f_shellCommandWithVerdict("mv XSD.ttcn tmp_XSD.ttcn","",c_shell_successWithoutWarningAndError ); | |
299 | f_shellCommandWithVerdict("mv UsefulTtcn3Types.ttcn tmp_UsefulTtcn3Types.ttcn","",c_shell_successWithoutWarningAndError ); | |
300 | ||
3abe9331 | 301 | f_shellCommandWithVerdict("xsd2ttcn -p XmlTest_annotation.xsd","",c_shell_successWithWarning ); |
970ed795 EL |
302 | if(getverdict==pass) { |
303 | f_shellCommandWithVerdict("ls www_XmlTest_org_annotation.ttcn", "",c_shell_successWithoutWarningAndError); | |
304 | f_shellCommandWithVerdict("ls XSD.ttcn", "",c_shell_error_noSuchFileOrDirectory ); | |
305 | f_shellCommandWithVerdict("ls UsefulTtcn3Types.ttcn.ttcn","", c_shell_error_noSuchFileOrDirectory ); | |
306 | } | |
307 | ||
308 | f_shellCommandWithVerdict("mv tmp_www_XmlTest_org_annotation.ttcn www_XmlTest_org_annotation.ttcn","",c_shell_successWithoutWarningAndError ); | |
309 | f_shellCommandWithVerdict("mv tmp_XSD.ttcn XSD.ttcn","",c_shell_successWithoutWarningAndError ); | |
310 | f_shellCommandWithVerdict("mv tmp_UsefulTtcn3Types.ttcn UsefulTtcn3Types.ttcn","",c_shell_successWithoutWarningAndError ); | |
311 | } | |
312 | ||
313 | //-s: parse and validate only - no TTCN-3 module generation | |
314 | testcase tc_options_s() runs on xmlTest_CT | |
315 | { | |
316 | f_shellCommandWithVerdict("mv www_XmlTest_org_annotation.ttcn tmp_www_XmlTest_org_annotation.ttcn","",c_shell_successWithoutWarningAndError ); | |
317 | f_shellCommandWithVerdict("mv XSD.ttcn tmp_XSD.ttcn","",c_shell_successWithoutWarningAndError ); | |
318 | f_shellCommandWithVerdict("mv UsefulTtcn3Types.ttcn tmp_UsefulTtcn3Types.ttcn","",c_shell_successWithoutWarningAndError ); | |
319 | ||
320 | f_shellCommandWithVerdict("xsd2ttcn -s XmlTest_annotation.xsd","",c_shell_successWithoutWarningAndError ); | |
321 | //TODO:test if wrong xsd causes conversion error wit this switch | |
322 | ||
323 | //test if www_XmlTest_org_annotation.ttcn.ttcn, XSD.ttcn and UsefulTtcn3Types.ttcn exist: | |
324 | if(getverdict==pass) { | |
325 | f_shellCommandWithVerdict("ls www_XmlTest_org_annotation.ttcn", "", c_shell_error_noSuchFileOrDirectory ); | |
326 | f_shellCommandWithVerdict("ls XSD.ttcn", "",c_shell_error_noSuchFileOrDirectory ); | |
327 | f_shellCommandWithVerdict("ls UsefulTtcn3Types.ttcn.ttcn","", c_shell_error_noSuchFileOrDirectory ); | |
328 | } | |
329 | f_shellCommandWithVerdict("mv tmp_www_XmlTest_org_annotation.ttcn www_XmlTest_org_annotation.ttcn","",c_shell_successWithoutWarningAndError ); | |
330 | f_shellCommandWithVerdict("mv tmp_XSD.ttcn XSD.ttcn","",c_shell_successWithoutWarningAndError ); | |
331 | f_shellCommandWithVerdict("mv tmp_UsefulTtcn3Types.ttcn UsefulTtcn3Types.ttcn","",c_shell_successWithoutWarningAndError ); | |
332 | } | |
333 | ||
334 | //Ready | |
335 | // -t: disable the generation of timing information in TTCN-3 modules | |
336 | testcase tc_options_t() runs on xmlTest_CT | |
337 | { | |
3abe9331 | 338 | f_shellCommandWithVerdict("xsd2ttcn -t XmlTest_annotation.xsd","",c_shell_successWithWarning ); |
970ed795 | 339 | if(getverdict==pass) { |
d44e3c4f | 340 | f_compareFiles("www_XmlTest_org_annotation_t_e.ttcn","www_XmlTest_org_annotation.ttcn", c_numOfDiff_headerAndModuleName); |
970ed795 EL |
341 | } |
342 | } | |
343 | ||
344 | // -v: show version information | |
345 | //TODO:Not ready yet | |
346 | testcase tc_options_v() runs on xmlTest_CT | |
347 | { | |
348 | f_shellCommandWithVerdict("xsd2ttcn -v","",c_shell_successWithoutWarningAndError ); | |
349 | } | |
350 | ||
351 | //TODO:Not ready yet | |
352 | // -q: quiet - disable the issue of status messages | |
353 | testcase tc_options_V() runs on xmlTest_CT | |
354 | { | |
3abe9331 | 355 | f_shellCommandWithVerdict("xsd2ttcn -q XmlTest_annotation.xsd","",c_shell_successWithWarning); |
970ed795 EL |
356 | } |
357 | ||
970ed795 EL |
358 | // -w: suppress warnings |
359 | testcase tc_options_w() runs on xmlTest_CT | |
360 | { | |
361 | f_shellCommandWithVerdict("xsd2ttcn -w XmlTest_annotation.xsd","",c_shell_successWithoutWarningAndError ); | |
362 | } | |
363 | ||
364 | //TODO:Not ready yet | |
365 | // -x: disable schema validation but generate TTCN-3 modules | |
366 | testcase tc_options_x() runs on xmlTest_CT | |
367 | { | |
3abe9331 | 368 | f_shellCommandWithVerdict("xsd2ttcn -x XmlTest_annotation.xsd","",c_shell_successWithWarning); |
970ed795 EL |
369 | } |
370 | ||
371 | testcase tc_options_wrong() runs on xmlTest_CT | |
372 | { | |
373 | f_shellCommandWithVerdict("xsd2ttcn -H XmlTest_annotation.xsd","", c_shell_error); | |
374 | } | |
375 | ||
376 | testcase tc_options_missing() runs on xmlTest_CT | |
377 | { | |
378 | f_shellCommandWithVerdict("xsd2ttcn ","",c_shell_successWithoutWarningAndError ); | |
379 | //TODO: check the output | |
380 | } | |
381 | ||
382 | ||
383 | testcase tc_XmlTest_label() runs on xmlTest_CT | |
384 | { | |
385 | f_shellCommandWithVerdict("xsd2ttcn -x XmlTest_label.xsd","",c_shell_successWithoutWarningAndError ); | |
386 | } | |
387 | ||
388 | testcase tc_XmlTest_definition() runs on xmlTest_CT | |
389 | { | |
390 | f_shellCommandWithVerdict("xsd2ttcn -x XmlTest_definition.xsd","",c_shell_successWithoutWarningAndError ); | |
391 | } | |
392 | //************************************ | |
393 | // Testcases_basedOnTtcnStandard9 | |
394 | //************************************ | |
395 | group Testcases_basedOnTtcnStandard9 { | |
396 | ||
397 | //Passed | |
398 | testcase tc_XmlTest_all() runs on xmlTest_CT | |
399 | { | |
400 | f_shellCommandWithVerdict("xsd2ttcn all.xsd","",c_shell_successWithoutWarningAndError); | |
3abe9331 | 401 | if(getverdict==pass) { |
402 | f_compareFiles( | |
403 | "www_example_org_all_e.ttcn","www_example_org_all.ttcn", c_numOfDiff_headerAndModuleName); | |
404 | } | |
405 | } | |
406 | ||
407 | testcase tc_element_in_all_neg() runs on xmlTest_CT | |
408 | { | |
409 | f_shellCommandWithVerdict("xsd2ttcn element_in_all_minmax.xsd","",c_shell_error); | |
970ed795 EL |
410 | } |
411 | ||
412 | //Passed | |
413 | testcase tc_XmlTest_any_anyAttribute() runs on xmlTest_CT | |
414 | { | |
3abe9331 | 415 | f_shellCommandWithVerdict("xsd2ttcn any_anyAttribute.xsd","",c_shell_successWithWarning); |
3f84031e | 416 | |
417 | if(getverdict==pass) { | |
418 | f_compareFiles( | |
419 | "http_www_example_org_ttcn_wildcards_e.ttcn","http_www_example_org_ttcn_wildcards.ttcn", c_numOfDiff_headerAndModuleName); | |
420 | } | |
970ed795 EL |
421 | } |
422 | ||
423 | //HQ73011 | |
424 | //Heading: XSD anyAtribute is inserted into a wrong place | |
425 | //Passed | |
426 | testcase tc_XmlTest_HQ73011() runs on xmlTest_CT | |
427 | { | |
428 | f_shellCommandWithVerdict("xsd2ttcn HQ73011.xsd","",c_shell_successWithoutWarningAndError); | |
429 | if(getverdict==pass) { | |
430 | f_compareFiles( | |
431 | "urn_ietf_params_xml_ns_conference_info_e.ttcn","urn_ietf_params_xml_ns_conference_info.ttcn", c_numOfDiff_headerAndModuleName); | |
432 | } | |
433 | } | |
434 | ||
3abe9331 | 435 | testcase tc_anyattribute_optional() runs on xmlTest_CT |
436 | { | |
437 | f_shellCommandWithVerdict("xsd2ttcn anyattribute_optional.xsd","",c_shell_successWithoutWarningAndError); | |
438 | if(getverdict==pass) { | |
439 | f_compareFiles( | |
440 | "http_www_example_org_wildcards_e.ttcn","http_www_example_org_wildcards.ttcn", c_numOfDiff_headerAndModuleName); | |
441 | } | |
442 | } | |
443 | ||
444 | testcase tc_anyattribute_single() runs on xmlTest_CT | |
445 | { | |
446 | f_shellCommandWithVerdict("xsd2ttcn anyattrib_single.xsd","",c_shell_successWithoutWarningAndError); | |
447 | if(getverdict==pass) { | |
448 | f_compareFiles( | |
449 | "www_example_org_anyattrib_single_e.ttcn","www_example_org_anyattrib_single.ttcn", c_numOfDiff_headerAndModuleName); | |
450 | } | |
451 | } | |
452 | ||
453 | testcase tc_anyattribute_in_complex() runs on xmlTest_CT | |
454 | { | |
455 | f_shellCommandWithVerdict("xsd2ttcn anyattr_in_complex.xsd","",c_shell_successWithoutWarningAndError); | |
456 | if(getverdict==pass) { | |
457 | f_compareFiles( | |
458 | "www_example_org_anyattr_in_complex_e.ttcn","www_example_org_anyattr_in_complex.ttcn", c_numOfDiff_headerModNameAndNamespace); | |
459 | } | |
460 | } | |
461 | ||
462 | ||
970ed795 EL |
463 | //Passed |
464 | testcase tc_XmlTest_attributeGroup() runs on xmlTest_CT | |
465 | { | |
466 | f_shellCommandWithVerdict("xsd2ttcn attributeGroup.xsd","",c_shell_successWithoutWarningAndError); | |
3f84031e | 467 | |
468 | if(getverdict==pass) { | |
469 | f_compareFiles( | |
470 | "www_example_org_attributegroup_e.ttcn","www_example_org_attributegroup.ttcn", c_numOfDiff_headerModNameAndNamespace); | |
471 | } | |
970ed795 EL |
472 | } |
473 | ||
474 | //double schema definition - Validator Returns with Error, Passed | |
475 | testcase tc_XmlTest_attribute_use_noTNS() runs on xmlTest_CT | |
476 | { | |
477 | f_shellCommandWithVerdict("xsd2ttcn attribute_use_noTNS.xsd","",c_shell_error); | |
478 | } | |
479 | ||
3abe9331 | 480 | testcase tc_id_attribute() runs on xmlTest_CT |
481 | { | |
482 | f_shellCommandWithVerdict("xsd2ttcn id_attrib.xsd","",c_shell_successWithWarning); | |
483 | if(getverdict==pass) { | |
484 | f_compareFiles( | |
485 | "www_example_org_id_attrib_e.ttcn", "www_example_org_id_attrib.ttcn", c_numOfDiff_headerAndModuleName); | |
486 | } | |
487 | } | |
488 | ||
489 | testcase tc_attribute_order() runs on xmlTest_CT | |
490 | { | |
491 | f_shellCommandWithVerdict("xsd2ttcn attrib_order_a.xsd attrib_order_b.xsd attrib_order_c.xsd","",c_shell_successWithoutWarningAndError); | |
492 | if(getverdict==pass) { | |
493 | f_compareFiles( | |
494 | "www_example_org_attrib_order_a_e.ttcn", "www_example_org_attrib_order_a.ttcn", c_numOfDiff_headerAndModuleName); | |
495 | } | |
496 | ||
497 | if(getverdict==pass) { | |
498 | f_compareFiles( | |
499 | "www_example_org_attrib_order_b_e.ttcn", "www_example_org_attrib_order_b.ttcn", c_numOfDiff_headerAndModuleName); | |
500 | } | |
501 | } | |
502 | ||
503 | testcase tc_name_conv_non_alphanumeric() runs on xmlTest_CT | |
504 | { | |
505 | f_shellCommandWithVerdict("xsd2ttcn name_conv_non_alphanumeric.xsd","",c_shell_successWithoutWarningAndError); | |
506 | if(getverdict==pass) { | |
507 | f_compareFiles( | |
508 | "http_www_example_org_name_conv2_e.ttcn", | |
509 | "http_www_example_org_name_conv2.ttcn", c_numOfDiff_headerAndModuleName); | |
510 | } | |
511 | } | |
512 | ||
513 | testcase tc_module_name_convert_with_diff_namespace() runs on xmlTest_CT { | |
514 | f_shellCommandWithVerdict("xsd2ttcn imported_module.xsd imported_module_.xsd","",c_shell_successWithoutWarningAndError); | |
515 | ||
516 | if(getverdict==pass) { | |
517 | f_compareFiles( | |
518 | "imported_module_e.ttcn","imported_module.ttcn", c_numOfDiff_headerAndModuleName); | |
519 | } | |
520 | ||
521 | if(getverdict==pass) { | |
522 | f_compareFiles( | |
523 | "imported_module_1_e.ttcn","imported_module_1.ttcn", c_numOfDiff_headerAndModuleName); | |
524 | } | |
525 | }//tc_ | |
526 | ||
527 | testcase tc_module_typename_conversion() runs on xmlTest_CT { | |
528 | f_shellCommandWithVerdict("xsd2ttcn module_typename_conversion.xsd module_typename_conversion_1.xsd","",c_shell_successWithoutWarningAndError); | |
529 | ||
530 | if(getverdict==pass) { | |
531 | f_compareFiles( | |
532 | "module_typename_conversion_e.ttcn","module_typename_conversion.ttcn", c_numOfDiff_headerAndModuleName); | |
533 | } | |
534 | ||
535 | if(getverdict==pass) { | |
536 | f_compareFiles( | |
537 | "MyTypes_e.ttcn","MyTypes.ttcn", c_numOfDiff_headerAndModuleName); | |
538 | } | |
539 | }//tc_ | |
540 | ||
541 | testcase tc_name_conv_remove_seq_of_low_line() runs on xmlTest_CT | |
542 | { | |
543 | f_shellCommandWithVerdict("xsd2ttcn name_conv_remove_seq_of_low_line.xsd","", | |
544 | c_shell_successWithoutWarningAndError); | |
545 | if(getverdict==pass) { | |
546 | f_compareFiles( | |
547 | "http_www_example_org_name_conv3_e.ttcn", | |
548 | "http_www_example_org_name_conv3.ttcn", c_numOfDiff_headerAndModuleName); | |
549 | } | |
550 | } | |
551 | ||
552 | testcase tc_name_conv_with_z() runs on xmlTest_CT | |
553 | { | |
554 | f_shellCommandWithVerdict("xsd2ttcn -z name_conv_with_z.xsd","",c_shell_successWithoutWarningAndError); | |
555 | if(getverdict==pass) { | |
556 | f_compareFiles( | |
557 | "www_example_org_name_conv_http_e.ttcn", | |
558 | "www_example_org_name_conv_http.ttcn", c_numOfDiff_headerAndModuleName); | |
559 | } | |
560 | } | |
561 | ||
562 | testcase tc_comment_placement() runs on xmlTest_CT | |
563 | { | |
564 | f_shellCommandWithVerdict("xsd2ttcn comment_placement.xsd","",c_shell_successWithoutWarningAndError); | |
565 | if(getverdict==pass) { | |
566 | f_compareFiles( | |
567 | "www_example_org_comment_placement_e.ttcn", | |
568 | "www_example_org_comment_placement.ttcn", c_numOfDiff_headerAndModuleName); | |
569 | } | |
570 | } | |
571 | ||
970ed795 EL |
572 | }//group |
573 | ||
574 | //************************************ | |
575 | // Testcases based on W3C standards | |
576 | //************************************ | |
577 | ||
578 | //****************************** | |
579 | // StringTest | |
580 | //****************************** | |
581 | group StringTest { | |
582 | ||
583 | //=== Correct string type definitions: ==== | |
584 | //TR HL21086 - whitespace preserve. TODO: standalone testcase | |
585 | testcase tc_string() runs on xmlTest_CT | |
586 | { | |
587 | f_shellCommandWithVerdict("xsd2ttcn -z XmlTest_string.xsd","",c_shell_successWithoutWarningAndError) | |
588 | if(getverdict==pass) { | |
589 | f_compareFiles( | |
590 | "www_XmlTest_org_string.ttcn", | |
591 | "www_XmlTest_org_string_e.ttcn", c_numOfDiff_headerModNameAndNamespace); | |
592 | } | |
593 | //////////////////////////////////////////// | |
594 | // | |
595 | // f_encDecTest_NameA(); | |
596 | // f_encDecTest_NameB(); | |
597 | // f_encDecTest_Non_empty_string(); | |
598 | // f_encDecTest_Type(); | |
599 | // | |
600 | //////////////////////////////////////////// | |
601 | } | |
602 | ||
603 | //Passed, TR: Hl21086 - Solved | |
604 | testcase tc_string_withWhitespace() runs on xmlTest_CT | |
605 | { | |
606 | f_shellCommandWithVerdict("xsd2ttcn -z XmlTest_string_withWhitespace.xsd","",c_shell_successWithoutWarningAndError) | |
607 | if(getverdict==pass) { | |
608 | f_compareFiles( | |
609 | "www_XmlTest_org_string_withWhitespace.ttcn", | |
610 | "www_XmlTest_org_string_withWhitespace_e.ttcn", c_numOfDiff_headerAndModuleName); | |
611 | } | |
612 | f_encDecTest_StringWhiteSpaceP(); | |
613 | f_encDecTest_StringWhiteSpaceR(); | |
614 | f_encDecTest_StringWhiteSpaceC(); | |
615 | } | |
616 | ||
617 | //Passed, TR: HL26227 -Solved BUT rethink if variant part is well ordered or not!! | |
618 | testcase tc_string_withEnum() runs on xmlTest_CT | |
619 | { | |
620 | f_shellCommandWithVerdict("xsd2ttcn -z XmlTest_string_withEnum.xsd","",c_shell_successWithoutWarningAndError) | |
621 | if(getverdict==pass) { | |
622 | f_compareFiles( | |
623 | "www_XmlTest_org_string_withEnum.ttcn", | |
624 | "www_XmlTest_org_string_withEnum_e.ttcn", c_numOfDiff_headerAndModuleName); | |
625 | } | |
626 | f_encDecTest_StringEnum(); | |
627 | } | |
628 | //TODO: Write length of child restriction tests based on tc_string!!! | |
629 | ||
630 | //=== Length restriction tests === | |
631 | ||
632 | ||
633 | ||
634 | //=== Faulty String definitions: ========= | |
635 | ||
636 | //===length=== | |
637 | //TR: HL21257 --Solved | |
638 | testcase tc_string_withPosLength() runs on xmlTest_CT | |
639 | { | |
640 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withPosLength.xsd","",c_shell_successWithoutWarningAndError); | |
641 | if(getverdict==pass) { | |
642 | f_compareFiles( | |
643 | "www_XmlTest_org_string_withPosLength.ttcn", | |
644 | "www_XmlTest_org_string_withPosLength_e.ttcn", c_numOfDiff_headerAndModuleName); | |
645 | } | |
646 | } | |
647 | ||
648 | //Passed, returs with error | |
649 | testcase tc_string_withEmptyLength() runs on xmlTest_CT | |
650 | { | |
651 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withEmptyLength.xsd","",c_shell_error) | |
652 | } | |
653 | ||
654 | testcase tc_string_withNegativeLength() runs on xmlTest_CT | |
655 | { | |
656 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withNegativeLength.xsd","",c_shell_error) | |
657 | } | |
658 | ||
659 | //Passed | |
660 | testcase tc_string_withFixedLength() runs on xmlTest_CT | |
661 | { | |
3abe9331 | 662 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withFixedLength.xsd","",c_shell_error); |
663 | } | |
664 | ||
665 | testcase tc_fixed_value() runs on xmlTest_CT | |
666 | { | |
667 | f_shellCommandWithVerdict("xsd2ttcn fixed_value.xsd","",c_shell_successWithWarning); | |
668 | if(getverdict==pass) { | |
669 | f_compareFiles( | |
670 | "www_example_org_fixed_value.ttcn", | |
671 | "www_example_org_fixed_value_e.ttcn", c_numOfDiff_headerAndModuleName); | |
672 | } | |
970ed795 EL |
673 | } |
674 | ||
675 | //Passed | |
676 | testcase tc_string_withFloatLength() runs on xmlTest_CT | |
677 | { | |
678 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withFloatLength.xsd","", c_shell_error) | |
679 | } | |
680 | ||
681 | //===minLength=== | |
682 | //Passed, TR: HL21690 | |
683 | testcase tc_string_withPosMinLength() runs on xmlTest_CT | |
684 | { | |
685 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withMinLength.xsd","",c_shell_successWithoutWarningAndError) | |
686 | if(getverdict==pass) { | |
687 | f_compareFiles( | |
688 | "www_XmlTest_org_string_withMinLength.ttcn", | |
689 | "www_XmlTest_org_string_withMinLength_e.ttcn", c_numOfDiff_headerAndModuleName); | |
690 | } | |
691 | } | |
692 | ||
693 | //Passed | |
694 | testcase tc_string_withEmptyMin() runs on xmlTest_CT | |
695 | { | |
696 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withEmptyMin.xsd","",c_shell_error) | |
697 | } | |
698 | ||
699 | //Passed | |
700 | testcase tc_string_withNegativeMin() runs on xmlTest_CT | |
701 | { | |
702 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withNegativeMin.xsd","",c_shell_error) | |
703 | } | |
704 | ||
705 | //===maxLength=== | |
706 | //Passed | |
707 | testcase tc_string_withPosMax() runs on xmlTest_CT | |
708 | { | |
709 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withPosMax.xsd","",c_shell_successWithoutWarningAndError); | |
710 | if(getverdict==pass) { | |
711 | f_compareFiles( | |
712 | "www_XmlTest_org_string_withPosMax_e.ttcn","www_XmlTest_org_string_withPosMax.ttcn", c_numOfDiff_headerAndModuleName); | |
713 | } | |
714 | } | |
715 | ||
716 | //Passed | |
717 | testcase tc_string_withEmptyMax() runs on xmlTest_CT | |
718 | { | |
719 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withEmptyMax.xsd","",c_shell_error) | |
720 | } | |
721 | ||
722 | //Passed | |
723 | testcase tc_string_withNegativeMax() runs on xmlTest_CT | |
724 | { | |
725 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withNegativeMax.xsd","",c_shell_error) | |
726 | } | |
727 | //=== minLength>maxLength | |
728 | //Passed, TR: | |
729 | testcase tc_string_withFaultyMinMaxLength() runs on xmlTest_CT | |
730 | { | |
731 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withFaultyMinMax.xsd","",c_shell_error) | |
732 | } | |
733 | //Passed | |
734 | testcase tc_string_withOverDefinition() runs on xmlTest_CT | |
735 | { | |
736 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withOverDefinition.xsd","",c_shell_error) | |
737 | } | |
738 | ||
739 | testcase tc_string_withTypeAndBase() runs on xmlTest_CT | |
740 | { | |
741 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withTypeAndBase.xsd","",c_shell_error) | |
742 | } | |
3abe9331 | 743 | |
744 | //testcase tc_string_pattern_square_brackets() runs on xmlTest_CT | |
745 | //{ | |
746 | // f_shellCommandWithVerdict("xsd2ttcn regex_square_brackets.xsd","",c_shell_successWithoutWarningAndError); | |
747 | // if(getverdict==pass) { | |
748 | // f_compareFiles( | |
749 | // "www_example_org_regex_square_brackets_e.ttcn","www_example_org_regex_square_brackets.ttcn", c_numOfDiff_headerAndModuleName); | |
750 | // } | |
751 | //} | |
970ed795 EL |
752 | }//StringTest |
753 | ||
754 | //****************************** | |
755 | // BooleanTest | |
756 | //****************************** | |
757 | group BooleanTest { | |
758 | ||
759 | //TODO: check warning sending for not supported:features | |
760 | testcase tc_boolean() runs on xmlTest_CT { | |
761 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_boolean.xsd","",c_shell_successWithoutWarningAndError) | |
762 | if(getverdict==pass) { | |
763 | f_compareFiles( | |
764 | "www_XmlTest_org_boolean_e.ttcn","www_XmlTest_org_boolean.ttcn", c_numOfDiff_headerAndModuleName); | |
765 | } | |
766 | } | |
3abe9331 | 767 | |
768 | testcase tc_boolean_variant_commented() runs on xmlTest_CT { | |
769 | f_shellCommandWithVerdict("xsd2ttcn boolean_variant_commented.xsd","",c_shell_successWithoutWarningAndError) | |
770 | if(getverdict==pass) { | |
771 | f_compareFiles( | |
772 | "www_example_org_boolean_variant_commented_e.ttcn", | |
773 | "www_example_org_boolean_variant_commented.ttcn", c_numOfDiff_headerAndModuleName); | |
774 | } | |
775 | } | |
970ed795 EL |
776 | }//BooleanTest |
777 | ||
778 | ||
779 | //****************************** | |
780 | // DecimalTest | |
781 | //****************************** | |
782 | group DecimalTest { | |
783 | ||
784 | //Passed | |
785 | testcase tc_decimal() runs on xmlTest_CT { | |
786 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_decimal.xsd","",c_shell_successWithoutWarningAndError) | |
787 | if(getverdict==pass) { | |
788 | f_compareFiles( | |
789 | "www_XmlTest_org_decimal_e.ttcn", | |
790 | "www_XmlTest_org_decimal.ttcn", c_numOfDiff_headerAndModuleName); | |
791 | } | |
792 | } | |
793 | ||
794 | //!!!!!Length not supported!!!! | |
795 | // testcase tc_decimal_withLength() runs on xmlTest_CT { | |
796 | // f_shellCommandWithVerdict("xsd2ttcn XmlTest_decimal_withLength.xsd","",c_shell_successWithoutWarningAndError) | |
797 | // if(getverdict==pass) { | |
798 | // f_compareFiles( | |
799 | // "www_XmlTest_org_decimal_withLength_e.ttcn", | |
800 | // "www_XmlTest_org_decimal_withLength.ttcn", c_numOfDiff_headerAndModuleName); | |
801 | // } | |
802 | // } | |
803 | ||
804 | //TR: Generates integer limits instead of decimal | |
805 | //TR: HL2715 -Solved | |
806 | testcase tc_decimal_withMinMaxInclusive() runs on xmlTest_CT { | |
807 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_decimal_withMinMaxInclusive.xsd","",c_shell_successWithoutWarningAndError) | |
808 | ||
809 | if(getverdict==pass) { | |
810 | f_compareFiles( | |
811 | "www_XmlTest_org_decimal_withMinMaxInclusive_e.ttcn", | |
812 | "www_XmlTest_org_decimal_withMinMaxInclusive.ttcn", c_numOfDiff_headerAndModuleName); | |
813 | } | |
814 | }//tc_ | |
815 | ||
816 | //TR21266 -Solved | |
817 | testcase tc_decimal_withMinMaxExclusive() runs on xmlTest_CT { | |
818 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_decimal_withMinMaxExclusive.xsd","",c_shell_successWithoutWarningAndError) | |
819 | ||
820 | if(getverdict==pass) { | |
821 | f_compareFiles( | |
822 | "www_XmlTest_org_decimal_withMinMaxExclusive_e.ttcn", | |
823 | "www_XmlTest_org_decimal_withMinMaxExclusive.ttcn", c_numOfDiff_headerAndModuleName); | |
824 | } | |
825 | }//tc_ | |
826 | ||
827 | //TR HL21296 | |
828 | testcase tc_decimal_withEnum() runs on xmlTest_CT { | |
829 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_decimal_withEnum.xsd","",c_shell_successWithoutWarningAndError) | |
830 | ||
831 | if(getverdict==pass) { | |
832 | f_compareFiles( | |
833 | "www_XmlTest_org_decimal_withEnum_e.ttcn", | |
834 | "www_XmlTest_org_decimal_withEnum.ttcn", c_numOfDiff_headerAndModuleName); | |
835 | } | |
836 | } | |
3abe9331 | 837 | |
838 | testcase tc_decimal_fractiondigits() runs on xmlTest_CT { | |
839 | f_shellCommandWithVerdict("xsd2ttcn decimal_fractiondigits.xsd","",c_shell_successWithWarning) | |
840 | ||
841 | if(getverdict==pass) { | |
842 | f_compareFiles( | |
843 | "www_example_org_decimal_fractiondigits_e.ttcn", | |
844 | "www_example_org_decimal_fractiondigits.ttcn", c_numOfDiff_headerAndModuleName); | |
845 | } | |
846 | } | |
970ed795 EL |
847 | }//DecimalTest |
848 | ||
849 | //****************************** | |
850 | // IntegerTest | |
851 | // Based on (XSD_2)/3.3.13 and (ETSI_9)/6.1/Table1 | |
852 | //****************************** | |
853 | group IntegerTest { | |
854 | ||
855 | testcase tc_integer() runs on xmlTest_CT { | |
856 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_integer.xsd","",c_shell_successWithoutWarningAndError) | |
857 | ||
858 | if(getverdict==pass) { | |
859 | f_compareFiles( | |
860 | "www_XmlTest_org_integer_e.ttcn", | |
861 | "www_XmlTest_org_integer.ttcn", c_numOfDiff_headerAndModuleName); | |
862 | } | |
863 | ||
864 | }//tc_ | |
865 | ||
866 | //negative test | |
867 | testcase tc_integer_empty1() runs on xmlTest_CT { | |
868 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_integer_empty1.xsd","",c_shell_error) | |
869 | }//tc_ | |
870 | ||
871 | //negative test | |
872 | testcase tc_integer_withLength() runs on xmlTest_CT { | |
873 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_integer_withLength.xsd","",c_shell_error) | |
874 | }//tc_ | |
875 | ||
876 | //Ready, passed, TR:HL21694 -solved | |
877 | testcase tc_integer_withEnum() runs on xmlTest_CT { | |
878 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_integer_withEnum.xsd","",c_shell_successWithoutWarningAndError) | |
879 | ||
880 | if(getverdict==pass) { | |
881 | f_compareFiles( | |
882 | "www_XmlTest_org_integer_withEnum_e.ttcn","www_XmlTest_org_integer_withEnum.ttcn", c_numOfDiff_headerAndModuleName); | |
883 | } | |
884 | }//tc_ | |
885 | ||
886 | //Passed | |
887 | testcase tc_integer_withMinIncl() runs on xmlTest_CT { | |
888 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_integer_withMinIncl.xsd","",c_shell_successWithoutWarningAndError) | |
889 | ||
890 | if(getverdict==pass) { | |
891 | f_compareFiles( | |
892 | "www_XmlTest_org_integer_withMinIncl_e.ttcn", | |
893 | "www_XmlTest_org_integer_withMinIncl.ttcn",c_numOfDiff_headerAndModuleName); | |
894 | } | |
895 | }//tc_ | |
896 | ||
897 | //Passed | |
898 | testcase tc_integer_withMaxIncl() runs on xmlTest_CT { | |
899 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_integer_withMaxIncl.xsd","",c_shell_successWithoutWarningAndError) | |
900 | ||
901 | if(getverdict==pass) { | |
902 | f_compareFiles( | |
903 | "www_XmlTest_org_integer_withMaxIncl_e.ttcn","www_XmlTest_org_integer_withMaxIncl.ttcn", c_numOfDiff_headerAndModuleName); | |
904 | } | |
905 | }//tc_ | |
906 | ||
907 | //Passed | |
908 | testcase tc_integer_withMinExcl() runs on xmlTest_CT { | |
909 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_integer_withMinExcl.xsd","",c_shell_successWithoutWarningAndError) | |
910 | ||
911 | if(getverdict==pass) { | |
912 | f_compareFiles( | |
913 | "www_XmlTest_org_integer_withMinExcl_e.ttcn", | |
914 | "www_XmlTest_org_integer_withMinExcl.ttcn", c_numOfDiff_headerAndModuleName); | |
915 | } | |
916 | }//tc_ | |
917 | ||
918 | //Passed | |
919 | testcase tc_integer_withMaxExcl() runs on xmlTest_CT { | |
920 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_integer_withMaxExcl.xsd","",c_shell_successWithoutWarningAndError) | |
921 | ||
922 | if(getverdict==pass) { | |
923 | f_compareFiles( | |
924 | "www_XmlTest_org_integer_withMaxExcl_e.ttcn","www_XmlTest_org_integer_withMaxExcl.ttcn", c_numOfDiff_headerAndModuleName); | |
925 | } | |
926 | }//tc_ | |
927 | ||
928 | ||
929 | }//IntegerTest | |
930 | ||
3abe9331 | 931 | |
932 | testcase tc_float_not_a_number() runs on xmlTest_CT { | |
933 | f_shellCommandWithVerdict("xsd2ttcn not_a_number_minex_inf_maxex_-inf.xsd","",c_shell_successWithoutWarningAndError) | |
934 | ||
935 | if(getverdict==pass) { | |
936 | f_compareFiles( | |
937 | "www_example_org_not_a_number_minex_inf_maxex_inf_e.ttcn", | |
938 | "www_example_org_not_a_number_minex_inf_maxex_inf.ttcn", c_numOfDiff_headerAndModuleName); | |
939 | } | |
940 | }//tc_ | |
941 | ||
970ed795 EL |
942 | // |
943 | testcase tc_simpleType_enum() runs on xmlTest_CT { | |
944 | ||
945 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_simple_enum.xsd","",c_shell_successWithoutWarningAndError) | |
946 | ||
947 | if(getverdict==pass) { | |
948 | f_compareFiles( | |
949 | "www_XmlTest_org_simple_enum_e.ttcn","www_XmlTest_org_simple_enum.ttcn", c_numOfDiff_headerAndModuleName); | |
950 | } | |
951 | ||
952 | }//tc_ | |
953 | ||
3abe9331 | 954 | testcase tc_simpleType_restrict_comp() runs on xmlTest_CT { |
955 | ||
956 | f_shellCommandWithVerdict("xsd2ttcn simpletype_restrict_comp.xsd","",c_shell_successWithoutWarningAndError) | |
957 | ||
958 | if(getverdict==pass) { | |
959 | f_compareFiles( | |
960 | "www_example_org_simpletype_restrict_comp_e.ttcn","www_example_org_simpletype_restrict_comp.ttcn", c_numOfDiff_headerAndModuleName); | |
961 | } | |
962 | ||
963 | }//tc_ | |
964 | ||
965 | testcase tc_simpleType_ref() runs on xmlTest_CT { | |
966 | ||
967 | f_shellCommandWithVerdict("xsd2ttcn simpletype_ref.xsd","",c_shell_successWithoutWarningAndError) | |
968 | ||
969 | if(getverdict==pass) { | |
970 | f_compareFiles( | |
971 | "www_example_org_simpletype_ref_e.ttcn","www_example_org_simpletype_ref.ttcn", c_numOfDiff_headerAndModuleName); | |
972 | } | |
973 | ||
974 | }//tc_ | |
975 | ||
976 | testcase tc_simpleType_base() runs on xmlTest_CT { | |
977 | ||
978 | f_shellCommandWithVerdict("xsd2ttcn simpletype_base.xsd","",c_shell_successWithoutWarningAndError) | |
979 | ||
980 | if(getverdict==pass) { | |
981 | f_compareFiles( | |
982 | "www_example_org_simpletype_base_e.ttcn","www_example_org_simpletype_base.ttcn", c_numOfDiff_headerAndModuleName); | |
983 | } | |
984 | ||
985 | }//tc_ | |
986 | ||
987 | // | |
988 | testcase tc_enum_field_names() runs on xmlTest_CT { | |
989 | ||
990 | f_shellCommandWithVerdict("xsd2ttcn enum_field_names.xsd","",c_shell_successWithoutWarningAndError) | |
991 | ||
992 | if(getverdict==pass) { | |
993 | f_compareFiles( | |
994 | "www_example_org_enum_field_names_e.ttcn","www_example_org_enum_field_names.ttcn", c_numOfDiff_headerAndModuleName); | |
995 | } | |
996 | ||
997 | }//tc_ | |
998 | ||
3f84031e | 999 | testcase tc_attribute_enumeration_variant() runs on xmlTest_CT { |
1000 | ||
1001 | f_shellCommandWithVerdict("xsd2ttcn attribute_enumeration_variant.xsd","",c_shell_successWithoutWarningAndError) | |
1002 | ||
1003 | if(getverdict==pass) { | |
1004 | f_compareFiles( | |
1005 | "www_example_org_attribute_enumeration_variant_e.ttcn","www_example_org_attribute_enumeration_variant.ttcn", c_numOfDiff_headerAndModuleName); | |
1006 | } | |
1007 | }//tc_ | |
1008 | ||
970ed795 EL |
1009 | |
1010 | //****************************** | |
1011 | // TimeTest | |
1012 | // Based on (XSD_2)/ | |
1013 | //****************************** | |
1014 | group TimeTest { | |
1015 | ||
1016 | //Passed: | |
1017 | testcase tc_time() runs on xmlTest_CT { | |
1018 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_time.xsd","",c_shell_successWithoutWarningAndError) | |
1019 | ||
1020 | if(getverdict==pass) { | |
1021 | f_compareFiles( | |
1022 | "www_XmlTest_org_time_e.ttcn","www_XmlTest_org_time.ttcn", c_numOfDiff_headerAndModuleName); | |
1023 | } | |
1024 | }//tc_ | |
1025 | ||
1026 | //Passed TR HL22058 | |
1027 | testcase tc_time_withEnum() runs on xmlTest_CT { | |
1028 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_time_withEnum.xsd","",c_shell_successWithoutWarningAndError) | |
1029 | ||
1030 | if(getverdict==pass) { | |
1031 | f_compareFiles( | |
1032 | "www_XmlTest_org_time_withEnum_e.ttcn","www_XmlTest_org_time_withEnum.ttcn", c_numOfDiff_headerAndModuleName); | |
1033 | } | |
1034 | }//tc_ | |
1035 | }//TimeTest | |
1036 | ||
1037 | group ListTest { | |
1038 | //converter | |
1039 | testcase tc_list_conv() runs on xmlTest_CT { | |
1040 | ||
1041 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_list.xsd","",c_shell_successWithoutWarningAndError) | |
1042 | ||
1043 | if(getverdict==pass) { | |
1044 | f_compareFiles( | |
1045 | "www_XmlTest_org_list_e.ttcn","www_XmlTest_org_list.ttcn", c_numOfDiff_headerAndModuleName); | |
1046 | } | |
1047 | ||
1048 | // restrictions:length, minLength, maxLength, pattern, and enumeration. | |
1049 | }//tc_ | |
1050 | ||
1051 | testcase tc_list_encDec() runs on xmlTest_CT { | |
1052 | f_encDecTest_StringList(); | |
1053 | }//tc_ | |
1054 | ||
1055 | testcase tc_integerList() runs on xmlTest_CT { | |
1056 | ||
1057 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_list_integer.xsd","",c_shell_successWithoutWarningAndError) | |
1058 | ||
1059 | if(getverdict==pass) { | |
1060 | f_compareFiles( | |
1061 | "www_XmlTest_org_list_integer_e.ttcn","www_XmlTest_org_list_integer.ttcn", c_numOfDiff_headerAndModuleName); | |
1062 | } | |
1063 | ||
1064 | }//tc_ | |
3abe9331 | 1065 | |
1066 | testcase tc_list_simpletype() runs on xmlTest_CT { | |
1067 | ||
1068 | f_shellCommandWithVerdict("xsd2ttcn list_simpletype.xsd","",c_shell_successWithoutWarningAndError) | |
1069 | ||
1070 | if(getverdict==pass) { | |
1071 | f_compareFiles( | |
1072 | "www_example_org_list_simpletype_e.ttcn","www_example_org_list_simpletype.ttcn", c_numOfDiff_headerAndModuleName); | |
1073 | } | |
1074 | ||
1075 | }//tc_ | |
970ed795 EL |
1076 | }//ListTest |
1077 | ||
1078 | group UnionTest { | |
1079 | //TR:HL23577 | |
1080 | testcase tc_union() runs on xmlTest_CT { | |
1081 | ||
1082 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_union.xsd","",c_shell_successWithoutWarningAndError) | |
1083 | ||
1084 | if(getverdict==pass) { | |
1085 | f_compareFiles( | |
1086 | "www_XmlTest_org_union_e.ttcn","www_XmlTest_org_union.ttcn", c_numOfDiff_headerAndModuleName); | |
1087 | } | |
1088 | }//tc_ | |
1089 | ||
1090 | testcase tc_union_optional() runs on xmlTest_CT { | |
1091 | ||
1092 | f_shellCommandWithVerdict("xsd2ttcn ETSI_CR5852_union.xsd","",c_shell_successWithoutWarningAndError) | |
1093 | ||
1094 | if(getverdict==pass) { | |
1095 | f_compareFiles( | |
1096 | "ETSI_CR5852_union_e.ttcn","ETSI_CR5852_union.ttcn", c_numOfDiff_headerAndModuleName); | |
1097 | } | |
1098 | } | |
1099 | ||
3abe9331 | 1100 | testcase tc_enumeration_union_restriction() runs on xmlTest_CT { |
1101 | ||
1102 | f_shellCommandWithVerdict("xsd2ttcn enumeration_restriction.xsd","",c_shell_successWithWarning) | |
1103 | ||
1104 | if(getverdict==pass) { | |
1105 | f_compareFiles( | |
1106 | "www_example_org_enumeration_restriction_e.ttcn", | |
1107 | "www_example_org_enumeration_restriction.ttcn", c_numOfDiff_headerAndModuleName); | |
1108 | } | |
1109 | } | |
1110 | ||
1111 | testcase tc_enumeration_union_restriction2() runs on xmlTest_CT { | |
1112 | ||
1113 | f_shellCommandWithVerdict("xsd2ttcn enumeration_restriction2.xsd","",c_shell_successWithoutWarningAndError) | |
1114 | ||
1115 | if(getverdict==pass) { | |
1116 | f_compareFiles( | |
1117 | "www_example_org_seq_enumeration_restriction_e.ttcn", | |
1118 | "www_example_org_seq_enumeration_restriction.ttcn", c_numOfDiff_headerAndModuleName); | |
1119 | } | |
1120 | } | |
1121 | ||
1122 | testcase tc_enumeration_remove_dup() runs on xmlTest_CT { | |
1123 | ||
1124 | f_shellCommandWithVerdict("xsd2ttcn enumeration_remove_dup.xsd","",c_shell_successWithoutWarningAndError) | |
1125 | ||
1126 | if(getverdict==pass) { | |
1127 | f_compareFiles( | |
1128 | "www_example_org_enumeration_remove_dup_e.ttcn", | |
1129 | "www_example_org_enumeration_remove_dup.ttcn", c_numOfDiff_headerAndModuleName); | |
1130 | } | |
1131 | } | |
1132 | ||
970ed795 EL |
1133 | }//UnionTest |
1134 | ||
1135 | ||
1136 | ||
1137 | group ComplexType { | |
1138 | ||
1139 | testcase tc_complex1() runs on xmlTest_CT { | |
1140 | ||
1141 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex1.xsd","",c_shell_successWithoutWarningAndError) | |
1142 | ||
1143 | if(getverdict==pass) { | |
1144 | f_compareFiles( | |
1145 | "www_XmlTest_org_complex1_e.ttcn","www_XmlTest_org_complex1.ttcn", c_numOfDiff_headerModNameAndNamespace); | |
1146 | f_encDecTest_InternationalPrice(); | |
1147 | } | |
1148 | }//tc_ | |
1149 | ||
1150 | //TR: HL24977 -Solved | |
1151 | testcase tc_complex2() runs on xmlTest_CT { | |
1152 | ||
1153 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex2.xsd","",c_shell_successWithoutWarningAndError) | |
1154 | ||
1155 | if(getverdict==pass) { | |
1156 | f_compareFiles( | |
1157 | "www_XmlTest_org_complex2_e.ttcn","www_XmlTest_org_complex2.ttcn", c_numOfDiff_headerModNameAndNamespace); | |
1158 | } | |
1159 | f_encDecTest_InternationalPrice2(); //TR: HL24977 -solved -Primer, 2.5.3 Empty Content | |
1160 | f_encDecTest_InternationalPrice3(); | |
1161 | f_encDecTest_InternationalPrice4(); | |
1162 | }//tc_ | |
1163 | ||
1164 | testcase tc_complex_simpleContent() runs on xmlTest_CT { | |
1165 | ||
1166 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_simpleContent.xsd","",c_shell_successWithoutWarningAndError) | |
1167 | ||
1168 | if(getverdict==pass) { | |
1169 | f_compareFiles( | |
1170 | "www_XmlTest_org_complex_simpleContent_e.ttcn","www_XmlTest_org_complex_simpleContent.ttcn", c_numOfDiff_headerModNameAndNamespace); | |
1171 | f_encDecTest_ComplexTypeWithSimpleContent1(); | |
1172 | f_encDecTest_ComplexTypeWithSimpleContent2(); | |
1173 | f_encDecTest_ComplexTypeWithSimpleContent2_neg(); | |
1174 | } | |
1175 | }//tc_ | |
1176 | ||
3abe9331 | 1177 | testcase tc_complex_namespaceas() runs on xmlTest_CT { |
1178 | ||
1179 | f_shellCommandWithVerdict("xsd2ttcn namespaceas.xsd imported2.xsd","",c_shell_successWithoutWarningAndError) | |
1180 | ||
1181 | if(getverdict==pass) { | |
1182 | f_compareFiles( | |
1183 | "www_example_org_namespaceas_e.ttcn","www_example_org_namespaceas.ttcn", c_numOfDiff_headerAndModuleName); | |
1184 | f_compareFiles( | |
1185 | "www_example_org_imported2_e.ttcn","www_example_org_imported2.ttcn", c_numOfDiff_headerAndModuleName); | |
1186 | } | |
1187 | }//tc_ | |
1188 | ||
970ed795 EL |
1189 | testcase tc_complex_mixed_conv() runs on xmlTest_CT { |
1190 | ||
1191 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_mixed.xsd","",c_shell_successWithoutWarningAndError) | |
1192 | ||
1193 | if(getverdict==pass) { | |
1194 | f_compareFiles( | |
1195 | "www_XmlTest_org_complex_mixed_e.ttcn","www_XmlTest_org_complex_mixed.ttcn", c_numOfDiff_headerAndModuleName); | |
1196 | } | |
1197 | }//tc_ | |
1198 | ||
3abe9331 | 1199 | testcase tc_complex_group_reference() runs on xmlTest_CT { |
1200 | ||
1201 | f_shellCommandWithVerdict("xsd2ttcn seq_group_reference.xsd","",c_shell_successWithoutWarningAndError) | |
1202 | ||
1203 | if(getverdict==pass) { | |
1204 | f_compareFiles( | |
1205 | "www_example_org_seq_group_reference_e.ttcn","www_example_org_seq_group_reference.ttcn", c_numOfDiff_headerAndModuleName); | |
1206 | } | |
1207 | }//tc_ | |
1208 | ||
970ed795 EL |
1209 | //TR:HL29258 |
1210 | testcase tc_complex_mixed_encDec() runs on xmlTest_CT { | |
1211 | f_encDecTest_ComplexTypeWithMixed(); | |
1212 | }//tc_ | |
1213 | ||
3abe9331 | 1214 | testcase tc_complex_seq_embeds_seq() runs on xmlTest_CT { |
1215 | ||
1216 | f_shellCommandWithVerdict("xsd2ttcn sequence_embeds_sequence.xsd","",c_shell_successWithoutWarningAndError) | |
1217 | ||
1218 | if(getverdict==pass) { | |
1219 | f_compareFiles( | |
1220 | "http_www_example_org_seq_embeds_seq_e.ttcn","http_www_example_org_seq_embeds_seq.ttcn", c_numOfDiff_headerModNameAndNamespace); | |
1221 | f_encDecTest_InternationalPrice(); | |
1222 | } | |
1223 | }//tc_ | |
970ed795 EL |
1224 | |
1225 | testcase tc_complex_choice_converter() runs on xmlTest_CT { | |
1226 | ||
3abe9331 | 1227 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_choice.xsd","",c_shell_successWithWarning) |
970ed795 EL |
1228 | |
1229 | if(getverdict==pass) { | |
1230 | f_compareFiles( | |
1231 | "www_XmlTest_org_complex_choice_e.ttcn","www_XmlTest_org_complex_choice.ttcn", c_numOfDiff_headerAndModuleName); | |
1232 | } | |
1233 | }//tc_ | |
1234 | ||
1235 | // | |
1236 | testcase tc_complex_choice_encDec() runs on xmlTest_CT { | |
1237 | f_encDecTest_ComplexTypeWithChoice_1(); | |
1238 | f_encDecTest_ComplexTypeWithChoice_2(); | |
1239 | f_encDecTest_ComplexTypeWithChoice_3(); | |
1240 | f_encDecTest_ComplexTypeWithChoice_4(); | |
1241 | f_encDecTest_ComplexTypeWithChoice_5(); | |
1242 | f_encDecTest_ComplexTypeWithChoice_6(); | |
1243 | f_encDecTest_ComplexTypeWithChoice_7(); | |
1244 | f_encDecTest_ComplexTypeWithChoice_8(); | |
1245 | f_encDecTest_ComplexTypeWithChoice_9(); | |
1246 | f_encDecTest_ComplexTypeWithChoice_10(); | |
1247 | }//tc_ | |
1248 | ||
1249 | //Passed, TR: HL30830 -solved | |
1250 | testcase tc_complex_all_converter() runs on xmlTest_CT { | |
1251 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_all.xsd","",c_shell_successWithoutWarningAndError) | |
1252 | ||
1253 | if(getverdict==pass) { | |
1254 | f_compareFiles( | |
1255 | "www_XmlTest_org_complex_all_e.ttcn","www_XmlTest_org_complex_all.ttcn", c_numOfDiff_headerAndModuleName); | |
1256 | } | |
1257 | }//tc_ | |
1258 | ||
1259 | //HL29679 | |
1260 | testcase tc_complex_all_emptySet_encDec() runs on xmlTest_CT { | |
1261 | var MySubjects1 vl_pdu:= { | |
1262 | order:={}, | |
1263 | year:="2009", | |
1264 | english:=omit, | |
1265 | math:=omit, | |
1266 | physics:=omit, | |
1267 | chemistry:=omit | |
1268 | } | |
1269 | var charstring vl_expectedEncodedPdu:="<MySubjects1 Year='2009'/>\n\n"; | |
1270 | f_encDecTest_ComplexTypeWithAll_MySubject1(vl_pdu,vl_expectedEncodedPdu,vl_pdu); | |
1271 | }//tc_ | |
1272 | ||
1273 | testcase tc_complex_all_fullSet_encDec() runs on xmlTest_CT { | |
1274 | var MySubjects1 vl_pdu:= { | |
1275 | order:={math,english,chemistry, physics}, | |
1276 | year:="2009", | |
1277 | english:="Advanced Group 1", | |
1278 | math:="Beginners 1", | |
1279 | physics:="Mechanics 1", | |
1280 | chemistry:="CH2" | |
1281 | } | |
1282 | var charstring vl_expectedEncodedPdu:= | |
1283 | "<MySubjects1 Year='2009'>\n\t<Math>Beginners 1</Math>\n\t<English>Advanced Group 1</English>\n\t<Chemistry>CH2</Chemistry>\n\t<Physics>Mechanics 1</Physics>\n</MySubjects1>\n\n" | |
1284 | f_encDecTest_ComplexTypeWithAll_MySubject1(vl_pdu,vl_expectedEncodedPdu,vl_pdu); | |
1285 | }//tc_ | |
1286 | ||
1287 | testcase tc_complex_all_subSet_encDec() runs on xmlTest_CT { | |
1288 | var MySubjects1 vl_pdu:= { | |
1289 | order:={math,english,chemistry}, | |
1290 | year:="2009", | |
1291 | english:="Advanced Group 1", | |
1292 | math:="Beginners 1", | |
1293 | physics:=omit, | |
1294 | chemistry:="CH2" | |
1295 | }, | |
1296 | vl_expectedPdu:={ | |
1297 | order:={math,english}, | |
1298 | year:="2009", | |
1299 | english:="Advanced Group 1", | |
1300 | math:="Beginners 1", | |
1301 | physics:=omit, | |
1302 | chemistry:=omit | |
1303 | }; | |
1304 | var charstring vl_expectedEncodedPdu:= | |
1305 | "<MySubjects1 Year='2009'>\n\t<Math>Beginners 1</Math>\n\t<English>Advanced Group 1</English>\n\t<Chemistry>CH2</Chemistry>\n</MySubjects1>\n\n" | |
1306 | f_encDecTest_ComplexTypeWithAll_MySubject1(vl_pdu,vl_expectedEncodedPdu,vl_pdu); | |
1307 | }//tc_ | |
1308 | ||
1309 | testcase tc_complex_all_inconsistentSet_encDec() runs on xmlTest_CT { | |
1310 | f_encDecTest_ComplexTypeWithAll_inconsistentSet(); | |
1311 | }//tc_ | |
1312 | ||
1313 | //positive testcase for group "all". The type has no optional field (element).The input is correct | |
1314 | testcase tc_complex_all_noOptional_pos_encDec() runs on xmlTest_CT { | |
1315 | var MySubjects2 vl_pdu:= { | |
3abe9331 | 1316 | order:={math,english,chemistry, physics,history}, |
970ed795 | 1317 | year:="2009", |
3abe9331 | 1318 | english:="Advanced Group 1", |
1319 | math:="Beginners 1", | |
1320 | physics:="Mechanics 1", | |
1321 | chemistry:="CH2", | |
1322 | history:="H1" | |
970ed795 EL |
1323 | } |
1324 | var charstring vl_expectedEncodedPdu:= | |
1325 | "<MySubjects2 Year='2009'>\n\t<Math>Beginners 1</Math>\n\t<English>Advanced Group 1</English>\n\t<Chemistry>CH2</Chemistry>\n\t<Physics>Mechanics 1</Physics>\n\t<History>H1</History>\n</MySubjects2>\n\n"; | |
1326 | f_encDecTest_ComplexTypeWithAll_MySubject2(vl_pdu,vl_expectedEncodedPdu,vl_pdu,0); | |
1327 | }//tc_ | |
1328 | ||
1329 | //Negative testcase for group "all". The type has no optional field (element). | |
1330 | //The input is not correct: value of one field (history) is missing | |
1331 | //Passed, TR: HL32978 | |
1332 | testcase tc_complex_all_noOptional_neg1_encDec() runs on xmlTest_CT { | |
1333 | var MySubjects2 vl_pdu:= { | |
3abe9331 | 1334 | order:={math,english,chemistry, physics,history}, |
970ed795 | 1335 | year:="2009", |
3abe9331 | 1336 | english:="Advanced Group 1", |
1337 | math:="Beginners 1", | |
1338 | physics:="Mechanics 1", | |
1339 | chemistry:="CH2" | |
1340 | //history:="H1" | |
970ed795 EL |
1341 | } |
1342 | var MySubjects2 vl_expectedDecodedPdu:= { | |
3abe9331 | 1343 | order:={math,english,chemistry, physics,history}, |
970ed795 | 1344 | year:="2009", |
3abe9331 | 1345 | english:="Advanced Group 1", |
1346 | math:="Beginners 1", | |
1347 | physics:="Mechanics 1", | |
1348 | chemistry:="CH2", | |
1349 | history:="" | |
970ed795 EL |
1350 | } |
1351 | var charstring vl_expectedEncodedPdu:="<MySubjects2 Year='2009'>\n\t<Math>Beginners 1</Math>\n\t<English>Advanced Group 1</English>\n\t<Chemistry>CH2</Chemistry>\n\t<Physics>Mechanics 1</Physics>\n\t<History/>\n</MySubjects2>\n\n" | |
1352 | f_encDecTest_ComplexTypeWithAll_MySubject2(vl_pdu,vl_expectedEncodedPdu,vl_expectedDecodedPdu,0); | |
1353 | }//tc_ | |
1354 | ||
1355 | //Negative testcase for group "all". The type has no optional field (element). | |
1356 | //The input is not correct: value of one field (history) and its place in order-list is missing. | |
1357 | // ***Less elements of record of order than required*** | |
1358 | //expectation: error report at encoding, returning 1 at decoding | |
1359 | //Passed, TR: HL32978 | |
1360 | testcase tc_complex_all_noOptional_neg2_encDec() runs on xmlTest_CT { | |
1361 | var MySubjects2 vl_pdu:= { | |
3abe9331 | 1362 | order:={math,english,chemistry, physics}, |
970ed795 | 1363 | year:="2009", |
3abe9331 | 1364 | english:="Advanced Group 1", |
1365 | math:="Beginners 1", | |
1366 | physics:="Mechanics 1", | |
1367 | chemistry:="CH2" | |
1368 | //history:="H1" | |
970ed795 EL |
1369 | } |
1370 | var MySubjects2 vl_expectedDecodedPdu:= { | |
3abe9331 | 1371 | order:={math,english,chemistry, physics}, |
970ed795 | 1372 | year:="2009", |
3abe9331 | 1373 | english:="Advanced Group 1", |
1374 | math:="Beginners 1", | |
1375 | physics:="Mechanics 1", | |
1376 | chemistry:="CH2", | |
1377 | history:="" | |
970ed795 EL |
1378 | } |
1379 | var charstring vl_expectedEncodedPdu:="<MySubjects2 Year='2009'/>\n\n"; //expecting error report!!! | |
1380 | //"<MySubjects2 Year='2009'>\n\t<Math>Beginners 1</Math>\n\t<English>Advanced Group 1</English>\n\t<Chemistry>CH2</Chemistry>\n\t<Physics>Mechanics 1</Physics>\n</MySubjects2>\n\n" | |
1381 | f_encDecTest_ComplexTypeWithAll_MySubject2(vl_pdu,vl_expectedEncodedPdu,vl_expectedDecodedPdu,1); | |
1382 | }//tc_ | |
1383 | ||
1384 | //Negative testcase for group "all". The type has no optional field (element). | |
1385 | //The input is not correct: order three times contains "math", Physics and history are missing. | |
1386 | //expectation: error report at encoding, returning 1 at decoding | |
1387 | //Passed, TR: HL32978 | |
1388 | testcase tc_complex_all_noOptional_neg3_encDec() runs on xmlTest_CT { | |
1389 | var MySubjects2 vl_pdu:= { | |
3abe9331 | 1390 | order:={math,english,chemistry,math,math}, |
970ed795 | 1391 | year:="2009", |
3abe9331 | 1392 | english:="Advanced Group 1", |
1393 | math:="Beginners 1", | |
1394 | physics:="Mechanics 1", | |
1395 | chemistry:="CH2" | |
1396 | //history:="H1" | |
970ed795 EL |
1397 | } |
1398 | var charstring vl_expectedEncodedPdu:="<MySubjects2 Year='2009'/>\n\n"; //expecting error report!!! | |
1399 | //"<MySubjects2 Year='2009'>\n\t<Math>Beginners 1</Math>\n\t<English>Advanced Group 1</English>\n\t<Chemistry>CH2</Chemistry>\n\t<Physics>Mechanics 1</Physics>\n</MySubjects2>\n\n" | |
1400 | f_encDecTest_ComplexTypeWithAll_MySubject2(vl_pdu,vl_expectedEncodedPdu,vl_pdu,1); | |
1401 | }//tc_ | |
1402 | ||
1403 | ||
1404 | //========================================================================= | |
1405 | // tc_complex_all_noOptional_empty_encDec | |
1406 | //========================================================================= | |
1407 | //Negative testcase for group "all". The type has no optional field (element). | |
1408 | //The input is not correct: value of all the fields and their place in order-list is missing | |
1409 | //expectation: error report at encoding | |
1410 | //Passed, TR: HL32978 | |
1411 | testcase tc_complex_all_noOptional_empty_encDec() runs on xmlTest_CT { | |
1412 | var MySubjects2 vl_pdu:= { | |
3abe9331 | 1413 | order:={ }, |
1414 | year:="2009" | |
1415 | //english:="Advanced Group 1", | |
1416 | //math:="Beginners 1", | |
1417 | //physics:="Mechanics 1", | |
1418 | //chemistry:="CH2" | |
1419 | //history:="H1" | |
970ed795 EL |
1420 | } |
1421 | var charstring vl_expectedEncodedPdu:="<MySubjects2 Year='2009'/>\n\n"; //expecting error report!!! | |
1422 | f_encDecTest_ComplexTypeWithAll_MySubject2(vl_pdu,vl_expectedEncodedPdu,vl_pdu,1); | |
1423 | }//tc_ | |
1424 | ||
1425 | //========================================================================= | |
1426 | // tc_complex_minOccursMaxOccurs | |
1427 | //========================================================================= | |
1428 | //Old name: tc_XmlTest_minOccursMaxOccurs | |
1429 | ////TR (ethgry): HL10386 | |
1430 | testcase tc_complex_minOccursMaxOccurs() runs on xmlTest_CT | |
1431 | { | |
1432 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_minOccursMaxOccurs.xsd","",c_shell_successWithoutWarningAndError); | |
1433 | if(getverdict==pass) { | |
1434 | f_compareFiles( | |
1435 | "www_XmlTest_org_complex_minOccursMaxOccurs_e.ttcn","www_XmlTest_org_complex_minOccursMaxOccurs.ttcn", c_numOfDiff_headerAndModuleName); | |
1436 | } | |
1437 | } | |
1438 | ||
1439 | ||
1440 | testcase tc_complex_extension_converter() runs on xmlTest_CT { | |
1441 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_extension.xsd","",c_shell_successWithoutWarningAndError) | |
1442 | ||
1443 | if(getverdict==pass) { | |
1444 | f_compareFiles( | |
1445 | "www_XmlTest_org_complex_extension_e.ttcn","www_XmlTest_org_complex_extension.ttcn", c_numOfDiff_headerAndModuleName); | |
1446 | } | |
1447 | }//tc_ | |
1448 | ||
3abe9331 | 1449 | testcase tc_complex_extension_name_attrib_convert() runs on xmlTest_CT { |
1450 | f_shellCommandWithVerdict("xsd2ttcn name_conversion_extension_attrib.xsd","",c_shell_successWithoutWarningAndError) | |
1451 | ||
1452 | if(getverdict==pass) { | |
1453 | f_compareFiles( | |
1454 | "name_conversion_extension_attrib_e.ttcn","name_conversion_extension_attrib.ttcn", c_numOfDiff_headerAndModuleName); | |
1455 | } | |
1456 | }//tc_ | |
1457 | ||
1458 | testcase tc_complex_long_extension() runs on xmlTest_CT { | |
1459 | f_shellCommandWithVerdict("xsd2ttcn long_extension.xsd","",c_shell_successWithoutWarningAndError) | |
1460 | ||
1461 | if(getverdict==pass) { | |
1462 | f_compareFiles( | |
1463 | "www_example_org_long_extension_e.ttcn","www_example_org_long_extension.ttcn", c_numOfDiff_headerAndModuleName); | |
1464 | } | |
1465 | }//tc_ | |
1466 | ||
1467 | testcase tc_complex_self_recursion() runs on xmlTest_CT { | |
1468 | f_shellCommandWithVerdict("xsd2ttcn complex_self_recursion.xsd","",c_shell_successWithoutWarningAndError) | |
1469 | ||
1470 | if(getverdict==pass) { | |
1471 | f_compareFiles( | |
1472 | "www_example_org_self_recursion_e.ttcn","www_example_org_self_recursion.ttcn", c_numOfDiff_headerAndModuleName); | |
1473 | } | |
1474 | }//tc_ | |
1475 | ||
1476 | testcase tc_type_name_conversion_follow() runs on xmlTest_CT { | |
1477 | f_shellCommandWithVerdict("xsd2ttcn type_conversion_follow.xsd","",c_shell_successWithoutWarningAndError) | |
1478 | ||
1479 | if(getverdict==pass) { | |
1480 | f_compareFiles( | |
1481 | "www_example_org_type_conversion_follow_e.ttcn","www_example_org_type_conversion_follow.ttcn", c_numOfDiff_headerAndModuleName); | |
1482 | } | |
1483 | }//tc_ | |
1484 | ||
1485 | testcase tc_complex_extension_with_attrib() runs on xmlTest_CT { | |
1486 | f_shellCommandWithVerdict("xsd2ttcn attribute_in_extension.xsd","",c_shell_successWithoutWarningAndError) | |
1487 | ||
1488 | if(getverdict==pass) { | |
1489 | f_compareFiles( | |
1490 | "attribute_in_extension_e.ttcn","attribute_in_extension.ttcn", c_numOfDiff_headerAndModuleName); | |
1491 | } | |
1492 | }//tc_ | |
1493 | ||
1494 | testcase tc_extension_restriction_with_attrib() runs on xmlTest_CT { | |
1495 | f_shellCommandWithVerdict("xsd2ttcn attrib_restriction_extension.xsd","",c_shell_successWithoutWarningAndError) | |
1496 | ||
1497 | if(getverdict==pass) { | |
1498 | f_compareFiles( | |
1499 | "www_example_org_attr_ext_rest_e.ttcn","www_example_org_attr_ext_rest.ttcn", c_numOfDiff_headerAndModuleName); | |
1500 | } | |
1501 | }//tc_ | |
1502 | ||
1503 | testcase tc_attrib_enum() runs on xmlTest_CT { | |
1504 | f_shellCommandWithVerdict("xsd2ttcn attrib_enum.xsd","",c_shell_successWithoutWarningAndError) | |
1505 | ||
1506 | if(getverdict==pass) { | |
1507 | f_compareFiles( | |
1508 | "www_example_org_attrib_enum_e.ttcn","www_example_org_attrib_enum.ttcn", c_numOfDiff_headerModNameAndNamespace); | |
1509 | } | |
1510 | }//tc_ | |
1511 | ||
970ed795 EL |
1512 | testcase tc_complex_extension_encDec() runs on xmlTest_CT |
1513 | { | |
1514 | var MySubjects3Extension vl_pdu:={ | |
1515 | semester:="Autumn", | |
1516 | year:="2009", | |
1517 | english:="B1", | |
1518 | math:=omit, | |
1519 | physics:="Optics", | |
1520 | chemistry:=omit, | |
1521 | arts:="Impressionism" | |
1522 | } | |
1523 | var charstring vl_expectedEncodedPdu:= | |
1524 | "<MySubjects3Extension Semester='Autumn' Year='2009'>\n\t<English>B1</English>\n\t<Physics>Optics</Physics>\n\t<Arts>Impressionism</Arts>\n</MySubjects3Extension>\n\n"; | |
1525 | f_encDecTest_ComplexTypeWithExtension_MySubject3(vl_pdu,vl_expectedEncodedPdu, vl_pdu); | |
1526 | } | |
1527 | ||
1528 | testcase tc_complex_restriction_converter() runs on xmlTest_CT { | |
1529 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_restriction.xsd","",c_shell_successWithoutWarningAndError) | |
1530 | ||
1531 | if(getverdict==pass) { | |
1532 | f_compareFiles( | |
1533 | "www_XmlTest_org_complex_restriction_e.ttcn","www_XmlTest_org_complex_restriction.ttcn", c_numOfDiff_headerAndModuleName); | |
1534 | } | |
1535 | }//tc_ | |
1536 | ||
3abe9331 | 1537 | testcase tc_complex_restriction_with_use() runs on xmlTest_CT { |
1538 | f_shellCommandWithVerdict("xsd2ttcn complex_restriction_with_use.xsd","",c_shell_successWithoutWarningAndError) | |
1539 | ||
1540 | if(getverdict==pass) { | |
1541 | f_compareFiles( | |
1542 | "http_www_example_org_complex_restriction_with_use_e.ttcn", | |
1543 | "http_www_example_org_complex_restriction_with_use.ttcn", c_numOfDiff_headerAndModuleName); | |
1544 | } | |
1545 | }//tc_ | |
1546 | ||
1547 | testcase tc_complex_nillable() runs on xmlTest_CT { | |
1548 | f_shellCommandWithVerdict("xsd2ttcn complex_nillable.xsd","",c_shell_successWithoutWarningAndError) | |
1549 | ||
1550 | if(getverdict==pass) { | |
1551 | f_compareFiles( | |
1552 | "www_example_org_complex_nillable_e.ttcn", | |
1553 | "www_example_org_complex_nillable.ttcn", c_numOfDiff_headerAndModuleName); | |
1554 | } | |
1555 | }//tc_ | |
1556 | ||
1557 | //Fixed or defaultforempty attribute is not allowed on nillable elements according to TITAN | |
1558 | testcase tc_nillable_fixed() runs on xmlTest_CT { | |
1559 | f_shellCommandWithVerdict("xsd2ttcn nillable_fixed.xsd","",c_shell_successWithoutWarningAndError) | |
1560 | ||
1561 | if(getverdict==pass) { | |
1562 | f_compareFiles( | |
1563 | "www_example_org_nillable_fixed_e.ttcn", | |
1564 | "www_example_org_nillable_fixed.ttcn", c_numOfDiff_headerAndModuleName); | |
1565 | } | |
1566 | }//tc_ | |
1567 | ||
1568 | testcase tc_no_ns_connector() runs on xmlTest_CT { | |
51fa56b9 | 1569 | f_shellCommandWithVerdict("xsd2ttcn no_ns_connector.xsd","",c_shell_successWithoutWarningAndError) |
3abe9331 | 1570 | |
1571 | if(getverdict==pass) { | |
1572 | f_compareFiles( | |
1573 | "www_example_org_no_ns_connector_e.ttcn", | |
1574 | "www_example_org_no_ns_connector.ttcn", c_numOfDiff_headerModNameAndNamespace); | |
1575 | } | |
1576 | }//tc_ | |
1577 | ||
970ed795 EL |
1578 | testcase tc_complex_restriction_encDec() runs on xmlTest_CT |
1579 | { | |
1580 | var MySubjects4Restriction vl_pdu:={ | |
1581 | year:="2009", | |
1582 | english:="B1", | |
1583 | math:="Combinatorics 1" | |
1584 | } | |
1585 | var charstring vl_expectedEncodedPdu:= "<MySubjects4Restriction Year='2009'>\n\t<English>B1</English>\n\t<Math>Combinatorics 1</Math>\n</MySubjects4Restriction>\n\n"; | |
1586 | f_encDecTest_ComplexTypeWithExtension_MySubject4(vl_pdu,vl_expectedEncodedPdu, vl_pdu); | |
1587 | } | |
1588 | //TR: HL32948, Solved | |
1589 | testcase tc_complex_restriction_neg1_converter() runs on xmlTest_CT { | |
1590 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_restriction_neg1.xsd","",c_shell_error); | |
1591 | }//tc_ | |
1592 | ||
1593 | //TR: HL32948, Solved | |
1594 | testcase tc_complex_restriction_neg2_converter() runs on xmlTest_CT { | |
1595 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_restriction_neg2.xsd","",c_shell_error); | |
1596 | }//tc_ | |
1597 | ||
1598 | //not supported: | |
1599 | testcase tc_complex_unique_converter() runs on xmlTest_CT { | |
1600 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_unique.xsd","",c_shell_successWithWarning); | |
3f84031e | 1601 | if(getverdict==pass) { |
1602 | f_compareFiles( | |
1603 | "www_XmlTest_org_complex_unique_e.ttcn", | |
1604 | "www_XmlTest_org_complex_unique.ttcn", c_numOfDiff_headerModNameAndNamespace); | |
1605 | } | |
970ed795 EL |
1606 | }//tc_ |
1607 | ||
1608 | //Positive test: The including and the included schema are in the same namespace | |
1609 | testcase tc_complex_include_converter() runs on xmlTest_CT { | |
1610 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_include.xsd XmlTest_complex_include1.xsd","",c_shell_successWithoutWarningAndError); | |
1611 | ||
1612 | if(getverdict==pass) { | |
1613 | f_compareFiles( | |
1614 | "www_XmlTest_org_complex_include1_e.ttcn","www_XmlTest_org_complex_include.ttcn", c_numOfDiff_headerAndModuleName); | |
1615 | } | |
1616 | }//tc_ | |
1617 | ||
feade998 | 1618 | //========================================================================= |
1619 | // tc_complex_include_without_namespace | |
1620 | //========================================================================= | |
1621 | //Positive test: The including schema includes a schema without a namespace | |
1622 | testcase tc_complex_include_without_namespace() runs on xmlTest_CT { | |
1623 | f_shellCommandWithVerdict("xsd2ttcn including_module.xsd included_without_namespace.xsd","",c_shell_successWithoutWarningAndError); | |
1624 | ||
1625 | if(getverdict==pass) { | |
1626 | f_compareFiles( | |
1627 | "www_example_org_including_module_e.ttcn","www_example_org_including_module.ttcn", c_numOfDiff_headerAndModuleName); | |
1628 | } | |
1629 | }//tc_ | |
1630 | ||
970ed795 EL |
1631 | //========================================================================= |
1632 | // tc_complex_include_neg1_converter | |
1633 | //========================================================================= | |
1634 | //Negative test: The including and the included schema are not in the same namespace | |
1635 | testcase tc_complex_include_neg1_converter() runs on xmlTest_CT { | |
1636 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_include.xsd XmlTest_complex_include2.xsd","",c_shell_error); | |
1637 | }//tc_ | |
1638 | ||
1639 | //========================================================================= | |
1640 | // tc_complex_import_pos1_converter | |
1641 | //========================================================================= | |
1642 | //Positive test: The including and the included schema are in different namespaces (import and include) | |
1643 | testcase tc_complex_import_pos1_converter() runs on xmlTest_CT { | |
1644 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_import_pos.xsd XmlTest_complex_include1.xsd","",c_shell_successWithoutWarningAndError); | |
1645 | ||
1646 | if(getverdict==pass) { | |
1647 | f_compareFiles( | |
1648 | "www_XmlTest_org_complex_import_e.ttcn","www_XmlTest_org_complex_import.ttcn", c_numOfDiff_headerModNameAndImport); | |
1649 | ||
1650 | f_compareFiles( | |
1651 | "www_XmlTest_org_complex_include2_e.ttcn","www_XmlTest_org_complex_include.ttcn", c_numOfDiff_headerModNameAndImport); | |
1652 | } | |
1653 | }//tc_ | |
1654 | ||
1655 | //========================================================================= | |
1656 | // tc_complex_import_pos2_converter | |
1657 | //========================================================================= | |
1658 | //Pos test: Checks if the converter can choose the file having the correct namespace | |
1659 | //The types are the same in the 2nd and the 3rd file but only the 3rd have the namespace having prefix in the first file | |
1660 | testcase tc_complex_import_pos2_converter() runs on xmlTest_CT { | |
1661 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_import_pos.xsd XmlTest_complex_include2.xsd XmlTest_complex_include1.xsd","",c_shell_successWithoutWarningAndError); | |
1662 | ||
1663 | if(getverdict==pass) { | |
1664 | f_compareFiles( | |
1665 | "www_XmlTest_org_complex_import_e.ttcn","www_XmlTest_org_complex_import.ttcn", c_numOfDiff_headerModNameAndNamespace); | |
1666 | ||
1667 | f_compareFiles( | |
1668 | "www_XmlTest_org_complex_include2_e.ttcn","www_XmlTest_org_complex_include.ttcn", c_numOfDiff_headerModNameAndNamespace); | |
1669 | } | |
1670 | }//tc_ | |
1671 | ||
1672 | //========================================================================= | |
1673 | // tc_complex_import_neg1_converter | |
1674 | //========================================================================= | |
1675 | //Negative test: The importing and the imported schema are in different namespaces, but the first file contains unknown type | |
1676 | //If the type checking is switched off the testcase fails. | |
1677 | testcase tc_complex_import_neg1_converter() runs on xmlTest_CT { | |
1678 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_import_neg1.xsd XmlTest_complex_include1.xsd","",c_shell_error); | |
1679 | }//tc_ | |
1680 | ||
1681 | //========================================================================= | |
1682 | // tc_complex_import_withSL_converter | |
1683 | //========================================================================= | |
1684 | //Positive test: The importing schema contains the namespace and the schema location of the imported schema. | |
1685 | testcase tc_complex_import_withSL_converter() runs on xmlTest_CT { | |
1686 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_import_withSchemaLocation.xsd XmlTest_complex_include1.xsd","",c_shell_successWithoutWarningAndError); | |
1687 | ||
1688 | if(getverdict==pass) { | |
1689 | f_compareFiles( | |
1690 | "www_XmlTest_org_complex_import_e.ttcn","www_XmlTest_org_complex_import.ttcn", c_numOfDiff_headerModNameAndNamespace+4); | |
1691 | } | |
1692 | }//tc_ | |
1693 | ||
1694 | //========================================================================= | |
1695 | // tc_complex_import_withSL_encDec | |
1696 | //========================================================================= | |
1697 | // TODO: fix HR88527 | |
1698 | testcase tc_complex_import_withSL_encDec() runs on xmlTest_CT { | |
1699 | var PurchaseReportImport pl_pdu:= { | |
1700 | period :="P3M", | |
1701 | periodEnding :="1999-12-31", | |
1702 | regions:= { | |
1703 | zip_list :={ | |
1704 | { | |
1705 | code:=95819, | |
1706 | part_list:= { | |
1707 | { | |
1708 | number:="872-AA", | |
1709 | quantity:=1 | |
1710 | }, | |
1711 | { | |
1712 | number:="926-AA", | |
1713 | quantity:=2 | |
1714 | } | |
1715 | } | |
1716 | } | |
1717 | } | |
1718 | }, | |
1719 | parts :={ | |
1720 | part_list:= { | |
1721 | { | |
1722 | number:="872-AA", | |
1723 | base:="Lawnmower" | |
1724 | }, | |
1725 | { | |
1726 | number:="926-AA", | |
1727 | base:="Baby Monitor" | |
1728 | } | |
1729 | } | |
1730 | } | |
1731 | } | |
1732 | var charstring pl_expectedEncodedPdu:="<imp:purchaseReportImport xmlns:imp='www.XmlTest.org/complex_import' xmlns:r='www.XmlTest.org/complex_include' period='P3M' periodEnding='1999-12-31'>\n\t<imp:regions>\n\t\t<r:zip code='95819'>\n\t\t\t<r:part number='872-AA' quantity='1'/>\n\t\t\t<r:part number='926-AA' quantity='2'/>\n\t\t</r:zip>\n\t</imp:regions>\n\t<imp:parts>\n\t\t<r:part number='872-AA'>Lawnmower</r:part>\n\t\t<r:part number='926-AA'>Baby Monitor</r:part>\n\t</imp:parts>\n</imp:purchaseReportImport>\n\n"; | |
1733 | //see http://www.w3.org/TR/xmlschema-0/#quartelyReport ! | |
1734 | f_encDecTest_PurchaseReportImport(pl_pdu,pl_expectedEncodedPdu,pl_pdu); | |
1735 | }//tc_ | |
1736 | ||
1737 | //========================================================================= | |
1738 | // tc_complex_import_nameCollision_converter | |
1739 | //========================================================================= | |
1740 | //imports the same type from different namespaces | |
1741 | testcase tc_complex_import_nameCollision_converter() runs on xmlTest_CT { | |
1742 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_import_AB.xsd XmlTest_complex_import_A.xsd XmlTest_complex_import_B.xsd","",c_shell_successWithoutWarningAndError); | |
1743 | ||
1744 | if(getverdict==pass) { | |
1745 | f_compareFiles( | |
1746 | "www_XmlTest_org_complex_import_A_e.ttcn","www_XmlTest_org_complex_import_A.ttcn", c_numOfDiff_headerAndModuleName); | |
1747 | f_compareFiles( | |
1748 | "www_XmlTest_org_complex_import_B_e.ttcn","www_XmlTest_org_complex_import_B.ttcn", c_numOfDiff_headerAndModuleName); | |
1749 | f_compareFiles( | |
1750 | "www_XmlTest_org_complex_import_AB_e.ttcn","www_XmlTest_org_complex_import_AB.ttcn", 10+c_numOfDiff_headerModNameAndImport); | |
1751 | } | |
1752 | }//tc_ | |
1753 | ||
1754 | //========================================================================= | |
1755 | // tc_complex_import_nameCollision2_converter | |
1756 | //========================================================================= | |
1757 | //imports the same type from different namespaces | |
1758 | testcase tc_complex_import_nameCollision2_converter() runs on xmlTest_CT { | |
1759 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_import_AB.xsd XmlTest_complex_import_B.xsd XmlTest_complex_import_A.xsd","",c_shell_successWithoutWarningAndError); | |
1760 | }//tc_ | |
1761 | ||
1762 | //========================================================================= | |
1763 | // tc_complex_any_pos_converter | |
1764 | //========================================================================= | |
1765 | testcase tc_complex_any_pos_converter() runs on xmlTest_CT { | |
3abe9331 | 1766 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_any.xsd","",c_shell_successWithWarning); |
970ed795 EL |
1767 | |
1768 | if(getverdict==pass) { | |
1769 | f_compareFiles( | |
1770 | "www_XmlTest_org_complex_any_e.ttcn","www_XmlTest_org_complex_any.ttcn", c_numOfDiff_headerAndModuleName); | |
1771 | } | |
1772 | }//tc_ | |
1773 | ||
3abe9331 | 1774 | testcase tc_imported_type_prefix() runs on xmlTest_CT { |
1775 | f_shellCommandWithVerdict("xsd2ttcn import_prefix_name.xsd imported_prefix_name.xsd","",c_shell_successWithoutWarningAndError); | |
1776 | ||
1777 | if(getverdict==pass) { | |
1778 | f_compareFiles( | |
1779 | "www_example_org_import_prefix_e.ttcn","www_example_org_import_prefix.ttcn", c_numOfDiff_headerAndModuleName); | |
1780 | } | |
1781 | }//tc_ | |
1782 | ||
970ed795 EL |
1783 | |
1784 | //========================================================================= | |
1785 | // tc_complex_any_pos1_encDec | |
1786 | // Failed, TR: HL37887 | |
1787 | //========================================================================= | |
1788 | testcase tc_complex_any_pos1_encDec() runs on xmlTest_CT { | |
1789 | ||
1790 | var ElementContainingXhtml_1 vl_pdu := { | |
1791 | firstField:="1st field", | |
1792 | elem_list:= { | |
1793 | "<table xmlns=\"http://www.w3.org/1999/xhtml\" border=\"0\" width=\"100%\">\n <tr><td>95819</td><td> </td><td> </td></tr>\n </table>" | |
1794 | }, | |
1795 | thirdField:="3rd field" | |
1796 | } | |
1797 | var charstring vl_expectedEncodedPdu:="<r1:ElementContainingXhtml_1 xmlns:r1='www.XmlTest.org/complex_any'>\n\t<r1:FirstField>1st field</r1:FirstField>\n\t<table xmlns=\"http://www.w3.org/1999/xhtml\" border=\"0\" width=\"100%\">\n <tr><td>95819</td><td> </td><td> </td></tr>\n </table>\n\t<r1:ThirdField>3rd field</r1:ThirdField>\n</r1:ElementContainingXhtml_1>\n\n"; | |
1798 | f_encDecTest_ElementContainingXhtml_1(vl_pdu,vl_expectedEncodedPdu, vl_pdu); | |
1799 | }//tc_ | |
1800 | ||
1801 | //========================================================================= | |
1802 | // tc_complex_any_pos2_encDec | |
1803 | //========================================================================= | |
1804 | testcase tc_complex_any_pos2_encDec() runs on xmlTest_CT { | |
1805 | ||
1806 | var ElementContainingXhtml_2 vl_pdu := { | |
1807 | elem_list:= { | |
1808 | "<table xmlns=\"http://www.w3.org/1999/xhtml\" border=\"0\" width=\"100%\">\n <tr><td>95819</td><td> </td><td> </td></tr>\n </table>" | |
1809 | } | |
1810 | } | |
1811 | var charstring vl_expectedEncodedPdu:= | |
1812 | "<r1:ElementContainingXhtml_2 xmlns:r1='www.XmlTest.org/complex_any'>\n\t<table xmlns=\"http://www.w3.org/1999/xhtml\" border=\"0\" width=\"100%\">\n <tr><td>95819</td><td> </td><td> </td></tr>\n </table>\n</r1:ElementContainingXhtml_2>\n\n"; | |
1813 | f_encDecTest_ElementContainingXhtml_2(vl_pdu,vl_expectedEncodedPdu, vl_pdu); | |
1814 | }//tc_ | |
1815 | ||
1816 | //========================================================================= | |
1817 | // tc_complex_any_pos3_encDec | |
1818 | // Failed, TR: HL37887 | |
1819 | //========================================================================= | |
1820 | testcase tc_complex_any_pos3_encDec() runs on xmlTest_CT { | |
1821 | ||
1822 | var ElementContainingXhtml_1 vl_pdu := | |
1823 | { | |
1824 | firstField := "1st field", | |
1825 | elem_list := { | |
1826 | "<table xmlns=\"http://www.w3.org/1999/xhtml\" border=\"0\" width=\"100%\">\n <tr><td>95819</td><td> </td><td> </td></tr>\n </table>", | |
1827 | "<second xmlns=\"http://www.w3.org/1999/xhtml\" element=\"rabbit\"/>" }, | |
1828 | thirdField := "3rd field" | |
1829 | } | |
1830 | ||
1831 | var charstring vl_expectedEncodedPdu:="<r1:ElementContainingXhtml_1 xmlns:r1='www.XmlTest.org/complex_any'>\n\t<r1:FirstField>1st field</r1:FirstField>\n\t<table xmlns=\"http://www.w3.org/1999/xhtml\" border=\"0\" width=\"100%\">\n <tr><td>95819</td><td> </td><td> </td></tr>\n </table>\n\t<second xmlns=\"http://www.w3.org/1999/xhtml\" element=\"rabbit\"/>\n\t<r1:ThirdField>3rd field</r1:ThirdField>\n</r1:ElementContainingXhtml_1>\n\n"; | |
1832 | f_encDecTest_ElementContainingXhtml_1(vl_pdu,vl_expectedEncodedPdu, vl_pdu); | |
1833 | }//tc_ | |
1834 | ||
1835 | }//complexTypes | |
1836 | ||
1837 | //========================================================================= | |
1838 | // group Elements | |
1839 | //========================================================================= | |
1840 | group Elements{ | |
1841 | ||
1842 | //Passed | |
1843 | testcase tc_element_anyType_converter() runs on xmlTest_CT { | |
1844 | ||
1845 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_anyType.xsd","",c_shell_successWithoutWarningAndError) | |
1846 | ||
1847 | if(getverdict==pass) { | |
1848 | f_compareFiles( | |
1849 | "www_XmlTest_org_element_anyType_e.ttcn","www_XmlTest_org_element_anyType.ttcn", c_numOfDiff_headerAndModuleName); | |
1850 | } | |
1851 | }//tc_ | |
1852 | ||
3abe9331 | 1853 | testcase tc_element_attrib_qualified() runs on xmlTest_CT { |
1854 | ||
1855 | f_shellCommandWithVerdict("xsd2ttcn qualified_element_attrib.xsd","",c_shell_successWithoutWarningAndError) | |
1856 | ||
1857 | if(getverdict==pass) { | |
1858 | f_compareFiles( | |
1859 | "www_example_org_qualified_element_attrib_e.ttcn","www_example_org_qualified_element_attrib.ttcn", c_numOfDiff_headerAndModuleName); | |
1860 | } | |
1861 | }//tc_ | |
1862 | ||
1863 | testcase tc_element_attrib_unqualified() runs on xmlTest_CT { | |
1864 | ||
1865 | f_shellCommandWithVerdict("xsd2ttcn unqualified_element_attrib.xsd","",c_shell_successWithoutWarningAndError) | |
1866 | ||
1867 | if(getverdict==pass) { | |
1868 | f_compareFiles( | |
1869 | "www_example_org_unqualified_element_attrib_e.ttcn","www_example_org_unqualified_element_attrib.ttcn", c_numOfDiff_headerAndModuleName); | |
1870 | } | |
1871 | }//tc_ | |
1872 | ||
970ed795 EL |
1873 | //Passed TR: Hl29679 |
1874 | testcase tc_element_anyType_empty_encDec() runs on xmlTest_CT { | |
3f84031e | 1875 | var Anything1 vl_pdu:= { embed_values := omit, attr:=omit,elem_list:={}}; |
1876 | var charstring vl_expectedEncodedPdu:="<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType'/>\n" | |
970ed795 EL |
1877 | f_encDecTest_Anything1(vl_pdu, vl_expectedEncodedPdu,vl_pdu); |
1878 | }//tc_ | |
1879 | ||
1880 | //Passed | |
1881 | testcase tc_element_anyType_attrOnly_encDec() runs on xmlTest_CT { | |
3f84031e | 1882 | var Anything1 vl_pdu:= { embed_values := omit, attr:={"name=\"First\""},elem_list:={}}; |
970ed795 | 1883 | var charstring vl_expectedEncodedPdu:= |
3f84031e | 1884 | "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType' name=\"First\"/>\n"; |
970ed795 EL |
1885 | f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_pdu); |
1886 | }//tc_ | |
1887 | ||
1888 | testcase tc_element_anyType_2attrOnly_encDec() runs on xmlTest_CT { | |
3f84031e | 1889 | var Anything1 vl_pdu:= { embed_values := omit, attr:={"name=\"Hunor\"","nationality=\"HU\""},elem_list:={}}; |
970ed795 | 1890 | var charstring vl_expectedEncodedPdu:= |
3f84031e | 1891 | "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType' name=\"Hunor\" nationality=\"HU\"/>\n"; |
970ed795 EL |
1892 | f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_pdu); |
1893 | }//tc_ | |
1894 | ||
1895 | //Passed, TR: HL29711 | |
1896 | testcase tc_element_anyType_elemOnly_encDec() runs on xmlTest_CT { | |
3f84031e | 1897 | var Anything1 vl_pdu:= { embed_values := omit, attr:=omit, elem_list:={"<MyElement1/>", "<MyElement2></MyElement2>"} }; |
970ed795 | 1898 | var charstring vl_expectedEncodedPdu:= |
3f84031e | 1899 | "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType'><MyElement1/><MyElement2></MyElement2></ns31:anything1>\n"; |
1900 | var Anything1 vl_expectedDecodedPdu:= { embed_values := omit, attr:=omit, elem_list:={"<MyElement1/>", "<MyElement2/>"} }; | |
970ed795 EL |
1901 | f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_expectedDecodedPdu); |
1902 | }//tc_ | |
1903 | ||
1904 | testcase tc_element_anyType_encDec() runs on xmlTest_CT { | |
1905 | var Anything1 vl_pdu:= { | |
3f84031e | 1906 | embed_values := omit, |
970ed795 EL |
1907 | attr:={"name=\"Hunor\"","nationality=\"HU\""}, |
1908 | elem_list:={"<MyElement1/>", "<MyElement2></MyElement2>"} }; | |
1909 | var charstring vl_expectedEncodedPdu:= | |
3f84031e | 1910 | "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType' name=\"Hunor\" nationality=\"HU\"><MyElement1/><MyElement2></MyElement2></ns31:anything1>\n"; |
970ed795 | 1911 | var Anything1 vl_expectedDecodedPdu:= { |
3f84031e | 1912 | embed_values := omit, |
970ed795 EL |
1913 | attr:={"name=\"Hunor\"","nationality=\"HU\""}, |
1914 | elem_list:={"<MyElement1/>", "<MyElement2/>"} | |
1915 | }; | |
1916 | f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_expectedDecodedPdu); | |
1917 | }//tc_ | |
1918 | ||
feade998 | 1919 | testcase tc_element_anyType_embed_encDec() runs on xmlTest_CT { |
1920 | var Anything1 vl_pdu:= { | |
1921 | embed_values := {"The ordered ", " has arrived ", "Wait for further information.", "Ok"}, | |
1922 | attr :={"someattr=\"1\""}, | |
1923 | elem_list := { | |
1924 | "<ns:a xmlns:ns=\"http://www.example.org/other\">product</ns:a>", | |
1925 | "<ns:b xmlns:ns=\"http://www.example.org/other_1\">2</ns:b>", | |
1926 | "<ns:c xmlns:ns=\"http://www.example.org/other_13\">2</ns:c>" | |
1927 | } | |
1928 | } | |
1929 | var charstring vl_expectedEncodedPdu:= | |
1930 | "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType' someattr=\"1\">The ordered <ns:a xmlns:ns=\"http://www.example.org/other\">product</ns:a> has arrived <ns:b xmlns:ns=\"http://www.example.org/other_1\">2</ns:b>Wait for further information.<ns:c xmlns:ns=\"http://www.example.org/other_13\">2</ns:c>Ok</ns31:anything1>\n"; | |
1931 | f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_pdu); | |
1932 | }//tc_ | |
1933 | ||
970ed795 EL |
1934 | //=============================================================== |
1935 | // tc_element_anyType_deeper_encDec | |
1936 | //=============================================================== | |
1937 | testcase tc_element_anyType_deeper_encDec() runs on xmlTest_CT { | |
1938 | var Anything1 vl_pdu:= { | |
3f84031e | 1939 | embed_values := omit, |
970ed795 EL |
1940 | attr:={"name=\"Hunor\"","nationality=\"HU\""}, |
1941 | elem_list:={"<MyElement1>\n\t<Level2>\n\t<Level3_1>Great</Level3_1>\n\t<Level3_2>Britain</Level3_2>\n\t</Level2>\n</MyElement1>", "<MyElement2><Level2>Goddag</Level2>\n</MyElement2>"} }; | |
1942 | ||
1943 | var charstring vl_expectedEncodedPdu:= | |
3f84031e | 1944 | "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType' name=\"Hunor\" nationality=\"HU\"><MyElement1>\n\t<Level2>\n\t<Level3_1>Great</Level3_1>\n\t<Level3_2>Britain</Level3_2>\n\t</Level2>\n</MyElement1><MyElement2><Level2>Goddag</Level2>\n</MyElement2></ns31:anything1>\n"; |
970ed795 EL |
1945 | f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_pdu); |
1946 | }//tc_ | |
1947 | ||
1948 | ||
1949 | type record of charstring charstringList; | |
1950 | ||
1951 | //=============================================================== | |
1952 | // tc_element_anyType_longer_encDec | |
1953 | //=============================================================== | |
1954 | testcase tc_element_anyType_longer_encDec() runs on xmlTest_CT { | |
1955 | var charstringList vl_elementList:= { | |
1956 | "<MyElement1>\n\t<Level2>\n\t<Level3_1>Great</Level3_1>\n\t<Level3_2>Britain</Level3_2>\n\t</Level2>\n</MyElement1>", | |
1957 | "<MyElement2><Level2>Goddag</Level2>\n</MyElement2>", | |
1958 | "<MyElement3><Level2>Goddag</Level2>\n</MyElement3>", | |
1959 | "<MyElement4><Level2>Goddag</Level2>\n</MyElement4>" | |
1960 | }; | |
1961 | var Anything1 vl_pdu:= { | |
3f84031e | 1962 | embed_values := omit, |
970ed795 EL |
1963 | attr:={ |
1964 | "name=\"Hunor\"", | |
1965 | "nationality=\"HU\"" | |
1966 | }, | |
1967 | elem_list:={ } | |
1968 | }; | |
1969 | ||
1970 | var charstring vl_expectedEncodedPdu:= | |
3f84031e | 1971 | "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType' name=\"Hunor\" nationality=\"HU\">"; |
970ed795 EL |
1972 | |
1973 | for(var integer i:=0;i<sizeof(vl_elementList);i:=i+1){ | |
1974 | vl_pdu.elem_list[i]:=vl_elementList[i]; | |
3f84031e | 1975 | vl_expectedEncodedPdu:=vl_expectedEncodedPdu & vl_elementList[i]; |
970ed795 | 1976 | } |
3f84031e | 1977 | vl_expectedEncodedPdu:=vl_expectedEncodedPdu & "</ns31:anything1>\n" |
970ed795 EL |
1978 | |
1979 | f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_pdu); | |
1980 | }//tc_ | |
1981 | ||
1982 | ||
1983 | //=============================================================== | |
1984 | // tc_element_recOfElements_converter | |
1985 | //=============================================================== | |
1986 | //Passed: TR: HL27438, Old name:tc_element_recOfElements_defaultAttr_converter | |
1987 | testcase tc_element_recOfElements_converter() runs on xmlTest_CT { | |
1988 | ||
1989 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_recordOfElements.xsd","",c_shell_successWithoutWarningAndError) | |
1990 | ||
1991 | if(getverdict==pass) { | |
1992 | f_compareFiles( | |
1993 | "www_XmlTest_org_element_recordOfElements_e.ttcn","www_XmlTest_org_element_recordOfElements.ttcn", c_numOfDiff_headerModNameAndNamespace); | |
1994 | } | |
1995 | }//tc_ | |
1996 | ||
1997 | //Passed, old name: tc_element_recOfElements | |
1998 | testcase tc_element_recOfElements_encDec() runs on xmlTest_CT { | |
1999 | f_encDecTest_PersonInfo1(); | |
2000 | f_encDecTest_PersonInfo2(); | |
2001 | f_encDecTest_PersonInfo2_omitOptionals(); | |
2002 | // } | |
2003 | }//tc_ | |
2004 | ||
2005 | //Passed, TR HL27452 | |
2006 | testcase tc_element_recOfElements_defaultAttr_encDec() runs on xmlTest_CT { | |
2007 | f_encDecTest_PersonInfo2_defaultAttribute(); | |
2008 | }//tc_ | |
2009 | ||
2010 | //Passed: TR:27484 | |
2011 | testcase tc_element_recOfElements_defaultElement() runs on xmlTest_CT { | |
2012 | ||
2013 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_recordOfElements.xsd","",c_shell_successWithoutWarningAndError) | |
2014 | ||
2015 | if(getverdict==pass) { | |
2016 | f_compareFiles( | |
2017 | "www_XmlTest_org_element_recordOfElements_e.ttcn","www_XmlTest_org_element_recordOfElements.ttcn", c_numOfDiff_headerModNameAndNamespace); | |
2018 | f_encDecTest_PersonInfo1_defaultElement(); | |
2019 | } | |
2020 | }//tc_ | |
2021 | ||
2022 | //Passed | |
2023 | testcase tc_element_recOfElements_minMaxOccurs() runs on xmlTest_CT { | |
2024 | ||
2025 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_recordOfElements4.xsd","",c_shell_successWithoutWarningAndError) | |
2026 | ||
2027 | if(getverdict==pass) { | |
2028 | f_compareFiles( | |
2029 | "www_XmlTest_org_element_recordOfElements4_e.ttcn","www_XmlTest_org_element_recordOfElements4.ttcn", c_numOfDiff_headerModNameAndNamespace); | |
2030 | f_encDecTest_PersonInfo4(); | |
2031 | } | |
2032 | }//tc_ | |
2033 | ||
2034 | //Passed, TR:HL28010 | |
2035 | testcase tc_element_recOfElements_maxOccursInfinity_converter() runs on xmlTest_CT { | |
2036 | ||
2037 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_recordOfElements3.xsd","",c_shell_successWithoutWarningAndError) | |
2038 | ||
2039 | if(getverdict==pass) { | |
2040 | f_compareFiles( | |
2041 | "www_XmlTest_org_element_recordOfElements3_e.ttcn","www_XmlTest_org_element_recordOfElements3.ttcn", c_numOfDiff_headerModNameAndNamespace); | |
2042 | } | |
2043 | ||
2044 | }//tc_ | |
2045 | ||
2046 | //Passed, TR: HL28024 | |
2047 | testcase tc_element_recOfElements_maxOccursInfinity_encoderDecoder() runs on xmlTest_CT { | |
2048 | ||
2049 | f_encDecTest_PersonInfo3(); | |
2050 | }//tc_ | |
2051 | ||
2052 | testcase tc_element_recOfElements_anonymousType_conv() runs on xmlTest_CT { | |
2053 | ||
2054 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_recordOfElements5.xsd","",c_shell_successWithoutWarningAndError) | |
2055 | ||
2056 | if(getverdict==pass) { | |
2057 | f_compareFiles( | |
2058 | "www_XmlTest_org_element_recordOfElements5_e.ttcn","www_XmlTest_org_element_recordOfElements5.ttcn", c_numOfDiff_headerModNameAndNamespace); | |
2059 | } | |
2060 | ||
2061 | }//tc_ | |
2062 | ||
2063 | testcase tc_element_recOfElements_anonymousType_encDec() runs on xmlTest_CT { | |
2064 | f_encDecTest_PersonInfo5(); | |
2065 | }//tc_ | |
2066 | ||
2067 | ||
3abe9331 | 2068 | testcase tc_substitutiongroup() runs on xmlTest_CT { |
2069 | ||
2070 | f_shellCommandWithVerdict("xsd2ttcn substitutiongroup.xsd","",c_shell_successWithoutWarningAndError) | |
2071 | ||
2072 | if(getverdict==pass) { | |
2073 | f_compareFiles( | |
2074 | "www_example_org_substitutiongroup_e.ttcn","www_example_org_substitutiongroup.ttcn", c_numOfDiff_headerModNameAndNamespace); | |
2075 | } | |
2076 | ||
2077 | }//tc_ | |
2078 | ||
51fa56b9 | 2079 | testcase tc_substitutiongroup_name_as() runs on xmlTest_CT { |
2080 | ||
2081 | f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_name_as.xsd","",c_shell_successWithoutWarningAndError) | |
2082 | ||
2083 | if(getverdict==pass) { | |
2084 | f_compareFiles( | |
2085 | "www_example_org_substitutiongroup_name_as_e.ttcn","www_example_org_substitutiongroup_name_as.ttcn", c_numOfDiff_headerModNameAndNamespace); | |
2086 | } | |
2087 | ||
2088 | }//tc_ | |
2089 | ||
3abe9331 | 2090 | testcase tc_substitutiongroup_abstract_block_rest() runs on xmlTest_CT { |
2091 | ||
51fa56b9 | 2092 | f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_abstract_block_1.xsd","",c_shell_successWithoutWarningAndError) |
3abe9331 | 2093 | |
2094 | if(getverdict==pass) { | |
2095 | f_compareFiles( | |
2096 | "www_example_org_substitutiongroup_abstract_block_1_e.ttcn", | |
2097 | "www_example_org_substitutiongroup_abstract_block_1.ttcn", c_numOfDiff_headerModNameAndNamespace); | |
2098 | } | |
2099 | ||
2100 | }//tc_ | |
2101 | ||
2102 | testcase tc_substitutiongroup_abstract_block_ext() runs on xmlTest_CT { | |
2103 | ||
51fa56b9 | 2104 | f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_abstract_block_2.xsd","",c_shell_successWithoutWarningAndError) |
3abe9331 | 2105 | |
2106 | if(getverdict==pass) { | |
2107 | f_compareFiles( | |
2108 | "www_example_org_substitutiongroup_abstract_block_2_e.ttcn", | |
2109 | "www_example_org_substitutiongroup_abstract_block_2.ttcn", c_numOfDiff_headerModNameAndNamespace); | |
2110 | } | |
2111 | ||
2112 | }//tc_ | |
2113 | ||
2114 | testcase tc_substitutiongroup_complex_without_element() runs on xmlTest_CT { | |
2115 | ||
51fa56b9 | 2116 | f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_complex_without_element.xsd","",c_shell_successWithoutWarningAndError) |
3abe9331 | 2117 | |
2118 | if(getverdict==pass) { | |
2119 | f_compareFiles( | |
2120 | "www_example_org_substitutiongroup_complex_without_element_e.ttcn", | |
2121 | "www_example_org_substitutiongroup_complex_without_element.ttcn", c_numOfDiff_headerModNameAndNamespace); | |
2122 | } | |
2123 | ||
2124 | }//tc_ | |
2125 | ||
2126 | testcase tc_substitutiongroup_long_extension() runs on xmlTest_CT { | |
2127 | ||
51fa56b9 | 2128 | f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_complex_without_element.xsd","",c_shell_successWithoutWarningAndError) |
3abe9331 | 2129 | |
2130 | if(getverdict==pass) { | |
2131 | f_compareFiles( | |
2132 | "www_example_org_substitutiongroup_complex_without_element_e.ttcn", | |
2133 | "www_example_org_substitutiongroup_complex_without_element.ttcn", c_numOfDiff_headerModNameAndNamespace); | |
2134 | } | |
2135 | ||
2136 | }//tc_ | |
2137 | ||
51fa56b9 | 2138 | testcase tc_substitutiongroup_complextype_block() runs on xmlTest_CT { |
2139 | ||
2140 | f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_complextype_block.xsd","",c_shell_successWithoutWarningAndError) | |
2141 | ||
2142 | if(getverdict==pass) { | |
2143 | f_compareFiles( | |
2144 | "www_example_org_substitutiongroup_complextype_block_e.ttcn", | |
2145 | "www_example_org_substitutiongroup_complextype_block.ttcn", c_numOfDiff_headerModNameAndNamespace); | |
2146 | } | |
2147 | ||
2148 | }//tc_ | |
2149 | ||
2150 | //Test if we find the substitutiongroup references in notargetnamespace | |
2151 | testcase tc_substitutiongroup_notargetnamespace() runs on xmlTest_CT { | |
2152 | ||
2153 | //f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_notargetnamespace.xsd","",c_shell_successWithoutWarningAndError) | |
2154 | setverdict(pass); | |
2155 | ||
2156 | }//tc_ | |
2157 | ||
3abe9331 | 2158 | testcase tc_substitutiongroup_neg() runs on xmlTest_CT { |
2159 | ||
2160 | f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_neg.xsd","",c_shell_error) | |
2161 | ||
2162 | }//tc_ | |
2163 | ||
2164 | testcase tc_substitutiongroup_diff_module() runs on xmlTest_CT { | |
2165 | ||
51fa56b9 | 2166 | f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_main.xsd substitutiongroup_ref.xsd","",c_shell_successWithoutWarningAndError) |
3abe9331 | 2167 | |
2168 | if(getverdict==pass) { | |
2169 | f_compareFiles( | |
2170 | "www_example_org_substitutiongroup_ref_e.ttcn", | |
2171 | "www_example_org_substitutiongroup_ref.ttcn", c_numOfDiff_headerModNameAndNamespace); | |
2172 | } | |
2173 | ||
2174 | if(getverdict==pass) { | |
2175 | f_compareFiles( | |
2176 | "www_example_org_substitutiongroup_main_e.ttcn", | |
2177 | "www_example_org_substitutiongroup_main.ttcn", c_numOfDiff_headerModNameAndNamespace); | |
2178 | } | |
2179 | ||
2180 | }//tc_ | |
2181 | ||
51fa56b9 | 2182 | testcase tc_substitutiongroup_rename() runs on xmlTest_CT { |
2183 | ||
2184 | f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_rename.xsd","",c_shell_successWithoutWarningAndError) | |
2185 | ||
2186 | if(getverdict==pass) { | |
2187 | f_compareFiles( | |
2188 | "www_example_org_substitutiongroup_rename_e.ttcn", | |
2189 | "www_example_org_substitutiongroup_rename.ttcn", c_numOfDiff_headerModNameAndNamespace); | |
2190 | } | |
2191 | ||
2192 | }//tc_ | |
2193 | ||
2194 | testcase tc_substitutiongroup_endDec() runs on xmlTest_CT { | |
2195 | ||
2196 | f_encDecTest_ize_subs(); | |
2197 | } | |
2198 | ||
2199 | testcase tc_type_substitution() runs on xmlTest_CT { | |
2200 | ||
2201 | f_shellCommandWithVerdict("xsd2ttcn -h type_substitution.xsd","",c_shell_successWithoutWarningAndError) | |
2202 | ||
2203 | if(getverdict==pass) { | |
2204 | f_compareFiles( | |
2205 | "www_example_org_type_substitution_e.ttcn", | |
2206 | "www_example_org_type_substitution.ttcn", c_numOfDiff_headerModNameAndNamespace); | |
2207 | } | |
2208 | ||
2209 | }//tc_ | |
2210 | ||
2211 | testcase tc_type_substitution_encDec() runs on xmlTest_CT { | |
2212 | ||
2213 | f_encDecTest_type_subs(); | |
2214 | ||
2215 | }//tc_ | |
2216 | ||
2217 | testcase tc_type_substitution_chain() runs on xmlTest_CT { | |
2218 | ||
2219 | f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_chain.xsd","",c_shell_successWithoutWarningAndError) | |
2220 | ||
2221 | if(getverdict==pass) { | |
2222 | f_compareFiles( | |
2223 | "www_example_org_type_substitution_chain_e.ttcn", | |
2224 | "www_example_org_type_substitution_chain.ttcn", c_numOfDiff_headerModNameAndNamespace); | |
2225 | } | |
2226 | ||
2227 | }//tc_ | |
2228 | ||
2229 | testcase tc_type_substitution_abstract_block() runs on xmlTest_CT { | |
2230 | ||
2231 | f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_abstract_block.xsd","",c_shell_successWithoutWarningAndError) | |
2232 | ||
2233 | if(getverdict==pass) { | |
2234 | f_compareFiles( | |
2235 | "www_example_org_type_substitution_abstract_block_e.ttcn", | |
2236 | "www_example_org_type_substitution_abstract_block.ttcn", c_numOfDiff_headerModNameAndNamespace); | |
2237 | } | |
2238 | ||
2239 | }//tc_ | |
2240 | ||
2241 | testcase tc_type_substitution_diff_module() runs on xmlTest_CT { | |
2242 | ||
2243 | f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_mod1.xsd type_substitution_mod2.xsd","",c_shell_successWithoutWarningAndError) | |
2244 | ||
2245 | if(getverdict==pass) { | |
2246 | f_compareFiles( | |
2247 | "www_example_org_type_substitution_mod1_e.ttcn", | |
2248 | "www_example_org_type_substitution_mod1.ttcn", c_numOfDiff_headerModNameAndNamespace); | |
2249 | } | |
2250 | ||
2251 | if(getverdict==pass) { | |
2252 | f_compareFiles( | |
2253 | "www_example_org_type_substitution_mod2_e.ttcn", | |
2254 | "www_example_org_type_substitution_mod2.ttcn", c_numOfDiff_headerModNameAndNamespace); | |
2255 | } | |
2256 | ||
2257 | }//tc_ | |
2258 | ||
2259 | testcase tc_type_substitution_simpletype() runs on xmlTest_CT { | |
2260 | ||
2261 | f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_simpletype.xsd","",c_shell_successWithoutWarningAndError) | |
2262 | ||
2263 | if(getverdict==pass) { | |
2264 | f_compareFiles( | |
2265 | "www_example_org_type_substitution_simpletype_e.ttcn", | |
2266 | "www_example_org_type_substitution_simpletype.ttcn", c_numOfDiff_headerModNameAndNamespace); | |
2267 | } | |
2268 | ||
2269 | }//tc_ | |
2270 | ||
2271 | testcase tc_type_substitution_with_elem_substitution() runs on xmlTest_CT { | |
2272 | ||
2273 | f_shellCommandWithVerdict("xsd2ttcn -h type_subs_with_elem_subs.xsd","",c_shell_successWithoutWarningAndError) | |
2274 | ||
2275 | if(getverdict==pass) { | |
2276 | f_compareFiles( | |
2277 | "www_example_org_type_subs_with_elem_subs_e.ttcn", | |
2278 | "www_example_org_type_subs_with_elem_subs.ttcn", c_numOfDiff_headerModNameAndNamespace); | |
2279 | } | |
2280 | ||
2281 | }//tc_ | |
2282 | ||
2283 | testcase tc_type_substitution_element_in_ct() runs on xmlTest_CT { | |
2284 | ||
2285 | f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_elem_in_ct_mod1.xsd type_substitution_elem_in_ct_mod2.xsd","",c_shell_successWithoutWarningAndError) | |
2286 | ||
2287 | if(getverdict==pass) { | |
2288 | f_compareFiles( | |
2289 | "www_example_org_type_substitution_elem_in_ct_mod1_e.ttcn", | |
2290 | "www_example_org_type_substitution_elem_in_ct_mod1.ttcn", c_numOfDiff_headerModNameAndNamespace); | |
2291 | } | |
2292 | ||
2293 | if(getverdict==pass) { | |
2294 | f_compareFiles( | |
2295 | "www_example_org_type_substitution_elem_in_ct_mod2_e.ttcn", | |
2296 | "www_example_org_type_substitution_elem_in_ct_mod2.ttcn", c_numOfDiff_headerModNameAndNamespace); | |
2297 | } | |
2298 | ||
2299 | }//tc_ | |
2300 | ||
2301 | testcase tc_only_element_substitution() runs on xmlTest_CT { | |
2302 | ||
2303 | f_shellCommandWithVerdict("xsd2ttcn -h only_element_substitution.xsd","",c_shell_successWithoutWarningAndError) | |
2304 | ||
2305 | if(getverdict==pass) { | |
2306 | f_compareFiles( | |
2307 | "www_example_org_only_element_substitution_e.ttcn", | |
2308 | "www_example_org_only_element_substitution.ttcn", c_numOfDiff_headerModNameAndNamespace); | |
2309 | } | |
2310 | ||
2311 | }//tc_ | |
2312 | ||
2313 | testcase tc_type_substitution_builtintype() runs on xmlTest_CT { | |
2314 | ||
2315 | f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_builtintype.xsd","",c_shell_successWithoutWarningAndError) | |
2316 | ||
2317 | if(getverdict==pass) { | |
2318 | f_compareFiles( | |
2319 | "www_example_org_type_substitution_builtintype_e.ttcn", | |
2320 | "www_example_org_type_substitution_builtintype.ttcn", c_numOfDiff_headerModNameAndNamespace); | |
2321 | } | |
2322 | ||
2323 | }//tc_ | |
2324 | ||
2325 | testcase tc_type_substitution_rename() runs on xmlTest_CT { | |
2326 | ||
2327 | f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_rename.xsd","",c_shell_successWithoutWarningAndError) | |
2328 | ||
2329 | if(getverdict==pass) { | |
2330 | f_compareFiles( | |
2331 | "www_example_org_type_substitution_rename_e.ttcn", | |
2332 | "www_example_org_type_substitution_rename.ttcn", c_numOfDiff_headerModNameAndNamespace); | |
2333 | } | |
2334 | ||
2335 | }//tc_ | |
2336 | ||
3f84031e | 2337 | testcase tc_type_substitution_complex_cascade() runs on xmlTest_CT { |
2338 | ||
2339 | f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_complex_cascade.xsd","",c_shell_successWithoutWarningAndError) | |
2340 | ||
2341 | if(getverdict==pass) { | |
2342 | f_compareFiles( | |
2343 | "www_example_org_type_substitution_complex_cascade_e.ttcn", | |
2344 | "www_example_org_type_substitution_complex_cascade.ttcn", c_numOfDiff_headerModNameAndNamespace); | |
2345 | } | |
2346 | ||
2347 | }//tc_ | |
2348 | ||
2349 | testcase tc_type_substitution_simple_cascade() runs on xmlTest_CT { | |
2350 | ||
2351 | f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_simple_cascade.xsd","",c_shell_successWithoutWarningAndError) | |
2352 | ||
2353 | if(getverdict==pass) { | |
2354 | f_compareFiles( | |
2355 | "www_example_org_type_substitution_simple_cascade_e.ttcn", | |
2356 | "www_example_org_type_substitution_simple_cascade.ttcn", c_numOfDiff_headerModNameAndNamespace); | |
2357 | } | |
2358 | ||
2359 | }//tc_ | |
2360 | ||
3abe9331 | 2361 | |
2362 | ||
970ed795 EL |
2363 | //======================================================== |
2364 | // tc_element_nameInheritance_conv | |
2365 | // Checks if name of named (aliased) type is not inherited | |
2366 | //======================================================== | |
2367 | testcase tc_element_nameInheritance_conv() runs on xmlTest_CT { | |
2368 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_nameInheritance.xsd","",c_shell_successWithoutWarningAndError); | |
2369 | }//tc_ | |
2370 | ||
2371 | //======================================== | |
2372 | // tc_element_nameInheritance_encDec | |
2373 | // Checks if name of named (aliased) type is not inherited | |
2374 | //======================================== | |
2375 | //TR HL49978 | |
2376 | testcase tc_element_nameInheritance_encDec() runs on xmlTest_CT { | |
2377 | f_encDecTest_nameInheritance(); | |
2378 | }//tc_ | |
2379 | ||
2380 | //======================================== | |
2381 | // tc_element_Tgc_encDec | |
2382 | // Checks if name of named (aliased) type is not inherited | |
2383 | //======================================== | |
2384 | //TR HL49978 | |
2385 | testcase tc_element_Tgc_encDec() runs on xmlTest_CT { | |
2386 | f_encDecTest_Tgc(); | |
2387 | }//tc_ | |
2388 | ||
970ed795 | 2389 | testcase tc_element_abstract_conv() runs on xmlTest_CT { |
51fa56b9 | 2390 | f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_abstract.xsd","",c_shell_successWithoutWarningAndError); |
970ed795 EL |
2391 | }//tc_ |
2392 | ||
2393 | testcase tc_element_nillable_converter() runs on xmlTest_CT { | |
2394 | f_shellCommandWithVerdict("xsd2ttcn -z XmlTest_imsike.xsd","",c_shell_successWithoutWarningAndError ); | |
2395 | ||
2396 | if(getverdict==pass) { | |
2397 | f_compareFiles( | |
2398 | "XmlTest_imsike_e.ttcn","XmlTest_imsike.ttcn", c_numOfDiff_headerAndModuleName); | |
2399 | } | |
2400 | }//tc_ | |
2401 | ||
3abe9331 | 2402 | testcase tc_element_nillable_with_annotations() runs on xmlTest_CT { |
2403 | f_shellCommandWithVerdict("xsd2ttcn nillable_annotations.xsd","",c_shell_successWithoutWarningAndError ); | |
2404 | ||
2405 | if(getverdict==pass) { | |
2406 | f_compareFiles( | |
2407 | "nillable_annotations_e.ttcn","nillable_annotations.ttcn", c_numOfDiff_headerAndModuleName); | |
2408 | } | |
2409 | }//tc_ | |
2410 | ||
2411 | testcase tc_element_nillable_in_nillable_extension() runs on xmlTest_CT { | |
2412 | f_shellCommandWithVerdict("xsd2ttcn nillable_in_nillable_extension.xsd","",c_shell_successWithoutWarningAndError ); | |
2413 | ||
2414 | if(getverdict==pass) { | |
2415 | f_compareFiles( | |
2416 | "http_www_example_org_nillable_in_nillable_extension_e.ttcn", | |
2417 | "http_www_example_org_nillable_in_nillable_extension.ttcn", c_numOfDiff_headerAndModuleName); | |
2418 | } | |
2419 | }//tc_ | |
2420 | ||
2421 | testcase tc_element_attributegroup_nillable() runs on xmlTest_CT { | |
2422 | f_shellCommandWithVerdict("xsd2ttcn attributegroup_nillable.xsd","",c_shell_successWithoutWarningAndError ); | |
2423 | ||
2424 | if(getverdict==pass) { | |
2425 | f_compareFiles( | |
2426 | "www_example_org_type_attributegroup_nillable_e.ttcn", | |
2427 | "www_example_org_type_attributegroup_nillable.ttcn", c_numOfDiff_headerAndModuleName); | |
2428 | } | |
2429 | }//tc_ | |
2430 | ||
2431 | testcase tc_element_attributegroup_ingroup() runs on xmlTest_CT { | |
2432 | f_shellCommandWithVerdict("xsd2ttcn attribgroup_ingroup.xsd","",c_shell_successWithoutWarningAndError ); | |
2433 | ||
2434 | if(getverdict==pass) { | |
2435 | f_compareFiles( | |
2436 | "www_example_org_attribgroup_ingroup_e.ttcn", | |
2437 | "www_example_org_attribgroup_ingroup.ttcn", c_numOfDiff_headerModNameAndNamespace); | |
2438 | } | |
2439 | }//tc_ | |
2440 | ||
970ed795 EL |
2441 | //IndividualTrigger, nile="false" |
2442 | testcase tc_element_nillable_IndividualTrigger_nilFalse_encDec() runs on xmlTest_CT { | |
2443 | f_encDecTest_IndividualTrigger1(); | |
2444 | }//tc_ | |
2445 | ||
2446 | //IndividualTrigger, nil="true" | |
2447 | testcase tc_element_nillable_IndividualTrigger_nilTrue_encDec() runs on xmlTest_CT { | |
2448 | f_encDecTest_IndividualTrigger2(); //empty record | |
2449 | }//tc_ | |
2450 | ||
2451 | //Isp, nil="false" | |
2452 | testcase tc_element_nillable_Isp_nilFalse_encDec() runs on xmlTest_CT { | |
2453 | f_encDecTest_Isp1(); | |
2454 | }//tc_ | |
2455 | ||
2456 | //Isp, nil="true" | |
2457 | testcase tc_element_nillable_Isp_nilTrue_encDec() runs on xmlTest_CT { | |
2458 | f_encDecTest_Isp2(); | |
2459 | }//tc_ | |
2460 | ||
2461 | //RemarkNillable, nil="false" | |
2462 | testcase tc_element_nillable_RemarkNillable_nilFalse_encDec() runs on xmlTest_CT { | |
2463 | f_encDecTest_RemarkNillable1(); | |
2464 | }//tc_ | |
2465 | ||
2466 | //RemarkNillable, nil="true" | |
2467 | testcase tc_element_nillable_RemarkNillable_nilTrue_encDec() runs on xmlTest_CT { | |
2468 | f_encDecTest_RemarkNillable2(); | |
2469 | }//tc_ | |
2470 | ||
2471 | }//Element | |
2472 | ||
2473 | //========================================================================= | |
2474 | // Control | |
2475 | //========================================================================= | |
2476 | ||
2477 | control { | |
2478 | execute(tc_versionTest());//Passed | |
2479 | execute(tc_xsd2ttcn_versionTest());//Passed | |
2480 | //====My tcs==== | |
2481 | execute(tc_firstTrial());//Passed | |
2482 | execute(tc_secondTrial());//Passed | |
2483 | execute(tc_empty()); //Passed, TR: | |
2484 | //appended to increase coverage: | |
2485 | ||
2486 | execute(tc_annotation()); | |
2487 | execute(tc_annotation1()); | |
2488 | execute(tc_annotation2()); | |
3abe9331 | 2489 | execute(tc_xml_in_annotation()); |
970ed795 EL |
2490 | //option tests: |
2491 | execute(tc_version()); | |
2492 | execute(tc_options_c()); | |
2493 | execute(tc_options_e()); | |
2494 | execute(tc_options_f()); | |
3abe9331 | 2495 | execute(tc_options_g()); |
970ed795 EL |
2496 | execute(tc_options_p()); |
2497 | execute(tc_options_s()); | |
2498 | execute(tc_options_t()); | |
2499 | execute(tc_options_v()); | |
2500 | execute(tc_options_V()); | |
2501 | execute(tc_options_w()); | |
2502 | execute(tc_options_x()); | |
2503 | execute(tc_options_wrong()); | |
2504 | execute(tc_options_missing()); | |
2505 | //===LABEL and DEFINITION - unknown but used tags | |
2506 | ||
2507 | //===ttcn standard=== | |
2508 | execute(tc_XmlTest_all());//Passed | |
3abe9331 | 2509 | execute(tc_element_in_all_neg()); |
970ed795 EL |
2510 | execute(tc_XmlTest_any_anyAttribute());//Passed |
2511 | execute(tc_XmlTest_HQ73011());//Passed | |
3abe9331 | 2512 | execute(tc_anyattribute_optional()); |
2513 | execute(tc_anyattribute_single()); | |
2514 | execute(tc_anyattribute_in_complex()); | |
970ed795 EL |
2515 | execute(tc_XmlTest_attributeGroup());//Passed |
2516 | execute(tc_XmlTest_attribute_use_noTNS());//Passed | |
3abe9331 | 2517 | execute(tc_id_attribute()); |
2518 | execute(tc_attribute_order()); | |
2519 | execute(tc_name_conv_non_alphanumeric()); | |
2520 | execute(tc_module_name_convert_with_diff_namespace()); | |
2521 | execute(tc_module_typename_conversion()); | |
2522 | execute(tc_name_conv_remove_seq_of_low_line()); | |
2523 | execute(tc_name_conv_with_z()); | |
2524 | execute(tc_comment_placement()); | |
970ed795 EL |
2525 | |
2526 | //===W3C standard=== | |
2527 | ||
2528 | //===String=== | |
2529 | execute(tc_string()); //passed | |
2530 | execute(tc_string_withWhitespace());//Check it once again if encoder or decoder transform "content" !!! | |
2531 | execute(tc_string_withEnum());//Passed, TR: HL26227 | |
2532 | execute(tc_string_withPosLength());//TR: HL21257, | |
2533 | execute(tc_string_withEmptyLength()); //TR: HL20441, Solved | |
2534 | execute(tc_string_withNegativeLength());//Passed | |
2535 | execute(tc_string_withFixedLength()); //Passed | |
3abe9331 | 2536 | execute(tc_fixed_value()); |
970ed795 EL |
2537 | execute(tc_string_withFloatLength()); //passed ??? |
2538 | execute(tc_string_withPosMinLength()); //Passed, TR: HL21690 | |
2539 | execute(tc_string_withEmptyMin());//Passed | |
2540 | execute(tc_string_withNegativeMin());//Passed | |
2541 | execute(tc_string_withPosMax())//Passed | |
2542 | execute(tc_string_withEmptyMax());//Passed | |
2543 | execute(tc_string_withNegativeMax());//Passed | |
2544 | execute(tc_string_withFaultyMinMaxLength());//Passed, TR: TODO | |
2545 | execute(tc_string_withOverDefinition()); //TR: HL25948, Solved | |
2546 | execute(tc_string_withTypeAndBase());//Passed | |
3abe9331 | 2547 | //TODO: put this test back later |
2548 | //execute(tc_string_pattern_square_brackets()); | |
970ed795 EL |
2549 | //===Boolean=== |
2550 | execute(tc_boolean());//Passed | |
3abe9331 | 2551 | execute(tc_boolean_variant_commented()); |
970ed795 EL |
2552 | //===Decimal=== |
2553 | execute(tc_decimal());//Passed | |
2554 | //execute(tc_decimal_withLength()); length not supported | |
2555 | execute(tc_decimal_withMinMaxInclusive());//TR: HL20715 | |
2556 | execute(tc_decimal_withMinMaxExclusive());//Passed TR: HL21166 -solved | |
2557 | execute(tc_decimal_withEnum()); //Passed,TR HL21196 -solved | |
3abe9331 | 2558 | execute(tc_decimal_fractiondigits()); |
970ed795 EL |
2559 | //===Integer=== |
2560 | execute(tc_integer());//Passed | |
2561 | execute(tc_integer_empty1());//Passed | |
2562 | execute(tc_integer_withEnum()); //Passed, TR:HL21694 -solved | |
2563 | execute(tc_integer_withMinIncl());//Passed | |
2564 | execute(tc_integer_withMaxIncl());//Passed | |
2565 | execute(tc_integer_withMinExcl());//Passed | |
2566 | execute(tc_integer_withMaxExcl());//Passed | |
2567 | //===Time=== | |
2568 | execute(tc_time());//passed | |
2569 | execute(tc_time_withEnum());//Passed TR HL22058 | |
2570 | //==list=== | |
2571 | execute(tc_list_conv()); //Passed | |
2572 | execute(tc_list_encDec());//Passed | |
2573 | execute(tc_integerList());//Passed | |
3abe9331 | 2574 | execute(tc_list_simpletype());//Passed |
2575 | //===Float=== | |
2576 | execute(tc_float_not_a_number()); | |
970ed795 EL |
2577 | |
2578 | //===simpleType enum==== | |
2579 | execute(tc_simpleType_enum());//Passed | |
3abe9331 | 2580 | execute(tc_simpleType_restrict_comp()); |
2581 | execute(tc_simpleType_ref()); | |
2582 | execute(tc_simpleType_base()); | |
2583 | execute(tc_enum_field_names()); | |
3f84031e | 2584 | execute(tc_attribute_enumeration_variant()); |
970ed795 EL |
2585 | //===union=== |
2586 | execute(tc_union());//TR:HL23577 | |
2587 | execute(tc_union_optional());//CR_TR18883 | |
3abe9331 | 2588 | execute(tc_enumeration_union_restriction()); |
2589 | execute(tc_enumeration_union_restriction2()); | |
2590 | execute(tc_enumeration_remove_dup()); | |
970ed795 EL |
2591 | //===complex=== |
2592 | execute(tc_complex1()); //Passed | |
2593 | execute(tc_complex2());//TR: HL24977 | |
2594 | execute(tc_complex_simpleContent()); | |
3abe9331 | 2595 | execute(tc_complex_namespaceas()); |
970ed795 | 2596 | execute(tc_complex_mixed_conv()); //Passed |
3abe9331 | 2597 | execute(tc_complex_group_reference()); |
970ed795 | 2598 | execute(tc_complex_mixed_encDec()); //TR:HL29258 - Rejected. Reason: Not supported feature, TODO:Write CR!! |
3abe9331 | 2599 | execute(tc_complex_seq_embeds_seq()); |
970ed795 EL |
2600 | execute(tc_complex_choice_converter());//Passed |
2601 | execute(tc_complex_choice_encDec());//Passed | |
2602 | ||
2603 | execute(tc_complex_all_converter());//Passed | |
2604 | execute(tc_complex_all_emptySet_encDec());//Passed | |
2605 | execute(tc_complex_all_fullSet_encDec());//Passed | |
2606 | execute(tc_complex_all_subSet_encDec());//Passed | |
2607 | execute(tc_complex_all_inconsistentSet_encDec());//Passed | |
2608 | execute(tc_complex_all_noOptional_pos_encDec()); //Passed | |
2609 | execute(tc_complex_all_noOptional_neg1_encDec()); //Error, TR: HL32978 | |
2610 | execute(tc_complex_all_noOptional_neg2_encDec()); //Failed, TR: HL32978 | |
2611 | execute(tc_complex_all_noOptional_neg3_encDec()); //Failed, TR: HL32978 | |
2612 | execute(tc_complex_all_noOptional_empty_encDec()); //Failed, TR: HL32978 | |
2613 | execute(tc_complex_minOccursMaxOccurs()); //Passed, TR (ethgry): HL10386 | |
2614 | execute(tc_complex_extension_converter()); //TR HL32505 | |
2615 | execute(tc_complex_extension_encDec()); //Passed | |
3abe9331 | 2616 | execute(tc_complex_extension_name_attrib_convert()); |
2617 | execute(tc_complex_long_extension()); | |
2618 | execute(tc_type_name_conversion_follow()); | |
2619 | execute(tc_complex_extension_with_attrib()); | |
2620 | execute(tc_extension_restriction_with_attrib()); | |
2621 | execute(tc_attrib_enum()); | |
2622 | execute(tc_complex_self_recursion()); | |
970ed795 | 2623 | execute(tc_complex_restriction_converter()); //Failed, TR HL32896 |
3abe9331 | 2624 | execute(tc_complex_restriction_with_use()); |
2625 | execute(tc_complex_nillable()); | |
2626 | execute(tc_nillable_fixed()); | |
2627 | execute(tc_no_ns_connector()); | |
970ed795 EL |
2628 | |
2629 | ||
2630 | ||
3abe9331 | 2631 | //execute(tc_complex_restriction_encDec()); Dynamic test case error:Attempt to XER-encode an unbound record of |
970ed795 EL |
2632 | |
2633 | ||
2634 | ||
2635 | ||
2636 | execute(tc_complex_restriction_neg1_converter());//TR: HL32948 | |
2637 | execute(tc_complex_restriction_neg2_converter());//TR: HL32948 | |
2638 | execute(tc_complex_unique_converter()); | |
2639 | execute(tc_complex_include_converter()); | |
2640 | execute(tc_complex_include_neg1_converter()); | |
feade998 | 2641 | execute(tc_complex_include_without_namespace()); |
970ed795 EL |
2642 | execute(tc_complex_import_pos1_converter()); |
2643 | execute(tc_complex_import_pos2_converter()); | |
2644 | execute(tc_complex_import_neg1_converter()); | |
2645 | execute(tc_complex_import_withSL_converter());//SchemaLocation | |
3abe9331 | 2646 | execute(tc_complex_import_withSL_encDec()); |
970ed795 EL |
2647 | execute(tc_complex_import_nameCollision_converter()); |
2648 | execute(tc_complex_import_nameCollision2_converter()); | |
2649 | execute(tc_complex_any_pos_converter()); | |
3abe9331 | 2650 | execute(tc_imported_type_prefix()); |
970ed795 EL |
2651 | execute(tc_complex_any_pos1_encDec()); //Failed, TR: HL37887 |
2652 | execute(tc_complex_any_pos2_encDec()); | |
2653 | execute(tc_complex_any_pos3_encDec());//failed, TR: | |
2654 | //===element=== | |
2655 | execute(tc_element_anyType_converter());//Passed | |
3abe9331 | 2656 | execute(tc_element_attrib_qualified()); |
2657 | execute(tc_element_attrib_unqualified()); | |
970ed795 EL |
2658 | execute(tc_element_anyType_empty_encDec());//Passed TR: HL29679 |
2659 | execute(tc_element_anyType_attrOnly_encDec());//Passed | |
2660 | execute(tc_element_anyType_2attrOnly_encDec());//Passed | |
2661 | execute(tc_element_anyType_elemOnly_encDec());//Passed, TR: HL29711 | |
2662 | execute(tc_element_anyType_encDec());//Passed, HL29711 | |
feade998 | 2663 | execute(tc_element_anyType_embed_encDec()); |
970ed795 EL |
2664 | execute(tc_element_anyType_deeper_encDec()); |
2665 | execute(tc_element_anyType_longer_encDec()); | |
2666 | execute(tc_element_recOfElements_converter()); //Passed: TR: HL27438 | |
2667 | execute(tc_element_recOfElements_encDec());//Passed | |
2668 | execute(tc_element_recOfElements_defaultAttr_encDec());//Passed, TR HL27452 | |
2669 | execute(tc_element_recOfElements_defaultElement());//Passed: TR:27484 | |
2670 | execute(tc_element_recOfElements_maxOccursInfinity_converter());//Passed, TR:HL28010 | |
2671 | execute(tc_element_recOfElements_maxOccursInfinity_encoderDecoder());//Passed, TR: HL2802 | |
2672 | execute(tc_element_recOfElements_anonymousType_conv()); | |
2673 | execute(tc_element_recOfElements_anonymousType_encDec()); | |
2674 | ||
3abe9331 | 2675 | |
2676 | //===substitutiongroup=== | |
2677 | execute(tc_substitutiongroup()); | |
51fa56b9 | 2678 | execute(tc_substitutiongroup_name_as()); |
3abe9331 | 2679 | execute(tc_substitutiongroup_abstract_block_rest()); |
2680 | execute(tc_substitutiongroup_abstract_block_ext()); | |
2681 | execute(tc_substitutiongroup_complex_without_element()); | |
2682 | execute(tc_substitutiongroup_long_extension()); | |
51fa56b9 | 2683 | execute(tc_substitutiongroup_complextype_block()); |
2684 | execute(tc_substitutiongroup_notargetnamespace()); | |
3abe9331 | 2685 | execute(tc_substitutiongroup_neg()); |
2686 | execute(tc_substitutiongroup_diff_module()); | |
51fa56b9 | 2687 | execute(tc_substitutiongroup_rename()); |
2688 | execute(tc_substitutiongroup_endDec()); | |
2689 | ||
2690 | //===type substitution=== | |
2691 | execute(tc_type_substitution()); | |
2692 | execute(tc_type_substitution_encDec()); | |
2693 | execute(tc_type_substitution_chain()); | |
2694 | execute(tc_type_substitution_abstract_block()); | |
2695 | execute(tc_type_substitution_diff_module()); | |
2696 | execute(tc_type_substitution_simpletype()); | |
2697 | execute(tc_type_substitution_with_elem_substitution()); | |
2698 | execute(tc_type_substitution_element_in_ct()); | |
2699 | execute(tc_only_element_substitution()); | |
2700 | execute(tc_type_substitution_builtintype()); | |
2701 | execute(tc_type_substitution_rename()); | |
3f84031e | 2702 | execute(tc_type_substitution_complex_cascade()); |
2703 | execute(tc_type_substitution_simple_cascade()); | |
3abe9331 | 2704 | |
2705 | ||
2706 | ||
970ed795 EL |
2707 | execute(tc_element_nameInheritance_conv()); |
2708 | execute(tc_element_nameInheritance_encDec());//TR HL49978 | |
2709 | execute(tc_element_Tgc_encDec());//TR HL49978 | |
2710 | execute(tc_element_abstract_conv()); //Not supported features | |
2711 | execute(tc_element_nillable_converter()); | |
3abe9331 | 2712 | execute(tc_element_nillable_with_annotations()); |
2713 | execute(tc_element_nillable_in_nillable_extension()); | |
2714 | execute(tc_element_attributegroup_nillable()); | |
2715 | execute(tc_element_attributegroup_ingroup()); | |
970ed795 EL |
2716 | execute(tc_element_nillable_IndividualTrigger_nilFalse_encDec()); |
2717 | execute(tc_element_nillable_IndividualTrigger_nilTrue_encDec()); | |
2718 | execute(tc_element_nillable_Isp_nilFalse_encDec()); | |
2719 | execute(tc_element_nillable_Isp_nilTrue_encDec()); | |
2720 | execute(tc_element_nillable_RemarkNillable_nilFalse_encDec()); | |
2721 | execute(tc_element_nillable_RemarkNillable_nilTrue_encDec()); | |
2722 | } | |
2723 | ||
2724 | } with { | |
2725 | extension "version R1A02"; // a prerelease version | |
2726 | extension "requiresTITAN R1C01"; | |
2727 | } // end of module |