xmlTest_Testcases.ttcn 104 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
  }
}

Elemer Lelik's avatar
Elemer Lelik committed
234
235
testcase tc_options_g() runs on xmlTest_CT
{
236
  f_shellCommandWithVerdict(xsd2ttcn_command & " -g dont_generate_element_substitution.xsd","",c_shell_successWithoutWarningAndError );
Elemer Lelik's avatar
Elemer Lelik committed
237
238
  if(getverdict==pass) {
    f_compareFiles("www_example_org_dont_generate_element_substitution_e.ttcn",
239
                   "www_example_org_dont_generate_element_substitution.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
240
241
  }

242
  f_shellCommandWithVerdict(xsd2ttcn_command & " generate_element_substitution.xsd","",c_shell_successWithoutWarningAndError );
Elemer Lelik's avatar
Elemer Lelik committed
243
244
  if(getverdict==pass) {
    f_compareFiles("www_example_org_generate_element_substitution_e.ttcn",
245
                   "www_example_org_generate_element_substitution.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
246
247
248
  }
}

Elemer Lelik's avatar
Elemer Lelik committed
249
250
251
252
253
254
255
//-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 );

256
  f_shellCommandWithVerdict(xsd2ttcn_command & " -p XmlTest_annotation.xsd","",c_shell_successWithWarning );
Elemer Lelik's avatar
Elemer Lelik committed
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
  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 );

275
  f_shellCommandWithVerdict(xsd2ttcn_command & " -s XmlTest_annotation.xsd","",c_shell_successWithoutWarningAndError );
Elemer Lelik's avatar
Elemer Lelik committed
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
  //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
{
293
  f_shellCommandWithVerdict(xsd2ttcn_command & " -t  XmlTest_annotation.xsd","",c_shell_successWithWarning );
Elemer Lelik's avatar
Elemer Lelik committed
294
  if(getverdict==pass) {
295
    f_compareFiles("www_XmlTest_org_annotation_t_e.ttcn","www_XmlTest_org_annotation.ttcn", c_numOfDiff_ModName);
Elemer Lelik's avatar
Elemer Lelik committed
296
297
298
299
300
301
302
  }
}

//         -v:             show version information
//TODO:Not ready yet
testcase tc_options_v() runs on xmlTest_CT
{
303
  f_shellCommandWithVerdict(xsd2ttcn_command & " -v","",c_shell_successWithoutWarningAndError );
Elemer Lelik's avatar
Elemer Lelik committed
304
305
306
307
308
309
}

//TODO:Not ready yet
//         -q:             quiet - disable the issue of status messages
testcase tc_options_V() runs on xmlTest_CT
{
310
  f_shellCommandWithVerdict(xsd2ttcn_command & " -q XmlTest_annotation.xsd","",c_shell_successWithWarning);
Elemer Lelik's avatar
Elemer Lelik committed
311
312
313
314
315
}

//         -w:             suppress warnings
testcase tc_options_w() runs on xmlTest_CT
{
316
  f_shellCommandWithVerdict(xsd2ttcn_command & " -w XmlTest_annotation.xsd","",c_shell_successWithoutWarningAndError );
Elemer Lelik's avatar
Elemer Lelik committed
317
318
319
320
321
322
}

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

testcase tc_options_wrong() runs on xmlTest_CT
{
328
  f_shellCommandWithVerdict(xsd2ttcn_command & " -H XmlTest_annotation.xsd","", c_shell_error);
Elemer Lelik's avatar
Elemer Lelik committed
329
330
331
332
}

testcase tc_options_missing() runs on xmlTest_CT
{
333
  f_shellCommandWithVerdict("xsd2ttcn","",c_shell_successWithoutWarningAndError );
Elemer Lelik's avatar
Elemer Lelik committed
334
335
336
337
338
339
  //TODO: check the output
}


testcase tc_XmlTest_label() runs on xmlTest_CT
{
340
  f_shellCommandWithVerdict(xsd2ttcn_command & " -x XmlTest_label.xsd","",c_shell_successWithoutWarningAndError );
Elemer Lelik's avatar
Elemer Lelik committed
341
342
343
344
}

testcase tc_XmlTest_definition() runs on xmlTest_CT
{
345
  f_shellCommandWithVerdict(xsd2ttcn_command & " -x XmlTest_definition.xsd","",c_shell_successWithoutWarningAndError );
Elemer Lelik's avatar
Elemer Lelik committed
346
347
348
349
350
351
352
353
354
}
//************************************
//  Testcases_basedOnTtcnStandard9
//************************************
group Testcases_basedOnTtcnStandard9 {

  //Passed
  testcase tc_XmlTest_all() runs on xmlTest_CT
  {
355
    f_shellCommandWithVerdict(xsd2ttcn_command & " all.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
356
357
    if(getverdict==pass) {
      f_compareFiles(
358
	"www_example_org_all_e.ttcn","www_example_org_all.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
359
360
361
362
363
    }
  }

  testcase tc_element_in_all_neg() runs on xmlTest_CT
  {
364
    f_shellCommandWithVerdict(xsd2ttcn_command & " element_in_all_minmax.xsd","",c_shell_error);
Elemer Lelik's avatar
Elemer Lelik committed
365
366
367
368
369
  }

  //Passed
  testcase tc_XmlTest_any_anyAttribute() runs on xmlTest_CT
  {
370
    f_shellCommandWithVerdict(xsd2ttcn_command & " any_anyAttribute.xsd","",c_shell_successWithWarning);
Elemer Lelik's avatar
Elemer Lelik committed
371
372
373

    if(getverdict==pass) {
      f_compareFiles(
374
	"http_www_example_org_ttcn_wildcards_e.ttcn","http_www_example_org_ttcn_wildcards.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
375
    }
Elemer Lelik's avatar
Elemer Lelik committed
376
377
378
379
380
381
382
  }

  //HQ73011
  //Heading: XSD anyAtribute is inserted into a wrong place
  //Passed
  testcase tc_XmlTest_HQ73011() runs on xmlTest_CT
  {
383
  f_shellCommandWithVerdict(xsd2ttcn_command & " HQ73011.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
384
385
    if(getverdict==pass) {
      f_compareFiles(
386
        "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
387
388
389
    }
  }

Elemer Lelik's avatar
Elemer Lelik committed
390
391
  testcase tc_anyattribute_optional() runs on xmlTest_CT
  {
392
  f_shellCommandWithVerdict(xsd2ttcn_command & " anyattribute_optional.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
393
394
    if(getverdict==pass) {
      f_compareFiles(
395
        "http_www_example_org_wildcards_e.ttcn","http_www_example_org_wildcards.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
396
397
398
399
400
    }
  }

  testcase tc_anyattribute_single() runs on xmlTest_CT
  {
401
  f_shellCommandWithVerdict(xsd2ttcn_command & " anyattrib_single.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
402
403
    if(getverdict==pass) {
      f_compareFiles(
404
        "www_example_org_anyattrib_single_e.ttcn","www_example_org_anyattrib_single.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
405
406
407
408
409
    }
  }

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


Elemer Lelik's avatar
Elemer Lelik committed
418
419
420
  //Passed
  testcase tc_XmlTest_attributeGroup() runs on xmlTest_CT
  {
421
    f_shellCommandWithVerdict(xsd2ttcn_command & " attributeGroup.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
422
423
424

    if(getverdict==pass) {
      f_compareFiles(
425
        "www_example_org_attributegroup_e.ttcn","www_example_org_attributegroup.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
426
    }
Elemer Lelik's avatar
Elemer Lelik committed
427
428
429
430
431
  }

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

Elemer Lelik's avatar
Elemer Lelik committed
435
436
  testcase tc_id_attribute() runs on xmlTest_CT
  {
437
    f_shellCommandWithVerdict(xsd2ttcn_command & " id_attrib.xsd","",c_shell_successWithWarning);
Elemer Lelik's avatar
Elemer Lelik committed
438
439
    if(getverdict==pass) {
      f_compareFiles(
440
        "www_example_org_id_attrib_e.ttcn", "www_example_org_id_attrib.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
441
442
443
444
445
    }
  }

  testcase tc_attribute_order() runs on xmlTest_CT
  {
446
    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
447
448
    if(getverdict==pass) {
      f_compareFiles(
449
        "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
450
451
452
453
    }

    if(getverdict==pass) {
      f_compareFiles(
454
        "www_example_org_attrib_order_b_e.ttcn", "www_example_org_attrib_order_b.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
455
456
457
458
459
    }
  }

  testcase tc_name_conv_non_alphanumeric() runs on xmlTest_CT
  {
460
    f_shellCommandWithVerdict(xsd2ttcn_command & " name_conv_non_alphanumeric.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
461
462
463
    if(getverdict==pass) {
      f_compareFiles(
        "http_www_example_org_name_conv2_e.ttcn",
464
        "http_www_example_org_name_conv2.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
465
466
467
468
    }
  }

  testcase tc_module_name_convert_with_diff_namespace() runs on xmlTest_CT {
469
    f_shellCommandWithVerdict(xsd2ttcn_command & " imported_module.xsd imported_module_.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
470
471
472

    if(getverdict==pass) {
      f_compareFiles(
473
        "imported_module_e.ttcn","imported_module.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
474
475
476
477
    }

    if(getverdict==pass) {
      f_compareFiles(
478
        "imported_module_1_e.ttcn","imported_module_1.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
479
480
481
482
    }
  }//tc_

  testcase tc_module_typename_conversion() runs on xmlTest_CT {
483
    f_shellCommandWithVerdict(xsd2ttcn_command & " module_typename_conversion.xsd module_typename_conversion_1.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
484
485
486

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

    if(getverdict==pass) {
      f_compareFiles(
492
        "MyTypes_e.ttcn","MyTypes.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
493
494
495
496
497
    }
  }//tc_

  testcase tc_name_conv_remove_seq_of_low_line() runs on xmlTest_CT
  {
498
    f_shellCommandWithVerdict(xsd2ttcn_command & " name_conv_remove_seq_of_low_line.xsd","",
Elemer Lelik's avatar
Elemer Lelik committed
499
500
501
502
                              c_shell_successWithoutWarningAndError);
    if(getverdict==pass) {
      f_compareFiles(
        "http_www_example_org_name_conv3_e.ttcn",
503
        "http_www_example_org_name_conv3.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
504
505
506
507
508
    }
  }

  testcase tc_name_conv_with_z() runs on xmlTest_CT
  {
509
    f_shellCommandWithVerdict(xsd2ttcn_command & " -z name_conv_with_z.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
510
511
512
    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_name_conv_http_e.ttcn",
513
        "www_example_org_name_conv_http.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
514
515
516
517
518
    }
  }

  testcase tc_comment_placement() runs on xmlTest_CT
  {
519
    f_shellCommandWithVerdict(xsd2ttcn_command & " comment_placement.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
520
521
522
    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_comment_placement_e.ttcn",
523
        "www_example_org_comment_placement.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
524
525
526
    }
  }

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

  //Passed, returs with error
  testcase tc_string_withEmptyLength() runs on xmlTest_CT
  {
606
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withEmptyLength.xsd","",c_shell_error)
Elemer Lelik's avatar
Elemer Lelik committed
607
608
609
610
  }

  testcase tc_string_withNegativeLength() runs on xmlTest_CT
  {
611
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withNegativeLength.xsd","",c_shell_error)
Elemer Lelik's avatar
Elemer Lelik committed
612
613
614
615
616
  }

  //Passed
  testcase tc_string_withFixedLength() runs on xmlTest_CT
  {
617
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withFixedLength.xsd","",c_shell_error);
Elemer Lelik's avatar
Elemer Lelik committed
618
619
620
621
  }

  testcase tc_fixed_value() runs on xmlTest_CT
  {
622
    f_shellCommandWithVerdict(xsd2ttcn_command & " fixed_value.xsd","",c_shell_successWithWarning);
Elemer Lelik's avatar
Elemer Lelik committed
623
624
625
    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_fixed_value.ttcn",
626
        "www_example_org_fixed_value_e.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
627
    }
Elemer Lelik's avatar
Elemer Lelik committed
628
629
630
631
632
  }

  //Passed
  testcase tc_string_withFloatLength() runs on xmlTest_CT
  {
633
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withFloatLength.xsd","", c_shell_error)
Elemer Lelik's avatar
Elemer Lelik committed
634
635
636
637
638
639
  }

  //===minLength===
  //Passed, TR: HL21690
  testcase tc_string_withPosMinLength() runs on xmlTest_CT
  {
640
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withMinLength.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
641
642
643
    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_string_withMinLength.ttcn",
644
        "www_XmlTest_org_string_withMinLength_e.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
645
646
647
648
649
650
    }
  }

  //Passed
  testcase tc_string_withEmptyMin() runs on xmlTest_CT
  {
651
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withEmptyMin.xsd","",c_shell_error)
Elemer Lelik's avatar
Elemer Lelik committed
652
653
654
655
656
  }

  //Passed
  testcase tc_string_withNegativeMin() runs on xmlTest_CT
  {
657
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withNegativeMin.xsd","",c_shell_error)
Elemer Lelik's avatar
Elemer Lelik committed
658
659
660
661
662
663
  }

  //===maxLength===
  //Passed
  testcase tc_string_withPosMax() runs on xmlTest_CT
  {
664
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withPosMax.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
665
666
    if(getverdict==pass) {
      f_compareFiles(
667
        "www_XmlTest_org_string_withPosMax_e.ttcn","www_XmlTest_org_string_withPosMax.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
668
669
670
671
672
673
    }
  }

  //Passed
  testcase tc_string_withEmptyMax() runs on xmlTest_CT
  {
674
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withEmptyMax.xsd","",c_shell_error)
Elemer Lelik's avatar
Elemer Lelik committed
675
676
677
678
679
  }

  //Passed
  testcase tc_string_withNegativeMax() runs on xmlTest_CT
  {
680
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withNegativeMax.xsd","",c_shell_error)
Elemer Lelik's avatar
Elemer Lelik committed
681
682
683
684
685
  }
  //=== minLength>maxLength
  //Passed, TR:
  testcase tc_string_withFaultyMinMaxLength() runs on xmlTest_CT
  {
686
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_string_withFaultyMinMax.xsd","",c_shell_error)
Elemer Lelik's avatar
Elemer Lelik committed
687
688
689
690
  }
  //Passed
  testcase tc_string_withOverDefinition() runs on xmlTest_CT
  {
691
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_string_withOverDefinition.xsd","",c_shell_error)
Elemer Lelik's avatar
Elemer Lelik committed
692
693
694
695
  }

  testcase tc_string_withTypeAndBase() runs on xmlTest_CT
  {
696
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_string_withTypeAndBase.xsd","",c_shell_error)
Elemer Lelik's avatar
Elemer Lelik committed
697
  }
Elemer Lelik's avatar
Elemer Lelik committed
698
699
700

  //testcase tc_string_pattern_square_brackets() runs on xmlTest_CT
  //{
701
  //  f_shellCommandWithVerdict(xsd2ttcn_command & " regex_square_brackets.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
702
703
  //  if(getverdict==pass) {
  //    f_compareFiles(
704
  //      "www_example_org_regex_square_brackets_e.ttcn","www_example_org_regex_square_brackets.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
705
706
  //  }
  //}
Elemer Lelik's avatar
Elemer Lelik committed
707
708
709
710
711
712
713
714
715
}//StringTest

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

  //TODO: check warning sending for not supported:features
  testcase tc_boolean() runs on xmlTest_CT {
716
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_boolean.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
717
718
    if(getverdict==pass) {
      f_compareFiles(
719
        "www_XmlTest_org_boolean_e.ttcn","www_XmlTest_org_boolean.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
720
721
    }
  }
Elemer Lelik's avatar
Elemer Lelik committed
722
723

  testcase tc_boolean_variant_commented() runs on xmlTest_CT {
724
    f_shellCommandWithVerdict(xsd2ttcn_command & "  boolean_variant_commented.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
725
726
727
    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_boolean_variant_commented_e.ttcn",
728
        "www_example_org_boolean_variant_commented.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
729
730
    }
  }
Elemer Lelik's avatar
Elemer Lelik committed
731
732
733
734
735
736
737
738
739
740
}//BooleanTest


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

  //Passed
  testcase tc_decimal() runs on xmlTest_CT {
741
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_decimal.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
742
743
744
    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_decimal_e.ttcn",
745
        "www_XmlTest_org_decimal.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
746
747
748
749
750
    }
  }

  //!!!!!Length not supported!!!!
  //   testcase tc_decimal_withLength() runs on xmlTest_CT {
751
  //     f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_decimal_withLength.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
752
753
754
  //     if(getverdict==pass) {
  //       f_compareFiles(
  //         "www_XmlTest_org_decimal_withLength_e.ttcn",
755
  //         "www_XmlTest_org_decimal_withLength.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
756
757
758
759
760
761
  //     }
  //   }

  //TR: Generates integer limits instead of decimal
  //TR: HL2715 -Solved
  testcase tc_decimal_withMinMaxInclusive() runs on xmlTest_CT {
762
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_decimal_withMinMaxInclusive.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
763
764
765
766

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_decimal_withMinMaxInclusive_e.ttcn",
767
        "www_XmlTest_org_decimal_withMinMaxInclusive.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
768
769
770
771
772
    }
  }//tc_

  //TR21266 -Solved
  testcase tc_decimal_withMinMaxExclusive() runs on xmlTest_CT {
773
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_decimal_withMinMaxExclusive.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
774
775
776
777

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_decimal_withMinMaxExclusive_e.ttcn",
778
        "www_XmlTest_org_decimal_withMinMaxExclusive.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
779
780
781
782
783
    }
  }//tc_

  //TR HL21296
  testcase tc_decimal_withEnum() runs on xmlTest_CT {
784
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_decimal_withEnum.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
785
786
787
788

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_decimal_withEnum_e.ttcn",
789
        "www_XmlTest_org_decimal_withEnum.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
790
791
    }
  }
Elemer Lelik's avatar
Elemer Lelik committed
792
793

  testcase tc_decimal_fractiondigits() runs on xmlTest_CT {
794
    f_shellCommandWithVerdict(xsd2ttcn_command & "  decimal_fractiondigits.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
795
796
797
798

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_decimal_fractiondigits_e.ttcn",
799
        "www_example_org_decimal_fractiondigits.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
800
801
    }
  }
Elemer Lelik's avatar
Elemer Lelik committed
802
803
804
805
806
807
808
809
810
}//DecimalTest

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

  testcase tc_integer() runs on xmlTest_CT {
811
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_integer.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
812
813
814
815

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_integer_e.ttcn",
816
        "www_XmlTest_org_integer.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
817
818
819
820
821
822
    }

  }//tc_

  //negative test
  testcase tc_integer_empty1() runs on xmlTest_CT {
823
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_integer_empty1.xsd","",c_shell_error)
Elemer Lelik's avatar
Elemer Lelik committed
824
825
826
827
  }//tc_

  //negative test
  testcase tc_integer_withLength() runs on xmlTest_CT {
828
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_integer_withLength.xsd","",c_shell_error)
Elemer Lelik's avatar
Elemer Lelik committed
829
830
831
832
  }//tc_

  //Ready, passed, TR:HL21694 -solved
  testcase tc_integer_withEnum() runs on xmlTest_CT {
833
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_integer_withEnum.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
834
835
836

    if(getverdict==pass) {
      f_compareFiles(
837
        "www_XmlTest_org_integer_withEnum_e.ttcn","www_XmlTest_org_integer_withEnum.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
838
839
840
841
842
    }
  }//tc_

  //Passed
  testcase tc_integer_withMinIncl() runs on xmlTest_CT {
843
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_integer_withMinIncl.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
844
845
846
847

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_integer_withMinIncl_e.ttcn",
848
        "www_XmlTest_org_integer_withMinIncl.ttcn",c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
849
850
851
852
853
    }
  }//tc_

  //Passed
  testcase tc_integer_withMaxIncl() runs on xmlTest_CT {
854
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_integer_withMaxIncl.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
855
856
857

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

  //Passed
  testcase tc_integer_withMinExcl() runs on xmlTest_CT {
864
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_integer_withMinExcl.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
865
866
867
868

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_integer_withMinExcl_e.ttcn",
869
        "www_XmlTest_org_integer_withMinExcl.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
870
871
872
873
874
    }
  }//tc_

  //Passed
  testcase tc_integer_withMaxExcl() runs on xmlTest_CT {
875
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_integer_withMaxExcl.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
876
877
878

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


}//IntegerTest

Elemer Lelik's avatar
Elemer Lelik committed
886
887

  testcase tc_float_not_a_number() runs on xmlTest_CT {
888
    f_shellCommandWithVerdict(xsd2ttcn_command & "  not_a_number_minex_inf_maxex_-inf.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
889
890
891
892

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_not_a_number_minex_inf_maxex_inf_e.ttcn",
893
        "www_example_org_not_a_number_minex_inf_maxex_inf.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
894
895
896
    }
  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
897
898
899
  //
  testcase tc_simpleType_enum() runs on xmlTest_CT {

900
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_simple_enum.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
901
902
903

    if(getverdict==pass) {
      f_compareFiles(
904
        "www_XmlTest_org_simple_enum_e.ttcn","www_XmlTest_org_simple_enum.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
905
906
907
908
    }

  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
909
910
  testcase tc_simpleType_restrict_comp() runs on xmlTest_CT {

911
    f_shellCommandWithVerdict(xsd2ttcn_command & "  simpletype_restrict_comp.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
912
913
914

    if(getverdict==pass) {
      f_compareFiles(
915
        "www_example_org_simpletype_restrict_comp_e.ttcn","www_example_org_simpletype_restrict_comp.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
916
917
918
919
920
921
    }

  }//tc_

  testcase tc_simpleType_ref() runs on xmlTest_CT {

922
    f_shellCommandWithVerdict(xsd2ttcn_command & "  simpletype_ref.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
923
924
925

    if(getverdict==pass) {
      f_compareFiles(
926
        "www_example_org_simpletype_ref_e.ttcn","www_example_org_simpletype_ref.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
927
928
929
930
931
932
    }

  }//tc_

  testcase tc_simpleType_base() runs on xmlTest_CT {

933
    f_shellCommandWithVerdict(xsd2ttcn_command & "  simpletype_base.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
934
935
936

    if(getverdict==pass) {
      f_compareFiles(
937
        "www_example_org_simpletype_base_e.ttcn","www_example_org_simpletype_base.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
938
939
940
941
942
943
944
    }

  }//tc_

  //
  testcase tc_enum_field_names() runs on xmlTest_CT {

945
    f_shellCommandWithVerdict(xsd2ttcn_command & "  enum_field_names.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
946
947
948

    if(getverdict==pass) {
      f_compareFiles(
949
        "www_example_org_enum_field_names_e.ttcn","www_example_org_enum_field_names.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
950
951
952
953
    }

  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
954
955
  testcase tc_attribute_enumeration_variant() runs on xmlTest_CT {

956
    f_shellCommandWithVerdict(xsd2ttcn_command & "  attribute_enumeration_variant.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
957
958
959

    if(getverdict==pass) {
      f_compareFiles(
960
        "www_example_org_attribute_enumeration_variant_e.ttcn","www_example_org_attribute_enumeration_variant.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
961
962
963
    }
  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
964
965
966
967
968
969
970
971
972

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

  //Passed:
  testcase tc_time() runs on xmlTest_CT {
973
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_time.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
974
975
976

    if(getverdict==pass) {
      f_compareFiles(
977
        "www_XmlTest_org_time_e.ttcn","www_XmlTest_org_time.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
978
979
980
981
982
    }
  }//tc_

  //Passed TR HL22058
  testcase tc_time_withEnum() runs on xmlTest_CT {
983
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_time_withEnum.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
984
985
986

    if(getverdict==pass) {
      f_compareFiles(
987
        "www_XmlTest_org_time_withEnum_e.ttcn","www_XmlTest_org_time_withEnum.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
988
989
990
991
992
993
994
995
    }
  }//tc_
}//TimeTest

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

996
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_list.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
997
998
999

    if(getverdict==pass) {
      f_compareFiles(
1000
        "www_XmlTest_org_list_e.ttcn","www_XmlTest_org_list.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
    }

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

1012
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_list_integer.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1013
1014
1015

    if(getverdict==pass) {
      f_compareFiles(
1016
        "www_XmlTest_org_list_integer_e.ttcn","www_XmlTest_org_list_integer.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
1017
1018
1019
    }

  }//tc_
Elemer Lelik's avatar
Elemer Lelik committed
1020
1021
1022

  testcase tc_list_simpletype() runs on xmlTest_CT {

1023
    f_shellCommandWithVerdict(xsd2ttcn_command & "  list_simpletype.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1024
1025
1026

    if(getverdict==pass) {
      f_compareFiles(
1027
        "www_example_org_list_simpletype_e.ttcn","www_example_org_list_simpletype.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
1028
1029
1030
    }

  }//tc_
ebensza's avatar
ebensza committed
1031
1032
1033

  testcase tc_list_complextype() runs on xmlTest_CT {

1034
    f_shellCommandWithVerdict(xsd2ttcn_command & "  list_complextype.xsd","",c_shell_successWithoutWarningAndError)
ebensza's avatar
ebensza committed
1035
1036
1037

    if(getverdict==pass) {
      f_compareFiles(
1038
        "www_example_org_list_complextype_e.ttcn","www_example_org_list_complextype.ttcn", c_numOfDiff);
ebensza's avatar
ebensza committed
1039
1040
1041
    }

  }//tc_
1042
1043
1044
1045
1046
1047
1048

  testcase tc_list_minmaxoccurs() runs on xmlTest_CT {

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

    if(getverdict==pass) {
      f_compareFiles(
1049
        "http_www_example_org_list_minmaxoccurs_e.ttcn","http_www_example_org_list_minmaxoccurs.ttcn", c_numOfDiff);
1050
1051
1052
    }

  }//tc_
Elemer Lelik's avatar
Elemer Lelik committed
1053
1054
1055
1056
1057
1058
}//ListTest

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

1059
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_union.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1060
1061
1062

    if(getverdict==pass) {
      f_compareFiles(
1063
        "www_XmlTest_org_union_e.ttcn","www_XmlTest_org_union.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
1064
1065
1066
1067
1068
    }
  }//tc_
  
  testcase tc_union_optional() runs on xmlTest_CT {

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

    if(getverdict==pass) {
      f_compareFiles(
1073
        "ETSI_CR5852_union_e.ttcn","ETSI_CR5852_union.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
1074
1075
1076
    }
  }

Elemer Lelik's avatar
Elemer Lelik committed
1077
1078
 testcase tc_enumeration_union_restriction() runs on xmlTest_CT {

1079
    f_shellCommandWithVerdict(xsd2ttcn_command & "  enumeration_restriction.xsd","",c_shell_successWithWarning)
Elemer Lelik's avatar
Elemer Lelik committed
1080
1081
1082
1083

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_enumeration_restriction_e.ttcn",
1084
        "www_example_org_enumeration_restriction.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
1085
1086
1087
1088
1089
    }
  }

 testcase tc_enumeration_union_restriction2() runs on xmlTest_CT {

1090
    f_shellCommandWithVerdict(xsd2ttcn_command & "  enumeration_restriction2.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1091
1092
1093
1094

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

1099
1100
 testcase tc_enumeration_restriction3() runs on xmlTest_CT {

1101
    f_shellCommandWithVerdict(xsd2ttcn_command & "  enumeration_restriction3.xsd","",c_shell_successWithoutWarningAndError)
1102
1103
1104
1105

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_enumeration_restriction3_e.ttcn",
1106
        "www_example_org_enumeration_restriction3.ttcn", c_numOfDiff);
1107
1108
1109
1110
    }
  }


Elemer Lelik's avatar
Elemer Lelik committed
1111
1112
 testcase tc_enumeration_remove_dup() runs on xmlTest_CT {

1113
    f_shellCommandWithVerdict(xsd2ttcn_command & "  enumeration_remove_dup.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1114
1115
1116
1117

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_enumeration_remove_dup_e.ttcn",
1118
        "www_example_org_enumeration_remove_dup.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
1119
1120
1121
    }
  }

Elemer Lelik's avatar
Elemer Lelik committed
1122
1123
1124
1125
1126
1127
1128
1129
}//UnionTest



group ComplexType {

  testcase tc_complex1() runs on xmlTest_CT {

1130
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_complex1.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1131
1132
1133

     if(getverdict==pass) {
       f_compareFiles(
1134
        "www_XmlTest_org_complex1_e.ttcn","www_XmlTest_org_complex1.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
1135
1136
1137
1138
1139
1140
1141
       f_encDecTest_InternationalPrice();
     }
  }//tc_

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

1142
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_complex2.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1143
1144
1145

    if(getverdict==pass) {
      f_compareFiles(
1146
        "www_XmlTest_org_complex2_e.ttcn","www_XmlTest_org_complex2.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
1147
1148
1149
1150
1151
1152
1153
1154
    }
    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 {

1155
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_complex_simpleContent.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1156
1157
1158

     if(getverdict==pass) {
       f_compareFiles(
1159
        "www_XmlTest_org_complex_simpleContent_e.ttcn","www_XmlTest_org_complex_simpleContent.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
1160
1161
1162
1163
1164
1165
      f_encDecTest_ComplexTypeWithSimpleContent1();
      f_encDecTest_ComplexTypeWithSimpleContent2();
      f_encDecTest_ComplexTypeWithSimpleContent2_neg();
     }
  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
1166
1167
  testcase tc_complex_namespaceas() runs on xmlTest_CT {

1168
    f_shellCommandWithVerdict(xsd2ttcn_command & " namespaceas.xsd imported2.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1169
1170
1171

     if(getverdict==pass) {
       f_compareFiles(
1172
        "www_example_org_namespaceas_e.ttcn","www_example_org_namespaceas.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
1173
       f_compareFiles(
1174
        "www_example_org_imported2_e.ttcn","www_example_org_imported2.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
1175
1176
1177
     }
  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
1178
1179
  testcase tc_complex_mixed_conv() runs on xmlTest_CT {

1180
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_complex_mixed.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1181
1182
1183

     if(getverdict==pass) {
       f_compareFiles(
1184
        "www_XmlTest_org_complex_mixed_e.ttcn","www_XmlTest_org_complex_mixed.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
1185
1186
1187
     }
  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
1188
1189
  testcase tc_complex_group_reference() runs on xmlTest_CT {

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

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

Elemer Lelik's avatar
Elemer Lelik committed
1198
1199
1200
1201
1202
  //TR:HL29258
  testcase tc_complex_mixed_encDec() runs on xmlTest_CT {
     f_encDecTest_ComplexTypeWithMixed();
  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed