xsd2ttcn: fixed enumeration restriction (bug 494987)
[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_restriction3() runs on xmlTest_CT {
1134
1135 f_shellCommandWithVerdict("xsd2ttcn enumeration_restriction3.xsd","",c_shell_successWithoutWarningAndError)
1136
1137 if(getverdict==pass) {
1138 f_compareFiles(
1139 "www_example_org_enumeration_restriction3_e.ttcn",
1140 "www_example_org_enumeration_restriction3.ttcn", c_numOfDiff_headerAndModuleName);
1141 }
1142 }
1143
1144
1145 testcase tc_enumeration_remove_dup() runs on xmlTest_CT {
1146
1147 f_shellCommandWithVerdict("xsd2ttcn enumeration_remove_dup.xsd","",c_shell_successWithoutWarningAndError)
1148
1149 if(getverdict==pass) {
1150 f_compareFiles(
1151 "www_example_org_enumeration_remove_dup_e.ttcn",
1152 "www_example_org_enumeration_remove_dup.ttcn", c_numOfDiff_headerAndModuleName);
1153 }
1154 }
1155
1156 }//UnionTest
1157
1158
1159
1160 group ComplexType {
1161
1162 testcase tc_complex1() runs on xmlTest_CT {
1163
1164 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex1.xsd","",c_shell_successWithoutWarningAndError)
1165
1166 if(getverdict==pass) {
1167 f_compareFiles(
1168 "www_XmlTest_org_complex1_e.ttcn","www_XmlTest_org_complex1.ttcn", c_numOfDiff_headerModNameAndNamespace);
1169 f_encDecTest_InternationalPrice();
1170 }
1171 }//tc_
1172
1173 //TR: HL24977 -Solved
1174 testcase tc_complex2() runs on xmlTest_CT {
1175
1176 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex2.xsd","",c_shell_successWithoutWarningAndError)
1177
1178 if(getverdict==pass) {
1179 f_compareFiles(
1180 "www_XmlTest_org_complex2_e.ttcn","www_XmlTest_org_complex2.ttcn", c_numOfDiff_headerModNameAndNamespace);
1181 }
1182 f_encDecTest_InternationalPrice2(); //TR: HL24977 -solved -Primer, 2.5.3 Empty Content
1183 f_encDecTest_InternationalPrice3();
1184 f_encDecTest_InternationalPrice4();
1185 }//tc_
1186
1187 testcase tc_complex_simpleContent() runs on xmlTest_CT {
1188
1189 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_simpleContent.xsd","",c_shell_successWithoutWarningAndError)
1190
1191 if(getverdict==pass) {
1192 f_compareFiles(
1193 "www_XmlTest_org_complex_simpleContent_e.ttcn","www_XmlTest_org_complex_simpleContent.ttcn", c_numOfDiff_headerModNameAndNamespace);
1194 f_encDecTest_ComplexTypeWithSimpleContent1();
1195 f_encDecTest_ComplexTypeWithSimpleContent2();
1196 f_encDecTest_ComplexTypeWithSimpleContent2_neg();
1197 }
1198 }//tc_
1199
1200 testcase tc_complex_namespaceas() runs on xmlTest_CT {
1201
1202 f_shellCommandWithVerdict("xsd2ttcn namespaceas.xsd imported2.xsd","",c_shell_successWithoutWarningAndError)
1203
1204 if(getverdict==pass) {
1205 f_compareFiles(
1206 "www_example_org_namespaceas_e.ttcn","www_example_org_namespaceas.ttcn", c_numOfDiff_headerAndModuleName);
1207 f_compareFiles(
1208 "www_example_org_imported2_e.ttcn","www_example_org_imported2.ttcn", c_numOfDiff_headerAndModuleName);
1209 }
1210 }//tc_
1211
1212 testcase tc_complex_mixed_conv() runs on xmlTest_CT {
1213
1214 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_mixed.xsd","",c_shell_successWithoutWarningAndError)
1215
1216 if(getverdict==pass) {
1217 f_compareFiles(
1218 "www_XmlTest_org_complex_mixed_e.ttcn","www_XmlTest_org_complex_mixed.ttcn", c_numOfDiff_headerAndModuleName);
1219 }
1220 }//tc_
1221
1222 testcase tc_complex_group_reference() runs on xmlTest_CT {
1223
1224 f_shellCommandWithVerdict("xsd2ttcn seq_group_reference.xsd","",c_shell_successWithoutWarningAndError)
1225
1226 if(getverdict==pass) {
1227 f_compareFiles(
1228 "www_example_org_seq_group_reference_e.ttcn","www_example_org_seq_group_reference.ttcn", c_numOfDiff_headerAndModuleName);
1229 }
1230 }//tc_
1231
1232 //TR:HL29258
1233 testcase tc_complex_mixed_encDec() runs on xmlTest_CT {
1234 f_encDecTest_ComplexTypeWithMixed();
1235 }//tc_
1236
1237 testcase tc_complex_seq_embeds_seq() runs on xmlTest_CT {
1238
1239 f_shellCommandWithVerdict("xsd2ttcn sequence_embeds_sequence.xsd","",c_shell_successWithoutWarningAndError)
1240
1241 if(getverdict==pass) {
1242 f_compareFiles(
1243 "http_www_example_org_seq_embeds_seq_e.ttcn","http_www_example_org_seq_embeds_seq.ttcn", c_numOfDiff_headerModNameAndNamespace);
1244 f_encDecTest_InternationalPrice();
1245 }
1246 }//tc_
1247
1248 testcase tc_complex_choice_converter() runs on xmlTest_CT {
1249
1250 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_choice.xsd","",c_shell_successWithWarning)
1251
1252 if(getverdict==pass) {
1253 f_compareFiles(
1254 "www_XmlTest_org_complex_choice_e.ttcn","www_XmlTest_org_complex_choice.ttcn", c_numOfDiff_headerAndModuleName);
1255 }
1256 }//tc_
1257
1258 //
1259 testcase tc_complex_choice_encDec() runs on xmlTest_CT {
1260 f_encDecTest_ComplexTypeWithChoice_1();
1261 f_encDecTest_ComplexTypeWithChoice_2();
1262 f_encDecTest_ComplexTypeWithChoice_3();
1263 f_encDecTest_ComplexTypeWithChoice_4();
1264 f_encDecTest_ComplexTypeWithChoice_5();
1265 f_encDecTest_ComplexTypeWithChoice_6();
1266 f_encDecTest_ComplexTypeWithChoice_7();
1267 f_encDecTest_ComplexTypeWithChoice_8();
1268 f_encDecTest_ComplexTypeWithChoice_9();
1269 f_encDecTest_ComplexTypeWithChoice_10();
1270 }//tc_
1271
1272 //Passed, TR: HL30830 -solved
1273 testcase tc_complex_all_converter() runs on xmlTest_CT {
1274 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_all.xsd","",c_shell_successWithoutWarningAndError)
1275
1276 if(getverdict==pass) {
1277 f_compareFiles(
1278 "www_XmlTest_org_complex_all_e.ttcn","www_XmlTest_org_complex_all.ttcn", c_numOfDiff_headerAndModuleName);
1279 }
1280 }//tc_
1281
1282 //HL29679
1283 testcase tc_complex_all_emptySet_encDec() runs on xmlTest_CT {
1284 var MySubjects1 vl_pdu:= {
1285 order:={},
1286 year:="2009",
1287 english:=omit,
1288 math:=omit,
1289 physics:=omit,
1290 chemistry:=omit
1291 }
1292 var charstring vl_expectedEncodedPdu:="<MySubjects1 Year='2009'/>\n\n";
1293 f_encDecTest_ComplexTypeWithAll_MySubject1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
1294 }//tc_
1295
1296 testcase tc_complex_all_fullSet_encDec() runs on xmlTest_CT {
1297 var MySubjects1 vl_pdu:= {
1298 order:={math,english,chemistry, physics},
1299 year:="2009",
1300 english:="Advanced Group 1",
1301 math:="Beginners 1",
1302 physics:="Mechanics 1",
1303 chemistry:="CH2"
1304 }
1305 var charstring vl_expectedEncodedPdu:=
1306 "<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"
1307 f_encDecTest_ComplexTypeWithAll_MySubject1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
1308 }//tc_
1309
1310 testcase tc_complex_all_subSet_encDec() runs on xmlTest_CT {
1311 var MySubjects1 vl_pdu:= {
1312 order:={math,english,chemistry},
1313 year:="2009",
1314 english:="Advanced Group 1",
1315 math:="Beginners 1",
1316 physics:=omit,
1317 chemistry:="CH2"
1318 },
1319 vl_expectedPdu:={
1320 order:={math,english},
1321 year:="2009",
1322 english:="Advanced Group 1",
1323 math:="Beginners 1",
1324 physics:=omit,
1325 chemistry:=omit
1326 };
1327 var charstring vl_expectedEncodedPdu:=
1328 "<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"
1329 f_encDecTest_ComplexTypeWithAll_MySubject1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
1330 }//tc_
1331
1332 testcase tc_complex_all_inconsistentSet_encDec() runs on xmlTest_CT {
1333 f_encDecTest_ComplexTypeWithAll_inconsistentSet();
1334 }//tc_
1335
1336 //positive testcase for group "all". The type has no optional field (element).The input is correct
1337 testcase tc_complex_all_noOptional_pos_encDec() runs on xmlTest_CT {
1338 var MySubjects2 vl_pdu:= {
1339 order:={math,english,chemistry, physics,history},
1340 year:="2009",
1341 english:="Advanced Group 1",
1342 math:="Beginners 1",
1343 physics:="Mechanics 1",
1344 chemistry:="CH2",
1345 history:="H1"
1346 }
1347 var charstring vl_expectedEncodedPdu:=
1348 "<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";
1349 f_encDecTest_ComplexTypeWithAll_MySubject2(vl_pdu,vl_expectedEncodedPdu,vl_pdu,0);
1350 }//tc_
1351
1352 //Negative testcase for group "all". The type has no optional field (element).
1353 //The input is not correct: value of one field (history) is missing
1354 //Passed, TR: HL32978
1355 testcase tc_complex_all_noOptional_neg1_encDec() runs on xmlTest_CT {
1356 var MySubjects2 vl_pdu:= {
1357 order:={math,english,chemistry, physics,history},
1358 year:="2009",
1359 english:="Advanced Group 1",
1360 math:="Beginners 1",
1361 physics:="Mechanics 1",
1362 chemistry:="CH2"
1363 //history:="H1"
1364 }
1365 var MySubjects2 vl_expectedDecodedPdu:= {
1366 order:={math,english,chemistry, physics,history},
1367 year:="2009",
1368 english:="Advanced Group 1",
1369 math:="Beginners 1",
1370 physics:="Mechanics 1",
1371 chemistry:="CH2",
1372 history:=""
1373 }
1374 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"
1375 f_encDecTest_ComplexTypeWithAll_MySubject2(vl_pdu,vl_expectedEncodedPdu,vl_expectedDecodedPdu,0);
1376 }//tc_
1377
1378 //Negative testcase for group "all". The type has no optional field (element).
1379 //The input is not correct: value of one field (history) and its place in order-list is missing.
1380 // ***Less elements of record of order than required***
1381 //expectation: error report at encoding, returning 1 at decoding
1382 //Passed, TR: HL32978
1383 testcase tc_complex_all_noOptional_neg2_encDec() runs on xmlTest_CT {
1384 var MySubjects2 vl_pdu:= {
1385 order:={math,english,chemistry, physics},
1386 year:="2009",
1387 english:="Advanced Group 1",
1388 math:="Beginners 1",
1389 physics:="Mechanics 1",
1390 chemistry:="CH2"
1391 //history:="H1"
1392 }
1393 var MySubjects2 vl_expectedDecodedPdu:= {
1394 order:={math,english,chemistry, physics},
1395 year:="2009",
1396 english:="Advanced Group 1",
1397 math:="Beginners 1",
1398 physics:="Mechanics 1",
1399 chemistry:="CH2",
1400 history:=""
1401 }
1402 var charstring vl_expectedEncodedPdu:="<MySubjects2 Year='2009'/>\n\n"; //expecting error report!!!
1403 //"<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"
1404 f_encDecTest_ComplexTypeWithAll_MySubject2(vl_pdu,vl_expectedEncodedPdu,vl_expectedDecodedPdu,1);
1405 }//tc_
1406
1407 //Negative testcase for group "all". The type has no optional field (element).
1408 //The input is not correct: order three times contains "math", Physics and history are missing.
1409 //expectation: error report at encoding, returning 1 at decoding
1410 //Passed, TR: HL32978
1411 testcase tc_complex_all_noOptional_neg3_encDec() runs on xmlTest_CT {
1412 var MySubjects2 vl_pdu:= {
1413 order:={math,english,chemistry,math,math},
1414 year:="2009",
1415 english:="Advanced Group 1",
1416 math:="Beginners 1",
1417 physics:="Mechanics 1",
1418 chemistry:="CH2"
1419 //history:="H1"
1420 }
1421 var charstring vl_expectedEncodedPdu:="<MySubjects2 Year='2009'/>\n\n"; //expecting error report!!!
1422 //"<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"
1423 f_encDecTest_ComplexTypeWithAll_MySubject2(vl_pdu,vl_expectedEncodedPdu,vl_pdu,1);
1424 }//tc_
1425
1426
1427 //=========================================================================
1428 // tc_complex_all_noOptional_empty_encDec
1429 //=========================================================================
1430 //Negative testcase for group "all". The type has no optional field (element).
1431 //The input is not correct: value of all the fields and their place in order-list is missing
1432 //expectation: error report at encoding
1433 //Passed, TR: HL32978
1434 testcase tc_complex_all_noOptional_empty_encDec() runs on xmlTest_CT {
1435 var MySubjects2 vl_pdu:= {
1436 order:={ },
1437 year:="2009"
1438 //english:="Advanced Group 1",
1439 //math:="Beginners 1",
1440 //physics:="Mechanics 1",
1441 //chemistry:="CH2"
1442 //history:="H1"
1443 }
1444 var charstring vl_expectedEncodedPdu:="<MySubjects2 Year='2009'/>\n\n"; //expecting error report!!!
1445 f_encDecTest_ComplexTypeWithAll_MySubject2(vl_pdu,vl_expectedEncodedPdu,vl_pdu,1);
1446 }//tc_
1447
1448 //=========================================================================
1449 // tc_complex_minOccursMaxOccurs
1450 //=========================================================================
1451 //Old name: tc_XmlTest_minOccursMaxOccurs
1452 ////TR (ethgry): HL10386
1453 testcase tc_complex_minOccursMaxOccurs() runs on xmlTest_CT
1454 {
1455 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_minOccursMaxOccurs.xsd","",c_shell_successWithoutWarningAndError);
1456 if(getverdict==pass) {
1457 f_compareFiles(
1458 "www_XmlTest_org_complex_minOccursMaxOccurs_e.ttcn","www_XmlTest_org_complex_minOccursMaxOccurs.ttcn", c_numOfDiff_headerAndModuleName);
1459 }
1460 }
1461
1462
1463 testcase tc_complex_extension_converter() runs on xmlTest_CT {
1464 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_extension.xsd","",c_shell_successWithoutWarningAndError)
1465
1466 if(getverdict==pass) {
1467 f_compareFiles(
1468 "www_XmlTest_org_complex_extension_e.ttcn","www_XmlTest_org_complex_extension.ttcn", c_numOfDiff_headerAndModuleName);
1469 }
1470 }//tc_
1471
1472 testcase tc_complex_extension_name_attrib_convert() runs on xmlTest_CT {
1473 f_shellCommandWithVerdict("xsd2ttcn name_conversion_extension_attrib.xsd","",c_shell_successWithoutWarningAndError)
1474
1475 if(getverdict==pass) {
1476 f_compareFiles(
1477 "name_conversion_extension_attrib_e.ttcn","name_conversion_extension_attrib.ttcn", c_numOfDiff_headerAndModuleName);
1478 }
1479 }//tc_
1480
1481 testcase tc_complex_long_extension() runs on xmlTest_CT {
1482 f_shellCommandWithVerdict("xsd2ttcn long_extension.xsd","",c_shell_successWithoutWarningAndError)
1483
1484 if(getverdict==pass) {
1485 f_compareFiles(
1486 "www_example_org_long_extension_e.ttcn","www_example_org_long_extension.ttcn", c_numOfDiff_headerAndModuleName);
1487 }
1488 }//tc_
1489
1490 testcase tc_complex_self_recursion() runs on xmlTest_CT {
1491 f_shellCommandWithVerdict("xsd2ttcn complex_self_recursion.xsd","",c_shell_successWithoutWarningAndError)
1492
1493 if(getverdict==pass) {
1494 f_compareFiles(
1495 "www_example_org_self_recursion_e.ttcn","www_example_org_self_recursion.ttcn", c_numOfDiff_headerAndModuleName);
1496 }
1497 }//tc_
1498
1499 testcase tc_type_name_conversion_follow() runs on xmlTest_CT {
1500 f_shellCommandWithVerdict("xsd2ttcn type_conversion_follow.xsd","",c_shell_successWithoutWarningAndError)
1501
1502 if(getverdict==pass) {
1503 f_compareFiles(
1504 "www_example_org_type_conversion_follow_e.ttcn","www_example_org_type_conversion_follow.ttcn", c_numOfDiff_headerAndModuleName);
1505 }
1506 }//tc_
1507
1508 testcase tc_complex_extension_with_attrib() runs on xmlTest_CT {
1509 f_shellCommandWithVerdict("xsd2ttcn attribute_in_extension.xsd","",c_shell_successWithoutWarningAndError)
1510
1511 if(getverdict==pass) {
1512 f_compareFiles(
1513 "attribute_in_extension_e.ttcn","attribute_in_extension.ttcn", c_numOfDiff_headerAndModuleName);
1514 }
1515 }//tc_
1516
1517 testcase tc_extension_restriction_with_attrib() runs on xmlTest_CT {
1518 f_shellCommandWithVerdict("xsd2ttcn attrib_restriction_extension.xsd","",c_shell_successWithoutWarningAndError)
1519
1520 if(getverdict==pass) {
1521 f_compareFiles(
1522 "www_example_org_attr_ext_rest_e.ttcn","www_example_org_attr_ext_rest.ttcn", c_numOfDiff_headerAndModuleName);
1523 }
1524 }//tc_
1525
1526 testcase tc_attrib_enum() runs on xmlTest_CT {
1527 f_shellCommandWithVerdict("xsd2ttcn attrib_enum.xsd","",c_shell_successWithoutWarningAndError)
1528
1529 if(getverdict==pass) {
1530 f_compareFiles(
1531 "www_example_org_attrib_enum_e.ttcn","www_example_org_attrib_enum.ttcn", c_numOfDiff_headerModNameAndNamespace);
1532 }
1533 }//tc_
1534
1535 testcase tc_complex_extension_encDec() runs on xmlTest_CT
1536 {
1537 var MySubjects3Extension vl_pdu:={
1538 semester:="Autumn",
1539 year:="2009",
1540 english:="B1",
1541 math:=omit,
1542 physics:="Optics",
1543 chemistry:=omit,
1544 arts:="Impressionism"
1545 }
1546 var charstring vl_expectedEncodedPdu:=
1547 "<MySubjects3Extension Semester='Autumn' Year='2009'>\n\t<English>B1</English>\n\t<Physics>Optics</Physics>\n\t<Arts>Impressionism</Arts>\n</MySubjects3Extension>\n\n";
1548 f_encDecTest_ComplexTypeWithExtension_MySubject3(vl_pdu,vl_expectedEncodedPdu, vl_pdu);
1549 }
1550
1551 testcase tc_complex_restriction_converter() runs on xmlTest_CT {
1552 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_restriction.xsd","",c_shell_successWithoutWarningAndError)
1553
1554 if(getverdict==pass) {
1555 f_compareFiles(
1556 "www_XmlTest_org_complex_restriction_e.ttcn","www_XmlTest_org_complex_restriction.ttcn", c_numOfDiff_headerAndModuleName);
1557 }
1558 }//tc_
1559
1560 testcase tc_complex_restriction_with_use() runs on xmlTest_CT {
1561 f_shellCommandWithVerdict("xsd2ttcn complex_restriction_with_use.xsd","",c_shell_successWithoutWarningAndError)
1562
1563 if(getverdict==pass) {
1564 f_compareFiles(
1565 "http_www_example_org_complex_restriction_with_use_e.ttcn",
1566 "http_www_example_org_complex_restriction_with_use.ttcn", c_numOfDiff_headerAndModuleName);
1567 }
1568 }//tc_
1569
1570 testcase tc_complex_nillable() runs on xmlTest_CT {
1571 f_shellCommandWithVerdict("xsd2ttcn complex_nillable.xsd","",c_shell_successWithoutWarningAndError)
1572
1573 if(getverdict==pass) {
1574 f_compareFiles(
1575 "www_example_org_complex_nillable_e.ttcn",
1576 "www_example_org_complex_nillable.ttcn", c_numOfDiff_headerAndModuleName);
1577 }
1578 }//tc_
1579
1580 //Fixed or defaultforempty attribute is not allowed on nillable elements according to TITAN
1581 testcase tc_nillable_fixed() runs on xmlTest_CT {
1582 f_shellCommandWithVerdict("xsd2ttcn nillable_fixed.xsd","",c_shell_successWithoutWarningAndError)
1583
1584 if(getverdict==pass) {
1585 f_compareFiles(
1586 "www_example_org_nillable_fixed_e.ttcn",
1587 "www_example_org_nillable_fixed.ttcn", c_numOfDiff_headerAndModuleName);
1588 }
1589 }//tc_
1590
1591 testcase tc_no_ns_connector() runs on xmlTest_CT {
1592 f_shellCommandWithVerdict("xsd2ttcn no_ns_connector.xsd","",c_shell_successWithoutWarningAndError)
1593
1594 if(getverdict==pass) {
1595 f_compareFiles(
1596 "www_example_org_no_ns_connector_e.ttcn",
1597 "www_example_org_no_ns_connector.ttcn", c_numOfDiff_headerModNameAndNamespace);
1598 }
1599 }//tc_
1600
1601 testcase tc_complex_restriction_encDec() runs on xmlTest_CT
1602 {
1603 var MySubjects4Restriction vl_pdu:={
1604 year:="2009",
1605 english:="B1",
1606 math:="Combinatorics 1"
1607 }
1608 var charstring vl_expectedEncodedPdu:= "<MySubjects4Restriction Year='2009'>\n\t<English>B1</English>\n\t<Math>Combinatorics 1</Math>\n</MySubjects4Restriction>\n\n";
1609 f_encDecTest_ComplexTypeWithExtension_MySubject4(vl_pdu,vl_expectedEncodedPdu, vl_pdu);
1610 }
1611 //TR: HL32948, Solved
1612 testcase tc_complex_restriction_neg1_converter() runs on xmlTest_CT {
1613 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_restriction_neg1.xsd","",c_shell_error);
1614 }//tc_
1615
1616 //TR: HL32948, Solved
1617 testcase tc_complex_restriction_neg2_converter() runs on xmlTest_CT {
1618 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_restriction_neg2.xsd","",c_shell_error);
1619 }//tc_
1620
1621 //not supported:
1622 testcase tc_complex_unique_converter() runs on xmlTest_CT {
1623 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_unique.xsd","",c_shell_successWithWarning);
1624 if(getverdict==pass) {
1625 f_compareFiles(
1626 "www_XmlTest_org_complex_unique_e.ttcn",
1627 "www_XmlTest_org_complex_unique.ttcn", c_numOfDiff_headerModNameAndNamespace);
1628 }
1629 }//tc_
1630
1631 //Positive test: The including and the included schema are in the same namespace
1632 testcase tc_complex_include_converter() runs on xmlTest_CT {
1633 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_include.xsd XmlTest_complex_include1.xsd","",c_shell_successWithoutWarningAndError);
1634
1635 if(getverdict==pass) {
1636 f_compareFiles(
1637 "www_XmlTest_org_complex_include1_e.ttcn","www_XmlTest_org_complex_include.ttcn", c_numOfDiff_headerAndModuleName);
1638 }
1639 }//tc_
1640
1641 //=========================================================================
1642 // tc_complex_include_without_namespace
1643 //=========================================================================
1644 //Positive test: The including schema includes a schema without a namespace
1645 testcase tc_complex_include_without_namespace() runs on xmlTest_CT {
1646 f_shellCommandWithVerdict("xsd2ttcn including_module.xsd included_without_namespace.xsd","",c_shell_successWithoutWarningAndError);
1647
1648 if(getverdict==pass) {
1649 f_compareFiles(
1650 "www_example_org_including_module_e.ttcn","www_example_org_including_module.ttcn", c_numOfDiff_headerAndModuleName);
1651 }
1652 }//tc_
1653
1654 //=========================================================================
1655 // tc_complex_include_neg1_converter
1656 //=========================================================================
1657 //Negative test: The including and the included schema are not in the same namespace
1658 testcase tc_complex_include_neg1_converter() runs on xmlTest_CT {
1659 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_include.xsd XmlTest_complex_include2.xsd","",c_shell_error);
1660 }//tc_
1661
1662 //=========================================================================
1663 // tc_complex_import_pos1_converter
1664 //=========================================================================
1665 //Positive test: The including and the included schema are in different namespaces (import and include)
1666 testcase tc_complex_import_pos1_converter() runs on xmlTest_CT {
1667 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_import_pos.xsd XmlTest_complex_include1.xsd","",c_shell_successWithoutWarningAndError);
1668
1669 if(getverdict==pass) {
1670 f_compareFiles(
1671 "www_XmlTest_org_complex_import_e.ttcn","www_XmlTest_org_complex_import.ttcn", c_numOfDiff_headerModNameAndImport);
1672
1673 f_compareFiles(
1674 "www_XmlTest_org_complex_include2_e.ttcn","www_XmlTest_org_complex_include.ttcn", c_numOfDiff_headerModNameAndImport);
1675 }
1676 }//tc_
1677
1678 //=========================================================================
1679 // tc_complex_import_pos2_converter
1680 //=========================================================================
1681 //Pos test: Checks if the converter can choose the file having the correct namespace
1682 //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
1683 testcase tc_complex_import_pos2_converter() runs on xmlTest_CT {
1684 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_import_pos.xsd XmlTest_complex_include2.xsd XmlTest_complex_include1.xsd","",c_shell_successWithoutWarningAndError);
1685
1686 if(getverdict==pass) {
1687 f_compareFiles(
1688 "www_XmlTest_org_complex_import_e.ttcn","www_XmlTest_org_complex_import.ttcn", c_numOfDiff_headerModNameAndNamespace);
1689
1690 f_compareFiles(
1691 "www_XmlTest_org_complex_include2_e.ttcn","www_XmlTest_org_complex_include.ttcn", c_numOfDiff_headerModNameAndNamespace);
1692 }
1693 }//tc_
1694
1695 //=========================================================================
1696 // tc_complex_import_neg1_converter
1697 //=========================================================================
1698 //Negative test: The importing and the imported schema are in different namespaces, but the first file contains unknown type
1699 //If the type checking is switched off the testcase fails.
1700 testcase tc_complex_import_neg1_converter() runs on xmlTest_CT {
1701 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_import_neg1.xsd XmlTest_complex_include1.xsd","",c_shell_error);
1702 }//tc_
1703
1704 //=========================================================================
1705 // tc_complex_import_withSL_converter
1706 //=========================================================================
1707 //Positive test: The importing schema contains the namespace and the schema location of the imported schema.
1708 testcase tc_complex_import_withSL_converter() runs on xmlTest_CT {
1709 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_import_withSchemaLocation.xsd XmlTest_complex_include1.xsd","",c_shell_successWithoutWarningAndError);
1710
1711 if(getverdict==pass) {
1712 f_compareFiles(
1713 "www_XmlTest_org_complex_import_e.ttcn","www_XmlTest_org_complex_import.ttcn", c_numOfDiff_headerModNameAndNamespace+4);
1714 }
1715 }//tc_
1716
1717 //=========================================================================
1718 // tc_complex_import_withSL_encDec
1719 //=========================================================================
1720 // TODO: fix HR88527
1721 testcase tc_complex_import_withSL_encDec() runs on xmlTest_CT {
1722 var PurchaseReportImport pl_pdu:= {
1723 period :="P3M",
1724 periodEnding :="1999-12-31",
1725 regions:= {
1726 zip_list :={
1727 {
1728 code:=95819,
1729 part_list:= {
1730 {
1731 number:="872-AA",
1732 quantity:=1
1733 },
1734 {
1735 number:="926-AA",
1736 quantity:=2
1737 }
1738 }
1739 }
1740 }
1741 },
1742 parts :={
1743 part_list:= {
1744 {
1745 number:="872-AA",
1746 base:="Lawnmower"
1747 },
1748 {
1749 number:="926-AA",
1750 base:="Baby Monitor"
1751 }
1752 }
1753 }
1754 }
1755 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";
1756 //see http://www.w3.org/TR/xmlschema-0/#quartelyReport !
1757 f_encDecTest_PurchaseReportImport(pl_pdu,pl_expectedEncodedPdu,pl_pdu);
1758 }//tc_
1759
1760 //=========================================================================
1761 // tc_complex_import_nameCollision_converter
1762 //=========================================================================
1763 //imports the same type from different namespaces
1764 testcase tc_complex_import_nameCollision_converter() runs on xmlTest_CT {
1765 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_import_AB.xsd XmlTest_complex_import_A.xsd XmlTest_complex_import_B.xsd","",c_shell_successWithoutWarningAndError);
1766
1767 if(getverdict==pass) {
1768 f_compareFiles(
1769 "www_XmlTest_org_complex_import_A_e.ttcn","www_XmlTest_org_complex_import_A.ttcn", c_numOfDiff_headerAndModuleName);
1770 f_compareFiles(
1771 "www_XmlTest_org_complex_import_B_e.ttcn","www_XmlTest_org_complex_import_B.ttcn", c_numOfDiff_headerAndModuleName);
1772 f_compareFiles(
1773 "www_XmlTest_org_complex_import_AB_e.ttcn","www_XmlTest_org_complex_import_AB.ttcn", 10+c_numOfDiff_headerModNameAndImport);
1774 }
1775 }//tc_
1776
1777 //=========================================================================
1778 // tc_complex_import_nameCollision2_converter
1779 //=========================================================================
1780 //imports the same type from different namespaces
1781 testcase tc_complex_import_nameCollision2_converter() runs on xmlTest_CT {
1782 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_import_AB.xsd XmlTest_complex_import_B.xsd XmlTest_complex_import_A.xsd","",c_shell_successWithoutWarningAndError);
1783 }//tc_
1784
1785 //=========================================================================
1786 // tc_complex_any_pos_converter
1787 //=========================================================================
1788 testcase tc_complex_any_pos_converter() runs on xmlTest_CT {
1789 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_any.xsd","",c_shell_successWithWarning);
1790
1791 if(getverdict==pass) {
1792 f_compareFiles(
1793 "www_XmlTest_org_complex_any_e.ttcn","www_XmlTest_org_complex_any.ttcn", c_numOfDiff_headerAndModuleName);
1794 }
1795 }//tc_
1796
1797 testcase tc_imported_type_prefix() runs on xmlTest_CT {
1798 f_shellCommandWithVerdict("xsd2ttcn import_prefix_name.xsd imported_prefix_name.xsd","",c_shell_successWithoutWarningAndError);
1799
1800 if(getverdict==pass) {
1801 f_compareFiles(
1802 "www_example_org_import_prefix_e.ttcn","www_example_org_import_prefix.ttcn", c_numOfDiff_headerAndModuleName);
1803 }
1804 }//tc_
1805
1806
1807 //=========================================================================
1808 // tc_complex_any_pos1_encDec
1809 // Failed, TR: HL37887
1810 //=========================================================================
1811 testcase tc_complex_any_pos1_encDec() runs on xmlTest_CT {
1812
1813 var ElementContainingXhtml_1 vl_pdu := {
1814 firstField:="1st field",
1815 elem_list:= {
1816 "<table xmlns=\"http://www.w3.org/1999/xhtml\" border=\"0\" width=\"100%\">\n <tr><td>95819</td><td> </td><td> </td></tr>\n </table>"
1817 },
1818 thirdField:="3rd field"
1819 }
1820 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";
1821 f_encDecTest_ElementContainingXhtml_1(vl_pdu,vl_expectedEncodedPdu, vl_pdu);
1822 }//tc_
1823
1824 //=========================================================================
1825 // tc_complex_any_pos2_encDec
1826 //=========================================================================
1827 testcase tc_complex_any_pos2_encDec() runs on xmlTest_CT {
1828
1829 var ElementContainingXhtml_2 vl_pdu := {
1830 elem_list:= {
1831 "<table xmlns=\"http://www.w3.org/1999/xhtml\" border=\"0\" width=\"100%\">\n <tr><td>95819</td><td> </td><td> </td></tr>\n </table>"
1832 }
1833 }
1834 var charstring vl_expectedEncodedPdu:=
1835 "<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";
1836 f_encDecTest_ElementContainingXhtml_2(vl_pdu,vl_expectedEncodedPdu, vl_pdu);
1837 }//tc_
1838
1839 //=========================================================================
1840 // tc_complex_any_pos3_encDec
1841 // Failed, TR: HL37887
1842 //=========================================================================
1843 testcase tc_complex_any_pos3_encDec() runs on xmlTest_CT {
1844
1845 var ElementContainingXhtml_1 vl_pdu :=
1846 {
1847 firstField := "1st field",
1848 elem_list := {
1849 "<table xmlns=\"http://www.w3.org/1999/xhtml\" border=\"0\" width=\"100%\">\n <tr><td>95819</td><td> </td><td> </td></tr>\n </table>",
1850 "<second xmlns=\"http://www.w3.org/1999/xhtml\" element=\"rabbit\"/>" },
1851 thirdField := "3rd field"
1852 }
1853
1854 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";
1855 f_encDecTest_ElementContainingXhtml_1(vl_pdu,vl_expectedEncodedPdu, vl_pdu);
1856 }//tc_
1857
1858 }//complexTypes
1859
1860 //=========================================================================
1861 // group Elements
1862 //=========================================================================
1863 group Elements{
1864
1865 //Passed
1866 testcase tc_element_anyType_converter() runs on xmlTest_CT {
1867
1868 f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_anyType.xsd","",c_shell_successWithoutWarningAndError)
1869
1870 if(getverdict==pass) {
1871 f_compareFiles(
1872 "www_XmlTest_org_element_anyType_e.ttcn","www_XmlTest_org_element_anyType.ttcn", c_numOfDiff_headerAndModuleName);
1873 }
1874 }//tc_
1875
1876 testcase tc_element_attrib_qualified() runs on xmlTest_CT {
1877
1878 f_shellCommandWithVerdict("xsd2ttcn qualified_element_attrib.xsd","",c_shell_successWithoutWarningAndError)
1879
1880 if(getverdict==pass) {
1881 f_compareFiles(
1882 "www_example_org_qualified_element_attrib_e.ttcn","www_example_org_qualified_element_attrib.ttcn", c_numOfDiff_headerAndModuleName);
1883 }
1884 }//tc_
1885
1886 testcase tc_element_attrib_unqualified() runs on xmlTest_CT {
1887
1888 f_shellCommandWithVerdict("xsd2ttcn unqualified_element_attrib.xsd","",c_shell_successWithoutWarningAndError)
1889
1890 if(getverdict==pass) {
1891 f_compareFiles(
1892 "www_example_org_unqualified_element_attrib_e.ttcn","www_example_org_unqualified_element_attrib.ttcn", c_numOfDiff_headerAndModuleName);
1893 }
1894 }//tc_
1895
1896 //Passed TR: Hl29679
1897 testcase tc_element_anyType_empty_encDec() runs on xmlTest_CT {
1898 var Anything1 vl_pdu:= { embed_values := omit, attr:=omit,elem_list:={}};
1899 var charstring vl_expectedEncodedPdu:="<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType'/>\n"
1900 f_encDecTest_Anything1(vl_pdu, vl_expectedEncodedPdu,vl_pdu);
1901 }//tc_
1902
1903 //Passed
1904 testcase tc_element_anyType_attrOnly_encDec() runs on xmlTest_CT {
1905 var Anything1 vl_pdu:= { embed_values := omit, attr:={"name=\"First\""},elem_list:={}};
1906 var charstring vl_expectedEncodedPdu:=
1907 "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType' name=\"First\"/>\n";
1908 f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
1909 }//tc_
1910
1911 testcase tc_element_anyType_2attrOnly_encDec() runs on xmlTest_CT {
1912 var Anything1 vl_pdu:= { embed_values := omit, attr:={"name=\"Hunor\"","nationality=\"HU\""},elem_list:={}};
1913 var charstring vl_expectedEncodedPdu:=
1914 "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType' name=\"Hunor\" nationality=\"HU\"/>\n";
1915 f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
1916 }//tc_
1917
1918 //Passed, TR: HL29711
1919 testcase tc_element_anyType_elemOnly_encDec() runs on xmlTest_CT {
1920 var Anything1 vl_pdu:= { embed_values := omit, attr:=omit, elem_list:={"<MyElement1/>", "<MyElement2></MyElement2>"} };
1921 var charstring vl_expectedEncodedPdu:=
1922 "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType'><MyElement1/><MyElement2></MyElement2></ns31:anything1>\n";
1923 var Anything1 vl_expectedDecodedPdu:= { embed_values := omit, attr:=omit, elem_list:={"<MyElement1/>", "<MyElement2/>"} };
1924 f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_expectedDecodedPdu);
1925 }//tc_
1926
1927 testcase tc_element_anyType_encDec() runs on xmlTest_CT {
1928 var Anything1 vl_pdu:= {
1929 embed_values := omit,
1930 attr:={"name=\"Hunor\"","nationality=\"HU\""},
1931 elem_list:={"<MyElement1/>", "<MyElement2></MyElement2>"} };
1932 var charstring vl_expectedEncodedPdu:=
1933 "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType' name=\"Hunor\" nationality=\"HU\"><MyElement1/><MyElement2></MyElement2></ns31:anything1>\n";
1934 var Anything1 vl_expectedDecodedPdu:= {
1935 embed_values := omit,
1936 attr:={"name=\"Hunor\"","nationality=\"HU\""},
1937 elem_list:={"<MyElement1/>", "<MyElement2/>"}
1938 };
1939 f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_expectedDecodedPdu);
1940 }//tc_
1941
1942 testcase tc_element_anyType_embed_encDec() runs on xmlTest_CT {
1943 var Anything1 vl_pdu:= {
1944 embed_values := {"The ordered ", " has arrived ", "Wait for further information.", "Ok"},
1945 attr :={"someattr=\"1\""},
1946 elem_list := {
1947 "<ns:a xmlns:ns=\"http://www.example.org/other\">product</ns:a>",
1948 "<ns:b xmlns:ns=\"http://www.example.org/other_1\">2</ns:b>",
1949 "<ns:c xmlns:ns=\"http://www.example.org/other_13\">2</ns:c>"
1950 }
1951 }
1952 var charstring vl_expectedEncodedPdu:=
1953 "<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";
1954 f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
1955 }//tc_
1956
1957 //===============================================================
1958 // tc_element_anyType_deeper_encDec
1959 //===============================================================
1960 testcase tc_element_anyType_deeper_encDec() runs on xmlTest_CT {
1961 var Anything1 vl_pdu:= {
1962 embed_values := omit,
1963 attr:={"name=\"Hunor\"","nationality=\"HU\""},
1964 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>"} };
1965
1966 var charstring vl_expectedEncodedPdu:=
1967 "<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";
1968 f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
1969 }//tc_
1970
1971
1972 type record of charstring charstringList;
1973
1974 //===============================================================
1975 // tc_element_anyType_longer_encDec
1976 //===============================================================
1977 testcase tc_element_anyType_longer_encDec() runs on xmlTest_CT {
1978 var charstringList vl_elementList:= {
1979 "<MyElement1>\n\t<Level2>\n\t<Level3_1>Great</Level3_1>\n\t<Level3_2>Britain</Level3_2>\n\t</Level2>\n</MyElement1>",
1980 "<MyElement2><Level2>Goddag</Level2>\n</MyElement2>",
1981 "<MyElement3><Level2>Goddag</Level2>\n</MyElement3>",
1982 "<MyElement4><Level2>Goddag</Level2>\n</MyElement4>"
1983 };
1984 var Anything1 vl_pdu:= {
1985 embed_values := omit,
1986 attr:={
1987 "name=\"Hunor\"",
1988 "nationality=\"HU\""
1989 },
1990 elem_list:={ }
1991 };
1992
1993 var charstring vl_expectedEncodedPdu:=
1994 "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType' name=\"Hunor\" nationality=\"HU\">";
1995
1996 for(var integer i:=0;i<sizeof(vl_elementList);i:=i+1){
1997 vl_pdu.elem_list[i]:=vl_elementList[i];
1998 vl_expectedEncodedPdu:=vl_expectedEncodedPdu & vl_elementList[i];
1999 }
2000 vl_expectedEncodedPdu:=vl_expectedEncodedPdu & "</ns31:anything1>\n"
2001
2002 f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
2003 }//tc_
2004
2005
2006 //===============================================================
2007 // tc_element_recOfElements_converter
2008 //===============================================================
2009 //Passed: TR: HL27438, Old name:tc_element_recOfElements_defaultAttr_converter
2010 testcase tc_element_recOfElements_converter() runs on xmlTest_CT {
2011
2012 f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_recordOfElements.xsd","",c_shell_successWithoutWarningAndError)
2013
2014 if(getverdict==pass) {
2015 f_compareFiles(
2016 "www_XmlTest_org_element_recordOfElements_e.ttcn","www_XmlTest_org_element_recordOfElements.ttcn", c_numOfDiff_headerModNameAndNamespace);
2017 }
2018 }//tc_
2019
2020 //Passed, old name: tc_element_recOfElements
2021 testcase tc_element_recOfElements_encDec() runs on xmlTest_CT {
2022 f_encDecTest_PersonInfo1();
2023 f_encDecTest_PersonInfo2();
2024 f_encDecTest_PersonInfo2_omitOptionals();
2025 // }
2026 }//tc_
2027
2028 //Passed, TR HL27452
2029 testcase tc_element_recOfElements_defaultAttr_encDec() runs on xmlTest_CT {
2030 f_encDecTest_PersonInfo2_defaultAttribute();
2031 }//tc_
2032
2033 //Passed: TR:27484
2034 testcase tc_element_recOfElements_defaultElement() runs on xmlTest_CT {
2035
2036 f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_recordOfElements.xsd","",c_shell_successWithoutWarningAndError)
2037
2038 if(getverdict==pass) {
2039 f_compareFiles(
2040 "www_XmlTest_org_element_recordOfElements_e.ttcn","www_XmlTest_org_element_recordOfElements.ttcn", c_numOfDiff_headerModNameAndNamespace);
2041 f_encDecTest_PersonInfo1_defaultElement();
2042 }
2043 }//tc_
2044
2045 //Passed
2046 testcase tc_element_recOfElements_minMaxOccurs() runs on xmlTest_CT {
2047
2048 f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_recordOfElements4.xsd","",c_shell_successWithoutWarningAndError)
2049
2050 if(getverdict==pass) {
2051 f_compareFiles(
2052 "www_XmlTest_org_element_recordOfElements4_e.ttcn","www_XmlTest_org_element_recordOfElements4.ttcn", c_numOfDiff_headerModNameAndNamespace);
2053 f_encDecTest_PersonInfo4();
2054 }
2055 }//tc_
2056
2057 //Passed, TR:HL28010
2058 testcase tc_element_recOfElements_maxOccursInfinity_converter() runs on xmlTest_CT {
2059
2060 f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_recordOfElements3.xsd","",c_shell_successWithoutWarningAndError)
2061
2062 if(getverdict==pass) {
2063 f_compareFiles(
2064 "www_XmlTest_org_element_recordOfElements3_e.ttcn","www_XmlTest_org_element_recordOfElements3.ttcn", c_numOfDiff_headerModNameAndNamespace);
2065 }
2066
2067 }//tc_
2068
2069 //Passed, TR: HL28024
2070 testcase tc_element_recOfElements_maxOccursInfinity_encoderDecoder() runs on xmlTest_CT {
2071
2072 f_encDecTest_PersonInfo3();
2073 }//tc_
2074
2075 testcase tc_element_recOfElements_anonymousType_conv() runs on xmlTest_CT {
2076
2077 f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_recordOfElements5.xsd","",c_shell_successWithoutWarningAndError)
2078
2079 if(getverdict==pass) {
2080 f_compareFiles(
2081 "www_XmlTest_org_element_recordOfElements5_e.ttcn","www_XmlTest_org_element_recordOfElements5.ttcn", c_numOfDiff_headerModNameAndNamespace);
2082 }
2083
2084 }//tc_
2085
2086 testcase tc_element_recOfElements_anonymousType_encDec() runs on xmlTest_CT {
2087 f_encDecTest_PersonInfo5();
2088 }//tc_
2089
2090
2091 testcase tc_substitutiongroup() runs on xmlTest_CT {
2092
2093 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup.xsd","",c_shell_successWithoutWarningAndError)
2094
2095 if(getverdict==pass) {
2096 f_compareFiles(
2097 "www_example_org_substitutiongroup_e.ttcn","www_example_org_substitutiongroup.ttcn", c_numOfDiff_headerModNameAndNamespace);
2098 }
2099
2100 }//tc_
2101
2102 testcase tc_substitutiongroup_name_as() runs on xmlTest_CT {
2103
2104 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_name_as.xsd","",c_shell_successWithoutWarningAndError)
2105
2106 if(getverdict==pass) {
2107 f_compareFiles(
2108 "www_example_org_substitutiongroup_name_as_e.ttcn","www_example_org_substitutiongroup_name_as.ttcn", c_numOfDiff_headerModNameAndNamespace);
2109 }
2110
2111 }//tc_
2112
2113 testcase tc_substitutiongroup_abstract_block_rest() runs on xmlTest_CT {
2114
2115 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_abstract_block_1.xsd","",c_shell_successWithoutWarningAndError)
2116
2117 if(getverdict==pass) {
2118 f_compareFiles(
2119 "www_example_org_substitutiongroup_abstract_block_1_e.ttcn",
2120 "www_example_org_substitutiongroup_abstract_block_1.ttcn", c_numOfDiff_headerModNameAndNamespace);
2121 }
2122
2123 }//tc_
2124
2125 testcase tc_substitutiongroup_abstract_block_ext() runs on xmlTest_CT {
2126
2127 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_abstract_block_2.xsd","",c_shell_successWithoutWarningAndError)
2128
2129 if(getverdict==pass) {
2130 f_compareFiles(
2131 "www_example_org_substitutiongroup_abstract_block_2_e.ttcn",
2132 "www_example_org_substitutiongroup_abstract_block_2.ttcn", c_numOfDiff_headerModNameAndNamespace);
2133 }
2134
2135 }//tc_
2136
2137 testcase tc_substitutiongroup_complex_without_element() 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_long_extension() runs on xmlTest_CT {
2150
2151 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_complex_without_element.xsd","",c_shell_successWithoutWarningAndError)
2152
2153 if(getverdict==pass) {
2154 f_compareFiles(
2155 "www_example_org_substitutiongroup_complex_without_element_e.ttcn",
2156 "www_example_org_substitutiongroup_complex_without_element.ttcn", c_numOfDiff_headerModNameAndNamespace);
2157 }
2158
2159 }//tc_
2160
2161 testcase tc_substitutiongroup_complextype_block() runs on xmlTest_CT {
2162
2163 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_complextype_block.xsd","",c_shell_successWithoutWarningAndError)
2164
2165 if(getverdict==pass) {
2166 f_compareFiles(
2167 "www_example_org_substitutiongroup_complextype_block_e.ttcn",
2168 "www_example_org_substitutiongroup_complextype_block.ttcn", c_numOfDiff_headerModNameAndNamespace);
2169 }
2170
2171 }//tc_
2172
2173 //Test if we find the substitutiongroup references in notargetnamespace
2174 testcase tc_substitutiongroup_notargetnamespace() runs on xmlTest_CT {
2175
2176 //f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_notargetnamespace.xsd","",c_shell_successWithoutWarningAndError)
2177 setverdict(pass);
2178
2179 }//tc_
2180
2181 testcase tc_substitutiongroup_neg() runs on xmlTest_CT {
2182
2183 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_neg.xsd","",c_shell_error)
2184
2185 }//tc_
2186
2187 testcase tc_substitutiongroup_diff_module() runs on xmlTest_CT {
2188
2189 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_main.xsd substitutiongroup_ref.xsd","",c_shell_successWithoutWarningAndError)
2190
2191 if(getverdict==pass) {
2192 f_compareFiles(
2193 "www_example_org_substitutiongroup_ref_e.ttcn",
2194 "www_example_org_substitutiongroup_ref.ttcn", c_numOfDiff_headerModNameAndNamespace);
2195 }
2196
2197 if(getverdict==pass) {
2198 f_compareFiles(
2199 "www_example_org_substitutiongroup_main_e.ttcn",
2200 "www_example_org_substitutiongroup_main.ttcn", c_numOfDiff_headerModNameAndNamespace);
2201 }
2202
2203 }//tc_
2204
2205 testcase tc_substitutiongroup_rename() runs on xmlTest_CT {
2206
2207 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_rename.xsd","",c_shell_successWithoutWarningAndError)
2208
2209 if(getverdict==pass) {
2210 f_compareFiles(
2211 "www_example_org_substitutiongroup_rename_e.ttcn",
2212 "www_example_org_substitutiongroup_rename.ttcn", c_numOfDiff_headerModNameAndNamespace);
2213 }
2214
2215 }//tc_
2216
2217 testcase tc_substitutiongroup_endDec() runs on xmlTest_CT {
2218
2219 f_encDecTest_ize_subs();
2220 }
2221
2222 testcase tc_type_substitution() runs on xmlTest_CT {
2223
2224 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution.xsd","",c_shell_successWithoutWarningAndError)
2225
2226 if(getverdict==pass) {
2227 f_compareFiles(
2228 "www_example_org_type_substitution_e.ttcn",
2229 "www_example_org_type_substitution.ttcn", c_numOfDiff_headerModNameAndNamespace);
2230 }
2231
2232 }//tc_
2233
2234 testcase tc_type_substitution_encDec() runs on xmlTest_CT {
2235
2236 f_encDecTest_type_subs();
2237
2238 }//tc_
2239
2240 testcase tc_type_substitution_chain() runs on xmlTest_CT {
2241
2242 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_chain.xsd","",c_shell_successWithoutWarningAndError)
2243
2244 if(getverdict==pass) {
2245 f_compareFiles(
2246 "www_example_org_type_substitution_chain_e.ttcn",
2247 "www_example_org_type_substitution_chain.ttcn", c_numOfDiff_headerModNameAndNamespace);
2248 }
2249
2250 }//tc_
2251
2252 testcase tc_type_substitution_abstract_block() runs on xmlTest_CT {
2253
2254 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_abstract_block.xsd","",c_shell_successWithoutWarningAndError)
2255
2256 if(getverdict==pass) {
2257 f_compareFiles(
2258 "www_example_org_type_substitution_abstract_block_e.ttcn",
2259 "www_example_org_type_substitution_abstract_block.ttcn", c_numOfDiff_headerModNameAndNamespace);
2260 }
2261
2262 }//tc_
2263
2264 testcase tc_type_substitution_diff_module() runs on xmlTest_CT {
2265
2266 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_mod1.xsd type_substitution_mod2.xsd","",c_shell_successWithoutWarningAndError)
2267
2268 if(getverdict==pass) {
2269 f_compareFiles(
2270 "www_example_org_type_substitution_mod1_e.ttcn",
2271 "www_example_org_type_substitution_mod1.ttcn", c_numOfDiff_headerModNameAndNamespace);
2272 }
2273
2274 if(getverdict==pass) {
2275 f_compareFiles(
2276 "www_example_org_type_substitution_mod2_e.ttcn",
2277 "www_example_org_type_substitution_mod2.ttcn", c_numOfDiff_headerModNameAndNamespace);
2278 }
2279
2280 }//tc_
2281
2282 testcase tc_type_substitution_simpletype() runs on xmlTest_CT {
2283
2284 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_simpletype.xsd","",c_shell_successWithoutWarningAndError)
2285
2286 if(getverdict==pass) {
2287 f_compareFiles(
2288 "www_example_org_type_substitution_simpletype_e.ttcn",
2289 "www_example_org_type_substitution_simpletype.ttcn", c_numOfDiff_headerModNameAndNamespace);
2290 }
2291
2292 }//tc_
2293
2294 testcase tc_type_substitution_with_elem_substitution() runs on xmlTest_CT {
2295
2296 f_shellCommandWithVerdict("xsd2ttcn -h type_subs_with_elem_subs.xsd","",c_shell_successWithoutWarningAndError)
2297
2298 if(getverdict==pass) {
2299 f_compareFiles(
2300 "www_example_org_type_subs_with_elem_subs_e.ttcn",
2301 "www_example_org_type_subs_with_elem_subs.ttcn", c_numOfDiff_headerModNameAndNamespace);
2302 }
2303
2304 }//tc_
2305
2306 testcase tc_type_substitution_element_in_ct() runs on xmlTest_CT {
2307
2308 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_elem_in_ct_mod1.xsd type_substitution_elem_in_ct_mod2.xsd","",c_shell_successWithoutWarningAndError)
2309
2310 if(getverdict==pass) {
2311 f_compareFiles(
2312 "www_example_org_type_substitution_elem_in_ct_mod1_e.ttcn",
2313 "www_example_org_type_substitution_elem_in_ct_mod1.ttcn", c_numOfDiff_headerModNameAndNamespace);
2314 }
2315
2316 if(getverdict==pass) {
2317 f_compareFiles(
2318 "www_example_org_type_substitution_elem_in_ct_mod2_e.ttcn",
2319 "www_example_org_type_substitution_elem_in_ct_mod2.ttcn", c_numOfDiff_headerModNameAndNamespace);
2320 }
2321
2322 }//tc_
2323
2324 testcase tc_only_element_substitution() runs on xmlTest_CT {
2325
2326 f_shellCommandWithVerdict("xsd2ttcn -h only_element_substitution.xsd","",c_shell_successWithoutWarningAndError)
2327
2328 if(getverdict==pass) {
2329 f_compareFiles(
2330 "www_example_org_only_element_substitution_e.ttcn",
2331 "www_example_org_only_element_substitution.ttcn", c_numOfDiff_headerModNameAndNamespace);
2332 }
2333
2334 }//tc_
2335
2336 testcase tc_type_substitution_builtintype() runs on xmlTest_CT {
2337
2338 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_builtintype.xsd","",c_shell_successWithoutWarningAndError)
2339
2340 if(getverdict==pass) {
2341 f_compareFiles(
2342 "www_example_org_type_substitution_builtintype_e.ttcn",
2343 "www_example_org_type_substitution_builtintype.ttcn", c_numOfDiff_headerModNameAndNamespace);
2344 }
2345
2346 }//tc_
2347
2348 testcase tc_type_substitution_rename() runs on xmlTest_CT {
2349
2350 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_rename.xsd","",c_shell_successWithoutWarningAndError)
2351
2352 if(getverdict==pass) {
2353 f_compareFiles(
2354 "www_example_org_type_substitution_rename_e.ttcn",
2355 "www_example_org_type_substitution_rename.ttcn", c_numOfDiff_headerModNameAndNamespace);
2356 }
2357
2358 }//tc_
2359
2360 testcase tc_type_substitution_complex_cascade() runs on xmlTest_CT {
2361
2362 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_complex_cascade.xsd","",c_shell_successWithoutWarningAndError)
2363
2364 if(getverdict==pass) {
2365 f_compareFiles(
2366 "www_example_org_type_substitution_complex_cascade_e.ttcn",
2367 "www_example_org_type_substitution_complex_cascade.ttcn", c_numOfDiff_headerModNameAndNamespace);
2368 }
2369
2370 }//tc_
2371
2372 testcase tc_type_substitution_simple_cascade() runs on xmlTest_CT {
2373
2374 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_simple_cascade.xsd","",c_shell_successWithoutWarningAndError)
2375
2376 if(getverdict==pass) {
2377 f_compareFiles(
2378 "www_example_org_type_substitution_simple_cascade_e.ttcn",
2379 "www_example_org_type_substitution_simple_cascade.ttcn", c_numOfDiff_headerModNameAndNamespace);
2380 }
2381
2382 }//tc_
2383
2384
2385
2386 //========================================================
2387 // tc_element_nameInheritance_conv
2388 // Checks if name of named (aliased) type is not inherited
2389 //========================================================
2390 testcase tc_element_nameInheritance_conv() runs on xmlTest_CT {
2391 f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_nameInheritance.xsd","",c_shell_successWithoutWarningAndError);
2392 }//tc_
2393
2394 //========================================
2395 // tc_element_nameInheritance_encDec
2396 // Checks if name of named (aliased) type is not inherited
2397 //========================================
2398 //TR HL49978
2399 testcase tc_element_nameInheritance_encDec() runs on xmlTest_CT {
2400 f_encDecTest_nameInheritance();
2401 }//tc_
2402
2403 //========================================
2404 // tc_element_Tgc_encDec
2405 // Checks if name of named (aliased) type is not inherited
2406 //========================================
2407 //TR HL49978
2408 testcase tc_element_Tgc_encDec() runs on xmlTest_CT {
2409 f_encDecTest_Tgc();
2410 }//tc_
2411
2412 testcase tc_element_abstract_conv() runs on xmlTest_CT {
2413 f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_abstract.xsd","",c_shell_successWithoutWarningAndError);
2414 }//tc_
2415
2416 testcase tc_element_nillable_converter() runs on xmlTest_CT {
2417 f_shellCommandWithVerdict("xsd2ttcn -z XmlTest_imsike.xsd","",c_shell_successWithoutWarningAndError );
2418
2419 if(getverdict==pass) {
2420 f_compareFiles(
2421 "XmlTest_imsike_e.ttcn","XmlTest_imsike.ttcn", c_numOfDiff_headerAndModuleName);
2422 }
2423 }//tc_
2424
2425 testcase tc_element_nillable_with_annotations() runs on xmlTest_CT {
2426 f_shellCommandWithVerdict("xsd2ttcn nillable_annotations.xsd","",c_shell_successWithoutWarningAndError );
2427
2428 if(getverdict==pass) {
2429 f_compareFiles(
2430 "nillable_annotations_e.ttcn","nillable_annotations.ttcn", c_numOfDiff_headerAndModuleName);
2431 }
2432 }//tc_
2433
2434 testcase tc_element_nillable_in_nillable_extension() runs on xmlTest_CT {
2435 f_shellCommandWithVerdict("xsd2ttcn nillable_in_nillable_extension.xsd","",c_shell_successWithoutWarningAndError );
2436
2437 if(getverdict==pass) {
2438 f_compareFiles(
2439 "http_www_example_org_nillable_in_nillable_extension_e.ttcn",
2440 "http_www_example_org_nillable_in_nillable_extension.ttcn", c_numOfDiff_headerAndModuleName);
2441 }
2442 }//tc_
2443
2444 testcase tc_element_attributegroup_nillable() runs on xmlTest_CT {
2445 f_shellCommandWithVerdict("xsd2ttcn attributegroup_nillable.xsd","",c_shell_successWithoutWarningAndError );
2446
2447 if(getverdict==pass) {
2448 f_compareFiles(
2449 "www_example_org_type_attributegroup_nillable_e.ttcn",
2450 "www_example_org_type_attributegroup_nillable.ttcn", c_numOfDiff_headerAndModuleName);
2451 }
2452 }//tc_
2453
2454 testcase tc_element_attributegroup_ingroup() runs on xmlTest_CT {
2455 f_shellCommandWithVerdict("xsd2ttcn attribgroup_ingroup.xsd","",c_shell_successWithoutWarningAndError );
2456
2457 if(getverdict==pass) {
2458 f_compareFiles(
2459 "www_example_org_attribgroup_ingroup_e.ttcn",
2460 "www_example_org_attribgroup_ingroup.ttcn", c_numOfDiff_headerModNameAndNamespace);
2461 }
2462 }//tc_
2463
2464 //IndividualTrigger, nile="false"
2465 testcase tc_element_nillable_IndividualTrigger_nilFalse_encDec() runs on xmlTest_CT {
2466 f_encDecTest_IndividualTrigger1();
2467 }//tc_
2468
2469 //IndividualTrigger, nil="true"
2470 testcase tc_element_nillable_IndividualTrigger_nilTrue_encDec() runs on xmlTest_CT {
2471 f_encDecTest_IndividualTrigger2(); //empty record
2472 }//tc_
2473
2474 //Isp, nil="false"
2475 testcase tc_element_nillable_Isp_nilFalse_encDec() runs on xmlTest_CT {
2476 f_encDecTest_Isp1();
2477 }//tc_
2478
2479 //Isp, nil="true"
2480 testcase tc_element_nillable_Isp_nilTrue_encDec() runs on xmlTest_CT {
2481 f_encDecTest_Isp2();
2482 }//tc_
2483
2484 //RemarkNillable, nil="false"
2485 testcase tc_element_nillable_RemarkNillable_nilFalse_encDec() runs on xmlTest_CT {
2486 f_encDecTest_RemarkNillable1();
2487 }//tc_
2488
2489 //RemarkNillable, nil="true"
2490 testcase tc_element_nillable_RemarkNillable_nilTrue_encDec() runs on xmlTest_CT {
2491 f_encDecTest_RemarkNillable2();
2492 }//tc_
2493
2494 }//Element
2495
2496 //=========================================================================
2497 // Control
2498 //=========================================================================
2499
2500 control {
2501 execute(tc_versionTest());//Passed
2502 execute(tc_xsd2ttcn_versionTest());//Passed
2503 //====My tcs====
2504 execute(tc_firstTrial());//Passed
2505 execute(tc_secondTrial());//Passed
2506 execute(tc_empty()); //Passed, TR:
2507 //appended to increase coverage:
2508
2509 execute(tc_annotation());
2510 execute(tc_annotation1());
2511 execute(tc_annotation2());
2512 execute(tc_xml_in_annotation());
2513 //option tests:
2514 execute(tc_version());
2515 execute(tc_options_c());
2516 execute(tc_options_e());
2517 execute(tc_options_f());
2518 execute(tc_options_g());
2519 execute(tc_options_p());
2520 execute(tc_options_s());
2521 execute(tc_options_t());
2522 execute(tc_options_v());
2523 execute(tc_options_V());
2524 execute(tc_options_w());
2525 execute(tc_options_x());
2526 execute(tc_options_wrong());
2527 execute(tc_options_missing());
2528 //===LABEL and DEFINITION - unknown but used tags
2529
2530 //===ttcn standard===
2531 execute(tc_XmlTest_all());//Passed
2532 execute(tc_element_in_all_neg());
2533 execute(tc_XmlTest_any_anyAttribute());//Passed
2534 execute(tc_XmlTest_HQ73011());//Passed
2535 execute(tc_anyattribute_optional());
2536 execute(tc_anyattribute_single());
2537 execute(tc_anyattribute_in_complex());
2538 execute(tc_XmlTest_attributeGroup());//Passed
2539 execute(tc_XmlTest_attribute_use_noTNS());//Passed
2540 execute(tc_id_attribute());
2541 execute(tc_attribute_order());
2542 execute(tc_name_conv_non_alphanumeric());
2543 execute(tc_module_name_convert_with_diff_namespace());
2544 execute(tc_module_typename_conversion());
2545 execute(tc_name_conv_remove_seq_of_low_line());
2546 execute(tc_name_conv_with_z());
2547 execute(tc_comment_placement());
2548
2549 //===W3C standard===
2550
2551 //===String===
2552 execute(tc_string()); //passed
2553 execute(tc_string_withWhitespace());//Check it once again if encoder or decoder transform "content" !!!
2554 execute(tc_string_withEnum());//Passed, TR: HL26227
2555 execute(tc_string_withPosLength());//TR: HL21257,
2556 execute(tc_string_withEmptyLength()); //TR: HL20441, Solved
2557 execute(tc_string_withNegativeLength());//Passed
2558 execute(tc_string_withFixedLength()); //Passed
2559 execute(tc_fixed_value());
2560 execute(tc_string_withFloatLength()); //passed ???
2561 execute(tc_string_withPosMinLength()); //Passed, TR: HL21690
2562 execute(tc_string_withEmptyMin());//Passed
2563 execute(tc_string_withNegativeMin());//Passed
2564 execute(tc_string_withPosMax())//Passed
2565 execute(tc_string_withEmptyMax());//Passed
2566 execute(tc_string_withNegativeMax());//Passed
2567 execute(tc_string_withFaultyMinMaxLength());//Passed, TR: TODO
2568 execute(tc_string_withOverDefinition()); //TR: HL25948, Solved
2569 execute(tc_string_withTypeAndBase());//Passed
2570 //TODO: put this test back later
2571 //execute(tc_string_pattern_square_brackets());
2572 //===Boolean===
2573 execute(tc_boolean());//Passed
2574 execute(tc_boolean_variant_commented());
2575 //===Decimal===
2576 execute(tc_decimal());//Passed
2577 //execute(tc_decimal_withLength()); length not supported
2578 execute(tc_decimal_withMinMaxInclusive());//TR: HL20715
2579 execute(tc_decimal_withMinMaxExclusive());//Passed TR: HL21166 -solved
2580 execute(tc_decimal_withEnum()); //Passed,TR HL21196 -solved
2581 execute(tc_decimal_fractiondigits());
2582 //===Integer===
2583 execute(tc_integer());//Passed
2584 execute(tc_integer_empty1());//Passed
2585 execute(tc_integer_withEnum()); //Passed, TR:HL21694 -solved
2586 execute(tc_integer_withMinIncl());//Passed
2587 execute(tc_integer_withMaxIncl());//Passed
2588 execute(tc_integer_withMinExcl());//Passed
2589 execute(tc_integer_withMaxExcl());//Passed
2590 //===Time===
2591 execute(tc_time());//passed
2592 execute(tc_time_withEnum());//Passed TR HL22058
2593 //==list===
2594 execute(tc_list_conv()); //Passed
2595 execute(tc_list_encDec());//Passed
2596 execute(tc_integerList());//Passed
2597 execute(tc_list_simpletype());//Passed
2598 execute(tc_list_complextype());
2599 //===Float===
2600 execute(tc_float_not_a_number());
2601
2602 //===simpleType enum====
2603 execute(tc_simpleType_enum());//Passed
2604 execute(tc_simpleType_restrict_comp());
2605 execute(tc_simpleType_ref());
2606 execute(tc_simpleType_base());
2607 execute(tc_enum_field_names());
2608 execute(tc_attribute_enumeration_variant());
2609 //===union===
2610 execute(tc_union());//TR:HL23577
2611 execute(tc_union_optional());//CR_TR18883
2612 execute(tc_enumeration_union_restriction());
2613 execute(tc_enumeration_union_restriction2());
2614 execute(tc_enumeration_restriction3());
2615 execute(tc_enumeration_remove_dup());
2616 //===complex===
2617 execute(tc_complex1()); //Passed
2618 execute(tc_complex2());//TR: HL24977
2619 execute(tc_complex_simpleContent());
2620 execute(tc_complex_namespaceas());
2621 execute(tc_complex_mixed_conv()); //Passed
2622 execute(tc_complex_group_reference());
2623 execute(tc_complex_mixed_encDec()); //TR:HL29258 - Rejected. Reason: Not supported feature, TODO:Write CR!!
2624 execute(tc_complex_seq_embeds_seq());
2625 execute(tc_complex_choice_converter());//Passed
2626 execute(tc_complex_choice_encDec());//Passed
2627
2628 execute(tc_complex_all_converter());//Passed
2629 execute(tc_complex_all_emptySet_encDec());//Passed
2630 execute(tc_complex_all_fullSet_encDec());//Passed
2631 execute(tc_complex_all_subSet_encDec());//Passed
2632 execute(tc_complex_all_inconsistentSet_encDec());//Passed
2633 execute(tc_complex_all_noOptional_pos_encDec()); //Passed
2634 execute(tc_complex_all_noOptional_neg1_encDec()); //Error, TR: HL32978
2635 execute(tc_complex_all_noOptional_neg2_encDec()); //Failed, TR: HL32978
2636 execute(tc_complex_all_noOptional_neg3_encDec()); //Failed, TR: HL32978
2637 execute(tc_complex_all_noOptional_empty_encDec()); //Failed, TR: HL32978
2638 execute(tc_complex_minOccursMaxOccurs()); //Passed, TR (ethgry): HL10386
2639 execute(tc_complex_extension_converter()); //TR HL32505
2640 execute(tc_complex_extension_encDec()); //Passed
2641 execute(tc_complex_extension_name_attrib_convert());
2642 execute(tc_complex_long_extension());
2643 execute(tc_type_name_conversion_follow());
2644 execute(tc_complex_extension_with_attrib());
2645 execute(tc_extension_restriction_with_attrib());
2646 execute(tc_attrib_enum());
2647 execute(tc_complex_self_recursion());
2648 execute(tc_complex_restriction_converter()); //Failed, TR HL32896
2649 execute(tc_complex_restriction_with_use());
2650 execute(tc_complex_nillable());
2651 execute(tc_nillable_fixed());
2652 execute(tc_no_ns_connector());
2653
2654
2655
2656 //execute(tc_complex_restriction_encDec()); Dynamic test case error:Attempt to XER-encode an unbound record of
2657
2658
2659
2660
2661 execute(tc_complex_restriction_neg1_converter());//TR: HL32948
2662 execute(tc_complex_restriction_neg2_converter());//TR: HL32948
2663 execute(tc_complex_unique_converter());
2664 execute(tc_complex_include_converter());
2665 execute(tc_complex_include_neg1_converter());
2666 execute(tc_complex_include_without_namespace());
2667 execute(tc_complex_import_pos1_converter());
2668 execute(tc_complex_import_pos2_converter());
2669 execute(tc_complex_import_neg1_converter());
2670 execute(tc_complex_import_withSL_converter());//SchemaLocation
2671 execute(tc_complex_import_withSL_encDec());
2672 execute(tc_complex_import_nameCollision_converter());
2673 execute(tc_complex_import_nameCollision2_converter());
2674 execute(tc_complex_any_pos_converter());
2675 execute(tc_imported_type_prefix());
2676 execute(tc_complex_any_pos1_encDec()); //Failed, TR: HL37887
2677 execute(tc_complex_any_pos2_encDec());
2678 execute(tc_complex_any_pos3_encDec());//failed, TR:
2679 //===element===
2680 execute(tc_element_anyType_converter());//Passed
2681 execute(tc_element_attrib_qualified());
2682 execute(tc_element_attrib_unqualified());
2683 execute(tc_element_anyType_empty_encDec());//Passed TR: HL29679
2684 execute(tc_element_anyType_attrOnly_encDec());//Passed
2685 execute(tc_element_anyType_2attrOnly_encDec());//Passed
2686 execute(tc_element_anyType_elemOnly_encDec());//Passed, TR: HL29711
2687 execute(tc_element_anyType_encDec());//Passed, HL29711
2688 execute(tc_element_anyType_embed_encDec());
2689 execute(tc_element_anyType_deeper_encDec());
2690 execute(tc_element_anyType_longer_encDec());
2691 execute(tc_element_recOfElements_converter()); //Passed: TR: HL27438
2692 execute(tc_element_recOfElements_encDec());//Passed
2693 execute(tc_element_recOfElements_defaultAttr_encDec());//Passed, TR HL27452
2694 execute(tc_element_recOfElements_defaultElement());//Passed: TR:27484
2695 execute(tc_element_recOfElements_maxOccursInfinity_converter());//Passed, TR:HL28010
2696 execute(tc_element_recOfElements_maxOccursInfinity_encoderDecoder());//Passed, TR: HL2802
2697 execute(tc_element_recOfElements_anonymousType_conv());
2698 execute(tc_element_recOfElements_anonymousType_encDec());
2699
2700
2701 //===substitutiongroup===
2702 execute(tc_substitutiongroup());
2703 execute(tc_substitutiongroup_name_as());
2704 execute(tc_substitutiongroup_abstract_block_rest());
2705 execute(tc_substitutiongroup_abstract_block_ext());
2706 execute(tc_substitutiongroup_complex_without_element());
2707 execute(tc_substitutiongroup_long_extension());
2708 execute(tc_substitutiongroup_complextype_block());
2709 execute(tc_substitutiongroup_notargetnamespace());
2710 execute(tc_substitutiongroup_neg());
2711 execute(tc_substitutiongroup_diff_module());
2712 execute(tc_substitutiongroup_rename());
2713 execute(tc_substitutiongroup_endDec());
2714
2715 //===type substitution===
2716 execute(tc_type_substitution());
2717 execute(tc_type_substitution_encDec());
2718 execute(tc_type_substitution_chain());
2719 execute(tc_type_substitution_abstract_block());
2720 execute(tc_type_substitution_diff_module());
2721 execute(tc_type_substitution_simpletype());
2722 execute(tc_type_substitution_with_elem_substitution());
2723 execute(tc_type_substitution_element_in_ct());
2724 execute(tc_only_element_substitution());
2725 execute(tc_type_substitution_builtintype());
2726 execute(tc_type_substitution_rename());
2727 execute(tc_type_substitution_complex_cascade());
2728 execute(tc_type_substitution_simple_cascade());
2729
2730
2731
2732 execute(tc_element_nameInheritance_conv());
2733 execute(tc_element_nameInheritance_encDec());//TR HL49978
2734 execute(tc_element_Tgc_encDec());//TR HL49978
2735 execute(tc_element_abstract_conv()); //Not supported features
2736 execute(tc_element_nillable_converter());
2737 execute(tc_element_nillable_with_annotations());
2738 execute(tc_element_nillable_in_nillable_extension());
2739 execute(tc_element_attributegroup_nillable());
2740 execute(tc_element_attributegroup_ingroup());
2741 execute(tc_element_nillable_IndividualTrigger_nilFalse_encDec());
2742 execute(tc_element_nillable_IndividualTrigger_nilTrue_encDec());
2743 execute(tc_element_nillable_Isp_nilFalse_encDec());
2744 execute(tc_element_nillable_Isp_nilTrue_encDec());
2745 execute(tc_element_nillable_RemarkNillable_nilFalse_encDec());
2746 execute(tc_element_nillable_RemarkNillable_nilTrue_encDec());
2747 }
2748
2749 } with {
2750 extension "version R1A02"; // a prerelease version
2751 extension "requiresTITAN R1C01";
2752 } // end of module
This page took 0.091446 seconds and 5 git commands to generate.