xmlTest_Testcases.ttcn 106 KB
Newer Older
Elemer Lelik's avatar
Elemer Lelik committed
1
/******************************************************************************
Elemer Lelik's avatar
Elemer Lelik committed
2
 * Copyright (c) 2000-2016 Ericsson Telecom AB
Elemer Lelik's avatar
Elemer Lelik committed
3
4
5
6
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
Elemer Lelik's avatar
Elemer Lelik committed
7
8
9
10
11
12
13
14
 *
 * Contributors:
 *   Balasko, Jeno
 *   Baranyi, Botond
 *   Ormandi, Matyas
 *   Raduly, Csaba
 *   Szabo, Bence Janos
 *
Elemer Lelik's avatar
Elemer Lelik committed
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
 ******************************************************************************/

//=========================================================================
// References: (XSD_0)  XML Schema Part 0: Primer Second Edition
//             (XSD_1)  XML Schema Part 1: Structures Second Edition
//             (XSD_2)  XML Schema Part 2: Datatypes Second Edition
//             (ETSI_9) ETSI ES 201 873-9 V4.1.2, The Testing and Test Control Notation version 3;
//                      Part 9: Using XML schema with TTCN-3
// Last modified: 2013-12-02 by ethbaat
// Temporarily commented out: tc_complex_import_withSL_encDec fails on some platforms because of TR:HR88527

module xmlTest_Testcases
{

//=========================================================================
// Import Part
//=========================================================================
//import from XSD all;
import from PIPEasp_Types all;
import from PIPEasp_PortType all;
import from PIPEasp_Templates all;
import from xmlTest_Shell all;

import from www_XmlTest_org_element_anyType_e all;
import from www_XmlTest_org_complex_all_e all;
import from www_XmlTest_org_complex_extension_e all;
import from www_XmlTest_org_complex_restriction_e all;
import from www_XmlTest_org_complex_import_e all;
import from www_XmlTest_org_complex_any_e all;

import from xmlTest_Functions_string all;
import from xmlTest_Functions_complex1 all;
import from xmlTest_Functions_complex2 all;
import from xmlTest_Functions_complex all;
import from xmlTest_Functions_element all;
import from xmlTest_Functions_list all;


//=========================================================================
// Module Parameters
//=========================================================================

// Insert module parameters here if applicable!
// You can use the module_param skeleton!

//=========================================================================
// Data Types
//=========================================================================

// Insert data type defintions here if applicable!
// You can use the data_type skeleton!

//=========================================================================
// Signatures
//=========================================================================

// Insert signature definitions here if applicable!
// You can use the signature skeleton!

//=========================================================================
//Port Types
//=========================================================================

// Insert port type defintions here if applicable!
// You can use the port_type skeleton!

//=========================================================================
//Component Types
//=========================================================================

type component xmlTest_CT extends Shell_CT {}

type component mtc_CT {}
//=========================================================================
// Constants
//=========================================================================


//=========================================================================
// Templates
//=========================================================================

// Insert templates here if applicable!
// You can use the template skeleton!

//=========================================================================
// Altsteps
//=========================================================================

// Insert altsteps here if applicable!
// You can use the altstep skeleton!

//=========================================================================
// Functions
//=========================================================================

//=========================================================================
// f_countDelimiters
//=========================================================================
function f_countDelimiters(in charstring pl_string, in charstring pl_delimiter, inout integer pl_counter) {
  pl_counter:=0;
  var integer pos:=0;
  var integer vl_size:=lengthof(pl_string);
  var integer vl_delimsize:=lengthof(pl_delimiter);
  while(pos<vl_size) {
    if( substr(pl_string,pos,vl_delimsize)==pl_delimiter) { pl_counter:=pl_counter+1}
    pos:=pos+1;
  }
}//f_

//=========================================================================
// f_compareFiles
//=========================================================================
//pl_diffLimit: upper limit of acceptable diff lines. 4 means one acceptable difference
function f_compareFiles(in charstring pl_file1, in charstring pl_file2, in integer pl_diffLimit) runs on xmlTest_CT {
  var integer vl_expectedResult:=0
  if(pl_diffLimit>0) { vl_expectedResult:=256; }
  var boolean vl_success:=false;
  f_shell_command("diff -w " & pl_file1  & " " & pl_file2,"",vl_expectedResult,vl_success);

  if(v_ASP_PResult.code==0)
  {
    setverdict(pass);
  }
  else if(v_ASP_PResult.code==256) {
    var integer vl_counter:=0;
    f_countDelimiters(v_ASP_PResult.stdout,"\n",vl_counter);
    log("Counted lines: ",vl_counter, " diffLimit: ", pl_diffLimit)
    if(vl_counter>pl_diffLimit) {
      setverdict(fail);
    }
  } else { //e.g 512: No such file or directory
    log("Wrong result code: ",v_ASP_PResult.code, " Expected result code: ", vl_expectedResult)
    setverdict(fail);
  }
}//f_


//=========================================================================
// Testcases
//=========================================================================
testcase tc_versionTest() runs on xmlTest_CT
{
  f_shellCommandWithVerdict("compiler -v","",0)
}

testcase tc_xsd2ttcn_versionTest() runs on xmlTest_CT
{
  f_shellCommandWithVerdict("xsd2ttcn -v","",0)
}

//simple records
testcase tc_firstTrial() runs on xmlTest_CT
{
Elemer Lelik's avatar
Elemer Lelik committed
169
170
171
172
173
174
  f_shellCommandWithVerdict("xsd2ttcn elements.xsd","",c_shell_successWithoutWarningAndError);

  if(getverdict==pass) {
    f_compareFiles(
      "www_example_org_elements_e.ttcn","www_example_org_elements.ttcn", c_numOfDiff_headerAndModuleName);
  }
Elemer Lelik's avatar
Elemer Lelik committed
175
176
177
178
179
180
}

// see http://www.w3.org/TR/xmlschema-0/ 2.1 The Purchase Order Schema
// This tc is "passed" but it is generated into noTargetNaespace.ttcn
testcase tc_secondTrial() runs on xmlTest_CT
{
Elemer Lelik's avatar
Elemer Lelik committed
181
182
183
184
185
186
  f_shellCommandWithVerdict("xsd2ttcn po.xsd noTargetNamespace.xsd","",c_shell_successWithoutWarningAndError);

  if(getverdict==pass) {
    f_compareFiles(
      "http_www_XmlTest_org_po_e.ttcn","http_www_XmlTest_org_po.ttcn", c_numOfDiff_headerAndModuleName);
  }
Elemer Lelik's avatar
Elemer Lelik committed
187
188
189
190
191
192
193
194
195
196
197
198
199
}
testcase tc_empty() runs on xmlTest_CT
{
  f_shellCommandWithVerdict("xsd2ttcn empty.xsd","",c_shell_successWithoutWarningAndError);

  if(getverdict==pass) {
    f_compareFiles(
      "www_XmlTest_org_empty_e.ttcn","www_XmlTest_org_empty.ttcn", c_numOfDiff_headerAndModuleName);
  }
}

testcase tc_annotation() runs on xmlTest_CT
{
Elemer Lelik's avatar
Elemer Lelik committed
200
  f_shellCommandWithVerdict("xsd2ttcn XmlTest_annotation.xsd","",c_shell_successWithWarning);
Elemer Lelik's avatar
Elemer Lelik committed
201
202
203
204
205
206
207
208
209
  if(getverdict==pass) {
      f_compareFiles(
      "www_XmlTest_org_annotation_e.ttcn","www_XmlTest_org_annotation.ttcn", c_numOfDiff_headerModNameAndNamespace);
    }
}

testcase tc_annotation1() runs on xmlTest_CT
{
  f_shellCommandWithVerdict("xsd2ttcn XmlTest_annotation1.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
210
  //No f_compareFiles becaulse tc_xml_in_annotation() covering this testcase
Elemer Lelik's avatar
Elemer Lelik committed
211
212
213
214
215
}

testcase tc_annotation2() runs on xmlTest_CT
{
  f_shellCommandWithVerdict("xsd2ttcn XmlTest_annotation2.xsd","",c_shell_error);
Elemer Lelik's avatar
Elemer Lelik committed
216
  //No f_compareFiles becaulse tc_xml_in_annotation() covering this testcase
Elemer Lelik's avatar
Elemer Lelik committed
217
218
}

Elemer Lelik's avatar
Elemer Lelik committed
219
220
221
222
223
224
225
226
227
testcase tc_xml_in_annotation() runs on xmlTest_CT
{
  f_shellCommandWithVerdict("xsd2ttcn xml_in_annotation.xsd","",c_shell_successWithoutWarningAndError);
  if(getverdict==pass) {
      f_compareFiles(
      "www_example_org_xml_in_annotation_e.ttcn","www_example_org_xml_in_annotation.ttcn", c_numOfDiff_headerModNameAndNamespace);
    }
}

Elemer Lelik's avatar
Elemer Lelik committed
228
//Incorrect version: 1.1, libxml parser prints warning
Elemer Lelik's avatar
Elemer Lelik committed
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
testcase tc_version() runs on xmlTest_CT
{
  f_shellCommandWithVerdict("xsd2ttcn XmlTest_version.xsd","",c_shell_successWithWarning);
}

//************************************
// === Converter switch tests: ===
//************************************
// usage: xsd2ttcn [-cepstVwx] [-f file] schema.xsd ...
//         or xsd2ttcn -v
//
// OPTIONS:
//         -c:             disable the generation of comments in TTCN-3 modules
//         -e:             disable the generation of encoding instructions in TTCN-3 modules
//         -f file:        the XSD files are taken from file instead of the command line
//         -p:             do not generate the UsefulTtcn3Types and XSD predefined modules
//         -q:             quiet - disable the issue of status messages
//         -s:             parse and validate only - no TTCN-3 module generation
//         -t:             disable the generation of timing information in TTCN-3 modules
//         -v:             show version information
//         -w:             suppress warnings
//         -x:             disable schema validation but generate TTCN-3 modules

//TODO:Not ready yet
testcase tc_options_c() runs on xmlTest_CT
{
Elemer Lelik's avatar
Elemer Lelik committed
255
  f_shellCommandWithVerdict("xsd2ttcn -c XmlTest_annotation.xsd","",c_shell_successWithWarning );
Elemer Lelik's avatar
Elemer Lelik committed
256
257
258
259
260
261
262
263
  if(getverdict==pass) {
    f_compareFiles("www_XmlTest_org_annotation_c_e.ttcn","www_XmlTest_org_annotation.ttcn", c_numOfDiff_headerModNameAndNamespace);
  }
}

//         -e:             disable the generation of encoding instructions in TTCN-3 modules
testcase tc_options_e() runs on xmlTest_CT
{
Elemer Lelik's avatar
Elemer Lelik committed
264
  f_shellCommandWithVerdict("xsd2ttcn -e XmlTest_annotation.xsd","",c_shell_successWithWarning );
Elemer Lelik's avatar
Elemer Lelik committed
265
266
267
268
269
270
271
272
  if(getverdict==pass) {
    f_compareFiles("www_XmlTest_org_annotation_e_e.ttcn","www_XmlTest_org_annotation.ttcn", c_numOfDiff_headerModNameAndNamespace);
  }
}

//         -f file:        the XSD files are taken from file instead of the command line
testcase tc_options_f() runs on xmlTest_CT
{
Elemer Lelik's avatar
Elemer Lelik committed
273
  f_shellCommandWithVerdict("xsd2ttcn -f XmlTest_files1.txt","",c_shell_successWithWarning );
Elemer Lelik's avatar
Elemer Lelik committed
274
275
276
277
278
  if(getverdict==pass) {
    f_compareFiles("www_XmlTest_org_annotation_e.ttcn","www_XmlTest_org_annotation.ttcn", c_numOfDiff_headerModNameAndNamespace);
  }
}

Elemer Lelik's avatar
Elemer Lelik committed
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
testcase tc_options_g() runs on xmlTest_CT
{
  f_shellCommandWithVerdict("xsd2ttcn -g dont_generate_element_substitution.xsd","",c_shell_successWithoutWarningAndError );
  if(getverdict==pass) {
    f_compareFiles("www_example_org_dont_generate_element_substitution_e.ttcn",
                   "www_example_org_dont_generate_element_substitution.ttcn", c_numOfDiff_headerModNameAndNamespace);
  }

  f_shellCommandWithVerdict("xsd2ttcn generate_element_substitution.xsd","",c_shell_successWithoutWarningAndError );
  if(getverdict==pass) {
    f_compareFiles("www_example_org_generate_element_substitution_e.ttcn",
                   "www_example_org_generate_element_substitution.ttcn", c_numOfDiff_headerModNameAndNamespace);
  }
}

Elemer Lelik's avatar
Elemer Lelik committed
294
295
296
297
298
299
300
//-p: do not generate the UsefulTtcn3Types and XSD predefined modules
testcase tc_options_p() runs on xmlTest_CT
{
  f_shellCommandWithVerdict("mv www_XmlTest_org_annotation.ttcn  tmp_www_XmlTest_org_annotation.ttcn","",c_shell_successWithoutWarningAndError );
  f_shellCommandWithVerdict("mv XSD.ttcn  tmp_XSD.ttcn","",c_shell_successWithoutWarningAndError );
  f_shellCommandWithVerdict("mv UsefulTtcn3Types.ttcn tmp_UsefulTtcn3Types.ttcn","",c_shell_successWithoutWarningAndError );

Elemer Lelik's avatar
Elemer Lelik committed
301
  f_shellCommandWithVerdict("xsd2ttcn -p XmlTest_annotation.xsd","",c_shell_successWithWarning );
Elemer Lelik's avatar
Elemer Lelik committed
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
  if(getverdict==pass) {
    f_shellCommandWithVerdict("ls www_XmlTest_org_annotation.ttcn", "",c_shell_successWithoutWarningAndError);
    f_shellCommandWithVerdict("ls  XSD.ttcn", "",c_shell_error_noSuchFileOrDirectory );
    f_shellCommandWithVerdict("ls  UsefulTtcn3Types.ttcn.ttcn","", c_shell_error_noSuchFileOrDirectory );
  }

  f_shellCommandWithVerdict("mv tmp_www_XmlTest_org_annotation.ttcn  www_XmlTest_org_annotation.ttcn","",c_shell_successWithoutWarningAndError );
  f_shellCommandWithVerdict("mv tmp_XSD.ttcn  XSD.ttcn","",c_shell_successWithoutWarningAndError );
  f_shellCommandWithVerdict("mv tmp_UsefulTtcn3Types.ttcn UsefulTtcn3Types.ttcn","",c_shell_successWithoutWarningAndError );
}

//-s: parse and validate only - no TTCN-3 module generation
testcase tc_options_s() runs on xmlTest_CT
{
  f_shellCommandWithVerdict("mv www_XmlTest_org_annotation.ttcn  tmp_www_XmlTest_org_annotation.ttcn","",c_shell_successWithoutWarningAndError );
  f_shellCommandWithVerdict("mv XSD.ttcn  tmp_XSD.ttcn","",c_shell_successWithoutWarningAndError );
  f_shellCommandWithVerdict("mv UsefulTtcn3Types.ttcn tmp_UsefulTtcn3Types.ttcn","",c_shell_successWithoutWarningAndError );

  f_shellCommandWithVerdict("xsd2ttcn -s XmlTest_annotation.xsd","",c_shell_successWithoutWarningAndError );
  //TODO:test if wrong xsd causes conversion error wit this switch

  //test if www_XmlTest_org_annotation.ttcn.ttcn, XSD.ttcn and UsefulTtcn3Types.ttcn exist:
  if(getverdict==pass) {
    f_shellCommandWithVerdict("ls www_XmlTest_org_annotation.ttcn", "", c_shell_error_noSuchFileOrDirectory );
    f_shellCommandWithVerdict("ls  XSD.ttcn", "",c_shell_error_noSuchFileOrDirectory );
    f_shellCommandWithVerdict("ls  UsefulTtcn3Types.ttcn.ttcn","", c_shell_error_noSuchFileOrDirectory );
  }
  f_shellCommandWithVerdict("mv tmp_www_XmlTest_org_annotation.ttcn  www_XmlTest_org_annotation.ttcn","",c_shell_successWithoutWarningAndError );
  f_shellCommandWithVerdict("mv tmp_XSD.ttcn  XSD.ttcn","",c_shell_successWithoutWarningAndError );
  f_shellCommandWithVerdict("mv tmp_UsefulTtcn3Types.ttcn UsefulTtcn3Types.ttcn","",c_shell_successWithoutWarningAndError );
}

//Ready
//         -t:             disable the generation of timing information in TTCN-3 modules
testcase tc_options_t() runs on xmlTest_CT
{
Elemer Lelik's avatar
Elemer Lelik committed
338
  f_shellCommandWithVerdict("xsd2ttcn -t  XmlTest_annotation.xsd","",c_shell_successWithWarning );
Elemer Lelik's avatar
Elemer Lelik committed
339
  if(getverdict==pass) {
Elemer Lelik's avatar
Elemer Lelik committed
340
    f_compareFiles("www_XmlTest_org_annotation_t_e.ttcn","www_XmlTest_org_annotation.ttcn", c_numOfDiff_headerAndModuleName);
Elemer Lelik's avatar
Elemer Lelik committed
341
342
343
344
345
346
347
348
349
350
351
352
353
354
  }
}

//         -v:             show version information
//TODO:Not ready yet
testcase tc_options_v() runs on xmlTest_CT
{
  f_shellCommandWithVerdict("xsd2ttcn -v","",c_shell_successWithoutWarningAndError );
}

//TODO:Not ready yet
//         -q:             quiet - disable the issue of status messages
testcase tc_options_V() runs on xmlTest_CT
{
Elemer Lelik's avatar
Elemer Lelik committed
355
  f_shellCommandWithVerdict("xsd2ttcn -q XmlTest_annotation.xsd","",c_shell_successWithWarning);
Elemer Lelik's avatar
Elemer Lelik committed
356
357
358
359
360
361
362
363
364
365
366
367
}

//         -w:             suppress warnings
testcase tc_options_w() runs on xmlTest_CT
{
  f_shellCommandWithVerdict("xsd2ttcn -w XmlTest_annotation.xsd","",c_shell_successWithoutWarningAndError );
}

//TODO:Not ready yet
//         -x:             disable schema validation but generate TTCN-3 modules
testcase tc_options_x() runs on xmlTest_CT
{
Elemer Lelik's avatar
Elemer Lelik committed
368
  f_shellCommandWithVerdict("xsd2ttcn -x XmlTest_annotation.xsd","",c_shell_successWithWarning);
Elemer Lelik's avatar
Elemer Lelik committed
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
}

testcase tc_options_wrong() runs on xmlTest_CT
{
  f_shellCommandWithVerdict("xsd2ttcn -H XmlTest_annotation.xsd","", c_shell_error);
}

testcase tc_options_missing() runs on xmlTest_CT
{
  f_shellCommandWithVerdict("xsd2ttcn ","",c_shell_successWithoutWarningAndError );
  //TODO: check the output
}


testcase tc_XmlTest_label() runs on xmlTest_CT
{
  f_shellCommandWithVerdict("xsd2ttcn -x XmlTest_label.xsd","",c_shell_successWithoutWarningAndError );
}

testcase tc_XmlTest_definition() runs on xmlTest_CT
{
  f_shellCommandWithVerdict("xsd2ttcn -x XmlTest_definition.xsd","",c_shell_successWithoutWarningAndError );
}
//************************************
//  Testcases_basedOnTtcnStandard9
//************************************
group Testcases_basedOnTtcnStandard9 {

  //Passed
  testcase tc_XmlTest_all() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict("xsd2ttcn all.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
401
402
403
404
405
406
407
408
409
    if(getverdict==pass) {
      f_compareFiles(
	"www_example_org_all_e.ttcn","www_example_org_all.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }

  testcase tc_element_in_all_neg() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict("xsd2ttcn element_in_all_minmax.xsd","",c_shell_error);
Elemer Lelik's avatar
Elemer Lelik committed
410
411
412
413
414
  }

  //Passed
  testcase tc_XmlTest_any_anyAttribute() runs on xmlTest_CT
  {
Elemer Lelik's avatar
Elemer Lelik committed
415
    f_shellCommandWithVerdict("xsd2ttcn any_anyAttribute.xsd","",c_shell_successWithWarning);
Elemer Lelik's avatar
Elemer Lelik committed
416
417
418
419
420

    if(getverdict==pass) {
      f_compareFiles(
	"http_www_example_org_ttcn_wildcards_e.ttcn","http_www_example_org_ttcn_wildcards.ttcn", c_numOfDiff_headerAndModuleName);
    }
Elemer Lelik's avatar
Elemer Lelik committed
421
422
423
424
425
426
427
428
429
430
431
432
433
434
  }

  //HQ73011
  //Heading: XSD anyAtribute is inserted into a wrong place
  //Passed
  testcase tc_XmlTest_HQ73011() runs on xmlTest_CT
  {
  f_shellCommandWithVerdict("xsd2ttcn HQ73011.xsd","",c_shell_successWithoutWarningAndError);
    if(getverdict==pass) {
      f_compareFiles(
        "urn_ietf_params_xml_ns_conference_info_e.ttcn","urn_ietf_params_xml_ns_conference_info.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }

Elemer Lelik's avatar
Elemer Lelik committed
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
  testcase tc_anyattribute_optional() runs on xmlTest_CT
  {
  f_shellCommandWithVerdict("xsd2ttcn anyattribute_optional.xsd","",c_shell_successWithoutWarningAndError);
    if(getverdict==pass) {
      f_compareFiles(
        "http_www_example_org_wildcards_e.ttcn","http_www_example_org_wildcards.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }

  testcase tc_anyattribute_single() runs on xmlTest_CT
  {
  f_shellCommandWithVerdict("xsd2ttcn anyattrib_single.xsd","",c_shell_successWithoutWarningAndError);
    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_anyattrib_single_e.ttcn","www_example_org_anyattrib_single.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }

  testcase tc_anyattribute_in_complex() runs on xmlTest_CT
  {
  f_shellCommandWithVerdict("xsd2ttcn anyattr_in_complex.xsd","",c_shell_successWithoutWarningAndError);
    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_anyattr_in_complex_e.ttcn","www_example_org_anyattr_in_complex.ttcn", c_numOfDiff_headerModNameAndNamespace);
    }
  }


Elemer Lelik's avatar
Elemer Lelik committed
463
464
465
466
  //Passed
  testcase tc_XmlTest_attributeGroup() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict("xsd2ttcn attributeGroup.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
467
468
469
470
471

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_attributegroup_e.ttcn","www_example_org_attributegroup.ttcn", c_numOfDiff_headerModNameAndNamespace);
    }
Elemer Lelik's avatar
Elemer Lelik committed
472
473
474
475
476
477
478
479
  }

  //double schema definition - Validator Returns with Error, Passed
  testcase tc_XmlTest_attribute_use_noTNS() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict("xsd2ttcn attribute_use_noTNS.xsd","",c_shell_error);
  }

Elemer Lelik's avatar
Elemer Lelik committed
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
  testcase tc_id_attribute() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict("xsd2ttcn id_attrib.xsd","",c_shell_successWithWarning);
    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_id_attrib_e.ttcn", "www_example_org_id_attrib.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }

  testcase tc_attribute_order() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict("xsd2ttcn attrib_order_a.xsd attrib_order_b.xsd attrib_order_c.xsd","",c_shell_successWithoutWarningAndError);
    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_attrib_order_a_e.ttcn", "www_example_org_attrib_order_a.ttcn", c_numOfDiff_headerAndModuleName);
    }

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_attrib_order_b_e.ttcn", "www_example_org_attrib_order_b.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }

  testcase tc_name_conv_non_alphanumeric() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict("xsd2ttcn name_conv_non_alphanumeric.xsd","",c_shell_successWithoutWarningAndError);
    if(getverdict==pass) {
      f_compareFiles(
        "http_www_example_org_name_conv2_e.ttcn",
        "http_www_example_org_name_conv2.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }

  testcase tc_module_name_convert_with_diff_namespace() runs on xmlTest_CT {
    f_shellCommandWithVerdict("xsd2ttcn imported_module.xsd imported_module_.xsd","",c_shell_successWithoutWarningAndError);

    if(getverdict==pass) {
      f_compareFiles(
        "imported_module_e.ttcn","imported_module.ttcn", c_numOfDiff_headerAndModuleName);
    }

    if(getverdict==pass) {
      f_compareFiles(
        "imported_module_1_e.ttcn","imported_module_1.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_

  testcase tc_module_typename_conversion() runs on xmlTest_CT {
    f_shellCommandWithVerdict("xsd2ttcn module_typename_conversion.xsd module_typename_conversion_1.xsd","",c_shell_successWithoutWarningAndError);

    if(getverdict==pass) {
      f_compareFiles(
        "module_typename_conversion_e.ttcn","module_typename_conversion.ttcn", c_numOfDiff_headerAndModuleName);
    }

    if(getverdict==pass) {
      f_compareFiles(
        "MyTypes_e.ttcn","MyTypes.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_

  testcase tc_name_conv_remove_seq_of_low_line() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict("xsd2ttcn name_conv_remove_seq_of_low_line.xsd","",
                              c_shell_successWithoutWarningAndError);
    if(getverdict==pass) {
      f_compareFiles(
        "http_www_example_org_name_conv3_e.ttcn",
        "http_www_example_org_name_conv3.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }

  testcase tc_name_conv_with_z() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict("xsd2ttcn -z name_conv_with_z.xsd","",c_shell_successWithoutWarningAndError);
    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_name_conv_http_e.ttcn",
        "www_example_org_name_conv_http.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }

  testcase tc_comment_placement() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict("xsd2ttcn comment_placement.xsd","",c_shell_successWithoutWarningAndError);
    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_comment_placement_e.ttcn",
        "www_example_org_comment_placement.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }

Elemer Lelik's avatar
Elemer Lelik committed
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
}//group

//************************************
//   Testcases based on W3C standards
//************************************

//******************************
//    StringTest
//******************************
group StringTest {

  //=== Correct string type definitions: ====
  //TR HL21086 - whitespace preserve. TODO: standalone testcase
  testcase tc_string() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict("xsd2ttcn -z XmlTest_string.xsd","",c_shell_successWithoutWarningAndError)
    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_string.ttcn",
        "www_XmlTest_org_string_e.ttcn", c_numOfDiff_headerModNameAndNamespace);
    }
////////////////////////////////////////////
//
//    f_encDecTest_NameA();
//    f_encDecTest_NameB();
//    f_encDecTest_Non_empty_string();
//    f_encDecTest_Type();
//
////////////////////////////////////////////
  }

  //Passed, TR: Hl21086 - Solved
  testcase tc_string_withWhitespace() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict("xsd2ttcn -z XmlTest_string_withWhitespace.xsd","",c_shell_successWithoutWarningAndError)
    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_string_withWhitespace.ttcn",
        "www_XmlTest_org_string_withWhitespace_e.ttcn", c_numOfDiff_headerAndModuleName);
    }
    f_encDecTest_StringWhiteSpaceP();
    f_encDecTest_StringWhiteSpaceR();
    f_encDecTest_StringWhiteSpaceC();
  }

  //Passed, TR: HL26227 -Solved BUT rethink if variant part is well ordered or not!!
  testcase tc_string_withEnum() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict("xsd2ttcn -z XmlTest_string_withEnum.xsd","",c_shell_successWithoutWarningAndError)
    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_string_withEnum.ttcn",
        "www_XmlTest_org_string_withEnum_e.ttcn", c_numOfDiff_headerAndModuleName);
    }
    f_encDecTest_StringEnum();
  }
  //TODO: Write length of child restriction tests based on tc_string!!!

  //=== Length restriction tests ===



  //=== Faulty String definitions: =========

  //===length===
  //TR: HL21257 --Solved
  testcase tc_string_withPosLength() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withPosLength.xsd","",c_shell_successWithoutWarningAndError);
    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_string_withPosLength.ttcn",
        "www_XmlTest_org_string_withPosLength_e.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }

  //Passed, returs with error
  testcase tc_string_withEmptyLength() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withEmptyLength.xsd","",c_shell_error)
  }

  testcase tc_string_withNegativeLength() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withNegativeLength.xsd","",c_shell_error)
  }

  //Passed
  testcase tc_string_withFixedLength() runs on xmlTest_CT
  {
Elemer Lelik's avatar
Elemer Lelik committed
662
663
664
665
666
667
668
669
670
671
672
    f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withFixedLength.xsd","",c_shell_error);
  }

  testcase tc_fixed_value() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict("xsd2ttcn fixed_value.xsd","",c_shell_successWithWarning);
    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_fixed_value.ttcn",
        "www_example_org_fixed_value_e.ttcn", c_numOfDiff_headerAndModuleName);
    }
Elemer Lelik's avatar
Elemer Lelik committed
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
  }

  //Passed
  testcase tc_string_withFloatLength() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withFloatLength.xsd","", c_shell_error)
  }

  //===minLength===
  //Passed, TR: HL21690
  testcase tc_string_withPosMinLength() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withMinLength.xsd","",c_shell_successWithoutWarningAndError)
    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_string_withMinLength.ttcn",
        "www_XmlTest_org_string_withMinLength_e.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }

  //Passed
  testcase tc_string_withEmptyMin() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withEmptyMin.xsd","",c_shell_error)
  }

  //Passed
  testcase tc_string_withNegativeMin() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withNegativeMin.xsd","",c_shell_error)
  }

  //===maxLength===
  //Passed
  testcase tc_string_withPosMax() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withPosMax.xsd","",c_shell_successWithoutWarningAndError);
    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_string_withPosMax_e.ttcn","www_XmlTest_org_string_withPosMax.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }

  //Passed
  testcase tc_string_withEmptyMax() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withEmptyMax.xsd","",c_shell_error)
  }

  //Passed
  testcase tc_string_withNegativeMax() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withNegativeMax.xsd","",c_shell_error)
  }
  //=== minLength>maxLength
  //Passed, TR:
  testcase tc_string_withFaultyMinMaxLength() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict("xsd2ttcn  XmlTest_string_withFaultyMinMax.xsd","",c_shell_error)
  }
  //Passed
  testcase tc_string_withOverDefinition() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict("xsd2ttcn  XmlTest_string_withOverDefinition.xsd","",c_shell_error)
  }

  testcase tc_string_withTypeAndBase() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict("xsd2ttcn  XmlTest_string_withTypeAndBase.xsd","",c_shell_error)
  }
Elemer Lelik's avatar
Elemer Lelik committed
743
744
745
746
747
748
749
750
751

  //testcase tc_string_pattern_square_brackets() runs on xmlTest_CT
  //{
  //  f_shellCommandWithVerdict("xsd2ttcn regex_square_brackets.xsd","",c_shell_successWithoutWarningAndError);
  //  if(getverdict==pass) {
  //    f_compareFiles(
  //      "www_example_org_regex_square_brackets_e.ttcn","www_example_org_regex_square_brackets.ttcn", c_numOfDiff_headerAndModuleName);
  //  }
  //}
Elemer Lelik's avatar
Elemer Lelik committed
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
}//StringTest

