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