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