//******************************
//    BooleanTest
//******************************
group BooleanTest {

  //TODO: check warning sending for not supported:features
  testcase tc_boolean() runs on xmlTest_CT {
    f_shellCommandWithVerdict("xsd2ttcn  XmlTest_boolean.xsd","",c_shell_successWithoutWarningAndError)
    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_boolean_e.ttcn","www_XmlTest_org_boolean.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }
Elemer Lelik's avatar
Elemer Lelik committed
767
768
769
770
771
772
773
774
775

  testcase tc_boolean_variant_commented() runs on xmlTest_CT {
    f_shellCommandWithVerdict("xsd2ttcn  boolean_variant_commented.xsd","",c_shell_successWithoutWarningAndError)
    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_boolean_variant_commented_e.ttcn",
        "www_example_org_boolean_variant_commented.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }
Elemer Lelik's avatar
Elemer Lelik committed
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
}//BooleanTest


//******************************
//    DecimalTest
//******************************
group DecimalTest {

  //Passed
  testcase tc_decimal() runs on xmlTest_CT {
    f_shellCommandWithVerdict("xsd2ttcn  XmlTest_decimal.xsd","",c_shell_successWithoutWarningAndError)
    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_decimal_e.ttcn",
        "www_XmlTest_org_decimal.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }

  //!!!!!Length not supported!!!!
  //   testcase tc_decimal_withLength() runs on xmlTest_CT {
  //     f_shellCommandWithVerdict("xsd2ttcn  XmlTest_decimal_withLength.xsd","",c_shell_successWithoutWarningAndError)
  //     if(getverdict==pass) {
  //       f_compareFiles(
  //         "www_XmlTest_org_decimal_withLength_e.ttcn",
  //         "www_XmlTest_org_decimal_withLength.ttcn", c_numOfDiff_headerAndModuleName);
  //     }
  //   }

  //TR: Generates integer limits instead of decimal
  //TR: HL2715 -Solved
  testcase tc_decimal_withMinMaxInclusive() runs on xmlTest_CT {
    f_shellCommandWithVerdict("xsd2ttcn  XmlTest_decimal_withMinMaxInclusive.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_decimal_withMinMaxInclusive_e.ttcn",
        "www_XmlTest_org_decimal_withMinMaxInclusive.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_

  //TR21266 -Solved
  testcase tc_decimal_withMinMaxExclusive() runs on xmlTest_CT {
    f_shellCommandWithVerdict("xsd2ttcn XmlTest_decimal_withMinMaxExclusive.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_decimal_withMinMaxExclusive_e.ttcn",
        "www_XmlTest_org_decimal_withMinMaxExclusive.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_

  //TR HL21296
  testcase tc_decimal_withEnum() runs on xmlTest_CT {
    f_shellCommandWithVerdict("xsd2ttcn  XmlTest_decimal_withEnum.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_decimal_withEnum_e.ttcn",
        "www_XmlTest_org_decimal_withEnum.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }
Elemer Lelik's avatar
Elemer Lelik committed
837
838
839
840
841
842
843
844
845
846

  testcase tc_decimal_fractiondigits() runs on xmlTest_CT {
    f_shellCommandWithVerdict("xsd2ttcn  decimal_fractiondigits.xsd","",c_shell_successWithWarning)

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_decimal_fractiondigits_e.ttcn",
        "www_example_org_decimal_fractiondigits.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }
Elemer Lelik's avatar
Elemer Lelik committed
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
}//DecimalTest

//******************************
//    IntegerTest
//    Based on (XSD_2)/3.3.13 and (ETSI_9)/6.1/Table1
//******************************
group IntegerTest {

  testcase tc_integer() runs on xmlTest_CT {
    f_shellCommandWithVerdict("xsd2ttcn  XmlTest_integer.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_integer_e.ttcn",
        "www_XmlTest_org_integer.ttcn", c_numOfDiff_headerAndModuleName);
    }

  }//tc_

  //negative test
  testcase tc_integer_empty1() runs on xmlTest_CT {
    f_shellCommandWithVerdict("xsd2ttcn  XmlTest_integer_empty1.xsd","",c_shell_error)
  }//tc_

  //negative test
  testcase tc_integer_withLength() runs on xmlTest_CT {
    f_shellCommandWithVerdict("xsd2ttcn  XmlTest_integer_withLength.xsd","",c_shell_error)
  }//tc_

  //Ready, passed, TR:HL21694 -solved
  testcase tc_integer_withEnum() runs on xmlTest_CT {
    f_shellCommandWithVerdict("xsd2ttcn  XmlTest_integer_withEnum.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_integer_withEnum_e.ttcn","www_XmlTest_org_integer_withEnum.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_

  //Passed
  testcase tc_integer_withMinIncl() runs on xmlTest_CT {
    f_shellCommandWithVerdict("xsd2ttcn  XmlTest_integer_withMinIncl.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_integer_withMinIncl_e.ttcn",
        "www_XmlTest_org_integer_withMinIncl.ttcn",c_numOfDiff_headerAndModuleName);
    }
  }//tc_

  //Passed
  testcase tc_integer_withMaxIncl() runs on xmlTest_CT {
    f_shellCommandWithVerdict("xsd2ttcn  XmlTest_integer_withMaxIncl.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_integer_withMaxIncl_e.ttcn","www_XmlTest_org_integer_withMaxIncl.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_

  //Passed
  testcase tc_integer_withMinExcl() runs on xmlTest_CT {
    f_shellCommandWithVerdict("xsd2ttcn  XmlTest_integer_withMinExcl.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_integer_withMinExcl_e.ttcn",
        "www_XmlTest_org_integer_withMinExcl.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_

  //Passed
  testcase tc_integer_withMaxExcl() runs on xmlTest_CT {
    f_shellCommandWithVerdict("xsd2ttcn  XmlTest_integer_withMaxExcl.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_integer_withMaxExcl_e.ttcn","www_XmlTest_org_integer_withMaxExcl.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_


}//IntegerTest

Elemer Lelik's avatar
Elemer Lelik committed
931
932
933
934
935
936
937
938
939
940
941

  testcase tc_float_not_a_number() runs on xmlTest_CT {
    f_shellCommandWithVerdict("xsd2ttcn  not_a_number_minex_inf_maxex_-inf.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_not_a_number_minex_inf_maxex_inf_e.ttcn",
        "www_example_org_not_a_number_minex_inf_maxex_inf.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
942
943
944
945
946
947
948
949
950
951
952
953
  //
  testcase tc_simpleType_enum() runs on xmlTest_CT {

    f_shellCommandWithVerdict("xsd2ttcn  XmlTest_simple_enum.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_simple_enum_e.ttcn","www_XmlTest_org_simple_enum.ttcn", c_numOfDiff_headerAndModuleName);
    }

  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
  testcase tc_simpleType_restrict_comp() runs on xmlTest_CT {

    f_shellCommandWithVerdict("xsd2ttcn  simpletype_restrict_comp.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_simpletype_restrict_comp_e.ttcn","www_example_org_simpletype_restrict_comp.ttcn", c_numOfDiff_headerAndModuleName);
    }

  }//tc_

  testcase tc_simpleType_ref() runs on xmlTest_CT {

    f_shellCommandWithVerdict("xsd2ttcn  simpletype_ref.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_simpletype_ref_e.ttcn","www_example_org_simpletype_ref.ttcn", c_numOfDiff_headerAndModuleName);
    }

  }//tc_

  testcase tc_simpleType_base() runs on xmlTest_CT {

    f_shellCommandWithVerdict("xsd2ttcn  simpletype_base.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_simpletype_base_e.ttcn","www_example_org_simpletype_base.ttcn", c_numOfDiff_headerAndModuleName);
    }

  }//tc_

  //
  testcase tc_enum_field_names() runs on xmlTest_CT {

    f_shellCommandWithVerdict("xsd2ttcn  enum_field_names.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_enum_field_names_e.ttcn","www_example_org_enum_field_names.ttcn", c_numOfDiff_headerAndModuleName);
    }

  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
  testcase tc_attribute_enumeration_variant() runs on xmlTest_CT {

    f_shellCommandWithVerdict("xsd2ttcn  attribute_enumeration_variant.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_attribute_enumeration_variant_e.ttcn","www_example_org_attribute_enumeration_variant.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064

//******************************
//    TimeTest
//    Based on (XSD_2)/
//******************************
group TimeTest {

  //Passed:
  testcase tc_time() runs on xmlTest_CT {
    f_shellCommandWithVerdict("xsd2ttcn  XmlTest_time.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_time_e.ttcn","www_XmlTest_org_time.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_

  //Passed TR HL22058
  testcase tc_time_withEnum() runs on xmlTest_CT {
    f_shellCommandWithVerdict("xsd2ttcn  XmlTest_time_withEnum.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_time_withEnum_e.ttcn","www_XmlTest_org_time_withEnum.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_
}//TimeTest

group ListTest {
  //converter
  testcase tc_list_conv() runs on xmlTest_CT {

    f_shellCommandWithVerdict("xsd2ttcn  XmlTest_list.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_list_e.ttcn","www_XmlTest_org_list.ttcn", c_numOfDiff_headerAndModuleName);
    }

    // restrictions:length, minLength, maxLength, pattern, and  enumeration.
  }//tc_

  testcase tc_list_encDec() runs on xmlTest_CT {
    f_encDecTest_StringList();
  }//tc_

  testcase tc_integerList() runs on xmlTest_CT {

    f_shellCommandWithVerdict("xsd2ttcn  XmlTest_list_integer.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_list_integer_e.ttcn","www_XmlTest_org_list_integer.ttcn", c_numOfDiff_headerAndModuleName);
    }

  }//tc_
Elemer Lelik's avatar
Elemer Lelik committed
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075

  testcase tc_list_simpletype() runs on xmlTest_CT {

    f_shellCommandWithVerdict("xsd2ttcn  list_simpletype.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_list_simpletype_e.ttcn","www_example_org_list_simpletype.ttcn", c_numOfDiff_headerAndModuleName);
    }

  }//tc_
ebensza's avatar
ebensza committed
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086

  testcase tc_list_complextype() runs on xmlTest_CT {

    f_shellCommandWithVerdict("xsd2ttcn  list_complextype.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_list_complextype_e.ttcn","www_example_org_list_complextype.ttcn", c_numOfDiff_headerAndModuleName);
    }

  }//tc_
Elemer Lelik's avatar
Elemer Lelik committed
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
}//ListTest

group UnionTest {
  //TR:HL23577
  testcase tc_union() runs on xmlTest_CT {

    f_shellCommandWithVerdict("xsd2ttcn  XmlTest_union.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_union_e.ttcn","www_XmlTest_org_union.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_
  
  testcase tc_union_optional() runs on xmlTest_CT {

    f_shellCommandWithVerdict("xsd2ttcn  ETSI_CR5852_union.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "ETSI_CR5852_union_e.ttcn","ETSI_CR5852_union.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }

Elemer Lelik's avatar
Elemer Lelik committed
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
 testcase tc_enumeration_union_restriction() runs on xmlTest_CT {

    f_shellCommandWithVerdict("xsd2ttcn  enumeration_restriction.xsd","",c_shell_successWithWarning)

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_enumeration_restriction_e.ttcn",
        "www_example_org_enumeration_restriction.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }

 testcase tc_enumeration_union_restriction2() runs on xmlTest_CT {

    f_shellCommandWithVerdict("xsd2ttcn  enumeration_restriction2.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_seq_enumeration_restriction_e.ttcn",
        "www_example_org_seq_enumeration_restriction.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }

1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
 testcase tc_enumeration_restriction3() runs on xmlTest_CT {

    f_shellCommandWithVerdict("xsd2ttcn  enumeration_restriction3.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_enumeration_restriction3_e.ttcn",
        "www_example_org_enumeration_restriction3.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }


Elemer Lelik's avatar
Elemer Lelik committed
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
 testcase tc_enumeration_remove_dup() runs on xmlTest_CT {

    f_shellCommandWithVerdict("xsd2ttcn  enumeration_remove_dup.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_enumeration_remove_dup_e.ttcn",
        "www_example_org_enumeration_remove_dup.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }

Elemer Lelik's avatar
Elemer Lelik committed
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
}//UnionTest



group ComplexType {

  testcase tc_complex1() runs on xmlTest_CT {

    f_shellCommandWithVerdict("xsd2ttcn  XmlTest_complex1.xsd","",c_shell_successWithoutWarningAndError)

     if(getverdict==pass) {
       f_compareFiles(
        "www_XmlTest_org_complex1_e.ttcn","www_XmlTest_org_complex1.ttcn", c_numOfDiff_headerModNameAndNamespace);
       f_encDecTest_InternationalPrice();
     }
  }//tc_

  //TR: HL24977 -Solved
  testcase tc_complex2() runs on xmlTest_CT {

    f_shellCommandWithVerdict("xsd2ttcn  XmlTest_complex2.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_complex2_e.ttcn","www_XmlTest_org_complex2.ttcn", c_numOfDiff_headerModNameAndNamespace);
    }
    f_encDecTest_InternationalPrice2(); //TR: HL24977 -solved -Primer, 2.5.3 Empty Content
    f_encDecTest_InternationalPrice3();
    f_encDecTest_InternationalPrice4();
  }//tc_

  testcase tc_complex_simpleContent() runs on xmlTest_CT {

    f_shellCommandWithVerdict("xsd2ttcn  XmlTest_complex_simpleContent.xsd","",c_shell_successWithoutWarningAndError)

     if(getverdict==pass) {
       f_compareFiles(
        "www_XmlTest_org_complex_simpleContent_e.ttcn","www_XmlTest_org_complex_simpleContent.ttcn", c_numOfDiff_headerModNameAndNamespace);
      f_encDecTest_ComplexTypeWithSimpleContent1();
      f_encDecTest_ComplexTypeWithSimpleContent2();
      f_encDecTest_ComplexTypeWithSimpleContent2_neg();
     }
  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
  testcase tc_complex_namespaceas() runs on xmlTest_CT {

    f_shellCommandWithVerdict("xsd2ttcn namespaceas.xsd imported2.xsd","",c_shell_successWithoutWarningAndError)

     if(getverdict==pass) {
       f_compareFiles(
        "www_example_org_namespaceas_e.ttcn","www_example_org_namespaceas.ttcn", c_numOfDiff_headerAndModuleName);
       f_compareFiles(
        "www_example_org_imported2_e.ttcn","www_example_org_imported2.ttcn", c_numOfDiff_headerAndModuleName);
     }
  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
  testcase tc_complex_mixed_conv() runs on xmlTest_CT {

    f_shellCommandWithVerdict("xsd2ttcn  XmlTest_complex_mixed.xsd","",c_shell_successWithoutWarningAndError)

     if(getverdict==pass) {
       f_compareFiles(
        "www_XmlTest_org_complex_mixed_e.ttcn","www_XmlTest_org_complex_mixed.ttcn", c_numOfDiff_headerAndModuleName);
     }
  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
  testcase tc_complex_group_reference() runs on xmlTest_CT {

    f_shellCommandWithVerdict("xsd2ttcn  seq_group_reference.xsd","",c_shell_successWithoutWarningAndError)

     if(getverdict==pass) {
       f_compareFiles(
        "www_example_org_seq_group_reference_e.ttcn","www_example_org_seq_group_reference.ttcn", c_numOfDiff_headerAndModuleName);
     }
  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
1232
1233
1234
1235
1236
  //TR:HL29258
  testcase tc_complex_mixed_encDec() runs on xmlTest_CT {
     f_encDecTest_ComplexTypeWithMixed();
  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
 testcase tc_complex_seq_embeds_seq() runs on xmlTest_CT {

    f_shellCommandWithVerdict("xsd2ttcn  sequence_embeds_sequence.xsd","",c_shell_successWithoutWarningAndError)

     if(getverdict==pass) {
       f_compareFiles(
        "http_www_example_org_seq_embeds_seq_e.ttcn","http_www_example_org_seq_embeds_seq.ttcn", c_numOfDiff_headerModNameAndNamespace);
       f_encDecTest_InternationalPrice();
     }
  }//tc_
Elemer Lelik's avatar
Elemer Lelik committed
1247
1248
1249

  testcase tc_complex_choice_converter() runs on xmlTest_CT {

Elemer Lelik's avatar
Elemer Lelik committed
1250
    f_shellCommandWithVerdict("xsd2ttcn  XmlTest_complex_choice.xsd","",c_shell_successWithWarning)
Elemer Lelik's avatar
Elemer Lelik committed
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338

     if(getverdict==pass) {
       f_compareFiles(
        "www_XmlTest_org_complex_choice_e.ttcn","www_XmlTest_org_complex_choice.ttcn", c_numOfDiff_headerAndModuleName);
     }
  }//tc_

  //
  testcase tc_complex_choice_encDec() runs on xmlTest_CT {
    f_encDecTest_ComplexTypeWithChoice_1();
    f_encDecTest_ComplexTypeWithChoice_2();
    f_encDecTest_ComplexTypeWithChoice_3();
    f_encDecTest_ComplexTypeWithChoice_4();
    f_encDecTest_ComplexTypeWithChoice_5();
    f_encDecTest_ComplexTypeWithChoice_6();
    f_encDecTest_ComplexTypeWithChoice_7();
    f_encDecTest_ComplexTypeWithChoice_8();
    f_encDecTest_ComplexTypeWithChoice_9();
    f_encDecTest_ComplexTypeWithChoice_10();
  }//tc_

  //Passed, TR: HL30830 -solved
  testcase tc_complex_all_converter() runs on xmlTest_CT {
    f_shellCommandWithVerdict("xsd2ttcn  XmlTest_complex_all.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_complex_all_e.ttcn","www_XmlTest_org_complex_all.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_

  //HL29679
  testcase tc_complex_all_emptySet_encDec() runs on xmlTest_CT {
    var MySubjects1 vl_pdu:= {
      order:={},
      year:="2009",
      english:=omit,
      math:=omit,
      physics:=omit,
      chemistry:=omit
    }
    var charstring vl_expectedEncodedPdu:="<MySubjects1 Year='2009'/>\n\n";
    f_encDecTest_ComplexTypeWithAll_MySubject1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
  }//tc_

  testcase tc_complex_all_fullSet_encDec() runs on xmlTest_CT {
    var  MySubjects1 vl_pdu:= {
      order:={math,english,chemistry, physics},
      year:="2009",
      english:="Advanced Group 1",
      math:="Beginners 1",
      physics:="Mechanics 1",
      chemistry:="CH2"
    }
    var charstring vl_expectedEncodedPdu:=
      "<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"
    f_encDecTest_ComplexTypeWithAll_MySubject1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
  }//tc_

  testcase tc_complex_all_subSet_encDec() runs on xmlTest_CT {
    var  MySubjects1 vl_pdu:= {
      order:={math,english,chemistry},
      year:="2009",
      english:="Advanced Group 1",
      math:="Beginners 1",
      physics:=omit,
      chemistry:="CH2"
    },
    vl_expectedPdu:={
      order:={math,english},
      year:="2009",
      english:="Advanced Group 1",
      math:="Beginners 1",
      physics:=omit,
      chemistry:=omit
    };
    var charstring vl_expectedEncodedPdu:=
      "<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"
      f_encDecTest_ComplexTypeWithAll_MySubject1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
  }//tc_

  testcase tc_complex_all_inconsistentSet_encDec() runs on xmlTest_CT {
    f_encDecTest_ComplexTypeWithAll_inconsistentSet();
  }//tc_

  //positive testcase for group "all". The type has no optional field (element).The input is correct
  testcase tc_complex_all_noOptional_pos_encDec() runs on xmlTest_CT {
    var  MySubjects2 vl_pdu:= {
Elemer Lelik's avatar
Elemer Lelik committed
1339
      order:={math,english,chemistry, physics,history},
Elemer Lelik's avatar
Elemer Lelik committed
1340
      year:="2009",
Elemer Lelik's avatar
Elemer Lelik committed
1341
1342
1343
1344
1345
      english:="Advanced Group 1",
      math:="Beginners 1",
      physics:="Mechanics 1",
      chemistry:="CH2",
      history:="H1"
Elemer Lelik's avatar
Elemer Lelik committed
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
    }
    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>H1</History>\n</MySubjects2>\n\n";
      f_encDecTest_ComplexTypeWithAll_MySubject2(vl_pdu,vl_expectedEncodedPdu,vl_pdu,0);
  }//tc_

  //Negative testcase for group "all". The type has no optional field (element).
  //The input is not correct: value of one field (history) is missing
  //Passed, TR: HL32978
  testcase tc_complex_all_noOptional_neg1_encDec() runs on xmlTest_CT {
    var  MySubjects2 vl_pdu:= {
Elemer Lelik's avatar
Elemer Lelik committed
1357
      order:={math,english,chemistry, physics,history},
Elemer Lelik's avatar
Elemer Lelik committed
1358
      year:="2009",
Elemer Lelik's avatar
Elemer Lelik committed
1359
1360
1361
1362
1363
      english:="Advanced Group 1",
      math:="Beginners 1",
      physics:="Mechanics 1",
      chemistry:="CH2"
      //history:="H1"
Elemer Lelik's avatar
Elemer Lelik committed
1364
1365
    }
    var  MySubjects2 vl_expectedDecodedPdu:= {
Elemer Lelik's avatar
Elemer Lelik committed
1366
      order:={math,english,chemistry, physics,history},
Elemer Lelik's avatar
Elemer Lelik committed
1367
      year:="2009",
Elemer Lelik's avatar
Elemer Lelik committed
1368
1369
1370
1371
1372
      english:="Advanced Group 1",
      math:="Beginners 1",
      physics:="Mechanics 1",
      chemistry:="CH2",
      history:=""
Elemer Lelik's avatar
Elemer Lelik committed
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
    }
    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"
      f_encDecTest_ComplexTypeWithAll_MySubject2(vl_pdu,vl_expectedEncodedPdu,vl_expectedDecodedPdu,0);
  }//tc_

  //Negative testcase for group "all". The type has no optional field (element).
  //The input is not correct: value of one field (history) and its place in order-list is missing.
  // ***Less elements of record of order than required***
  //expectation: error report at encoding, returning 1 at decoding
  //Passed, TR: HL32978
  testcase tc_complex_all_noOptional_neg2_encDec() runs on xmlTest_CT {
    var  MySubjects2 vl_pdu:= {
Elemer Lelik's avatar
Elemer Lelik committed
1385
      order:={math,english,chemistry, physics},
Elemer Lelik's avatar
Elemer Lelik committed
1386
      year:="2009",
Elemer Lelik's avatar
Elemer Lelik committed
1387
1388
1389
1390
1391
      english:="Advanced Group 1",
      math:="Beginners 1",
      physics:="Mechanics 1",
      chemistry:="CH2"
      //history:="H1"
Elemer Lelik's avatar
Elemer Lelik committed
1392
1393
    }
    var  MySubjects2 vl_expectedDecodedPdu:= {
Elemer Lelik's avatar
Elemer Lelik committed
1394
      order:={math,english,chemistry, physics},
Elemer Lelik's avatar
Elemer Lelik committed
1395
      year:="2009",
Elemer Lelik's avatar
Elemer Lelik committed
1396
1397
1398
1399
1400
      english:="Advanced Group 1",
      math:="Beginners 1",
      physics:="Mechanics 1",
      chemistry:="CH2",
      history:=""
Elemer Lelik's avatar
Elemer Lelik committed
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
    }
    var charstring vl_expectedEncodedPdu:="<MySubjects2 Year='2009'/>\n\n"; //expecting error report!!!
      //"<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"
      f_encDecTest_ComplexTypeWithAll_MySubject2(vl_pdu,vl_expectedEncodedPdu,vl_expectedDecodedPdu,1);
  }//tc_

  //Negative testcase for group "all". The type has no optional field (element).
  //The input is not correct: order three times contains "math", Physics and history are missing.
  //expectation: error report at encoding,  returning 1 at decoding
  //Passed,  TR: HL32978
  testcase tc_complex_all_noOptional_neg3_encDec() runs on xmlTest_CT {
    var  MySubjects2 vl_pdu:= {
Elemer Lelik's avatar
Elemer Lelik committed
1413
      order:={math,english,chemistry,math,math},
Elemer Lelik's avatar
Elemer Lelik committed
1414
      year:="2009",
Elemer Lelik's avatar
Elemer Lelik committed
1415
1416
1417
1418
1419
      english:="Advanced Group 1",
      math:="Beginners 1",
      physics:="Mechanics 1",
      chemistry:="CH2"
      //history:="H1"
Elemer Lelik's avatar
Elemer Lelik committed
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
    }
    var charstring vl_expectedEncodedPdu:="<MySubjects2 Year='2009'/>\n\n"; //expecting error report!!!
      //"<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"
      f_encDecTest_ComplexTypeWithAll_MySubject2(vl_pdu,vl_expectedEncodedPdu,vl_pdu,1);
  }//tc_


  //=========================================================================
  //  tc_complex_all_noOptional_empty_encDec
  //=========================================================================
  //Negative testcase for group "all". The type has no optional field (element).
  //The input is not correct: value of all the fields and their place in order-list is missing
  //expectation: error report at encoding
  //Passed,  TR: HL32978
  testcase tc_complex_all_noOptional_empty_encDec() runs on xmlTest_CT {
    var  MySubjects2 vl_pdu:= {
Elemer Lelik's avatar
Elemer Lelik committed
1436
1437
1438
1439
1440
1441
1442
      order:={ },
      year:="2009"
      //english:="Advanced Group 1",
      //math:="Beginners 1",
      //physics:="Mechanics 1",
      //chemistry:="CH2"
      //history:="H1"
Elemer Lelik's avatar
Elemer Lelik committed
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
    }
    var charstring vl_expectedEncodedPdu:="<MySubjects2 Year='2009'/>\n\n"; //expecting error report!!!
      f_encDecTest_ComplexTypeWithAll_MySubject2(vl_pdu,vl_expectedEncodedPdu,vl_pdu,1);
  }//tc_

  //=========================================================================
  //  tc_complex_minOccursMaxOccurs
  //=========================================================================
  //Old name: tc_XmlTest_minOccursMaxOccurs
  ////TR (ethgry): HL10386
  testcase tc_complex_minOccursMaxOccurs() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_minOccursMaxOccurs.xsd","",c_shell_successWithoutWarningAndError);
    if(getverdict==pass) {
       f_compareFiles(
        "www_XmlTest_org_complex_minOccursMaxOccurs_e.ttcn","www_XmlTest_org_complex_minOccursMaxOccurs.ttcn", c_numOfDiff_headerAndModuleName);
     }
  }


  testcase tc_complex_extension_converter() runs on xmlTest_CT {
    f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_extension.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_complex_extension_e.ttcn","www_XmlTest_org_complex_extension.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
  testcase tc_complex_extension_name_attrib_convert() runs on xmlTest_CT {
    f_shellCommandWithVerdict("xsd2ttcn name_conversion_extension_attrib.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "name_conversion_extension_attrib_e.ttcn","name_conversion_extension_attrib.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_

  testcase tc_complex_long_extension() runs on xmlTest_CT {
    f_shellCommandWithVerdict("xsd2ttcn long_extension.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_long_extension_e.ttcn","www_example_org_long_extension.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_

  testcase tc_complex_self_recursion() runs on xmlTest_CT {
    f_shellCommandWithVerdict("xsd2ttcn complex_self_recursion.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_self_recursion_e.ttcn","www_example_org_self_recursion.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_

  testcase tc_type_name_conversion_follow() runs on xmlTest_CT {
    f_shellCommandWithVerdict("xsd2ttcn type_conversion_follow.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_type_conversion_follow_e.ttcn","www_example_org_type_conversion_follow.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_

  testcase tc_complex_extension_with_attrib() runs on xmlTest_CT {
    f_shellCommandWithVerdict("xsd2ttcn attribute_in_extension.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "attribute_in_extension_e.ttcn","attribute_in_extension.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_

  testcase tc_extension_restriction_with_attrib() runs on xmlTest_CT {
    f_shellCommandWithVerdict("xsd2ttcn attrib_restriction_extension.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_attr_ext_rest_e.ttcn","www_example_org_attr_ext_rest.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_

  testcase tc_attrib_enum() runs on xmlTest_CT {
    f_shellCommandWithVerdict("xsd2ttcn attrib_enum.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_attrib_enum_e.ttcn","www_example_org_attrib_enum.ttcn", c_numOfDiff_headerModNameAndNamespace);
    }
  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
  testcase tc_complex_extension_encDec() runs on xmlTest_CT
  {
    var MySubjects3Extension vl_pdu:={
      semester:="Autumn",
      year:="2009",
      english:="B1",
      math:=omit,
      physics:="Optics",
      chemistry:=omit,
      arts:="Impressionism"
    }
    var charstring vl_expectedEncodedPdu:=
      "<MySubjects3Extension Semester='Autumn' Year='2009'>\n\t<English>B1</English>\n\t<Physics>Optics</Physics>\n\t<Arts>Impressionism</Arts>\n</MySubjects3Extension>\n\n";
    f_encDecTest_ComplexTypeWithExtension_MySubject3(vl_pdu,vl_expectedEncodedPdu, vl_pdu);
  }

  testcase tc_complex_restriction_converter() runs on xmlTest_CT {
    f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_restriction.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_complex_restriction_e.ttcn","www_XmlTest_org_complex_restriction.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
 testcase tc_complex_restriction_with_use() runs on xmlTest_CT {
    f_shellCommandWithVerdict("xsd2ttcn complex_restriction_with_use.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "http_www_example_org_complex_restriction_with_use_e.ttcn",
         "http_www_example_org_complex_restriction_with_use.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_

 testcase tc_complex_nillable() runs on xmlTest_CT {
    f_shellCommandWithVerdict("xsd2ttcn complex_nillable.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_complex_nillable_e.ttcn",
         "www_example_org_complex_nillable.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_

 //Fixed or defaultforempty attribute is not allowed on nillable elements according to TITAN
 testcase tc_nillable_fixed() runs on xmlTest_CT {
    f_shellCommandWithVerdict("xsd2ttcn nillable_fixed.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_nillable_fixed_e.ttcn",
         "www_example_org_nillable_fixed.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_

 testcase tc_no_ns_connector() runs on xmlTest_CT {
Elemer Lelik's avatar
Elemer Lelik committed
1592
    f_shellCommandWithVerdict("xsd2ttcn no_ns_connector.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1593
1594
1595
1596
1597
1598
1599
1600

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_no_ns_connector_e.ttcn",
         "www_example_org_no_ns_connector.ttcn", c_numOfDiff_headerModNameAndNamespace);
    }
  }//tc_

1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
 testcase tc_xmlschema() runs on xmlTest_CT {
    f_shellCommandWithVerdict("xsd2ttcn MyXMLSchema.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "http_www_example_org_2001_XMLSchema_e.ttcn",
         "http_www_example_org_2001_XMLSchema.ttcn", c_numOfDiff_headerModNameAndNamespace);
    }
  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
  testcase tc_complex_restriction_encDec() runs on xmlTest_CT
  {
    var MySubjects4Restriction vl_pdu:={
      year:="2009",
      english:="B1",
      math:="Combinatorics 1"
    }
    var charstring vl_expectedEncodedPdu:= "<MySubjects4Restriction Year='2009'>\n\t<English>B1</English>\n\t<Math>Combinatorics 1</Math>\n</MySubjects4Restriction>\n\n";
    f_encDecTest_ComplexTypeWithExtension_MySubject4(vl_pdu,vl_expectedEncodedPdu, vl_pdu);
  }
  //TR: HL32948, Solved
  testcase tc_complex_restriction_neg1_converter() runs on xmlTest_CT {
    f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_restriction_neg1.xsd","",c_shell_error);
  }//tc_

  //TR: HL32948, Solved
  testcase tc_complex_restriction_neg2_converter() runs on xmlTest_CT {
    f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_restriction_neg2.xsd","",c_shell_error);
  }//tc_

  //not supported:
  testcase tc_complex_unique_converter() runs on xmlTest_CT {
    f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_unique.xsd","",c_shell_successWithWarning);
Elemer Lelik's avatar
Elemer Lelik committed
1634
1635
1636
1637
1638
    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_complex_unique_e.ttcn",
         "www_XmlTest_org_complex_unique.ttcn", c_numOfDiff_headerModNameAndNamespace);
    }
Elemer Lelik's avatar
Elemer Lelik committed
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
  }//tc_

  //Positive test: The including and the included schema are in the same namespace
  testcase tc_complex_include_converter() runs on xmlTest_CT {
    f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_include.xsd XmlTest_complex_include1.xsd","",c_shell_successWithoutWarningAndError);

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_complex_include1_e.ttcn","www_XmlTest_org_complex_include.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
  //=========================================================================
  //  tc_complex_include_without_namespace
  //=========================================================================
  //Positive test: The including schema includes a schema without a namespace
  testcase tc_complex_include_without_namespace() runs on xmlTest_CT {
    f_shellCommandWithVerdict("xsd2ttcn including_module.xsd included_without_namespace.xsd","",c_shell_successWithoutWarningAndError);

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_including_module_e.ttcn","www_example_org_including_module.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
  //=========================================================================
  //  tc_complex_include_neg1_converter
  //=========================================================================
  //Negative test: The including and the included schema are not in the same namespace
  testcase tc_complex_include_neg1_converter() runs on xmlTest_CT {
    f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_include.xsd XmlTest_complex_include2.xsd","",c_shell_error);
  }//tc_

  //=========================================================================
  //  tc_complex_import_pos1_converter
  //=========================================================================
  //Positive test: The including and the included schema are in different namespaces (import and include)
  testcase tc_complex_import_pos1_converter() runs on xmlTest_CT {
    f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_import_pos.xsd XmlTest_complex_include1.xsd","",c_shell_successWithoutWarningAndError);

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_complex_import_e.ttcn","www_XmlTest_org_complex_import.ttcn", c_numOfDiff_headerModNameAndImport);

      f_compareFiles(
       "www_XmlTest_org_complex_include2_e.ttcn","www_XmlTest_org_complex_include.ttcn", c_numOfDiff_headerModNameAndImport);
    }
  }//tc_

  //=========================================================================
  //  tc_complex_import_pos2_converter
  //=========================================================================
  //Pos test: Checks if the converter can choose the file having the correct namespace
  //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
  testcase tc_complex_import_pos2_converter() runs on xmlTest_CT {
    f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_import_pos.xsd XmlTest_complex_include2.xsd XmlTest_complex_include1.xsd","",c_shell_successWithoutWarningAndError);

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_complex_import_e.ttcn","www_XmlTest_org_complex_import.ttcn", c_numOfDiff_headerModNameAndNamespace);

      f_compareFiles(
       "www_XmlTest_org_complex_include2_e.ttcn","www_XmlTest_org_complex_include.ttcn", c_numOfDiff_headerModNameAndNamespace);
    }
  }//tc_

  //=========================================================================
  //  tc_complex_import_neg1_converter
  //=========================================================================
  //Negative test: The importing and the imported schema are in different namespaces, but the first file contains unknown type
  //If the type checking is switched off the testcase fails.
  testcase tc_complex_import_neg1_converter() runs on xmlTest_CT {
    f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_import_neg1.xsd XmlTest_complex_include1.xsd","",c_shell_error);
  }//tc_

  //=========================================================================
  //  tc_complex_import_withSL_converter
  //=========================================================================
  //Positive test: The importing schema contains the namespace and the schema location of the imported schema.
  testcase tc_complex_import_withSL_converter() runs on xmlTest_CT {
    f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_import_withSchemaLocation.xsd XmlTest_complex_include1.xsd","",c_shell_successWithoutWarningAndError);

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_complex_import_e.ttcn","www_XmlTest_org_complex_import.ttcn", c_numOfDiff_headerModNameAndNamespace+4);
    }
  }//tc_

  //=========================================================================
  //  tc_complex_import_withSL_encDec
  //=========================================================================
  // TODO: fix HR88527
  testcase tc_complex_import_withSL_encDec() runs on xmlTest_CT {
    var PurchaseReportImport pl_pdu:= {
      period :="P3M",
      periodEnding :="1999-12-31",
      regions:= {
        zip_list :={
          {
            code:=95819,
            part_list:= {
              {
                number:="872-AA",
                quantity:=1
              },
              {
                number:="926-AA",
                quantity:=2
              }
            }
          }
        }
      },
      parts :={
        part_list:= {
          {
            number:="872-AA",
            base:="Lawnmower"
          },
          {
            number:="926-AA",
            base:="Baby Monitor"
          }
        }
      }
    }
    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";
    //see http://www.w3.org/TR/xmlschema-0/#quartelyReport !
    f_encDecTest_PurchaseReportImport(pl_pdu,pl_expectedEncodedPdu,pl_pdu);
  }//tc_

  //=========================================================================
  //  tc_complex_import_nameCollision_converter
  //=========================================================================
  //imports the same type from different namespaces
  testcase tc_complex_import_nameCollision_converter() runs on xmlTest_CT {
    f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_import_AB.xsd XmlTest_complex_import_A.xsd XmlTest_complex_import_B.xsd","",c_shell_successWithoutWarningAndError);

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_complex_import_A_e.ttcn","www_XmlTest_org_complex_import_A.ttcn", c_numOfDiff_headerAndModuleName);
      f_compareFiles(
        "www_XmlTest_org_complex_import_B_e.ttcn","www_XmlTest_org_complex_import_B.ttcn", c_numOfDiff_headerAndModuleName);
      f_compareFiles(
        "www_XmlTest_org_complex_import_AB_e.ttcn","www_XmlTest_org_complex_import_AB.ttcn", 10+c_numOfDiff_headerModNameAndImport);
    }
  }//tc_

  //=========================================================================
  //  tc_complex_import_nameCollision2_converter
  //=========================================================================
  //imports the same type from different namespaces
  testcase tc_complex_import_nameCollision2_converter() runs on xmlTest_CT {
    f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_import_AB.xsd XmlTest_complex_import_B.xsd XmlTest_complex_import_A.xsd","",c_shell_successWithoutWarningAndError);
  }//tc_

  //=========================================================================
  //  tc_complex_any_pos_converter
  //=========================================================================
  testcase tc_complex_any_pos_converter() runs on xmlTest_CT {
Elemer Lelik's avatar
Elemer Lelik committed
1799
    f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_any.xsd","",c_shell_successWithWarning);
Elemer Lelik's avatar
Elemer Lelik committed
1800
1801
1802
1803
1804
1805
1806

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_complex_any_e.ttcn","www_XmlTest_org_complex_any.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
1807
1808
1809
1810
1811
1812
1813
1814
1815
  testcase tc_imported_type_prefix() runs on xmlTest_CT {
    f_shellCommandWithVerdict("xsd2ttcn import_prefix_name.xsd imported_prefix_name.xsd","",c_shell_successWithoutWarningAndError);

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_import_prefix_e.ttcn","www_example_org_import_prefix.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885

  //=========================================================================
  //  tc_complex_any_pos1_encDec
  //  Failed, TR: HL37887
  //=========================================================================
  testcase tc_complex_any_pos1_encDec() runs on xmlTest_CT {

    var ElementContainingXhtml_1 vl_pdu := {
      firstField:="1st field",
      elem_list:= {
        "<table xmlns=\"http://www.w3.org/1999/xhtml\" border=\"0\" width=\"100%\">\n      <tr><td>95819</td><td> </td><td> </td></tr>\n    </table>"
      },
      thirdField:="3rd field"
    }
    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";
    f_encDecTest_ElementContainingXhtml_1(vl_pdu,vl_expectedEncodedPdu, vl_pdu);
  }//tc_

  //=========================================================================
  //  tc_complex_any_pos2_encDec
  //=========================================================================
  testcase tc_complex_any_pos2_encDec() runs on xmlTest_CT {

    var ElementContainingXhtml_2 vl_pdu := {
      elem_list:= {
        "<table xmlns=\"http://www.w3.org/1999/xhtml\" border=\"0\" width=\"100%\">\n      <tr><td>95819</td><td> </td><td> </td></tr>\n    </table>"
      }
    }
    var charstring  vl_expectedEncodedPdu:=
        "<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";
    f_encDecTest_ElementContainingXhtml_2(vl_pdu,vl_expectedEncodedPdu, vl_pdu);
  }//tc_

  //=========================================================================
  //  tc_complex_any_pos3_encDec
  //  Failed, TR: HL37887
  //=========================================================================
  testcase tc_complex_any_pos3_encDec() runs on xmlTest_CT {

    var ElementContainingXhtml_1 vl_pdu :=
      {
        firstField := "1st field",
        elem_list := {
          "<table xmlns=\"http://www.w3.org/1999/xhtml\" border=\"0\" width=\"100%\">\n      <tr><td>95819</td><td> </td><td> </td></tr>\n    </table>",
          "<second xmlns=\"http://www.w3.org/1999/xhtml\" element=\"rabbit\"/>" },
        thirdField := "3rd field"
    }

    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";
    f_encDecTest_ElementContainingXhtml_1(vl_pdu,vl_expectedEncodedPdu, vl_pdu);
  }//tc_

}//complexTypes

//=========================================================================
//   group Elements
//=========================================================================
group Elements{

    //Passed
  testcase tc_element_anyType_converter() runs on xmlTest_CT {

    f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_anyType.xsd","",c_shell_successWithoutWarningAndError)

     if(getverdict==pass) {
       f_compareFiles(
        "www_XmlTest_org_element_anyType_e.ttcn","www_XmlTest_org_element_anyType.ttcn", c_numOfDiff_headerAndModuleName);
     }
  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
  testcase tc_element_attrib_qualified() runs on xmlTest_CT {

    f_shellCommandWithVerdict("xsd2ttcn qualified_element_attrib.xsd","",c_shell_successWithoutWarningAndError)

     if(getverdict==pass) {
       f_compareFiles(
        "www_example_org_qualified_element_attrib_e.ttcn","www_example_org_qualified_element_attrib.ttcn", c_numOfDiff_headerAndModuleName);
     }
  }//tc_

  testcase tc_element_attrib_unqualified() runs on xmlTest_CT {

    f_shellCommandWithVerdict("xsd2ttcn unqualified_element_attrib.xsd","",c_shell_successWithoutWarningAndError)

     if(getverdict==pass) {
       f_compareFiles(
        "www_example_org_unqualified_element_attrib_e.ttcn","www_example_org_unqualified_element_attrib.ttcn", c_numOfDiff_headerAndModuleName);
     }
  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
1906
1907
  //Passed TR: Hl29679
  testcase tc_element_anyType_empty_encDec() runs on xmlTest_CT {
Elemer Lelik's avatar
Elemer Lelik committed
1908
1909
    var Anything1 vl_pdu:= { embed_values := omit, attr:=omit,elem_list:={}};
    var charstring vl_expectedEncodedPdu:="<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType'/>\n"
Elemer Lelik's avatar
Elemer Lelik committed
1910
1911
1912
1913
1914
    f_encDecTest_Anything1(vl_pdu, vl_expectedEncodedPdu,vl_pdu);
  }//tc_

  //Passed
  testcase tc_element_anyType_attrOnly_encDec() runs on xmlTest_CT {
Elemer Lelik's avatar
Elemer Lelik committed
1915
    var Anything1 vl_pdu:= { embed_values := omit, attr:={"name=\"First\""},elem_list:={}};
Elemer Lelik's avatar
Elemer Lelik committed
1916
    var charstring vl_expectedEncodedPdu:=
Elemer Lelik's avatar
Elemer Lelik committed
1917
      "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType' name=\"First\"/>\n";
Elemer Lelik's avatar
Elemer Lelik committed
1918
1919
1920
1921
    f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
  }//tc_

  testcase tc_element_anyType_2attrOnly_encDec() runs on xmlTest_CT {
Elemer Lelik's avatar
Elemer Lelik committed
1922
    var Anything1 vl_pdu:= { embed_values := omit, attr:={"name=\"Hunor\"","nationality=\"HU\""},elem_list:={}};
Elemer Lelik's avatar
Elemer Lelik committed
1923
    var charstring vl_expectedEncodedPdu:=
Elemer Lelik's avatar
Elemer Lelik committed
1924
      "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType' name=\"Hunor\" nationality=\"HU\"/>\n";
Elemer Lelik's avatar
Elemer Lelik committed
1925
1926
1927
1928
1929
    f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
  }//tc_

  //Passed, TR: HL29711
  testcase tc_element_anyType_elemOnly_encDec() runs on xmlTest_CT {
Elemer Lelik's avatar
Elemer Lelik committed
1930
    var Anything1 vl_pdu:= { embed_values := omit, attr:=omit, elem_list:={"<MyElement1/>", "<MyElement2></MyElement2>"} };
Elemer Lelik's avatar
Elemer Lelik committed
1931
    var charstring vl_expectedEncodedPdu:=
Elemer Lelik's avatar
Elemer Lelik committed
1932
1933
      "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType'><MyElement1/><MyElement2></MyElement2></ns31:anything1>\n";
    var Anything1 vl_expectedDecodedPdu:= { embed_values := omit, attr:=omit, elem_list:={"<MyElement1/>", "<MyElement2/>"} };
Elemer Lelik's avatar
Elemer Lelik committed
1934
1935
1936
1937
1938
    f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_expectedDecodedPdu);
  }//tc_

  testcase tc_element_anyType_encDec() runs on xmlTest_CT {
    var Anything1 vl_pdu:= {
Elemer Lelik's avatar
Elemer Lelik committed
1939
      embed_values := omit,
Elemer Lelik's avatar
Elemer Lelik committed
1940
1941
1942
      attr:={"name=\"Hunor\"","nationality=\"HU\""},
      elem_list:={"<MyElement1/>", "<MyElement2></MyElement2>"} };
    var charstring vl_expectedEncodedPdu:=
Elemer Lelik's avatar
Elemer Lelik committed
1943
      "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType' name=\"Hunor\" nationality=\"HU\"><MyElement1/><MyElement2></MyElement2></ns31:anything1>\n";
Elemer Lelik's avatar
Elemer Lelik committed
1944
    var Anything1 vl_expectedDecodedPdu:= {
Elemer Lelik's avatar
Elemer Lelik committed
1945
      embed_values := omit, 
Elemer Lelik's avatar
Elemer Lelik committed
1946
1947
1948
1949
1950
1951
      attr:={"name=\"Hunor\"","nationality=\"HU\""},
      elem_list:={"<MyElement1/>", "<MyElement2/>"}
    };
    f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_expectedDecodedPdu);
  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
  testcase tc_element_anyType_embed_encDec() runs on xmlTest_CT {
    var Anything1 vl_pdu:= {
      embed_values := {"The ordered ", " has arrived ", "Wait for further information.", "Ok"},
      attr :={"someattr=\"1\""},
      elem_list := {
       "<ns:a xmlns:ns=\"http://www.example.org/other\">product</ns:a>",
       "<ns:b xmlns:ns=\"http://www.example.org/other_1\">2</ns:b>",
       "<ns:c xmlns:ns=\"http://www.example.org/other_13\">2</ns:c>"
      }
    }
    var charstring vl_expectedEncodedPdu:=
      "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType' someattr=\"1\">The ordered <ns:a xmlns:ns=\"http://www.example.org/other\">product</ns:a> has arrived <ns:b xmlns:ns=\"http://www.example.org/other_1\">2</ns:b>Wait for further information.<ns:c xmlns:ns=\"http://www.example.org/other_13\">2</ns:c>Ok</ns31:anything1>\n";
    f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
1967
1968
1969
1970
1971
  //===============================================================
  //  tc_element_anyType_deeper_encDec
  //===============================================================
  testcase tc_element_anyType_deeper_encDec() runs on xmlTest_CT {
    var Anything1 vl_pdu:= {
Elemer Lelik's avatar
Elemer Lelik committed
1972
      embed_values := omit,
Elemer Lelik's avatar
Elemer Lelik committed
1973
1974
1975
1976
      attr:={"name=\"Hunor\"","nationality=\"HU\""},
      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>"} };

    var charstring vl_expectedEncodedPdu:=
Elemer Lelik's avatar
Elemer Lelik committed
1977
      "<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";
Elemer Lelik's avatar
Elemer Lelik committed
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
      f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
  }//tc_


  type record of charstring charstringList;

  //===============================================================
  // tc_element_anyType_longer_encDec
  //===============================================================
  testcase tc_element_anyType_longer_encDec() runs on xmlTest_CT {
    var charstringList vl_elementList:= {
        "<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>",
        "<MyElement3><Level2>Goddag</Level2>\n</MyElement3>",
        "<MyElement4><Level2>Goddag</Level2>\n</MyElement4>"
    };
    var Anything1 vl_pdu:= {
Elemer Lelik's avatar
Elemer Lelik committed
1995
      embed_values := omit,
Elemer Lelik's avatar
Elemer Lelik committed
1996
1997
1998
1999
2000
2001
2002
2003
      attr:={
        "name=\"Hunor\"",
        "nationality=\"HU\""
      },
      elem_list:={ }
    };

    var charstring vl_expectedEncodedPdu:=
Elemer Lelik's avatar
Elemer Lelik committed
2004
      "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType' name=\"Hunor\" nationality=\"HU\">";
Elemer Lelik's avatar
Elemer Lelik committed
2005
2006
2007

    for(var integer i:=0;i<sizeof(vl_elementList);i:=i+1){
      vl_pdu.elem_list[i]:=vl_elementList[i];
Elemer Lelik's avatar
Elemer Lelik committed
2008
      vl_expectedEncodedPdu:=vl_expectedEncodedPdu & vl_elementList[i];
Elemer Lelik's avatar
Elemer Lelik committed
2009
    }
Elemer Lelik's avatar
Elemer Lelik committed
2010
    vl_expectedEncodedPdu:=vl_expectedEncodedPdu & "</ns31:anything1>\n"
Elemer Lelik's avatar
Elemer Lelik committed
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100

    f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
  }//tc_


  //===============================================================
  //  tc_element_recOfElements_converter
  //===============================================================
  //Passed: TR: HL27438, Old name:tc_element_recOfElements_defaultAttr_converter
  testcase tc_element_recOfElements_converter() runs on xmlTest_CT {

    f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_recordOfElements.xsd","",c_shell_successWithoutWarningAndError)

     if(getverdict==pass) {
       f_compareFiles(
        "www_XmlTest_org_element_recordOfElements_e.ttcn","www_XmlTest_org_element_recordOfElements.ttcn", c_numOfDiff_headerModNameAndNamespace);
     }
  }//tc_

  //Passed, old name: tc_element_recOfElements
  testcase tc_element_recOfElements_encDec() runs on xmlTest_CT {
      f_encDecTest_PersonInfo1();
      f_encDecTest_PersonInfo2();
      f_encDecTest_PersonInfo2_omitOptionals();
//      }
  }//tc_

  //Passed, TR HL27452
  testcase tc_element_recOfElements_defaultAttr_encDec() runs on xmlTest_CT {
      f_encDecTest_PersonInfo2_defaultAttribute();
  }//tc_

  //Passed: TR:27484
  testcase tc_element_recOfElements_defaultElement() runs on xmlTest_CT {

    f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_recordOfElements.xsd","",c_shell_successWithoutWarningAndError)

     if(getverdict==pass) {
       f_compareFiles(
        "www_XmlTest_org_element_recordOfElements_e.ttcn","www_XmlTest_org_element_recordOfElements.ttcn", c_numOfDiff_headerModNameAndNamespace);
      f_encDecTest_PersonInfo1_defaultElement();
     }
  }//tc_

  //Passed
  testcase tc_element_recOfElements_minMaxOccurs() runs on xmlTest_CT {

    f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_recordOfElements4.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_element_recordOfElements4_e.ttcn","www_XmlTest_org_element_recordOfElements4.ttcn", c_numOfDiff_headerModNameAndNamespace);
      f_encDecTest_PersonInfo4();
    }
  }//tc_

   //Passed, TR:HL28010
   testcase tc_element_recOfElements_maxOccursInfinity_converter() runs on xmlTest_CT {

    f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_recordOfElements3.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_element_recordOfElements3_e.ttcn","www_XmlTest_org_element_recordOfElements3.ttcn", c_numOfDiff_headerModNameAndNamespace);
    }

  }//tc_

  //Passed, TR: HL28024
  testcase tc_element_recOfElements_maxOccursInfinity_encoderDecoder() runs on xmlTest_CT {

    f_encDecTest_PersonInfo3();
  }//tc_

  testcase tc_element_recOfElements_anonymousType_conv() runs on xmlTest_CT {

    f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_recordOfElements5.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_element_recordOfElements5_e.ttcn","www_XmlTest_org_element_recordOfElements5.ttcn", c_numOfDiff_headerModNameAndNamespace);
    }

  }//tc_

  testcase tc_element_recOfElements_anonymousType_encDec() runs on xmlTest_CT {
   f_encDecTest_PersonInfo5();
  }//tc_


Elemer Lelik's avatar
Elemer Lelik committed
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
  testcase tc_substitutiongroup() runs on xmlTest_CT {

    f_shellCommandWithVerdict("xsd2ttcn substitutiongroup.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_substitutiongroup_e.ttcn","www_example_org_substitutiongroup.ttcn", c_numOfDiff_headerModNameAndNamespace);
    }

  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
  testcase tc_substitutiongroup_name_as() runs on xmlTest_CT {

    f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_name_as.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_substitutiongroup_name_as_e.ttcn","www_example_org_substitutiongroup_name_as.ttcn", c_numOfDiff_headerModNameAndNamespace);
    }

  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
2123
2124
  testcase tc_substitutiongroup_abstract_block_rest() runs on xmlTest_CT {

Elemer Lelik's avatar
Elemer Lelik committed
2125
    f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_abstract_block_1.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_substitutiongroup_abstract_block_1_e.ttcn",
        "www_example_org_substitutiongroup_abstract_block_1.ttcn", c_numOfDiff_headerModNameAndNamespace);
    }

  }//tc_

  testcase tc_substitutiongroup_abstract_block_ext() runs on xmlTest_CT {

Elemer Lelik's avatar
Elemer Lelik committed
2137
    f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_abstract_block_2.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_substitutiongroup_abstract_block_2_e.ttcn",
        "www_example_org_substitutiongroup_abstract_block_2.ttcn", c_numOfDiff_headerModNameAndNamespace);
    }

  }//tc_

  testcase tc_substitutiongroup_complex_without_element() runs on xmlTest_CT {

Elemer Lelik's avatar
Elemer Lelik committed
2149
    f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_complex_without_element.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_substitutiongroup_complex_without_element_e.ttcn",
        "www_example_org_substitutiongroup_complex_without_element.ttcn", c_numOfDiff_headerModNameAndNamespace);
    }

  }//tc_

  testcase tc_substitutiongroup_long_extension() runs on xmlTest_CT {

Elemer Lelik's avatar
Elemer Lelik committed
2161
    f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_complex_without_element.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
2162
2163
2164
2165
2166
2167
2168
2169
2170

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_substitutiongroup_complex_without_element_e.ttcn",
        "www_example_org_substitutiongroup_complex_without_element.ttcn", c_numOfDiff_headerModNameAndNamespace);
    }

  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
  testcase tc_substitutiongroup_complextype_block() runs on xmlTest_CT {

    f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_complextype_block.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_substitutiongroup_complextype_block_e.ttcn",
        "www_example_org_substitutiongroup_complextype_block.ttcn", c_numOfDiff_headerModNameAndNamespace);
    }

  }//tc_

  //Test if we find the substitutiongroup references in notargetnamespace
  testcase tc_substitutiongroup_notargetnamespace() runs on xmlTest_CT {

    //f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_notargetnamespace.xsd","",c_shell_successWithoutWarningAndError)
    setverdict(pass);

  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
2191
2192
2193
2194
2195
2196
2197
2198
  testcase tc_substitutiongroup_neg() runs on xmlTest_CT {

    f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_neg.xsd","",c_shell_error)

  }//tc_

  testcase tc_substitutiongroup_diff_module() runs on xmlTest_CT {

Elemer Lelik's avatar
Elemer Lelik committed
2199
    f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_main.xsd substitutiongroup_ref.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_substitutiongroup_ref_e.ttcn",
        "www_example_org_substitutiongroup_ref.ttcn", c_numOfDiff_headerModNameAndNamespace);
    }

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_substitutiongroup_main_e.ttcn",
        "www_example_org_substitutiongroup_main.ttcn", c_numOfDiff_headerModNameAndNamespace);
    }

  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353