xmlTest_Testcases.ttcn 105 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
 ******************************************************************************/

//=========================================================================
// 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;

38
39
40
41
42
43
import from www_XmlTest_org_element_anyType all;
import from www_XmlTest_org_complex_all all;
import from www_XmlTest_org_complex_extension all;
import from www_XmlTest_org_complex_restriction all;
import from www_XmlTest_org_complex_import all;
import from www_XmlTest_org_complex_any all;
Elemer Lelik's avatar
Elemer Lelik committed
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

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 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
//=========================================================================

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

testcase tc_xsd2ttcn_versionTest() runs on xmlTest_CT
{
118
  f_shellCommandWithVerdict(xsd2ttcn_command & " -v","",0)
Elemer Lelik's avatar
Elemer Lelik committed
119
120
121
122
123
}

//simple records
testcase tc_firstTrial() runs on xmlTest_CT
{
124
  f_shellCommandWithVerdict(xsd2ttcn_command & " elements.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
125
126
127

  if(getverdict==pass) {
    f_compareFiles(
128
      "www_example_org_elements_e.ttcn","www_example_org_elements.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
129
  }
Elemer Lelik's avatar
Elemer Lelik committed
130
131
132
133
134
135
}

// 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
{
136
  f_shellCommandWithVerdict(xsd2ttcn_command & " po.xsd noTargetNamespace.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
137
138
139

  if(getverdict==pass) {
    f_compareFiles(
140
      "http_www_XmlTest_org_po_e.ttcn","http_www_XmlTest_org_po.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
141
  }
Elemer Lelik's avatar
Elemer Lelik committed
142
143
144
}
testcase tc_empty() runs on xmlTest_CT
{
145
  f_shellCommandWithVerdict(xsd2ttcn_command & " empty.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
146
147
148

  if(getverdict==pass) {
    f_compareFiles(
149
      "www_XmlTest_org_empty_e.ttcn","www_XmlTest_org_empty.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
150
151
152
153
154
  }
}

testcase tc_annotation() runs on xmlTest_CT
{
155
  f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_annotation.xsd","",c_shell_successWithWarning);
Elemer Lelik's avatar
Elemer Lelik committed
156
157
  if(getverdict==pass) {
      f_compareFiles(
158
      "www_XmlTest_org_annotation_e.ttcn","www_XmlTest_org_annotation.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
159
160
161
162
163
    }
}

testcase tc_annotation1() runs on xmlTest_CT
{
164
  f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_annotation1.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
165
  //No f_compareFiles becaulse tc_xml_in_annotation() covering this testcase
Elemer Lelik's avatar
Elemer Lelik committed
166
167
168
169
}

testcase tc_annotation2() runs on xmlTest_CT
{
170
  f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_annotation2.xsd","",c_shell_error);
Elemer Lelik's avatar
Elemer Lelik committed
171
  //No f_compareFiles becaulse tc_xml_in_annotation() covering this testcase
Elemer Lelik's avatar
Elemer Lelik committed
172
173
}

Elemer Lelik's avatar
Elemer Lelik committed
174
175
testcase tc_xml_in_annotation() runs on xmlTest_CT
{
176
  f_shellCommandWithVerdict(xsd2ttcn_command & " xml_in_annotation.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
177
178
  if(getverdict==pass) {
      f_compareFiles(
179
      "www_example_org_xml_in_annotation_e.ttcn","www_example_org_xml_in_annotation.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
180
181
182
    }
}

Elemer Lelik's avatar
Elemer Lelik committed
183
//Incorrect version: 1.1, libxml parser prints warning
Elemer Lelik's avatar
Elemer Lelik committed
184
185
testcase tc_version() runs on xmlTest_CT
{
186
  f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_version.xsd","",c_shell_successWithWarning);
Elemer Lelik's avatar
Elemer Lelik committed
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
}

//************************************
// === 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
{
210
  f_shellCommandWithVerdict(xsd2ttcn_command & " -c XmlTest_annotation.xsd","",c_shell_successWithWarning );
Elemer Lelik's avatar
Elemer Lelik committed
211
  if(getverdict==pass) {
212
    f_compareFiles("www_XmlTest_org_annotation_c_e.ttcn","www_XmlTest_org_annotation.ttcn", c_numOfDiff_ModName);
Elemer Lelik's avatar
Elemer Lelik committed
213
214
215
216
217
218
  }
}

//         -e:             disable the generation of encoding instructions in TTCN-3 modules
testcase tc_options_e() runs on xmlTest_CT
{
219
  f_shellCommandWithVerdict(xsd2ttcn_command & " -e XmlTest_annotation.xsd","",c_shell_successWithWarning );
Elemer Lelik's avatar
Elemer Lelik committed
220
  if(getverdict==pass) {
221
    f_compareFiles("www_XmlTest_org_annotation_e_e.ttcn","www_XmlTest_org_annotation.ttcn", c_numOfDiff_ModName);
Elemer Lelik's avatar
Elemer Lelik committed
222
223
224
225
226
227
  }
}

//         -f file:        the XSD files are taken from file instead of the command line
testcase tc_options_f() runs on xmlTest_CT
{
228
  f_shellCommandWithVerdict(xsd2ttcn_command & " -f XmlTest_files1.txt","",c_shell_successWithWarning );
Elemer Lelik's avatar
Elemer Lelik committed
229
  if(getverdict==pass) {
230
    f_compareFiles("www_XmlTest_org_annotation2_e.ttcn","www_XmlTest_org_annotation.ttcn", c_numOfDiff_ModName);
Elemer Lelik's avatar
Elemer Lelik committed
231
232
233
  }
}

234
235
236
237
238
239
240
241
242
//         -J file:        the XSD files are taken from file instead of the command line
testcase tc_options_J() runs on xmlTest_CT
{
  f_shellCommandWithVerdict(xsd2ttcn_command & " -J XmlTest_files1.txt","",c_shell_successWithWarning );
  if(getverdict==pass) {
    f_compareFiles("www_XmlTest_org_annotation2_e.ttcn","www_XmlTest_org_annotation.ttcn", c_numOfDiff_ModName);
  }
}

Elemer Lelik's avatar
Elemer Lelik committed
243
244
testcase tc_options_g() runs on xmlTest_CT
{
245
  f_shellCommandWithVerdict(xsd2ttcn_command & " -g dont_generate_element_substitution.xsd","",c_shell_successWithoutWarningAndError );
Elemer Lelik's avatar
Elemer Lelik committed
246
247
  if(getverdict==pass) {
    f_compareFiles("www_example_org_dont_generate_element_substitution_e.ttcn",
248
                   "www_example_org_dont_generate_element_substitution.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
249
250
  }

251
  f_shellCommandWithVerdict(xsd2ttcn_command & " generate_element_substitution.xsd","",c_shell_successWithoutWarningAndError );
Elemer Lelik's avatar
Elemer Lelik committed
252
253
  if(getverdict==pass) {
    f_compareFiles("www_example_org_generate_element_substitution_e.ttcn",
254
                   "www_example_org_generate_element_substitution.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
255
256
257
  }
}

Elemer Lelik's avatar
Elemer Lelik committed
258
259
260
261
262
263
264
//-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 );

265
  f_shellCommandWithVerdict(xsd2ttcn_command & " -p XmlTest_annotation.xsd","",c_shell_successWithWarning );
Elemer Lelik's avatar
Elemer Lelik committed
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
  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 );

284
  f_shellCommandWithVerdict(xsd2ttcn_command & " -s XmlTest_annotation.xsd","",c_shell_successWithoutWarningAndError );
Elemer Lelik's avatar
Elemer Lelik committed
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
  //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
{
302
  f_shellCommandWithVerdict(xsd2ttcn_command & " -t  XmlTest_annotation.xsd","",c_shell_successWithWarning );
Elemer Lelik's avatar
Elemer Lelik committed
303
  if(getverdict==pass) {
304
    f_compareFiles("www_XmlTest_org_annotation_t_e.ttcn","www_XmlTest_org_annotation.ttcn", c_numOfDiff_ModName);
Elemer Lelik's avatar
Elemer Lelik committed
305
306
307
308
309
310
311
  }
}

//         -v:             show version information
//TODO:Not ready yet
testcase tc_options_v() runs on xmlTest_CT
{
312
  f_shellCommandWithVerdict(xsd2ttcn_command & " -v","",c_shell_successWithoutWarningAndError );
Elemer Lelik's avatar
Elemer Lelik committed
313
314
315
316
317
318
}

//TODO:Not ready yet
//         -q:             quiet - disable the issue of status messages
testcase tc_options_V() runs on xmlTest_CT
{
319
  f_shellCommandWithVerdict(xsd2ttcn_command & " -q XmlTest_annotation.xsd","",c_shell_successWithWarning);
Elemer Lelik's avatar
Elemer Lelik committed
320
321
322
323
324
}

//         -w:             suppress warnings
testcase tc_options_w() runs on xmlTest_CT
{
325
  f_shellCommandWithVerdict(xsd2ttcn_command & " -w XmlTest_annotation.xsd","",c_shell_successWithoutWarningAndError );
Elemer Lelik's avatar
Elemer Lelik committed
326
327
328
329
330
331
}

//TODO:Not ready yet
//         -x:             disable schema validation but generate TTCN-3 modules
testcase tc_options_x() runs on xmlTest_CT
{
332
  f_shellCommandWithVerdict(xsd2ttcn_command & " -x XmlTest_annotation.xsd","",c_shell_successWithWarning);
Elemer Lelik's avatar
Elemer Lelik committed
333
334
335
336
}

testcase tc_options_wrong() runs on xmlTest_CT
{
337
  f_shellCommandWithVerdict(xsd2ttcn_command & " -H XmlTest_annotation.xsd","", c_shell_error);
Elemer Lelik's avatar
Elemer Lelik committed
338
339
340
341
}

testcase tc_options_missing() runs on xmlTest_CT
{
342
  f_shellCommandWithVerdict("xsd2ttcn","",c_shell_successWithoutWarningAndError );
Elemer Lelik's avatar
Elemer Lelik committed
343
344
345
346
347
348
  //TODO: check the output
}


testcase tc_XmlTest_label() runs on xmlTest_CT
{
349
  f_shellCommandWithVerdict(xsd2ttcn_command & " -x XmlTest_label.xsd","",c_shell_successWithoutWarningAndError );
Elemer Lelik's avatar
Elemer Lelik committed
350
351
352
353
}

testcase tc_XmlTest_definition() runs on xmlTest_CT
{
354
  f_shellCommandWithVerdict(xsd2ttcn_command & " -x XmlTest_definition.xsd","",c_shell_successWithoutWarningAndError );
Elemer Lelik's avatar
Elemer Lelik committed
355
356
357
358
359
360
361
362
363
}
//************************************
//  Testcases_basedOnTtcnStandard9
//************************************
group Testcases_basedOnTtcnStandard9 {

  //Passed
  testcase tc_XmlTest_all() runs on xmlTest_CT
  {
364
    f_shellCommandWithVerdict(xsd2ttcn_command & " all.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
365
366
    if(getverdict==pass) {
      f_compareFiles(
367
	"www_example_org_all_e.ttcn","www_example_org_all.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
368
369
370
371
372
    }
  }

  testcase tc_element_in_all_neg() runs on xmlTest_CT
  {
373
    f_shellCommandWithVerdict(xsd2ttcn_command & " element_in_all_minmax.xsd","",c_shell_error);
Elemer Lelik's avatar
Elemer Lelik committed
374
375
376
377
378
  }

  //Passed
  testcase tc_XmlTest_any_anyAttribute() runs on xmlTest_CT
  {
379
    f_shellCommandWithVerdict(xsd2ttcn_command & " any_anyAttribute.xsd","",c_shell_successWithWarning);
Elemer Lelik's avatar
Elemer Lelik committed
380
381
382

    if(getverdict==pass) {
      f_compareFiles(
383
	"http_www_example_org_ttcn_wildcards_e.ttcn","http_www_example_org_ttcn_wildcards.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
384
    }
Elemer Lelik's avatar
Elemer Lelik committed
385
386
387
388
389
390
391
  }

  //HQ73011
  //Heading: XSD anyAtribute is inserted into a wrong place
  //Passed
  testcase tc_XmlTest_HQ73011() runs on xmlTest_CT
  {
392
  f_shellCommandWithVerdict(xsd2ttcn_command & " HQ73011.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
393
394
    if(getverdict==pass) {
      f_compareFiles(
395
        "urn_ietf_params_xml_ns_conference_info_e.ttcn","urn_ietf_params_xml_ns_conference_info.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
396
397
398
    }
  }

Elemer Lelik's avatar
Elemer Lelik committed
399
400
  testcase tc_anyattribute_optional() runs on xmlTest_CT
  {
401
  f_shellCommandWithVerdict(xsd2ttcn_command & " anyattribute_optional.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
402
403
    if(getverdict==pass) {
      f_compareFiles(
404
        "http_www_example_org_wildcards_e.ttcn","http_www_example_org_wildcards.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
405
406
407
408
409
    }
  }

  testcase tc_anyattribute_single() runs on xmlTest_CT
  {
410
  f_shellCommandWithVerdict(xsd2ttcn_command & " anyattrib_single.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
411
412
    if(getverdict==pass) {
      f_compareFiles(
413
        "www_example_org_anyattrib_single_e.ttcn","www_example_org_anyattrib_single.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
414
415
416
417
418
    }
  }

  testcase tc_anyattribute_in_complex() runs on xmlTest_CT
  {
419
  f_shellCommandWithVerdict(xsd2ttcn_command & " anyattr_in_complex.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
420
421
    if(getverdict==pass) {
      f_compareFiles(
422
        "www_example_org_anyattr_in_complex_e.ttcn","www_example_org_anyattr_in_complex.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
423
424
425
426
    }
  }


Elemer Lelik's avatar
Elemer Lelik committed
427
428
429
  //Passed
  testcase tc_XmlTest_attributeGroup() runs on xmlTest_CT
  {
430
    f_shellCommandWithVerdict(xsd2ttcn_command & " attributeGroup.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
431
432
433

    if(getverdict==pass) {
      f_compareFiles(
434
        "www_example_org_attributegroup_e.ttcn","www_example_org_attributegroup.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
435
    }
Elemer Lelik's avatar
Elemer Lelik committed
436
437
438
439
440
  }

  //double schema definition - Validator Returns with Error, Passed
  testcase tc_XmlTest_attribute_use_noTNS() runs on xmlTest_CT
  {
441
    f_shellCommandWithVerdict(xsd2ttcn_command & " attribute_use_noTNS.xsd","",c_shell_error);
Elemer Lelik's avatar
Elemer Lelik committed
442
443
  }

Elemer Lelik's avatar
Elemer Lelik committed
444
445
  testcase tc_id_attribute() runs on xmlTest_CT
  {
446
    f_shellCommandWithVerdict(xsd2ttcn_command & " id_attrib.xsd","",c_shell_successWithWarning);
Elemer Lelik's avatar
Elemer Lelik committed
447
448
    if(getverdict==pass) {
      f_compareFiles(
449
        "www_example_org_id_attrib_e.ttcn", "www_example_org_id_attrib.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
450
451
452
453
454
    }
  }

  testcase tc_attribute_order() runs on xmlTest_CT
  {
455
    f_shellCommandWithVerdict(xsd2ttcn_command & " attrib_order_a.xsd attrib_order_b.xsd attrib_order_c.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
456
457
    if(getverdict==pass) {
      f_compareFiles(
458
        "www_example_org_attrib_order_a_e.ttcn", "www_example_org_attrib_order_a.ttcn", c_numOfDiff+1); // +1: imported module
Elemer Lelik's avatar
Elemer Lelik committed
459
460
461
462
    }

    if(getverdict==pass) {
      f_compareFiles(
463
        "www_example_org_attrib_order_b_e.ttcn", "www_example_org_attrib_order_b.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
464
465
466
467
468
    }
  }

  testcase tc_name_conv_non_alphanumeric() runs on xmlTest_CT
  {
469
    f_shellCommandWithVerdict(xsd2ttcn_command & " name_conv_non_alphanumeric.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
470
471
472
    if(getverdict==pass) {
      f_compareFiles(
        "http_www_example_org_name_conv2_e.ttcn",
473
        "http_www_example_org_name_conv2.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
474
475
476
477
    }
  }

  testcase tc_module_name_convert_with_diff_namespace() runs on xmlTest_CT {
478
    f_shellCommandWithVerdict(xsd2ttcn_command & " imported_module.xsd imported_module_.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
479
480
481

    if(getverdict==pass) {
      f_compareFiles(
482
        "imported_module_e.ttcn","imported_module.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
483
484
485
486
    }

    if(getverdict==pass) {
      f_compareFiles(
487
        "imported_module_1_e.ttcn","imported_module_1.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
488
489
490
491
    }
  }//tc_

  testcase tc_module_typename_conversion() runs on xmlTest_CT {
492
    f_shellCommandWithVerdict(xsd2ttcn_command & " module_typename_conversion.xsd module_typename_conversion_1.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
493
494
495

    if(getverdict==pass) {
      f_compareFiles(
496
        "module_typename_conversion_e.ttcn","module_typename_conversion.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
497
498
499
500
    }

    if(getverdict==pass) {
      f_compareFiles(
501
        "MyTypes_e.ttcn","MyTypes.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
502
503
504
505
506
    }
  }//tc_

  testcase tc_name_conv_remove_seq_of_low_line() runs on xmlTest_CT
  {
507
    f_shellCommandWithVerdict(xsd2ttcn_command & " name_conv_remove_seq_of_low_line.xsd","",
Elemer Lelik's avatar
Elemer Lelik committed
508
509
510
511
                              c_shell_successWithoutWarningAndError);
    if(getverdict==pass) {
      f_compareFiles(
        "http_www_example_org_name_conv3_e.ttcn",
512
        "http_www_example_org_name_conv3.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
513
514
515
516
517
    }
  }

  testcase tc_name_conv_with_z() runs on xmlTest_CT
  {
518
    f_shellCommandWithVerdict(xsd2ttcn_command & " -z name_conv_with_z.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
519
520
521
    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_name_conv_http_e.ttcn",
522
        "www_example_org_name_conv_http.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
523
524
525
526
527
    }
  }

  testcase tc_comment_placement() runs on xmlTest_CT
  {
528
    f_shellCommandWithVerdict(xsd2ttcn_command & " comment_placement.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
529
530
531
    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_comment_placement_e.ttcn",
532
        "www_example_org_comment_placement.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
533
534
535
    }
  }

Elemer Lelik's avatar
Elemer Lelik committed
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
}//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
  {
551
    f_shellCommandWithVerdict(xsd2ttcn_command & " -z XmlTest_string.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
552
553
554
    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_string.ttcn",
555
        "www_XmlTest_org_string_e.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
556
557
558
559
560
561
562
563
564
565
566
567
568
569
    }
////////////////////////////////////////////
//
//    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
  {
570
    f_shellCommandWithVerdict(xsd2ttcn_command & " -z XmlTest_string_withWhitespace.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
571
572
573
    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_string_withWhitespace.ttcn",
574
        "www_XmlTest_org_string_withWhitespace_e.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
575
576
577
578
579
580
581
582
583
    }
    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
  {
584
    f_shellCommandWithVerdict(xsd2ttcn_command & " -z XmlTest_string_withEnum.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
585
586
587
    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_string_withEnum.ttcn",
588
        "www_XmlTest_org_string_withEnum_e.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
    }
    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
  {
604
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withPosLength.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
605
606
607
    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_string_withPosLength.ttcn",
608
        "www_XmlTest_org_string_withPosLength_e.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
609
610
611
612
613
614
    }
  }

  //Passed, returs with error
  testcase tc_string_withEmptyLength() runs on xmlTest_CT
  {
615
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withEmptyLength.xsd","",c_shell_error)
Elemer Lelik's avatar
Elemer Lelik committed
616
617
618
619
  }

  testcase tc_string_withNegativeLength() runs on xmlTest_CT
  {
620
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withNegativeLength.xsd","",c_shell_error)
Elemer Lelik's avatar
Elemer Lelik committed
621
622
623
624
625
  }

  //Passed
  testcase tc_string_withFixedLength() runs on xmlTest_CT
  {
626
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withFixedLength.xsd","",c_shell_error);
Elemer Lelik's avatar
Elemer Lelik committed
627
628
629
630
  }

  testcase tc_fixed_value() runs on xmlTest_CT
  {
631
    f_shellCommandWithVerdict(xsd2ttcn_command & " fixed_value.xsd","",c_shell_successWithWarning);
Elemer Lelik's avatar
Elemer Lelik committed
632
633
634
    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_fixed_value.ttcn",
635
        "www_example_org_fixed_value_e.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
636
    }
Elemer Lelik's avatar
Elemer Lelik committed
637
638
639
640
641
  }

  //Passed
  testcase tc_string_withFloatLength() runs on xmlTest_CT
  {
642
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withFloatLength.xsd","", c_shell_error)
Elemer Lelik's avatar
Elemer Lelik committed
643
644
645
646
647
648
  }

  //===minLength===
  //Passed, TR: HL21690
  testcase tc_string_withPosMinLength() runs on xmlTest_CT
  {
649
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withMinLength.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
650
651
652
    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_string_withMinLength.ttcn",
653
        "www_XmlTest_org_string_withMinLength_e.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
654
655
656
657
658
659
    }
  }

  //Passed
  testcase tc_string_withEmptyMin() runs on xmlTest_CT
  {
660
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withEmptyMin.xsd","",c_shell_error)
Elemer Lelik's avatar
Elemer Lelik committed
661
662
663
664
665
  }

  //Passed
  testcase tc_string_withNegativeMin() runs on xmlTest_CT
  {
666
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withNegativeMin.xsd","",c_shell_error)
Elemer Lelik's avatar
Elemer Lelik committed
667
668
669
670
671
672
  }

  //===maxLength===
  //Passed
  testcase tc_string_withPosMax() runs on xmlTest_CT
  {
673
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withPosMax.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
674
675
    if(getverdict==pass) {
      f_compareFiles(
676
        "www_XmlTest_org_string_withPosMax_e.ttcn","www_XmlTest_org_string_withPosMax.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
677
678
679
680
681
682
    }
  }

  //Passed
  testcase tc_string_withEmptyMax() runs on xmlTest_CT
  {
683
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withEmptyMax.xsd","",c_shell_error)
Elemer Lelik's avatar
Elemer Lelik committed
684
685
686
687
688
  }

  //Passed
  testcase tc_string_withNegativeMax() runs on xmlTest_CT
  {
689
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withNegativeMax.xsd","",c_shell_error)
Elemer Lelik's avatar
Elemer Lelik committed
690
691
692
693
694
  }
  //=== minLength>maxLength
  //Passed, TR:
  testcase tc_string_withFaultyMinMaxLength() runs on xmlTest_CT
  {
695
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_string_withFaultyMinMax.xsd","",c_shell_error)
Elemer Lelik's avatar
Elemer Lelik committed
696
697
698
699
  }
  //Passed
  testcase tc_string_withOverDefinition() runs on xmlTest_CT
  {
700
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_string_withOverDefinition.xsd","",c_shell_error)
Elemer Lelik's avatar
Elemer Lelik committed
701
702
703
704
  }

  testcase tc_string_withTypeAndBase() runs on xmlTest_CT
  {
705
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_string_withTypeAndBase.xsd","",c_shell_error)
Elemer Lelik's avatar
Elemer Lelik committed
706
  }
Elemer Lelik's avatar
Elemer Lelik committed
707
708
709

  //testcase tc_string_pattern_square_brackets() runs on xmlTest_CT
  //{
710
  //  f_shellCommandWithVerdict(xsd2ttcn_command & " regex_square_brackets.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
711
712
  //  if(getverdict==pass) {
  //    f_compareFiles(
713
  //      "www_example_org_regex_square_brackets_e.ttcn","www_example_org_regex_square_brackets.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
714
715
  //  }
  //}
Elemer Lelik's avatar
Elemer Lelik committed
716
717
718
719
720
721
722
723
724
}//StringTest

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

  //TODO: check warning sending for not supported:features
  testcase tc_boolean() runs on xmlTest_CT {
725
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_boolean.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
726
727
    if(getverdict==pass) {
      f_compareFiles(
728
        "www_XmlTest_org_boolean_e.ttcn","www_XmlTest_org_boolean.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
729
730
    }
  }
Elemer Lelik's avatar
Elemer Lelik committed
731
732

  testcase tc_boolean_variant_commented() runs on xmlTest_CT {
733
    f_shellCommandWithVerdict(xsd2ttcn_command & "  boolean_variant_commented.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
734
735
736
    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_boolean_variant_commented_e.ttcn",
737
        "www_example_org_boolean_variant_commented.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
738
739
    }
  }
Elemer Lelik's avatar
Elemer Lelik committed
740
741
742
743
744
745
746
747
748
749
}//BooleanTest


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

  //Passed
  testcase tc_decimal() runs on xmlTest_CT {
750
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_decimal.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
751
752
753
    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_decimal_e.ttcn",
754
        "www_XmlTest_org_decimal.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
755
756
757
758
759
    }
  }

  //!!!!!Length not supported!!!!
  //   testcase tc_decimal_withLength() runs on xmlTest_CT {
760
  //     f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_decimal_withLength.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
761
762
763
  //     if(getverdict==pass) {
  //       f_compareFiles(
  //         "www_XmlTest_org_decimal_withLength_e.ttcn",
764
  //         "www_XmlTest_org_decimal_withLength.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
765
766
767
768
769
770
  //     }
  //   }

  //TR: Generates integer limits instead of decimal
  //TR: HL2715 -Solved
  testcase tc_decimal_withMinMaxInclusive() runs on xmlTest_CT {
771
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_decimal_withMinMaxInclusive.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
772
773
774
775

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_decimal_withMinMaxInclusive_e.ttcn",
776
        "www_XmlTest_org_decimal_withMinMaxInclusive.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
777
778
779
780
781
    }
  }//tc_

  //TR21266 -Solved
  testcase tc_decimal_withMinMaxExclusive() runs on xmlTest_CT {
782
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_decimal_withMinMaxExclusive.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
783
784
785
786

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_decimal_withMinMaxExclusive_e.ttcn",
787
        "www_XmlTest_org_decimal_withMinMaxExclusive.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
788
789
790
791
792
    }
  }//tc_

  //TR HL21296
  testcase tc_decimal_withEnum() runs on xmlTest_CT {
793
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_decimal_withEnum.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
794
795
796
797

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_decimal_withEnum_e.ttcn",
798
        "www_XmlTest_org_decimal_withEnum.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
799
800
    }
  }
Elemer Lelik's avatar
Elemer Lelik committed
801
802

  testcase tc_decimal_fractiondigits() runs on xmlTest_CT {
803
    f_shellCommandWithVerdict(xsd2ttcn_command & "  decimal_fractiondigits.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
804
805
806
807

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_decimal_fractiondigits_e.ttcn",
808
        "www_example_org_decimal_fractiondigits.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
809
810
    }
  }
Elemer Lelik's avatar
Elemer Lelik committed
811
812
813
814
815
816
817
818
819
}//DecimalTest

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

  testcase tc_integer() runs on xmlTest_CT {
820
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_integer.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
821
822
823
824

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_integer_e.ttcn",
825
        "www_XmlTest_org_integer.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
826
827
828
829
830
831
    }

  }//tc_

  //negative test
  testcase tc_integer_empty1() runs on xmlTest_CT {
832
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_integer_empty1.xsd","",c_shell_error)
Elemer Lelik's avatar
Elemer Lelik committed
833
834
835
836
  }//tc_

  //negative test
  testcase tc_integer_withLength() runs on xmlTest_CT {
837
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_integer_withLength.xsd","",c_shell_error)
Elemer Lelik's avatar
Elemer Lelik committed
838
839
840
841
  }//tc_

  //Ready, passed, TR:HL21694 -solved
  testcase tc_integer_withEnum() runs on xmlTest_CT {
842
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_integer_withEnum.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
843
844
845

    if(getverdict==pass) {
      f_compareFiles(
846
        "www_XmlTest_org_integer_withEnum_e.ttcn","www_XmlTest_org_integer_withEnum.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
847
848
849
850
851
    }
  }//tc_

  //Passed
  testcase tc_integer_withMinIncl() runs on xmlTest_CT {
852
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_integer_withMinIncl.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
853
854
855
856

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_integer_withMinIncl_e.ttcn",
857
        "www_XmlTest_org_integer_withMinIncl.ttcn",c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
858
859
860
861
862
    }
  }//tc_

  //Passed
  testcase tc_integer_withMaxIncl() runs on xmlTest_CT {
863
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_integer_withMaxIncl.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
864
865
866

    if(getverdict==pass) {
      f_compareFiles(
867
        "www_XmlTest_org_integer_withMaxIncl_e.ttcn","www_XmlTest_org_integer_withMaxIncl.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
868
869
870
871
872
    }
  }//tc_

  //Passed
  testcase tc_integer_withMinExcl() runs on xmlTest_CT {
873
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_integer_withMinExcl.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
874
875
876
877

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_integer_withMinExcl_e.ttcn",
878
        "www_XmlTest_org_integer_withMinExcl.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
879
880
881
882
883
    }
  }//tc_

  //Passed
  testcase tc_integer_withMaxExcl() runs on xmlTest_CT {
884
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_integer_withMaxExcl.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
885
886
887

    if(getverdict==pass) {
      f_compareFiles(
888
        "www_XmlTest_org_integer_withMaxExcl_e.ttcn","www_XmlTest_org_integer_withMaxExcl.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
889
890
891
892
893
894
    }
  }//tc_


}//IntegerTest

Elemer Lelik's avatar
Elemer Lelik committed
895
896

  testcase tc_float_not_a_number() runs on xmlTest_CT {
897
    f_shellCommandWithVerdict(xsd2ttcn_command & "  not_a_number_minex_inf_maxex_-inf.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
898
899
900
901

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_not_a_number_minex_inf_maxex_inf_e.ttcn",
902
        "www_example_org_not_a_number_minex_inf_maxex_inf.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
903
904
905
    }
  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
906
907
908
  //
  testcase tc_simpleType_enum() runs on xmlTest_CT {

909
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_simple_enum.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
910
911
912

    if(getverdict==pass) {
      f_compareFiles(
913
        "www_XmlTest_org_simple_enum_e.ttcn","www_XmlTest_org_simple_enum.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
914
915
916
917
    }

  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
918
919
  testcase tc_simpleType_restrict_comp() runs on xmlTest_CT {

920
    f_shellCommandWithVerdict(xsd2ttcn_command & "  simpletype_restrict_comp.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
921
922
923

    if(getverdict==pass) {
      f_compareFiles(
924
        "www_example_org_simpletype_restrict_comp_e.ttcn","www_example_org_simpletype_restrict_comp.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
925
926
927
928
929
930
    }

  }//tc_

  testcase tc_simpleType_ref() runs on xmlTest_CT {

931
    f_shellCommandWithVerdict(xsd2ttcn_command & "  simpletype_ref.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
932
933
934

    if(getverdict==pass) {
      f_compareFiles(
935
        "www_example_org_simpletype_ref_e.ttcn","www_example_org_simpletype_ref.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
936
937
938
939
940
941
    }

  }//tc_

  testcase tc_simpleType_base() runs on xmlTest_CT {

942
    f_shellCommandWithVerdict(xsd2ttcn_command & "  simpletype_base.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
943
944
945

    if(getverdict==pass) {
      f_compareFiles(
946
        "www_example_org_simpletype_base_e.ttcn","www_example_org_simpletype_base.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
947
948
949
950
951
952
953
    }

  }//tc_

  //
  testcase tc_enum_field_names() runs on xmlTest_CT {

954
    f_shellCommandWithVerdict(xsd2ttcn_command & "  enum_field_names.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
955
956
957

    if(getverdict==pass) {
      f_compareFiles(
958
        "www_example_org_enum_field_names_e.ttcn","www_example_org_enum_field_names.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
959
960
961
962
    }

  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
963
964
  testcase tc_attribute_enumeration_variant() runs on xmlTest_CT {

965
    f_shellCommandWithVerdict(xsd2ttcn_command & "  attribute_enumeration_variant.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
966
967
968

    if(getverdict==pass) {
      f_compareFiles(
969
        "www_example_org_attribute_enumeration_variant_e.ttcn","www_example_org_attribute_enumeration_variant.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
970
971
972
    }
  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
973
974
975
976
977
978
979
980
981

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

  //Passed:
  testcase tc_time() runs on xmlTest_CT {
982
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_time.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
983
984
985

    if(getverdict==pass) {
      f_compareFiles(
986
        "www_XmlTest_org_time_e.ttcn","www_XmlTest_org_time.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
987
988
989
990
991
    }
  }//tc_

  //Passed TR HL22058
  testcase tc_time_withEnum() runs on xmlTest_CT {
992
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_time_withEnum.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
993
994
995

    if(getverdict==pass) {
      f_compareFiles(
996
        "www_XmlTest_org_time_withEnum_e.ttcn","www_XmlTest_org_time_withEnum.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
997
998
999
1000
1001
1002
1003
1004
    }
  }//tc_
}//TimeTest

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

1005
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_list.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1006
1007
1008

    if(getverdict==pass) {
      f_compareFiles(
1009
        "www_XmlTest_org_list_e.ttcn","www_XmlTest_org_list.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
    }

    // 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 {

1021
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_list_integer.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1022
1023
1024

    if(getverdict==pass) {
      f_compareFiles(
1025
        "www_XmlTest_org_list_integer_e.ttcn","www_XmlTest_org_list_integer.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
1026
1027
1028
    }

  }//tc_
Elemer Lelik's avatar
Elemer Lelik committed
1029
1030
1031

  testcase tc_list_simpletype() runs on xmlTest_CT {

1032
    f_shellCommandWithVerdict(xsd2ttcn_command & "  list_simpletype.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1033
1034
1035

    if(getverdict==pass) {
      f_compareFiles(
1036
        "www_example_org_list_simpletype_e.ttcn","www_example_org_list_simpletype.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
1037
1038
1039
    }

  }//tc_
ebensza's avatar
ebensza committed
1040
1041
1042

  testcase tc_list_complextype() runs on xmlTest_CT {

1043
    f_shellCommandWithVerdict(xsd2ttcn_command & "  list_complextype.xsd","",c_shell_successWithoutWarningAndError)
ebensza's avatar
ebensza committed
1044
1045
1046

    if(getverdict==pass) {
      f_compareFiles(
1047
        "www_example_org_list_complextype_e.ttcn","www_example_org_list_complextype.ttcn", c_numOfDiff);
ebensza's avatar
ebensza committed
1048
1049
1050
    }

  }//tc_
1051
1052
1053
1054
1055
1056
1057

  testcase tc_list_minmaxoccurs() runs on xmlTest_CT {

    f_shellCommandWithVerdict(xsd2ttcn_command & "  listMinMaxOccurs.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
1058
        "http_www_example_org_list_minmaxoccurs_e.ttcn","http_www_example_org_list_minmaxoccurs.ttcn", c_numOfDiff);
1059
1060
1061
    }

  }//tc_
Elemer Lelik's avatar
Elemer Lelik committed
1062
1063
1064
1065
1066
1067
}//ListTest

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

1068
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_union.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1069
1070
1071

    if(getverdict==pass) {
      f_compareFiles(
1072
        "www_XmlTest_org_union_e.ttcn","www_XmlTest_org_union.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
1073
1074
1075
1076
1077
    }
  }//tc_
  
  testcase tc_union_optional() runs on xmlTest_CT {

1078
    f_shellCommandWithVerdict(xsd2ttcn_command & "  ETSI_CR5852_union.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1079
1080
1081

    if(getverdict==pass) {
      f_compareFiles(
1082
        "ETSI_CR5852_union_e.ttcn","ETSI_CR5852_union.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
1083
1084
1085
    }
  }

Elemer Lelik's avatar
Elemer Lelik committed
1086
1087
 testcase tc_enumeration_union_restriction() runs on xmlTest_CT {

1088
    f_shellCommandWithVerdict(xsd2ttcn_command & "  enumeration_restriction.xsd","",c_shell_successWithWarning)
Elemer Lelik's avatar
Elemer Lelik committed
1089
1090
1091
1092

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_enumeration_restriction_e.ttcn",
1093
        "www_example_org_enumeration_restriction.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
1094
1095
1096
1097
1098
    }
  }

 testcase tc_enumeration_union_restriction2() runs on xmlTest_CT {

1099
    f_shellCommandWithVerdict(xsd2ttcn_command & "  enumeration_restriction2.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1100
1101
1102
1103

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_seq_enumeration_restriction_e.ttcn",
1104
        "www_example_org_seq_enumeration_restriction.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
1105
1106
1107
    }
  }

1108
1109
 testcase tc_enumeration_restriction3() runs on xmlTest_CT {

1110
    f_shellCommandWithVerdict(xsd2ttcn_command & "  enumeration_restriction3.xsd","",c_shell_successWithoutWarningAndError)
1111
1112
1113
1114

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_enumeration_restriction3_e.ttcn",
1115
        "www_example_org_enumeration_restriction3.ttcn", c_numOfDiff);
1116
1117
1118
1119
    }
  }


Elemer Lelik's avatar
Elemer Lelik committed
1120
1121
 testcase tc_enumeration_remove_dup() runs on xmlTest_CT {

1122
    f_shellCommandWithVerdict(xsd2ttcn_command & "  enumeration_remove_dup.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1123
1124
1125
1126

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_enumeration_remove_dup_e.ttcn",
1127
        "www_example_org_enumeration_remove_dup.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
1128
1129
1130
    }
  }

Elemer Lelik's avatar
Elemer Lelik committed
1131
1132
1133
1134
1135
1136
1137
1138
}//UnionTest



group ComplexType {

  testcase tc_complex1() runs on xmlTest_CT {

1139
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_complex1.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1140
1141
1142

     if(getverdict==pass) {
       f_compareFiles(
1143
        "www_XmlTest_org_complex1_e.ttcn","www_XmlTest_org_complex1.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
1144
1145
1146
1147
1148
1149
1150
       f_encDecTest_InternationalPrice();
     }
  }//tc_

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

1151
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_complex2.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1152
1153
1154

    if(getverdict==pass) {
      f_compareFiles(
1155
        "www_XmlTest_org_complex2_e.ttcn","www_XmlTest_org_complex2.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
1156
1157
1158
1159
1160
1161
1162
1163
    }
    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 {

1164
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_complex_simpleContent.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1165
1166
1167

     if(getverdict==pass) {
       f_compareFiles(
1168
        "www_XmlTest_org_complex_simpleContent_e.ttcn","www_XmlTest_org_complex_simpleContent.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
1169
1170
1171
1172
1173
1174
      f_encDecTest_ComplexTypeWithSimpleContent1();
      f_encDecTest_ComplexTypeWithSimpleContent2();
      f_encDecTest_ComplexTypeWithSimpleContent2_neg();
     }
  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
1175
1176
  testcase tc_complex_namespaceas() runs on xmlTest_CT {

1177
    f_shellCommandWithVerdict(xsd2ttcn_command & " namespaceas.xsd imported2.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1178
1179
1180

     if(getverdict==pass) {
       f_compareFiles(
1181
        "www_example_org_namespaceas_e.ttcn","www_example_org_namespaceas.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
1182
       f_compareFiles(
1183
        "www_example_org_imported2_e.ttcn","www_example_org_imported2.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
1184
1185
1186
     }
  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
1187
1188
  testcase tc_complex_mixed_conv() runs on xmlTest_CT {

1189
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_complex_mixed.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1190
1191
1192

     if(getverdict==pass) {
       f_compareFiles(
1193
        "www_XmlTest_org_complex_mixed_e.ttcn","www_XmlTest_org_complex_mixed.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
1194
1195
1196
     }
  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
1197
1198
  testcase tc_complex_group_reference() runs on xmlTest_CT {

1199
    f_shellCommandWithVerdict(xsd2ttcn_command & "  seq_group_reference.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1200
1201
1202

     if(getverdict==pass) {
       f_compareFiles(
1203
        "www_example_org_seq_group_reference_e.ttcn","www_example_org_seq_group_reference.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed