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