Sync with 5.4.1
[deliverable/titan.core.git] / regression_test / negativeTest / NegTest_RAW_Testcases.ttcn
CommitLineData
970ed795 1/******************************************************************************
3abe9331 2 * Copyright (c) 2000-2015 Ericsson Telecom AB
970ed795
EL
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 ******************************************************************************/
8module NegTest_RAW_Testcases {
9
10import from NegTest_RAW_Types all;
11
12type component RawComp {};
13
14 //================================================
15 //======== Functions==============================
16 //================================================
17 function f_compareAndVerdict(in octetstring pl_encoded, in octetstring pl_expected) {
18 //log("Encoded value: ", pl_encoded); //switch off from cfg file !
19 //log("Expected value: ", pl_expected);
20 if( pl_encoded == pl_expected ) {
21 setverdict(pass);
22 } else {
23 setverdict(fail, "! encoded value: ", pl_encoded, "!expected value: ", pl_expected );
24 }
25 }
26
27
28//seq
29external function encode_rawInteger10( in RawInteger10 pdu) return octetstring
30with { extension "prototype(convert) encode(RAW)" }
31
32external function encode_rawSeqEmpty(in RawSeqEmpty pdu) return octetstring
33with { extension "prototype(convert) encode(RAW)" }
34
35external function encode_rawSeqBool(in RawSeqBool pdu) return octetstring
36with { extension "prototype(convert) encode(RAW)" }
37
38external function encode_rawSeqInt(in RawSeqInt pdu) return octetstring
39with { extension "prototype(convert) encode(RAW)" }
40
41external function encode_rawSeqInt8(in RawSeqInt8 pdu) return octetstring
42with { extension "prototype(convert) encode(RAW)" }
43
44external function encode_rawSeqRawEnum(in RawSeqRawEnum pdu) return octetstring
45with { extension "prototype(convert) encode(RAW)" }
46
47external function encode_rawSeqInt2( in RawSeqInt2 pdu) return octetstring
48with { extension "prototype(convert) encode(RAW)" }
49
50external function encode_rawSeqInt28( in RawSeqInt28 pdu) return octetstring
51with { extension "prototype(convert) encode(RAW)" }
52
53external function encode_rawSeqIntSeqInt2( in RawSeqIntSeqInt2 pdu) return octetstring
54with { extension "prototype(convert) encode(RAW)" }
55
56external function encode_rawSeqIntSeqInt2opt( in RawSeqIntSeqInt2opt pdu) return octetstring
57with { extension "prototype(convert) encode(RAW)" }
58
59external function encode_rawSeqIntSeqInt2optopt( in RawSeqIntSeqInt2optopt pdu) return octetstring
60with { extension "prototype(convert) encode(RAW)" }
61
62external function encode_rawSeqInt3( in RawSeqInt3 pdu) return octetstring
63with { extension "prototype(convert) encode(RAW)" }
64
65//external function encode_rawSeqInt3opt( in RawSeqInt3opt pdu) return octetstring
66//with { extension "prototype(convert) encode(RAW)" }
67
68external function encode_rawSeqInt4( in RawSeqInt4 pdu) return octetstring
69with { extension "prototype(convert) encode(RAW)" }
70
71external function encode_rawSeqOJKL( in RawSeqOJKL pdu) return octetstring
72with { extension "prototype(convert) encode(RAW)" }
73
74external function encode_rawSeqIOKL( in RawSeqIOKL pdu) return octetstring
75with { extension "prototype(convert) encode(RAW)" }
76
77external function encode_rawSeqCharstring(in RawSeqCharstring pdu) return octetstring
78with { extension "prototype(convert) encode(RAW)" }
79
80external function encode_rawSeqStr(in RawSeqStr pdu) return octetstring
81with { extension "prototype(convert) encode(RAW)" }
82
83external function encode_rawSeqBitStr(in RawSeqBitStr pdu) return octetstring
84with { extension "prototype(convert) encode(RAW)" }
85
86external function encode_rawSeqOctStr(in RawSeqOctStr pdu) return octetstring
87with { extension "prototype(convert) encode(RAW)" }
88
89external function encode_rawSeqIntCharstring( in RawSeqIntCharstring pdu) return octetstring
90with { extension "prototype(convert) encode(RAW)" }
91
92external function encode_rawSeqIntStr( in RawSeqIntStr pdu) return octetstring
93with { extension "prototype(convert) encode(RAW)" }
94
95external function encode_rawSeqIntBitStr( in RawSeqIntBitStr pdu) return octetstring
96with { extension "prototype(convert) encode(RAW)" }
97
98external function encode_rawSeqISKL( in RawSeqISKL pdu) return octetstring
99with { extension "prototype(convert) encode(RAW)" }
100
101external function encode_rawSeqIntSeqIntSeqInt2( in RawSeqIntSeqIntSeqInt2 pdu) return octetstring
102with { extension "prototype(convert) encode(RAW)" }
103
104external function encode_rawSeqIntSeqIntSeqInt2SeqCharstring2( in RawSeqIntSeqIntSeqInt2SeqCharstring2 pdu) return octetstring
105with { extension "prototype(convert) encode(RAW)" }
106
107external function encode_rawSeqIntSeqIntSeqInt2SeqInt2(in RawSeqIntSeqIntSeqInt2SeqInt2 pdu) return octetstring
108with { extension "prototype(convert) encode(RAW)" }
109
110external function encode_rawSeqIntSeqCharstring2( in RawSeqIntSeqCharstring2 pdu) return octetstring
111with { extension "prototype(convert) encode(RAW)" }
112
113external function encode_rawSeqSeqIntSeqInt2SeqCharstring2( in RawSeqSeqIntSeqInt2SeqCharstring2 pdu) return octetstring
114with { extension "prototype(convert) encode(RAW)" }
115
116external function encode_rawSeqIntSeqIntSeqInt2optoptSeqCharstring2( in RawSeqIntSeqIntSeqInt2optoptSeqCharstring2 pdu) return octetstring
117with { extension "prototype(convert) encode(RAW)" }
118
119external function encode_rawSeq_SeqSeqIntSeqInt2SeqCharstring2_SeqSeqIntSeqInt2SeqCharstring2( in RawSeq_SeqSeqIntSeqInt2SeqCharstring2_SeqSeqIntSeqInt2SeqCharstring2 pdu) return octetstring
120with { extension "prototype(convert) encode(RAW)" }
121
122external function encode_rawSeq_SeqSeqIntSeqInt2optoptSeqCharstring2_SeqSeqIntSeqInt2optoptSeqCharstring2(
123 in RawSeq_SeqSeqIntSeqInt2optoptSeqCharstring2_SeqSeqIntSeqInt2optoptSeqCharstring2 pdu) return octetstring
124with { extension "prototype(convert) encode(RAW)" }
125
126//seq of
127external function encode_rawSeqOfBool(in RawSeqOfBool pdu) return octetstring
128with { extension "prototype(convert) encode(RAW)" }
129
130external function encode_rawSeqOfInt(in RawSeqOfInt pdu) return octetstring
131with { extension "prototype(convert) encode(RAW)" }
132
133external function encode_rawSeqOfInt32(in RawSeqOfInt32 pdu) return octetstring
134with { extension "prototype(convert) encode(RAW)" }
135
136external function encode_rawSeqOfRawEnum(in RawSeqOfRawEnum pdu) return octetstring
137with { extension "prototype(convert) encode(RAW)" }
138
139external function encode_rawSeqOfCharstring( in RawSeqOfCharstring pdu) return octetstring
140with { extension "prototype(convert) encode(RAW)" }
141
142external function encode_rawSeqOfBitStr(in RawSeqOfBitStr pdu) return octetstring
143with { extension "prototype(convert) encode(RAW)" }
144
145external function encode_rawSeqOfOctStr(in RawSeqOfOctStr pdu) return octetstring
146with { extension "prototype(convert) encode(RAW)" }
147
148external function encode_rawSeqOfObjId(in RawSeqOfObjId pdu) return octetstring
149with { extension "prototype(convert) encode(RAW)" }
150
151external function encode_rawSeqOfRawUnionBT(in RawSeqOfRawUnionBT pdu) return octetstring
152with { extension "prototype(convert) encode(RAW)" }
153
154external function encode_rawSeqOfRawUnionBT32(in RawSeqOfRawUnionBT32 pdu) return octetstring
155with { extension "prototype(convert) encode(RAW)" }
156
157external function encode_rawSeqOfSeqSeqIntSeqInt2SeqCharstring2(in RawSeqOfSeqSeqIntSeqInt2SeqCharstring2 pdu) return octetstring
158with { extension "prototype(convert) encode(RAW)" }
159
160external function encode_rawSeqOfRawSeqIntSeqIntSeqInt2optoptSeqCharstring2(in RawSeqOfRawSeqIntSeqIntSeqInt2optoptSeqCharstring2 pdu) return octetstring
161with { extension "prototype(convert) encode(RAW)" }
162
163//set
164external function encode_rawSetEmpty(in RawSetEmpty pdu) return octetstring
165with { extension "prototype(convert) encode(RAW)" }
166
167external function encode_rawSetBool(in RawSetBool pdu) return octetstring
168with { extension "prototype(convert) encode(RAW)" }
169
170external function encode_rawSetInt(in RawSetInt pdu) return octetstring
171with { extension "prototype(convert) encode(RAW)" }
172
173external function encode_rawSetInt8(in RawSetInt8 pdu) return octetstring
174with { extension "prototype(convert) encode(RAW)" }
175
176external function encode_rawSetRawEnum(in RawSetRawEnum pdu) return octetstring
177with { extension "prototype(convert) encode(RAW)" }
178
179external function encode_rawSetInt2( in RawSetInt2 pdu) return octetstring
180with { extension "prototype(convert) encode(RAW)" }
181
182external function encode_rawSetInt2opt( in RawSetInt2opt pdu) return octetstring
183with { extension "prototype(convert) encode(RAW)" }
184
185external function encode_rawSetInt2opt32( in RawSetInt2opt32 pdu) return octetstring
186with { extension "prototype(convert) encode(RAW)" }
187
188external function encode_rawSetIntSeqInt2( in RawSetIntSeqInt2 pdu) return octetstring
189with { extension "prototype(convert) encode(RAW)" }
190
191external function encode_rawSetIntSeqInt2T( in RawSetIntSeqInt2T pdu) return octetstring
192with { extension "prototype(convert) encode(RAW)" }
193
194external function encode_rawSetIntSeqInt2opt( in RawSetIntSeqInt2opt pdu) return octetstring
195with { extension "prototype(convert) encode(RAW)" }
196
197external function encode_rawSetIntSeqInt2Topt( in RawSetIntSeqInt2Topt pdu) return octetstring
198with { extension "prototype(convert) encode(RAW)" }
199
200external function encode_rawSetIntSeqInt2optopt( in RawSetIntSeqInt2optopt pdu) return octetstring
201with { extension "prototype(convert) encode(RAW)" }
202
203external function encode_rawSetIntSeqInt2Toptopt( in RawSetIntSeqInt2Toptopt pdu) return octetstring
204with { extension "prototype(convert) encode(RAW)" }
205
206external function encode_rawSetInt3( in RawSetInt3 pdu) return octetstring
207with { extension "prototype(convert) encode(RAW)" }
208
209external function encode_rawSetInt3opt( in RawSetInt3opt pdu) return octetstring
210with { extension "prototype(convert) encode(RAW)" }
211
212external function encode_rawSetInt4( in RawSetInt4 pdu) return octetstring
213with { extension "prototype(convert) encode(RAW)" }
214
215external function encode_rawSetInt4opt( in RawSetInt4opt pdu) return octetstring
216with { extension "prototype(convert) encode(RAW)" }
217
218external function encode_rawSetOJKL( in RawSetOJKL pdu) return octetstring
219with { extension "prototype(convert) encode(RAW)" }
220
221external function encode_rawSetIOKL( in RawSetIOKL pdu) return octetstring
222with { extension "prototype(convert) encode(RAW)" }
223
224external function encode_rawSetCharstring(in RawSetCharstring pdu) return octetstring
225with { extension "prototype(convert) encode(RAW)" }
226
227external function encode_rawSetStr(in RawSetStr pdu) return octetstring
228with { extension "prototype(convert) encode(RAW)" }
229
230external function encode_rawSetBitStr(in RawSetBitStr pdu) return octetstring
231with { extension "prototype(convert) encode(RAW)" }
232
233external function encode_rawSetOctStr(in RawSetOctStr pdu) return octetstring
234with { extension "prototype(convert) encode(RAW)" }
235
236external function encode_rawSetIntCharstring( in RawSetIntCharstring pdu) return octetstring
237with { extension "prototype(convert) encode(RAW)" }
238
239external function encode_rawSetIntStr( in RawSetIntStr pdu) return octetstring
240with { extension "prototype(convert) encode(RAW)" }
241
242external function encode_rawSetIntBitStr( in RawSetIntBitStr pdu) return octetstring
243with { extension "prototype(convert) encode(RAW)" }
244
245external function encode_rawSetISKL( in RawSetISKL pdu) return octetstring
246with { extension "prototype(convert) encode(RAW)" }
247
248external function encode_rawSetISKLopt( in RawSetISKLopt pdu) return octetstring
249with { extension "prototype(convert) encode(RAW)" }
250
251external function encode_rawSetIS2KLopt( in RawSetIS2KLopt pdu) return octetstring
252with { extension "prototype(convert) encode(RAW)" }
253
254external function encode_rawSetISOKL( in RawSetISOKL pdu) return octetstring
255with { extension "prototype(convert) encode(RAW)" }
256
257external function encode_rawSetISOKLopt( in RawSetISOKLopt pdu) return octetstring
258with { extension "prototype(convert) encode(RAW)" }
259
260external function encode_rawSetIOSKL( in RawSetIOSKL pdu) return octetstring
261with { extension "prototype(convert) encode(RAW)" }
262
263external function encode_rawSetIOSKLopt( in RawSetIOSKLopt pdu) return octetstring
264with { extension "prototype(convert) encode(RAW)" }
265
266external function encode_rawSetIntSeqIntSeqInt2( in RawSetIntSeqIntSeqInt2 pdu) return octetstring
267with { extension "prototype(convert) encode(RAW)" }
268
269external function encode_rawSetIntSeqIntSeqInt2SeqCharstring2( in RawSetIntSeqIntSeqInt2SeqCharstring2 pdu) return octetstring
270with { extension "prototype(convert) encode(RAW)" }
271
272external function encode_rawSetIntSeqCharstring2( in RawSetIntSeqCharstring2 pdu) return octetstring
273with { extension "prototype(convert) encode(RAW)" }
274
275external function encode_rawSetSeqIntSeqInt2SeqCharstring2( in RawSetSeqIntSeqInt2SeqCharstring2 pdu) return octetstring
276with { extension "prototype(convert) encode(RAW)" }
277
278external function encode_rawSetIntSeqIntSeqInt2optoptSeqCharstring2( in RawSetIntSeqIntSeqInt2optoptSeqCharstring2 pdu) return octetstring
279with { extension "prototype(convert) encode(RAW)" }
280
281external function encode_rawSet_SeqSeqIntSeqInt2SeqCharstring2_SeqSeqIntSeqInt2SeqCharstring2( in RawSet_SeqSeqIntSeqInt2SeqCharstring2_SeqSeqIntSeqInt2SeqCharstring2 pdu) return octetstring
282with { extension "prototype(convert) encode(RAW)" }
283
284external function encode_rawSet_SeqSeqIntSeqInt2optoptSeqCharstring2_SeqSeqIntSeqInt2optoptSeqCharstring2(
285 in RawSet_SeqSeqIntSeqInt2optoptSeqCharstring2_SeqSeqIntSeqInt2optoptSeqCharstring2 pdu) return octetstring
286with { extension "prototype(convert) encode(RAW)" }
287
288//set of
289external function encode_rawSetOfBool(in RawSetOfBool pdu) return octetstring
290with { extension "prototype(convert) encode(RAW)" }
291
292external function encode_rawSetOfBoolBogus(in RawSetOfBoolBogus pdu) return octetstring
293with { extension "prototype(convert) encode(RAW)" }
294
295external function encode_rawSetOfInt(in RawSetOfInt pdu) return octetstring
296with { extension "prototype(convert) encode(RAW)" }
297
298external function encode_rawSetOfInt32(in RawSetOfInt32 pdu) return octetstring
299with { extension "prototype(convert) encode(RAW)" }
300
301external function encode_rawSetOfRawEnum(in RawSetOfRawEnum pdu) return octetstring
302with { extension "prototype(convert) encode(RAW)" }
303
304external function encode_rawSetOfCharstring( in RawSetOfCharstring pdu) return octetstring
305with { extension "prototype(convert) encode(RAW)" }
306
307external function encode_rawSetOfBitStr(in RawSetOfBitStr pdu) return octetstring
308with { extension "prototype(convert) encode(RAW)" }
309
310external function encode_rawSetOfOctStr(in RawSetOfOctStr pdu) return octetstring
311with { extension "prototype(convert) encode(RAW)" }
312
313external function encode_rawSetOfObjId(in RawSetOfObjId pdu) return octetstring
314with { extension "prototype(convert) encode(RAW)" }
315
316external function encode_rawSetOfRawUnionBT(in RawSetOfRawUnionBT pdu) return octetstring
317with { extension "prototype(convert) encode(RAW)" }
318
319external function encode_rawSetOfRawUnionBT32(in RawSetOfRawUnionBT32 pdu) return octetstring
320with { extension "prototype(convert) encode(RAW)" }
321
322external function encode_rawSetOfSeqSeqIntSeqInt2SeqCharstring2(in RawSetOfSeqSeqIntSeqInt2SeqCharstring2 pdu) return octetstring
323with { extension "prototype(convert) encode(RAW)" }
324
325//union
326external function encode_rawUnionBasicTypes( in RawUnionBasicTypes pdu) return octetstring
327with { extension "prototype(convert) encode(RAW)" }
328
329external function encode_rawUnionBasicTypesT( in RawUnionBasicTypesT pdu) return octetstring
330with { extension "prototype(convert) encode(RAW)" }
331
332external function encode_rawUnionComplexTypes( in RawUnionComplexTypes pdu) return octetstring
333with { extension "prototype(convert) encode(RAW)" }
334//external function decode_rawUnionComplexTypes( in octetstring s) return RawUnionComplexTypes
335//with { extension "prototype(convert) decode(TEXT)" }
336
337modulepar {
338 integer tsp_maxInt := 1000000;
339 integer tsp_step := -10;
340}
341
342
343group Sequences{
344 template RawSeqInt2opt t_msi2opt := { i:= 1, j := 2 }
345 template RawSeqInt2opt t_msi2optomit := { i:= 1, j := omit }
346 const RawSeqInt2 c_msi2 := { i:= 1, j := 2 }
347 const RawSeqInt2opt c_msi2opt := { i:= 1, j := 2 }
348 const RawSeqInt2opt c_msi2optomit := { i:= 1, j := omit }
349
350 template RawSeqEmpty t_seqEmpty :={}
351
352 template RawSeqBool t_msb(template boolean p_b) := {b:= p_b}
353 template RawSeqInt t_msi(template integer p_i) := {i:= p_i}
354 template RawSeqInt8 t_msi8(template integer p_i) := {i:= p_i}
355
356
357 template RawSeqInt2 t_msi2(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j}
358 template RawSeqInt28 t_msi28(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j}
359 //variable related values:
360 //template RawSeqInt2 t_msi2_valueSeqIntOptFieldC(template integer p_i, template integer p_j):={i:=p_i, j:=p_j} with { erroneous (j) "value:=int32 : c_msi2opt.j" } ;//2
361
362 template RawSeqIntSeqInt2 t_msisi2_trial(template integer p_i, template integer p_j, template integer p_k) := { p_i, { p_j, p_k} } //not used yet
363 template RawSeqIntSeqInt2 t_msisi2(template integer p_i, template integer p_j, template integer p_k) := { i:= p_i, jk:= { i:=p_j, j:=p_k} };
364 //
365 template RawSeqInt3 t_msi3(template integer p_i, template integer p_j, template integer p_k) := {i:= p_i, j:=p_j, k:=p_k}
366
367 template RawSeqInt4 t_msi4(template integer p_i, template integer p_j, template integer p_k,template integer p_l ) := {i:= p_i, j:=p_j, k:=p_k, l:=p_l}
368
369 template RawSeqISKL t_msiskl(template integer p_i, template RawSeqInt4 p_s, template integer p_k,template integer p_l ) := {i:=p_i, s:=p_s, k:=p_k, l:=p_l}
370 //===seq of seq of seq:==
371
372 //Sequence of depth 3:
373
374 //real (charstring)
375 template RawSeqCharstring t_msr(template charstring p_x) := { x:=p_x }
376 template RawSeqCharstring2 t_mr2(template charstring p_x, template charstring p_y):={x:=p_x, y:=p_y}
377
378 //charstring->VisibleString
379 template RawSeqStr t_msstr(template charstring p_s) := { s := p_s }
380
381 //bitstring:
382 template RawSeqBitStr t_msbitstr(template bitstring p_b) := { b := p_b };
383 template RawSeqOctStr t_msos(template octetstring p_o) := { o := p_o };
384 template RawSeqIntCharstring t_msir(template integer p_i, template charstring p_x ) := { i:=p_i, x:=p_x };
385
386 template RawSeqIntStr t_msistr(template integer p_i, template charstring p_s ) := { i:=p_i, s:=p_s };
387
388 template RawSeqIntBitStr t_msibitstr(template integer p_i, template bitstring p_b ) := { i:=p_i, b:=p_b };
389
390
391 //====set of related templates ========
392
393 //==== union related templates ========
394 // It caused Seg fault - earlier :)
395 //template RawUnionBasicTypes t_mubt_boolean1( template boolean p_b) := { b:= p_b } with { erroneous(b) "value:=omit" }
396
397 //================================================
398 //======== Testcases==============================
399 //================================================
400
401 //======== {integer}===================
402 //omit
403 template RawSeqInt t_msi_omit(template integer p_i) := {i:= p_i}
404 with { erroneous (i) "value:= omit" }
405
406 testcase tc_rawSeqIntOmit() runs on RawComp {
407 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
408 var octetstring actual := encode_rawSeqInt(valueof(t_msi_omit(i)));
409 var octetstring expected:= encode_rawSeqEmpty(valueof(t_seqEmpty));
410 f_compareAndVerdict(actual, expected);
411 }
412 }
413
414 //value
415 template RawSeqInt t_msi_valueSameTypeE(template integer p_i) := {i:= p_i}
416 with { erroneous (i) "value:= int32:5" }
417
418 testcase tc_rawSeqIntValueSameTypeE() runs on RawComp {
419 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
420 var octetstring actual := encode_rawSeqInt(valueof(t_msi_valueSameTypeE(i)));
421 var octetstring expected:= encode_rawSeqInt(valueof(t_msi(5)));
422 f_compareAndVerdict(actual, expected);
423 }
424 }
425
426 template RawSeqInt t_msi_valueSameTypeI(template integer p_i) := {i:= p_i}
427 with { erroneous (i) "value:= 5" } //implicit type
428
429 testcase tc_rawSeqIntValueSameTypeI() runs on RawComp {
430 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
431 var octetstring actual := encode_rawSeqInt(valueof(t_msi_valueSameTypeI(i)));
432 var octetstring expected:= encode_rawSeqInt8(valueof(t_msi8(5)));
433 f_compareAndVerdict(actual, expected);
434 }
435 }
436
437 //Basic ASN.1 types (eq ttcn types): boolean, integer, octetstring, bitstring, null, objid, ext. objid, enum, embedded pdv, charstring (real), UTFSTR, seq, seq of
438 template RawSeqInt t_msi_valueDiffTypeExplicitBoolean(template integer p_i) := {i:= p_i}
439 with { erroneous (i) "value:= boolean:true" }
440
441 testcase tc_rawSeqIntValueDiffTypeExplicitBool() runs on RawComp {
442 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
443 var octetstring actual := encode_rawSeqInt(valueof(t_msi_valueDiffTypeExplicitBoolean(i)));
444 var octetstring expected:= encode_rawSeqBool(valueof(t_msb(true)));
445 f_compareAndVerdict(actual, expected);
446 }
447 }
448
449 template RawSeqInt t_msi_valueDiffTypeImplicitBoolean(template integer p_i) := {i:= p_i}
450 with { erroneous (i) "value:= true" }
451
452 testcase tc_rawSeqIntValueDiffTypeImplicitBool() runs on RawComp {
453 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
454 var octetstring actual := encode_rawSeqInt(valueof(t_msi_valueDiffTypeImplicitBoolean(i)));
455 var octetstring expected:= encode_rawSeqBool(valueof(t_msb(true)));
456 f_compareAndVerdict(actual, expected);
457 }
458 }
459
460 template RawSeqInt t_msi_valueDiffTypeExplicitOctStr(template integer p_i) := {i:= p_i}
461 with { erroneous (i) "value:= octetstring:'42414241'O" } //"BABA"
462
463 testcase tc_rawSeqIntValueDiffTypeExplicitOctStr() runs on RawComp {
464 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
465 var octetstring actual := encode_rawSeqInt(valueof(t_msi_valueDiffTypeExplicitOctStr(i)));
466 var octetstring expected:= encode_rawSeqOctStr(valueof(t_msos('42414241'O)));
467 f_compareAndVerdict(actual, expected);
468 }
469 }
470
471 template RawSeqInt t_msi_valueDiffTypeImplicitOctStr(template integer p_i) := {i:= p_i}
472 with { erroneous (i) "value:= '42414241'O" }
473
474 testcase tc_rawSeqIntValueDiffTypeImplicitOctStr() runs on RawComp {
475 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
476 var octetstring actual := encode_rawSeqInt(valueof(t_msi_valueDiffTypeImplicitOctStr(i)));
477 var octetstring expected:= encode_rawSeqOctStr(valueof(t_msos('42414241'O)));
478 f_compareAndVerdict(actual, expected);
479 }
480 }
481
482 template RawSeqInt t_msi_valueDiffTypeExplicitEnum(template integer p_i) := {i:= p_i}
483 with { erroneous (i) "value:= RawEnum:second" }
484
485 testcase tc_rawSeqIntValueDiffTypeExplicitEnum() runs on RawComp {
486 var RawSeqRawEnum vl_msme;
487 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
488 vl_msme.e:=second;
489 var octetstring actual := encode_rawSeqInt(valueof(t_msi_valueDiffTypeExplicitEnum(i)));
490 var octetstring expected:= encode_rawSeqRawEnum(vl_msme);
491 f_compareAndVerdict(actual, expected);
492 }
493 }
494
495 template RawSeqInt t_msi_valueDiffTypeExplicitCharstring(template integer p_i) := {i:= p_i}
496 with { erroneous (i) "value:= charstring:""Albert""" }
497
498 testcase tc_rawSeqIntValueDiffTypeExplicitCharstring() runs on RawComp {
499 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
500 var octetstring actual := encode_rawSeqInt(valueof(t_msi_valueDiffTypeExplicitCharstring(i)));
501 var octetstring expected:= encode_rawSeqCharstring(valueof(t_msr("Albert")));
502 f_compareAndVerdict(actual, expected);
503 }
504 }
505
506 template RawSeqInt t_msi_valueDiffTypeImplicitCharstring(template integer p_i) := {i:= p_i}
507 with { erroneous (i) "value:= ""Albert""" }
508
509 testcase tc_rawSeqIntValueDiffTypeImplicitCharstring() runs on RawComp {
510 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
511 var octetstring actual := encode_rawSeqInt(valueof(t_msi_valueDiffTypeImplicitCharstring(i)));
512 var octetstring expected:= encode_rawSeqCharstring(valueof(t_msr("Albert")));
513 f_compareAndVerdict(actual, expected);
514 }
515 }
516
517 template RawSeqInt t_msi_valueDiffTypeExplicitString(template integer p_i) := {i:= p_i}
518 with { erroneous (i) "value:= charstring:""subidubi""" }
519
520 testcase tc_rawSeqIntValueDiffTypeExplicitStr() runs on RawComp {
521 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
522 var octetstring actual := encode_rawSeqInt(valueof( t_msi_valueDiffTypeExplicitString(i)));
523 var octetstring expected:= encode_rawSeqStr(valueof(t_msstr("subidubi")));
524 f_compareAndVerdict(actual, expected);
525 }
526 }
527
528 //RAW
529 template RawSeqInt t_msi_valueDiffTypeRaw(template integer p_i) := {i:= p_i}
530 with { erroneous (i) "value(raw):= 'DECAFBAD'O" }
531
532 testcase tc_rawSeqIntValueDiffTypeRawOctStr() runs on RawComp {
533 var octetstring vl_expectedValue:= 'DECAFBAD'O;
534 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
535 var octetstring vl_actual := encode_rawSeqInt(valueof(t_msi_valueDiffTypeRaw(i)));
536 f_compareAndVerdict(vl_actual , vl_expectedValue);
537 }
538 }
539 // ============{integer, integer }==============
540 //omit
541 template RawSeqInt2 t_msi2_omiti(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j}
542 with { erroneous (i) "value:= omit" }
543
544 testcase tc_rawSeqInt2Omiti() runs on RawComp {
545 var integer j:= 255;
546 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
547 var octetstring actual := encode_rawSeqInt2(valueof(t_msi2_omiti(i,j)));
548 var octetstring etalon := encode_rawSeqInt(valueof(t_msi(j)));
549 f_compareAndVerdict(actual, etalon);
550 }
551 }
552
553 template RawSeqInt2 t_msi2_omitj(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j}
554 with { erroneous (j) "value:= omit" }
555
556 testcase tc_rawSeqInt2Omitj() runs on RawComp {
557 var integer j:= 255;
558 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
559 var octetstring actual := encode_rawSeqInt2(valueof(t_msi2_omitj(i,j)));
560 var octetstring etalon := encode_rawSeqInt(valueof(t_msi(i)));
561 f_compareAndVerdict(actual, etalon);
562 }
563 }
564
565 //before omit j
566 template RawSeqInt2 t_msi2_beforeomitj(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j}
567 with { erroneous (j) "before:= omit all" }
568
569 testcase tc_rawSeqInt2BeforeOmitj() runs on RawComp {
570 var integer j:= 255;
571 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
572 var octetstring actual := encode_rawSeqInt2(valueof(t_msi2_beforeomitj(i,j)));
573 var octetstring etalon := encode_rawSeqInt(valueof(t_msi(j)));
574 f_compareAndVerdict(actual, etalon);
575 }
576 }
577
578 //after omit i
579 template RawSeqInt2 t_msi2_afteromiti(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j}
580 with { erroneous (i) "after:= omit all" }
581
582 testcase tc_rawSeqInt2AfterOmiti() runs on RawComp {
583 var integer j:= 255;
584 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
585 var octetstring actual := encode_rawSeqInt2(valueof(t_msi2_afteromiti(i,j)));
586 var octetstring etalon := encode_rawSeqInt(valueof(t_msi(i)));
587 f_compareAndVerdict(actual, etalon);
588 }
589 }
590
591 //value
592 template RawSeqInt2 t_msi2_valueSameTypeE(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j}
593 with { erroneous (j) "value:= int32 : 5" }
594
595 testcase tc_rawSeqInt2ValueSameTypeE() runs on RawComp {
596 var integer j:= 255;
597 for(var integer i:=1; i < tsp_maxInt; i := i * tsp_step) {
598 var octetstring actual := encode_rawSeqInt2(valueof(t_msi2_valueSameTypeE(i,j)));
599 var octetstring etalon := encode_rawSeqInt2(valueof(t_msi2(i,5)));
600 f_compareAndVerdict(actual, etalon);
601 }
602 }
603
604 template RawSeqInt2 t_msi2_valueSameTypeI(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j}
605 with { erroneous (j) "value := 5" }
606
607 testcase tc_rawSeqInt2ValueSameTypeI() runs on RawComp {
608 var integer j:= 255;
609 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
610 var octetstring actual := encode_rawSeqInt2(valueof(t_msi2_valueSameTypeI(i,j)));
611 var octetstring etalon := encode_rawSeqInt28(valueof(t_msi28(i,5)));
612 f_compareAndVerdict(actual, etalon);
613 }
614 }
615
616 template RawSeqInt2 t_msi2_valueDiffTypeExplicitCharstring(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j}
617 with { erroneous (j) "value:= charstring:""Albert""" }
618
619 testcase tc_rawSeqInt2ValueDiffTypeExplicitCharstring() runs on RawComp {
620 var integer j:= 255;
621 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
622 var octetstring actual := encode_rawSeqInt2(valueof(t_msi2_valueDiffTypeExplicitCharstring(i,j)));
623 var octetstring etalon := encode_rawSeqIntCharstring(valueof(t_msir(i,"Albert")));
624 f_compareAndVerdict(actual, etalon);
625 }
626 }
627
628 template RawSeqInt2 t_msi2_valueDiffTypeImplicitCharstring(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j}
629 with { erroneous (j) "value:= ""Albert""" }
630
631 testcase tc_rawSeqInt2ValueDiffTypeImplicitCharstring() runs on RawComp {
632 var integer j:= 255;
633 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
634 var octetstring actual := encode_rawSeqInt2(valueof(t_msi2_valueDiffTypeImplicitCharstring(i,j)));
635 var octetstring etalon := encode_rawSeqIntCharstring(valueof(t_msir(i,"Albert")));
636 f_compareAndVerdict(actual, etalon);
637 }
638 }
639
640 template RawSeqInt2 t_msi2_valueDiffTypeExplicitString(template integer p_i, template integer p_j):={i:=p_i, j:=p_j}
641 with { erroneous (j) "value:= charstring:""subidubi""" }
642
643 testcase tc_rawSeqInt2ValueDiffTypeExplicitStr() runs on RawComp {
644 var integer j:= 255;
645 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
646 var octetstring actual := encode_rawSeqInt2(valueof( t_msi2_valueDiffTypeExplicitString(i, j)));
647 var octetstring etalon := encode_rawSeqIntStr(valueof(t_msistr(i, "subidubi")));
648 f_compareAndVerdict(actual, etalon);
649 }
650 }
651
652 template RawSeqInt2 t_msi2_valueSeqIntV(template integer p_i, template integer p_j):={i:=p_i, j:=p_j}
653 with { erroneous (j) "value := RawSeqInt2:{1,2}" }
654
655 testcase tc_rawSeqInt2ValueSeqIntV() runs on RawComp {
656 var integer i:= 10, j:= 15;
657 var octetstring vl_encoded := encode_rawSeqInt2(valueof(t_msi2_valueSeqIntV(i,j)))
658 var octetstring vl_expected:= encode_rawSeqIntSeqInt2({10,{1,2}})
659 f_compareAndVerdict(vl_encoded,vl_expected);
660 }
661
662 template RawSeqInt2 t_msi2_valueSeqIntOptV(template integer p_i, template integer p_j):={i:=p_i, j:=p_j}
663 with { erroneous (j) "value := RawSeqInt2opt:{1,2}" }
664
665 testcase tc_rawSeqInt2ValueSeqIntOptV() runs on RawComp {
666 var integer i:= 10, j:= 15;
667 var octetstring vl_encoded := encode_rawSeqInt2(valueof(t_msi2_valueSeqIntOptV(i,j)))
668 var octetstring vl_expected:= encode_rawSeqIntSeqInt2({10,{1,2}})
669 f_compareAndVerdict(vl_encoded,vl_expected);
670 }
671
672 template RawSeqInt2 t_msi2_valueSeqIntC(template integer p_i, template integer p_j):={i:=p_i, j:=p_j}
673 with { erroneous (j) "value := RawSeqInt2:c_msi2" }
674
675 testcase tc_rawSeqInt2ValueSeqIntC() runs on RawComp {
676 var integer i:= 10, j:= 15;
677 var octetstring vl_encoded := encode_rawSeqInt2(valueof(t_msi2_valueSeqIntC(i,j)))
678 var octetstring vl_expected:= encode_rawSeqIntSeqInt2({10,{1,2}})
679 f_compareAndVerdict(vl_encoded,vl_expected);
680 }
681
682 template RawSeqInt2 t_msi2_valueSeqIntOptC(template integer p_i, template integer p_j):={i:=p_i, j:=p_j}
683 with { erroneous (j) "value := RawSeqInt2opt:c_msi2opt" }
684
685 testcase tc_rawSeqInt2ValueSeqInt2OptC() runs on RawComp {
686 var integer i:= 10, j:= 15;
687 var octetstring vl_encoded := encode_rawSeqInt2(valueof(t_msi2_valueSeqIntOptC(i,j)));
688 var octetstring vl_expected:= encode_rawSeqIntSeqInt2({10,{1,2}});
689 f_compareAndVerdict(vl_encoded,vl_expected);
690 }
691
692 template RawSeqInt2 t_msi2_valueSeqInt2OptOmitC(template integer p_i, template integer p_j):={i:=p_i, j:=p_j}
693 with { erroneous (j) "value:= c_msi2optomit" }
694
695 testcase tc_rawSeqInt2ValueSeqInt2OptOmitC() runs on RawComp {
696 var integer i:= 10, j:= 15;
697 var octetstring vl_encoded := encode_rawSeqInt2(valueof(t_msi2_valueSeqInt2OptOmitC(i,j)));
698 var octetstring vl_expected:= encode_rawSeqIntSeqInt2optopt({10,{1,omit}})
699 f_compareAndVerdict(vl_encoded,vl_expected);
700 }
701
702 template RawSeqInt2 t_msi2_valueSeqInt2iiC(template integer p_i, template integer p_j):={i:=p_i, j:=p_j}
703 with { erroneous (i) "value:=int32 : c_msi2.i" }
704
705 testcase tc_rawSeqInt2ValueSeqInt2iiC() runs on RawComp {
706 var integer i:= 10, j:= 15;
707 var octetstring vl_encoded := encode_rawSeqInt2(valueof(t_msi2_valueSeqInt2iiC(i,j)));
708 var octetstring vl_expected:= encode_rawSeqInt2({1,15})
709 f_compareAndVerdict(vl_encoded,vl_expected);
710 }
711
712 template RawSeqInt2 t_msi2_valueSeqInt2ijC(template integer p_i, template integer p_j):={i:=p_i, j:=p_j}
713 with { erroneous (i) "value:=int32 : c_msi2.j" }
714
715 testcase tc_rawSeqInt2ValueSeqInt2ijC() runs on RawComp {
716 var integer i:= 10, j:= 15;
717 var octetstring vl_encoded := encode_rawSeqInt2(valueof(t_msi2_valueSeqInt2ijC(i,j)));
718 var octetstring vl_expected:= encode_rawSeqInt2({2,15})
719 f_compareAndVerdict(vl_encoded,vl_expected);
720 }
721
722 template RawSeqInt2 t_msi2_valueSeqInt2jiC(template integer p_i, template integer p_j):={i:=p_i, j:=p_j}
723 with { erroneous (j) "value:=int32 : c_msi2.i" }
724
725 testcase tc_rawSeqInt2ValueSeqInt2jiC() runs on RawComp {
726 var integer i:= 10, j:= 15;
727 var octetstring vl_encoded := encode_rawSeqInt2(valueof(t_msi2_valueSeqInt2jiC(i,j)));
728 var octetstring vl_expected:= encode_rawSeqInt2({10,1})
729 f_compareAndVerdict(vl_encoded,vl_expected);
730 }
731
732 template RawSeqInt2 t_msi2_valueSeqInt2jjC(template integer p_i, template integer p_j):={i:=p_i, j:=p_j}
733 with { erroneous (j) "value:=int32 : c_msi2.j" }
734
735 testcase tc_rawSeqInt2ValueSeqInt2jjC() runs on RawComp {
736 var integer i:= 10, j:= 15;
737 var octetstring vl_encoded := encode_rawSeqInt2(valueof(t_msi2_valueSeqInt2jjC(i,j)));
738 var octetstring vl_expected:= encode_rawSeqInt2({10,2})
739 f_compareAndVerdict(vl_encoded,vl_expected);
740 }
741
742 //=== Sequence { integer, {integer, integer} )
743 template RawSeqIntSeqInt2 t_msisi2_omiti(template integer p_i, template integer p_j, template integer p_k) := { i:= p_i, jk:= { i:=p_j, j:=p_k} }
744 with { erroneous (i) "value:= omit" };
745
746 testcase tc_rawSeqIntSeqInt2ValueOmiti() runs on RawComp {
747 var integer i:= 10, j:= 15, k:=16;
748 //var octetstring vl_default :=encode_rawSeqIntSeqInt2(valueof(t_msisi2(i,j,k))); // just to see the unaltered
749 // Stream after encoding: '0A0000000F00000010000000'O
750 var octetstring vl_encoded :=encode_rawSeqIntSeqInt2(valueof(t_msisi2_omiti(i,j,k)));
751 var octetstring vl_expected:=encode_rawSeqIntSeqInt2opt({omit,{15,16}});
752 f_compareAndVerdict(vl_encoded,vl_expected);
753 }
754
755 template RawSeqIntSeqInt2 t_msisi2_omitjki(template integer p_i, template integer p_j, template integer p_k) := { i:= p_i, jk:= { i:=p_j, j:=p_k} }
756 with { erroneous (jk.i) "value:= omit" };
757
758 testcase tc_rawSeqIntSeqInt2ValueOmitjki() runs on RawComp {
759 var integer i:= 10, j:= 15, k:=16;
760 f_compareAndVerdict(
761 encode_rawSeqIntSeqInt2(valueof(t_msisi2_omitjki(i,j,k))),
762 encode_rawSeqIntSeqInt2optopt({10,{16,omit}}) );
763 }
764
765 template RawSeqIntSeqInt2 t_msisi2_omitjkj(template integer p_i, template integer p_j, template integer p_k) :=
766 { i:= p_i, jk:= { i:=p_j, j:=p_k} }
767 with { erroneous (jk.j) "value:= omit" };
768
769 testcase tc_rawSeqIntSeqInt2ValueOmitjkj() runs on RawComp {
770 var integer i:= 10, j:= 15, k:=16;
771 f_compareAndVerdict(
772 encode_rawSeqIntSeqInt2(valueof(t_msisi2_omitjkj(i,j,k))),
773 encode_rawSeqIntSeqInt2optopt({10,{15,omit}}) );
774 }
775
776 template RawSeqIntSeqInt2 t_msisi2_rawjki(template integer p_i, template integer p_j, template integer p_k) :=
777 { i:= p_i, jk:= { i:=p_j, j:=p_k} }
778 with { erroneous (jk.i) "value(raw):= '41424241'O" }; //"ABBA"
779
780 testcase tc_rawSeqIntSeqInt2ValueRawjki() runs on RawComp {
781 var integer i:= 10, j:= 15, k:=16;
782 f_compareAndVerdict(
783 encode_rawSeqIntSeqInt2(valueof(t_msisi2_rawjki(i,j,k))),
784 '0A0000004142424110000000'O);
785 }
786
787 template RawSeqIntSeqInt2 t_msisi2_rawjkj(template integer p_i, template integer p_j, template integer p_k) :=
788 { i:= p_i, jk:= { i:=p_j, j:=p_k} }
789 with { erroneous (jk.j) "value(raw):= '41424241'O" };
790
791 testcase tc_rawSeqIntSeqInt2ValueRawjkj() runs on RawComp {
792 var integer i:= 10, j:= 15, k:=16;
793 f_compareAndVerdict(
794 encode_rawSeqIntSeqInt2(valueof(t_msisi2_rawjkj(i,j,k))),
795 '0A0000000F00000041424241'O);
796 }
797
798 //After-before:
799 template RawSeqIntSeqInt2 t_msisi2_afteribeforej(template integer p_i, template integer p_j, template integer p_k) := { i:= p_i, jk:= { i:=p_j, j:=p_k} }
800 with {
801 erroneous(i) "after:= '41424241'O";
802 erroneous(jk.i) "before:='42414241'O";
803 };
804
805 testcase tc_rawSeqIntSeqInt2AfteriBeforej() runs on RawComp {
806 var integer i:= 10, j:= 15, k:=16;
807 f_compareAndVerdict(
808 encode_rawSeqIntSeqInt2(valueof(t_msisi2_afteribeforej(i,j,k))),
809 '0A00000041424241424142410F00000010000000'O);
810 }
811
812 template RawSeqIntSeqInt2 t_msisi2_afterirawbeforejraw(template integer p_i, template integer p_j, template integer p_k) := { i:= p_i, jk:= { i:=p_j, j:=p_k} }
813 with {
814 erroneous(i) "after(raw):= '41424241'O"; //"ABBA"
815 erroneous(jk.i) "before(raw):='42414241'O"; //"BABA"
816 }; //"ABBA", "BABA"
817
818 testcase tc_rawSeqIntSeqInt2AfteriRawBeforejRaw() runs on RawComp {
819 var integer i:= 10, j:= 15, k:=16;
820 f_compareAndVerdict(
821 encode_rawSeqIntSeqInt2(valueof(t_msisi2_afterirawbeforejraw(i,j,k))),
822 '0A00000041424241424142410F00000010000000'O);
823 }
824
825 //==== {integer, integer, integer, integer} ==============
826 //omit
827 template RawSeqInt4 t_msi4_omiti(template integer p_i, template integer p_j, template integer p_k,template integer p_l ) := {i:= p_i, j:=p_j, k:=p_k, l:=p_l}
828 with { erroneous (i) "value:= omit" }
829
830 testcase tc_rawSeqInt4Omiti() runs on RawComp {
831 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
832 f_compareAndVerdict(
833 encode_rawSeqInt4(valueof(t_msi4_omiti(i,2*i,3*i,4*i))),
834 encode_rawSeqInt3(valueof(t_msi3(2*i,3*i,4*i))) )
835 }
836 }
837
838 template RawSeqInt4 t_msi4_omitj(template integer p_i, template integer p_j, template integer p_k,template integer p_l ) := {i:= p_i, j:=p_j, k:=p_k, l:=p_l}
839 with { erroneous (j) "value:= omit" }
840
841 testcase tc_rawSeqInt4Omitj() runs on RawComp {
842 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
843 f_compareAndVerdict(
844 encode_rawSeqInt4(valueof(t_msi4_omitj(i,2*i,3*i,4*i))),
845 encode_rawSeqInt3(valueof(t_msi3(i,3*i,4*i))) );
846 }
847 }
848
849 template RawSeqInt4 t_msi4_omitk(template integer p_i, template integer p_j, template integer p_k,template integer p_l ) := {i:= p_i, j:=p_j, k:=p_k, l:=p_l}
850 with { erroneous (k) "value:= omit" }
851
852 testcase tc_rawSeqInt4Omitk() runs on RawComp {
853 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
854 f_compareAndVerdict(
855 encode_rawSeqInt4(valueof(t_msi4_omitk(i,2*i,3*i,4*i))),
856 encode_rawSeqInt3(valueof(t_msi3(i,2*i,4*i))) )
857 }
858 }
859
860 template RawSeqInt4 t_msi4_omitl(template integer p_i, template integer p_j, template integer p_k,template integer p_l ) := {i:= p_i, j:=p_j, k:=p_k, l:=p_l}
861 with { erroneous (l) "value:= omit" }
862
863 testcase tc_rawSeqInt4Omitl() runs on RawComp {
864 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
865 f_compareAndVerdict(
866 encode_rawSeqInt4(valueof(t_msi4_omitl(i,2*i,3*i,4*i))),
867 encode_rawSeqInt3(valueof(t_msi3(i,2*i,3*i))) )
868 }
869 }
870
871 template RawSeqInt4 t_msi4_valueiOctetStr(template integer p_i, template integer p_j, template integer p_k, template integer p_l) :=
872 {i:= p_i, j:=p_j, k:=p_k,l:=p_l}
873 with { erroneous (i) "value:= 'FEDCBA98'O" }
874
875 template RawSeqOJKL t_msojkl(template octetstring p_o, template integer p_j, template integer p_k,template integer p_l ) :=
876 {o:= p_o, j:=p_j, k:=p_k, l:=p_l}
877
878 testcase tc_rawSeqInt4ValueiOctetStr() runs on RawComp {
879 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
880 f_compareAndVerdict(
881 encode_rawSeqInt4(valueof(t_msi4_valueiOctetStr(i,2*i,3*i,4*i))),
882 encode_rawSeqOJKL(valueof(t_msojkl('FEDCBA98'O,2*i,3*i, 4*i))) )
883 }
884 }
885
886 template RawSeqInt4 t_msi4_valuejOctetStr(template integer p_i, template integer p_j, template integer p_k,template integer p_l) :=
887 {i:= p_i, j:=p_j, k:=p_k,l:=p_l}
888 with { erroneous (j) "value:= 'FEDCBA98'O" }
889
890 template RawSeqIOKL t_msiokl(template integer p_i, template octetstring p_o, template integer p_k,template integer p_l ) :=
891 {i:=p_i, o:=p_o, k:=p_k, l:=p_l}
892
893 testcase tc_rawSeqInt4ValuejOctetStr() runs on RawComp {
894 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
895 f_compareAndVerdict(
896 encode_rawSeqInt4(valueof(t_msi4_valuejOctetStr(i,2*i,3*i,4*i))),
897 encode_rawSeqIOKL(valueof(t_msiokl(i,'FEDCBA98'O,3*i, 4*i))) )
898 }
899 }
900
901 type record of octetstring RoC;
902 type record of integer RoI;
903
904 template RawSeqInt4 t_msi4_valueiRaw(template integer p_i, template integer p_j, template integer p_k,template integer p_l) := {i:= p_i, j:=p_j, k:=p_k,l:=p_l}
905 with { erroneous (i) "value(raw):= '41424241'O" }
906
907 testcase tc_rawSeqInt4ValueiRaw() runs on RawComp {
908 var RoC vl_expectedValue:= {
909 '41424241020000000300000004000000'O,
910 '41424241140000001E00000028000000'O,
911 '41424241C80000002C01000090010000'O,
912 '41424241D0070000B80B0000A00F0000'O,
913 '41424241ECFFFFFFE2FFFFFFD8FFFFFF'O
914 }
915 //if i=1
916 var RoI vl_roi := { 1, 10, 100, 1000,-10};
917
918 var integer i:=0;
919 for(var integer index:=0; index<5;index:=index+1) {
920 i:=vl_roi[index];
921 f_compareAndVerdict(
922 encode_rawSeqInt4(valueof(t_msi4_valueiRaw(i,2*i,3*i,4*i))),
923 vl_expectedValue[index]);
924 }
925 }
926
927 template RawSeqInt4 t_msi4_valuejRaw(template integer p_i, template integer p_j, template integer p_k,template integer p_l) := {i:= p_i, j:=p_j, k:=p_k,l:=p_l}
928 with { erroneous (j) "value(raw):= '41424241'O" }
929
930 testcase tc_rawSeqInt4ValuejRaw() runs on RawComp {
931 var octetstring vl_expectedValue:= '01000000414242410300000004000000'O;
932 var integer i:=1;
933 f_compareAndVerdict(
934 encode_rawSeqInt4(valueof(t_msi4_valuejRaw(i,2*i,3*i,4*i))),
935 vl_expectedValue);
936 }
937
938 template RawSeqInt4 t_msi4_valuekRaw(template integer p_i, template integer p_j, template integer p_k,template integer p_l) := {i:= p_i, j:=p_j, k:=p_k,l:=p_l}
939 with { erroneous (k) "value(raw):= '41424241'O" }
940
941 testcase tc_rawSeqInt4ValuekRaw() runs on RawComp {
942 var octetstring vl_expectedValue:= '01000000020000004142424104000000'O;
943 var integer i:=1;
944 f_compareAndVerdict(
945 encode_rawSeqInt4(valueof(t_msi4_valuekRaw(i,2*i,3*i,4*i))),
946 vl_expectedValue);
947 }
948
949 template RawSeqInt4 t_msi4_valuelRaw(template integer p_i, template integer p_j, template integer p_k,template integer p_l) := {i:= p_i, j:=p_j, k:=p_k,l:=p_l}
950 with { erroneous (l) "value(raw):= '41424241'O" }
951
952 testcase tc_rawSeqInt4ValuelRaw() runs on RawComp {
953 var octetstring vl_expectedValue:= '01000000020000000300000041424241'O;
954 var integer i:=1
955 f_compareAndVerdict(
956 encode_rawSeqInt4(valueof(t_msi4_valuelRaw(i,2*i,3*i,4*i))),
957 vl_expectedValue);
958 }
959
960 //To test if a mandatory structure omitted
961 template RawSeqISKL t_msiskl_valueSomit(template integer p_i, template RawSeqInt4 p_s, template integer p_k,template integer p_l ) :=
962 {i:=p_i, s:=p_s, k:=p_k, l:=p_l}
963 with { erroneous (s) "value:= omit" }
964
965 testcase tc_rawSeqISKL_ValueSomit() runs on RawComp {
966 var RawSeqInt4 vl_msi4:={5,6,7,8};
967 var octetstring vl_expectedValue:='0A0000001E00000028000000'O;
968 f_compareAndVerdict(
969 encode_rawSeqISKL(valueof(t_msiskl_valueSomit(10,vl_msi4,30,40))),
970 vl_expectedValue);
971 }
972
973 template RawSeqISKL t_msiskl_valueSIomit(template integer p_i, template RawSeqInt4 p_s, template integer p_k,template integer p_l ) := {i:=p_i, s:=p_s, k:=p_k, l:=p_l}
974 with { erroneous (s.i) "value:= omit" }
975
976 testcase tc_rawSeqISKL_ValueSIomit() runs on RawComp {
977 var RawSeqInt4 vl_msi4:={5,6,7,8};
978 var octetstring vl_expectedValue:='0A0000000600000007000000080000001E00000028000000'O;
979 f_compareAndVerdict(
980 encode_rawSeqISKL(valueof(t_msiskl_valueSIomit(10,vl_msi4,30,40))),
981 vl_expectedValue);
982 }
983
984 template RawSeqISKL t_msiskl_valueSISJomit(template integer p_i, template RawSeqInt4 p_s, template integer p_k,template integer p_l ) := {i:=p_i, s:=p_s, k:=p_k, l:=p_l}
985 with {
986 erroneous (s.i) "value:= omit"
987 erroneous (s.j) "value:= omit"
988 }
989 testcase tc_rawSeqISKL_ValueSISJomit() runs on RawComp {
990 var RawSeqInt4 vl_msi4:={5,6,7,8};
991 var octetstring vl_expectedValue:='0A00000007000000080000001E00000028000000'O;
992 f_compareAndVerdict(
993 encode_rawSeqISKL(valueof(t_msiskl_valueSISJomit(10,vl_msi4,30,40))),
994 vl_expectedValue);
995 }
996
997 template RawSeqISKL t_msiskl_valueSraw(template integer p_i, template RawSeqInt4 p_s, template integer p_k,template integer p_l ) := {i:=p_i, s:=p_s, k:=p_k, l:=p_l}
998 with { erroneous (s) "value(raw):= '41424241'O" }
999
1000 testcase tc_rawSeqISKL_ValueSraw() runs on RawComp {
1001 var RawSeqInt4 vl_msi4:={5,6,7,8};
1002 var octetstring vl_expectedValue:= '0A000000414242411E00000028000000'O;
1003 f_compareAndVerdict(
1004 encode_rawSeqISKL(valueof(t_msiskl_valueSraw(10,vl_msi4,30,40))),
1005 vl_expectedValue);
1006 }
1007
1008 //===== sequence of sequence of sequence ====
1009 template RawSeqIntSeqIntSeqInt2SeqCharstring2 t_msisisi2r2_omiti(template integer p_i,template RawSeqIntSeqInt2 p_jkl, template RawSeqCharstring2 p_xy) :=
1010 { i:=p_i, jkl:=p_jkl, xy:=p_xy}
1011 with { erroneous(i) "value:=omit"}
1012
1013 testcase tc_RawSeqIntSeqIntSeqInt2SeqCharstring2_omiti() runs on RawComp {
1014 var RawSeqSeqIntSeqInt2SeqCharstring2 vl_analog:= {{2,{3,4}},{"Albert","Einstein"}};
1015 var octetstring vl_actual := encode_rawSeqIntSeqIntSeqInt2SeqCharstring2(valueof(t_msisisi2r2_omiti(1, {2,{3,4}}, {"Albert","Einstein"} )));
1016 var octetstring vl_expected:= encode_rawSeqSeqIntSeqInt2SeqCharstring2(vl_analog);
1017 f_compareAndVerdict(
1018 vl_actual,
1019 vl_expected)
1020 }
1021
1022 template RawSeqIntSeqIntSeqInt2SeqCharstring2 t_msisisi2r2_omitjkl(template integer p_i,template RawSeqIntSeqInt2 p_jkl, template RawSeqCharstring2 p_xy) :=
1023 { i:=p_i, jkl:=p_jkl, xy:=p_xy} with { erroneous(jkl) "value:=omit"}
1024
1025 testcase tc_RawSeqIntSeqIntSeqInt2SeqCharstring2_omitjkl() runs on RawComp {
1026 var RawSeqIntSeqCharstring2 vl_expected:= { 1, {"Albert","Einstein"}};
1027 var octetstring actual := encode_rawSeqIntSeqIntSeqInt2SeqCharstring2(valueof(t_msisisi2r2_omitjkl(1, {2,{3,4}}, {"Albert","Einstein"} )));
1028 var octetstring expected := encode_rawSeqIntSeqCharstring2(vl_expected);
1029 f_compareAndVerdict(actual, expected);
1030 }
1031
1032 template RawSeqIntSeqIntSeqInt2SeqCharstring2 t_msisisi2r2_omitxy(template integer p_i,template RawSeqIntSeqInt2 p_jkl, template RawSeqCharstring2 p_xy) :=
1033 { i:=p_i, jkl:=p_jkl, xy:=p_xy}
1034 with { erroneous(xy) "value:=omit"}
1035
1036 testcase tc_RawSeqIntSeqIntSeqInt2SeqCharstring2_omitxy() runs on RawComp {
1037 var RawSeqIntSeqIntSeqInt2 vl_expected:= { 1, {2,{3,4}} };
1038 var octetstring actual := encode_rawSeqIntSeqIntSeqInt2SeqCharstring2(valueof(t_msisisi2r2_omitxy(1, {2,{3,4}}, {"Albert","Einstein"} )));
1039 var octetstring expected := encode_rawSeqIntSeqIntSeqInt2(vl_expected);
1040 f_compareAndVerdict(actual, expected);
1041 }
1042
1043 //...with { erroneous(jkl.jk.j) "value:=omit"}
1044 template RawSeqIntSeqIntSeqInt2SeqCharstring2 t_msisisi2r2_omitjkll(template integer p_i,template RawSeqIntSeqInt2 p_jkl, template RawSeqCharstring2 p_xy) :=
1045 { i:=p_i, jkl:=p_jkl, xy:=p_xy}
1046 with { erroneous(jkl.jk.j) "value:=omit"}
1047
1048 testcase tc_RawSeqIntSeqIntSeqInt2SeqCharstring2_omitjkll() runs on RawComp {
1049 var RawSeqIntSeqIntSeqInt2optoptSeqCharstring2 vl_expected:= {1,{2,{3,omit}}, {"Albert","Einstein"}};
1050 var octetstring vl_actual := encode_rawSeqIntSeqIntSeqInt2SeqCharstring2(
1051 valueof(t_msisisi2r2_omitjkll(1, {2,{3,4}}, {"Albert","Einstein"} )))
1052 var octetstring vl_etalon := encode_rawSeqIntSeqIntSeqInt2optoptSeqCharstring2(vl_expected)
1053 f_compareAndVerdict(vl_actual , vl_etalon);
1054 }
1055
1056 template RawSeqIntSeqIntSeqInt2SeqCharstring2 t_msisisi2r2_valuexy(template integer p_i,template RawSeqIntSeqInt2 p_jkl, template RawSeqCharstring2 p_xy) :=
1057 { i:=p_i, jkl:=p_jkl, xy:=p_xy} with { erroneous(xy) "value:=RawSeqCharstring2:{""Bonnie"",""Tyler""}"}
1058
1059 testcase tc_RawSeqIntSeqIntSeqInt2SeqCharstring2_valuexy() runs on RawComp {
1060 //var RawSeqIntSeqIntSeqInt2SeqCharstring2 vl_msisisi2r2;
1061 var RawSeqIntSeqIntSeqInt2SeqCharstring2 vl_expected:= {1,{2,{3,4}}, {"Bonnie","Tyler"}};
1062 var octetstring actual := encode_rawSeqIntSeqIntSeqInt2SeqCharstring2(
1063 valueof(t_msisisi2r2_valuexy(1, {2,{3,4}}, {"Albert","Einstein"} )));
1064 var octetstring expected := encode_rawSeqIntSeqIntSeqInt2SeqCharstring2(vl_expected)
1065 f_compareAndVerdict(actual, expected);
1066 }
1067
1068 template RawSeqIntSeqIntSeqInt2SeqCharstring2 t_msisisi2r2_valuex_y(template integer p_i,template RawSeqIntSeqInt2 p_jkl, template RawSeqCharstring2 p_xy) :=
1069 { i:=p_i, jkl:=p_jkl, xy:=p_xy} with {
1070 erroneous(xy.x) "value:=charstring:""Albert""";
1071 erroneous(xy.y) "value:=charstring:""Einstein"""
1072 }
1073
1074 testcase tc_RawSeqIntSeqIntSeqInt2SeqCharstring2_valuex_y() runs on RawComp {
1075 var RawSeqIntSeqIntSeqInt2SeqCharstring2 vl_expected:= {1,{2,{3,4}}, {"Albert","Einstein"}};
1076 var octetstring actual := encode_rawSeqIntSeqIntSeqInt2SeqCharstring2(
1077 valueof(t_msisisi2r2_valuex_y(1, {2,{3,4}}, {"Albert","Einstein"} )));
1078 var octetstring expected := encode_rawSeqIntSeqIntSeqInt2SeqCharstring2(vl_expected)
1079 f_compareAndVerdict(actual, expected);
1080 }
1081
1082 // Expression evaluation in attribue section:
1083 template RawSeqIntSeqIntSeqInt2SeqCharstring2 t_msisisi2r2_valuex_y_expr1(template integer p_i,template RawSeqIntSeqInt2 p_jkl, template RawSeqCharstring2 p_xy) :=
1084 { i := p_i, jkl := p_jkl, xy := p_xy }
1085 with {
1086 erroneous(xy.x) "value := int32 : 9 * 5"
1087 erroneous(xy.y) "value := int32 : 16 * 4"
1088 }
1089
1090 testcase tc_RawSeqIntSeqIntSeqInt2SeqCharstring2_valuex_y_expr1() runs on RawComp {
1091 var RawSeqIntSeqIntSeqInt2SeqInt2 vl_expected:= { 1, { 2, { 3, 4 } }, { 45, 64 } }
1092 var octetstring actual := encode_rawSeqIntSeqIntSeqInt2SeqCharstring2(valueof(t_msisisi2r2_valuex_y_expr1(1, { 2, { 3, 4 } }, { "Albert", "Four" })))
1093 var octetstring expected := encode_rawSeqIntSeqIntSeqInt2SeqInt2(vl_expected)
1094 // Expected: '010200000003000000040000002D00000040000000'O
1095 f_compareAndVerdict(actual, expected);
1096 }
1097
1098 template RawSeqIntSeqIntSeqInt2SeqCharstring2 t_msisisi2r2_valuex_y_expr2(template integer p_i, template RawSeqIntSeqInt2 p_jkl, template RawSeqCharstring2 p_xy) :=
1099 { i := p_i, jkl := p_jkl, xy := p_xy }
1100 with {
1101 erroneous(xy.x) "value := int32 : (1 + 10 * (2 + 10 * (3 + 10 * (4 + 10 * (5 + 10 * 6)))))" // Horner
1102 erroneous(xy.y) "value := int32 : 16 / 5"
1103 }
1104
1105 testcase tc_RawSeqIntSeqIntSeqInt2SeqCharstring2_valuex_y_expr2() runs on RawComp {
1106 var RawSeqIntSeqIntSeqInt2SeqInt2 vl_expected:= { 1, { 2, { 3, 4 } }, { 654321, 3 } }
1107 var octetstring actual := encode_rawSeqIntSeqIntSeqInt2SeqCharstring2(valueof(t_msisisi2r2_valuex_y_expr2(1, { 2, { 3, 4 } }, { "Albert", "Four" })))
1108 var octetstring expected := encode_rawSeqIntSeqIntSeqInt2SeqInt2(vl_expected)
1109 // Expected: '01020000000300000004000000F1FB090003000000'O
1110 f_compareAndVerdict(actual, expected)
1111 }
1112
1113 template RawSeq_SeqSeqIntSeqInt2SeqCharstring2_SeqSeqIntSeqInt2SeqCharstring2 t_msssi2sr2ssi2sr2_omit(template RawSeqSeqIntSeqInt2SeqCharstring2 p_s1,template RawSeqSeqIntSeqInt2SeqCharstring2 p_s2)
1114 :={ s1:=p_s1,s2:=p_s2} with { erroneous(s1.jkl.jk.j) "value:=omit" }
1115
1116 testcase tc_RawSeq_SeqSeqIntSeqInt2SeqCharstring2_SeqSeqIntSeqInt2SeqCharstring2_omit() runs on RawComp {
1117 var RawSeqSeqIntSeqInt2SeqCharstring2 vl_s1:={ {1,{2,3}}, {"Three","Four"} }, vl_s2:= {{5,{6,7}}, {"Seven", "Eight"}};
1118 var RawSeq_SeqSeqIntSeqInt2optoptSeqCharstring2_SeqSeqIntSeqInt2optoptSeqCharstring2 vl_expected := { { omit,{1,{2, omit}}, {"Three","Four"} }, { omit,{5,{6,7}}, {"Seven", "Eight"}} }
1119 var octetstring actual := encode_rawSeq_SeqSeqIntSeqInt2SeqCharstring2_SeqSeqIntSeqInt2SeqCharstring2(valueof(t_msssi2sr2ssi2sr2_omit(vl_s1, vl_s2)));
1120 var octetstring expected := encode_rawSeq_SeqSeqIntSeqInt2optoptSeqCharstring2_SeqSeqIntSeqInt2optoptSeqCharstring2(vl_expected);
1121 f_compareAndVerdict(actual, expected);
1122 }
1123
1124 // perturbing an omitted value
1125 // before
1126 const RawSeqIntSeqInt2opt c_r2bp := { 42, {13, 17} }
1127 with { erroneous (i) "before := ""=42"" " };
1128
1129 const RawSeqIntSeqInt2opt c_r2bo := { omit, {13, 17} }
1130 with { erroneous (i) "before := ""=42"" " };
1131
1132 testcase tc_RawSeqInt2opt_before () runs on RawComp {
1133 //
1134 var octetstring actual := encode_rawSeqIntSeqInt2opt(c_r2bp);
1135 var octetstring expected := '3D3432'O & '2A000000'O & '0D00000011000000'O;
1136 f_compareAndVerdict(actual, expected);
1137
1138 actual := encode_rawSeqIntSeqInt2opt(c_r2bo);
1139 expected := '3D3432'O & ''O & '0D00000011000000'O;
1140 f_compareAndVerdict(actual, expected);
1141 }
1142
1143 const RawSeqIntSeqInt2opt c_r2bpr := { 42, {13, 17} }
1144 with { erroneous (i) "before(raw) := '42'O " };
1145
1146 const RawSeqIntSeqInt2opt c_r2bor := { omit, {13, 17} }
1147 with { erroneous (i) "before(raw) := '42'O " };
1148
1149 testcase tc_RawSeqInt2opt_before_raw () runs on RawComp {
1150 //
1151 var octetstring actual := encode_rawSeqIntSeqInt2opt(c_r2bpr);
1152 var octetstring expected := '42'O & '2A000000'O & '0D00000011000000'O;
1153 f_compareAndVerdict(actual, expected);
1154
1155 actual := encode_rawSeqIntSeqInt2opt(c_r2bor);
1156 expected := '42'O & ''O & '0D00000011000000'O;
1157 f_compareAndVerdict(actual, expected);
1158 }
1159
1160 // value replacement
1161 const RawSeqIntSeqInt2opt c_r2vp := { 42, {13, 17} }
1162 with { erroneous (i) "value := ""=42"" " };
1163
1164 const RawSeqIntSeqInt2opt c_r2vo := { omit, {13, 17} }
1165 with { erroneous (i) "value := ""=42"" " };
1166
1167 testcase tc_RawSeqInt2opt_value () runs on RawComp {
1168 //
1169 var octetstring actual := encode_rawSeqIntSeqInt2opt(c_r2vp);
1170 var octetstring expected := '3D3432'O & '0D00000011000000'O;
1171 f_compareAndVerdict(actual, expected);
1172
1173 actual := encode_rawSeqIntSeqInt2opt(c_r2vo);
1174 //expected should be the same
1175 f_compareAndVerdict(actual, expected);
1176 }
1177
1178 const RawSeqIntSeqInt2opt c_r2vpr := { 42, {13, 17} }
1179 with { erroneous (i) "value(raw) := '42'O " };
1180
1181 const RawSeqIntSeqInt2opt c_r2vor := { omit, {13, 17} }
1182 with { erroneous (i) "value(raw) := '42'O " };
1183
1184 testcase tc_RawSeqInt2opt_value_raw () runs on RawComp {
1185 //
1186 var octetstring actual := encode_rawSeqIntSeqInt2opt(c_r2vpr);
1187 var octetstring expected := '42'O & '0D00000011000000'O;
1188 f_compareAndVerdict(actual, expected);
1189
1190 actual := encode_rawSeqIntSeqInt2opt(c_r2vor);
1191 //expected should be the same
1192 f_compareAndVerdict(actual, expected);
1193 }
1194
1195 // after
1196 const RawSeqIntSeqInt2opt c_r2ap := { 42, {13, 17} }
1197 with { erroneous (i) "after := ""=42"" " };
1198
1199 const RawSeqIntSeqInt2opt c_r2ao := { omit, {13, 17} }
1200 with { erroneous (i) "after := ""=42"" " };
1201
1202 testcase tc_RawSeqInt2opt_after () runs on RawComp {
1203 //
1204 var octetstring actual := encode_rawSeqIntSeqInt2opt(c_r2ap);
1205 var octetstring expected := '2A000000'O & '3D3432'O & '0D00000011000000'O;
1206 f_compareAndVerdict(actual, expected);
1207
1208 actual := encode_rawSeqIntSeqInt2opt(c_r2ao);
1209 expected := ''O & '3D3432'O & '0D00000011000000'O;
1210 f_compareAndVerdict(actual, expected);
1211 }
1212
1213 const RawSeqIntSeqInt2opt c_r2apr := { 42, {13, 17} }
1214 with { erroneous (i) "after(raw) := '42'O " };
1215
1216 const RawSeqIntSeqInt2opt c_r2aor := { omit, {13, 17} }
1217 with { erroneous (i) "after(raw) := '42'O " };
1218
1219 testcase tc_RawSeqInt2opt_after_raw () runs on RawComp {
1220 //
1221 var octetstring actual := encode_rawSeqIntSeqInt2opt(c_r2apr);
1222 var octetstring expected := '2A000000'O & '42'O & '0D00000011000000'O;
1223 f_compareAndVerdict(actual, expected);
1224
1225 actual := encode_rawSeqIntSeqInt2opt(c_r2aor);
1226 expected := ''O & '42'O & '0D00000011000000'O;
1227 f_compareAndVerdict(actual, expected);
1228 }
1229
1230}//group Sequences
1231
1232group SequenceOf {
1233 //====sequence of related templates====
1234 template RawSeqOfBool t_msob(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 };
1235 template RawSeqOfInt t_msoi(template integer p_i1, template integer p_i2, template integer p_i3):={p_i1,p_i2,p_i3};
1236 template RawSeqOfRawEnum t_msome(template RawEnum p_e1, template RawEnum p_e2,template RawEnum p_e3) := {p_e1,p_e2,p_e3};
1237 template RawSeqOfCharstring t_msor(template charstring p_f1, template charstring p_f2, template charstring p_f3, template charstring p_f4):= {p_f1, p_f2,p_f3,p_f4}
1238 template RawSeqOfBitStr t_msobs(template bitstring p_bs1, template bitstring p_bs2, template bitstring p_bs3):={p_bs1, p_bs2, p_bs3}
1239 template RawSeqOfOctStr t_msoos(template octetstring p_os1, template octetstring p_os2, template octetstring p_os3):={p_os1, p_os2, p_os3}
1240
1241 // This would cause compilation error - correct behavior:
1242 //template RawSeqOfBool t_msobAfterOmit(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
1243 // with { erroneous ([0]) "after:=omit all"; erroneous ([1]) "value:= 4" };
1244
1245 //INTEGER
1246
1247 template RawSeqOfInt t_msoiCharStrValueAfterOmit1(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
1248 with { erroneous ([1]) "after:= omit all"; erroneous ([1]) "value:= ""bubu"""};
1249 template RawSeqOfInt t_msoiCharStrValueAfterOmit1_2(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
1250 with { erroneous ([1]) "after:= omit all"; erroneous ([0]) "value:= ""bubu"""};
1251 //RawEnum
1252 template RawSeqOfRawEnum t_msoeValueDiffType(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
1253 with { erroneous ([0]) "value:= ""Pi"""; erroneous ([2]) "value:= true" };
1254 template RawSeqOfRawEnum t_msoeValueDiffTypeRaw(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
1255 with { erroneous ([0]) "value(raw):= '41424241'O"; erroneous ([2]) "value:= true" };
1256 template RawSeqOfRawEnum t_msoeBeforeOmit2(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
1257 with { erroneous ([2]) "before:= omit all" };
1258 template RawSeqOfRawEnum t_msoeIntValueBeforeOmit2(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
1259 with { erroneous ([2]) "before:= omit all"; erroneous ([2]) "value:= int32 : 2011"};
1260 template RawSeqOfRawEnum t_msoeCharStrValueBeforeOmit2(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
1261 with { erroneous ([2]) "before:= omit all"; erroneous ([2]) "value:= ""bubu"""};
1262 template RawSeqOfRawEnum t_msoeBeforeOmit1(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
1263 with { erroneous ([1]) "before:= omit all" };
1264 template RawSeqOfRawEnum t_msoeIntValueBeforeOmit1(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
1265 with { erroneous ([1]) "before:= omit all"; erroneous ([1]) "value:= int32 : 2011"};
1266 template RawSeqOfRawEnum t_msoeCharStrValueBeforeOmit1(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
1267 with { erroneous ([1]) "before:= omit all"; erroneous ([1]) "value:= ""bubu"""};
1268 template RawSeqOfRawEnum t_msoeCharStrValueBeforeOmit1_2(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
1269 with { erroneous ([1]) "before:= omit all"; erroneous ([2]) "value:= ""bubu"""};
1270
1271 template RawSeqOfRawEnum t_msoeAfterOmit1(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
1272 with { erroneous ([1]) "after:= omit all" };
1273 template RawSeqOfRawEnum t_msoeIntValueAfterOmit1(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
1274 with { erroneous ([1]) "after:= omit all"; erroneous ([1]) "value:= int32 : 2011"};
1275 template RawSeqOfRawEnum t_msoeCharStrValueAfterOmit1(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
1276 with { erroneous ([1]) "after:= omit all"; erroneous ([1]) "value:= ""bubu"""};
1277 template RawSeqOfRawEnum t_msoeCharStrValueAfterOmit1_2(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
1278 with { erroneous ([1]) "after:= omit all"; erroneous ([0]) "value:= ""bubu"""};
1279 //Charstring (charstring):
1280 template RawSeqOfCharstring t_msorValueDiffType(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
1281 with { erroneous ([0]) "value:= ""Pi"""; erroneous ([2]) "value:= true" };
1282 template RawSeqOfCharstring t_msorValueDiffTypeRaw(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
1283 with { erroneous ([0]) "value(raw):= '41424241'O"; erroneous ([2]) "value:= true" };
1284 template RawSeqOfCharstring t_msorBeforeOmit2(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
1285 with { erroneous ([2]) "before:= omit all" };
1286 template RawSeqOfCharstring t_msorIntValueBeforeOmit2(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
1287 with { erroneous ([2]) "before:= omit all"; erroneous ([2]) "value:= int32 : 2011"};
1288 template RawSeqOfCharstring t_msorCharStrValueBeforeOmit2(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
1289 with { erroneous ([2]) "before:= omit all"; erroneous ([2]) "value:= ""bubu"""};
1290 template RawSeqOfCharstring t_msorBeforeOmit1(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
1291 with { erroneous ([1]) "before:= omit all" };
1292 template RawSeqOfCharstring t_msorIntValueBeforeOmit1(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
1293 with { erroneous ([1]) "before:= omit all"; erroneous ([1]) "value:= int32 : 2011"};
1294 template RawSeqOfCharstring t_msorCharStrValueBeforeOmit1(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
1295 with { erroneous ([1]) "before:= omit all"; erroneous ([1]) "value:= ""bubu"""};
1296 template RawSeqOfCharstring t_msorCharStrValueBeforeOmit1_2(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
1297 with { erroneous ([1]) "before:= omit all"; erroneous ([2]) "value:= ""bubu"""};
1298
1299 template RawSeqOfCharstring t_msorAfterOmit1(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
1300 with { erroneous ([1]) "after:= omit all" };
1301 template RawSeqOfCharstring t_msorIntValueAfterOmit1(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
1302 with { erroneous ([1]) "after:= omit all"; erroneous ([1]) "value:= int32 : 2011"};
1303 template RawSeqOfCharstring t_msorCharStrValueAfterOmit1(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
1304 with { erroneous ([1]) "after:= omit all"; erroneous ([1]) "value:= ""bubu"""};
1305 template RawSeqOfCharstring t_msorCharStrValueAfterOmit1_2(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
1306 with { erroneous ([1]) "after:= omit all"; erroneous ([0]) "value:= ""bubu"""};
1307 //more complex:
1308
1309 template RawSeqOfSeqSeqIntSeqInt2SeqCharstring2 t_msossisi2sr2_beforeomitj(template RawSeqSeqIntSeqInt2SeqCharstring2 p_s1,template RawSeqSeqIntSeqInt2SeqCharstring2 p_s2) :={ p_s1, p_s2}
1310 with { erroneous([0].jkl.jk.j) "before:=omit all" erroneous([1].jkl.jk.i) "after:=omit all"}
1311
1312 template RawSeqOfSeqSeqIntSeqInt2SeqCharstring2 t_msossisi2sr2_beforeafteromit(
1313 template RawSeqSeqIntSeqInt2SeqCharstring2 p_s1,template RawSeqSeqIntSeqInt2SeqCharstring2 p_s2) :={ p_s1, p_s2}
1314 with { erroneous([0].jkl.jk.j) "before:=omit all" erroneous([1].jkl.jk.i) "after:=omit all"}
1315
1316 template RawSeqOfSeqSeqIntSeqInt2SeqCharstring2 t_msossisi2sr2_arglist_omit(
1317 template RawSeqSeqIntSeqInt2SeqCharstring2 p_s1,template RawSeqSeqIntSeqInt2SeqCharstring2 p_s2) :={ p_s1, p_s2}
1318 with { erroneous([0].jkl.i, [0].jkl.jk.j, [0].xy.x) "value:=omit" erroneous([1].jkl.jk.i, [1].xy.x) "after:=omit all"}
1319
1320 template RawSeqOfSeqSeqIntSeqInt2SeqCharstring2 t_msossisi2sr2_arglist_afteromit(
1321 template RawSeqSeqIntSeqInt2SeqCharstring2 p_s1,template RawSeqSeqIntSeqInt2SeqCharstring2 p_s2) :={ p_s1, p_s2}
1322 with { erroneous([0].jkl.jk.i, [0].xy.x) "after:=omit all" erroneous([1].jkl.jk.i, [1].xy.x) "after:=omit all"}
1323
1324 template RawSeqOfSeqSeqIntSeqInt2SeqCharstring2 t_msossisi2sr2_arglist_beforeomit(
1325 template RawSeqSeqIntSeqInt2SeqCharstring2 p_s1,template RawSeqSeqIntSeqInt2SeqCharstring2 p_s2) :={ p_s1, p_s2}
1326 with { erroneous([0].jkl.jk.j, [0].xy.y) "before:=omit all" erroneous([1].jkl.jk.i, [1].xy.x) "after:=omit all"}
1327 //============ Testcases====================
1328 //Testcase of same type
1329 template RawSeqOfBool t_msobValueSameType(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
1330 with { erroneous ([0]) "value:= boolean:true"; erroneous ([2]) "value:= boolean:true" };
1331
1332 testcase tc_RawSeqOfBoolValueSameType1() runs on RawComp {
1333 f_compareAndVerdict(
1334 encode_rawSeqOfBool(valueof(t_msobValueSameType(false, false,false))),
1335 encode_rawSeqOfBool(valueof(t_msob(true, false, true))));
1336 }
1337
1338 testcase tc_RawSeqOfBoolValueSameType2() runs on RawComp {
1339 f_compareAndVerdict(
1340 encode_rawSeqOfBool(valueof(t_msobValueSameType(true, true,true))),
1341 encode_rawSeqOfBool(valueof(t_msob(true, true, true))));
1342 }
1343
1344 template RawSeqOfBool t_msobValueDiffType(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
1345 with { erroneous ([0]) "value:= ""Pi"""; erroneous ([2]) "value:= int32 : 2011" };
1346
1347 testcase tc_RawSeqOfBoolValueDiffType() runs on RawComp {
1348 var RawSeqOfRawUnionBT32 vl_expected :={ {r:="Pi"}, {b:=true}, {i:=2011}};
1349 f_compareAndVerdict(
1350 encode_rawSeqOfBool(valueof(t_msobValueDiffType(true, true,true))),
1351 encode_rawSeqOfRawUnionBT32( vl_expected ));
1352 }
1353
1354 template RawSeqOfBool t_msobValueDiffTypeRaw(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
1355 with { erroneous ([0]) "value(raw):='41424142'O"; erroneous ([2]) "value:= int32 : 2011" };
1356
1357 testcase tc_RawSeqOfBoolValueRaw() runs on RawComp {
1358 var RawSeqOfRawUnionBT32 vl_expected :={ {r:="ABAB"}, {b:=true}, {i:=2011}};
1359 f_compareAndVerdict(
1360 encode_rawSeqOfBool(valueof(t_msobValueDiffTypeRaw(true, true,true))),
1361 encode_rawSeqOfRawUnionBT32( vl_expected ));
1362 }
1363
1364 template RawSeqOfBool t_msobValueOmit(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
1365 with { erroneous ([0]) "value:=omit"; erroneous ([1]) "value:= omit" };
1366
1367 testcase tc_RawSeqOfBoolValueOmit() runs on RawComp {
1368 var RawSeqOfRawUnionBT vl_expected :={ {b:=true} };
1369 f_compareAndVerdict(
1370 encode_rawSeqOfBool(valueof(t_msobValueOmit(false, false,true))),
1371 encode_rawSeqOfRawUnionBT( vl_expected ));
1372 }
1373
1374 template RawSeqOfBool t_msobAfterOmit(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
1375 with { erroneous ([0]) "after:=omit all" };
1376
1377 testcase tc_RawSeqOfBoolAfterOmit() runs on RawComp {
1378 var RawSeqOfRawUnionBT vl_expected :={ {b:=false} };
1379 f_compareAndVerdict(
1380 encode_rawSeqOfBool(valueof(t_msobAfterOmit(false, true,true))),
1381 encode_rawSeqOfRawUnionBT( vl_expected ));
1382 }
1383
1384 template RawSeqOfBool t_msobValueAfterOmit(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
1385 with { erroneous ([0]) "after:=omit all"; erroneous ([0]) "value:=true" };
1386
1387 testcase tc_RawSeqOfBoolValueAfterOmit() runs on RawComp {
1388 var RawSeqOfRawUnionBT vl_expected :={ {b:=true} };
1389 f_compareAndVerdict(
1390 encode_rawSeqOfBool(valueof(t_msobValueAfterOmit(false, false,false))),
1391 encode_rawSeqOfRawUnionBT( vl_expected ));
1392 }
1393
1394 template RawSeqOfBool t_msobBeforeOmit2(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
1395 with { erroneous ([2]) "before:=omit all" };
1396
1397 testcase tc_RawSeqOfBoolBeforeOmit2() runs on RawComp {
1398 var RawSeqOfRawUnionBT vl_expected :={ {b:=true} };
1399 f_compareAndVerdict(
1400 encode_rawSeqOfBool(valueof(t_msobBeforeOmit2(false, false,true))),
1401 encode_rawSeqOfRawUnionBT( vl_expected ));
1402 }
1403
1404 template RawSeqOfBool t_msobValueBeforeOmit2(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
1405 with { erroneous ([2]) "before:=omit all"; erroneous ([2]) "value:=true" };
1406
1407 testcase tc_RawSeqOfBoolValueBeforeOmit2() runs on RawComp {
1408 var RawSeqOfRawUnionBT vl_expected :={ {b:=true} };
1409 f_compareAndVerdict(
1410 encode_rawSeqOfBool(valueof(t_msobValueBeforeOmit2(false, false,false))),
1411 encode_rawSeqOfRawUnionBT( vl_expected ));
1412 }
1413
1414 template RawSeqOfBool t_msobBeforeOmit1(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
1415 with { erroneous ([1]) "before:=omit all" };
1416
1417 testcase tc_RawSeqOfBoolBeforeOmit1() runs on RawComp {
1418 var RawSeqOfRawUnionBT vl_expected :={ {b:=false},{b:=true} };
1419 f_compareAndVerdict(
1420 encode_rawSeqOfBool(valueof(t_msobBeforeOmit1(true, false,true))),
1421 encode_rawSeqOfRawUnionBT( vl_expected ));
1422 }
1423
1424 template RawSeqOfBool t_msobValueBeforeOmit1(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
1425 with { erroneous ([1]) "before:=omit all"; erroneous ([1]) "value:=true" };
1426
1427 testcase tc_RawSeqOfBoolValueBeforeOmit1() runs on RawComp {
1428 var RawSeqOfRawUnionBT vl_expected :={ {b:=true},{b:=false} };
1429 f_compareAndVerdict(
1430 encode_rawSeqOfBool(valueof(t_msobValueBeforeOmit1(false, false,false))),
1431 encode_rawSeqOfRawUnionBT( vl_expected ));
1432 }
1433
1434 //INTEGER
1435 template RawSeqOfInt t_msoiValueDiffType(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
1436 with { erroneous ([0]) "value:= ""bubu"""; erroneous ([2]) "value:= true" };
1437
1438 testcase tc_RawSeqOfIntValueDiffType() runs on RawComp {
1439 var RawSeqOfRawUnionBT vl_expected :={ {r:="bubu"}, {i:=2}, {b:=true}};
1440 f_compareAndVerdict(
1441 encode_rawSeqOfInt(valueof(t_msoiValueDiffType(1,2,3))),
1442 encode_rawSeqOfRawUnionBT( vl_expected ));
1443 }
1444
1445 template RawSeqOfInt t_msoiValueDiffTypeRaw(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
1446 with { erroneous ([0]) "value(raw):= '41424241'O"; erroneous ([2]) "value:= true" };
1447
1448 testcase tc_RawSeqOfIntValueDiffTypeRaw() runs on RawComp {
1449 var RawSeqOfRawUnionBT vl_expected :={ {r:="ABBA"}, {i:=2}, {b:=true}};
1450 f_compareAndVerdict(
1451 encode_rawSeqOfInt(valueof(t_msoiValueDiffTypeRaw(1,2,3))),
1452 encode_rawSeqOfRawUnionBT( vl_expected ));
1453 }
1454
1455 template RawSeqOfInt t_msoiBeforeOmit2(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
1456 with { erroneous ([2]) "before:= omit all" };
1457
1458 testcase tc_RawSeqOfIntBeforeOmit2() runs on RawComp {
1459 var RawSeqOfRawUnionBT vl_expected :={ {i:=3} };
1460 f_compareAndVerdict(
1461 encode_rawSeqOfInt(valueof(t_msoiBeforeOmit2(1,2,3))),
1462 encode_rawSeqOfRawUnionBT( vl_expected ));
1463 }
1464
1465 template RawSeqOfInt t_msoiIntValueBeforeOmit2(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
1466 with { erroneous ([2]) "before:= omit all"; erroneous ([2]) "value:= int32 : 2011"};
1467
1468 testcase tc_RawSeqOfIntIntValueBeforeOmit2() runs on RawComp {
1469 var RawSeqOfRawUnionBT32 vl_expected :={ {i:=2011}};
1470 f_compareAndVerdict(
1471 encode_rawSeqOfInt(valueof(t_msoiIntValueBeforeOmit2(1,2,3))),
1472 encode_rawSeqOfRawUnionBT32( vl_expected ));
1473 }
1474
1475 template RawSeqOfInt t_msoiCharStrValueBeforeOmit2(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
1476 with { erroneous ([2]) "before:= omit all"; erroneous ([2]) "value:= ""bubu"""};
1477
1478 testcase tc_RawSeqOfIntCharStrValueBeforeOmit2() runs on RawComp {
1479 var RawSeqOfRawUnionBT vl_expected :={ {r:="bubu"}};
1480 f_compareAndVerdict(
1481 encode_rawSeqOfInt(valueof(t_msoiCharStrValueBeforeOmit2(1,2,3))),
1482 encode_rawSeqOfRawUnionBT( vl_expected ));
1483 }
1484
1485 template RawSeqOfInt t_msoiBeforeOmit1(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
1486 with { erroneous ([1]) "before:= omit all" };
1487
1488 testcase tc_RawSeqOfIntBeforeOmit1() runs on RawComp {
1489 var RawSeqOfRawUnionBT vl_expected :={ {i:=2},{i:=3} };
1490 f_compareAndVerdict(
1491 encode_rawSeqOfInt(valueof(t_msoiBeforeOmit1(1,2,3))),
1492 encode_rawSeqOfRawUnionBT( vl_expected ));
1493 }
1494
1495 template RawSeqOfInt32 t_msoiIntValueBeforeOmit1(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
1496 with { erroneous ([1]) "before:= omit all"; erroneous ([1]) "value:= int32 : 2011"};
1497
1498 testcase tc_RawSeqOfIntIntValueBeforeOmit1() runs on RawComp {
1499 var RawSeqOfRawUnionBT32 vl_expected :={ {i:=2011}, {i:=3}};
1500 f_compareAndVerdict(
1501 encode_rawSeqOfInt32(valueof(t_msoiIntValueBeforeOmit1(1,2,3))),
1502 encode_rawSeqOfRawUnionBT32( vl_expected ));
1503 }
1504
1505 template RawSeqOfInt t_msoiCharStrValueBeforeOmit1(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
1506 with { erroneous ([1]) "before:= omit all"; erroneous ([1]) "value:= ""bubu"""};
1507
1508 testcase tc_RawSeqOfIntCharStrValueBeforeOmit1() runs on RawComp {
1509 var RawSeqOfRawUnionBT vl_expected :={ {r:="bubu"},{i:=3}};
1510 f_compareAndVerdict(
1511 encode_rawSeqOfInt(valueof(t_msoiCharStrValueBeforeOmit1(1,2,3))),
1512 encode_rawSeqOfRawUnionBT( vl_expected ));
1513 }
1514
1515 template RawSeqOfInt t_msoiCharStrValueBeforeOmit1_2(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
1516 with { erroneous ([1]) "before:= omit all"; erroneous ([2]) "value:= ""bubu"""};
1517
1518 testcase tc_RawSeqOfIntCharStrValueBeforeOmit1_2() runs on RawComp {
1519 var RawSeqOfRawUnionBT vl_expected :={ {i:=2},{r:="bubu"}};
1520 f_compareAndVerdict(
1521 encode_rawSeqOfInt(valueof(t_msoiCharStrValueBeforeOmit1_2(1,2,3))),
1522 encode_rawSeqOfRawUnionBT( vl_expected ));
1523 }
1524
1525 template RawSeqOfInt t_msoiAfterOmit1(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
1526 with { erroneous ([1]) "after:= omit all" };
1527
1528 testcase tc_RawSeqOfIntAfterOmit1() runs on RawComp {
1529 var RawSeqOfRawUnionBT vl_expected :={ {i:=1}, {i:=2} } ;
1530 f_compareAndVerdict(
1531 encode_rawSeqOfInt(valueof(t_msoiAfterOmit1(1,2,3))),
1532 encode_rawSeqOfRawUnionBT( vl_expected ));
1533 }
1534
1535 template RawSeqOfInt32 t_msoiIntValueAfterOmit1(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
1536 with { erroneous ([1]) "after:= omit all"; erroneous ([1]) "value:= int32 : 2011"};
1537
1538 testcase tc_RawSeqOfIntIntValueAfterOmit1() runs on RawComp {
1539 var RawSeqOfRawUnionBT32 vl_expected :={ {i:=1},{i:=2011}};
1540 f_compareAndVerdict(
1541 encode_rawSeqOfInt32(valueof(t_msoiIntValueAfterOmit1(1,2,3))),
1542 encode_rawSeqOfRawUnionBT32( vl_expected ));
1543 }
1544
1545 testcase tc_RawSeqOfIntCharStrValueAfterOmit1() runs on RawComp {
1546 var RawSeqOfRawUnionBT vl_expected :={ {i:=1},{r:="bubu"}};
1547 f_compareAndVerdict(
1548 encode_rawSeqOfInt(valueof(t_msoiCharStrValueAfterOmit1(1,2,3))),
1549 encode_rawSeqOfRawUnionBT( vl_expected ));
1550 }
1551
1552 testcase tc_RawSeqOfIntCharStrValueAfterOmit1_2() runs on RawComp {
1553 var RawSeqOfRawUnionBT vl_expected :={ {r:="bubu"},{i:=2}};
1554 f_compareAndVerdict(
1555 encode_rawSeqOfInt(valueof(t_msoiCharStrValueAfterOmit1_2(1,2,3))),
1556 encode_rawSeqOfRawUnionBT( vl_expected ));
1557 }
1558
1559 //RawEnum
1560 testcase tc_RawSeqOfRawEnumValueDiffType() runs on RawComp {
1561 var RawSeqOfRawUnionBT vl_expected :={ {r:="Pi"}, {e:=second}, {b:=true}};
1562 f_compareAndVerdict(
1563 encode_rawSeqOfRawEnum(valueof(t_msoeValueDiffType(first, second, third))),
1564 encode_rawSeqOfRawUnionBT( vl_expected ));
1565 }
1566
1567 testcase tc_RawSeqOfRawEnumValueDiffTypeRaw() runs on RawComp {
1568 var RawSeqOfRawUnionBT vl_expected :={ {r:="ABBA"}, {e:=second}, {b:=true}};
1569 f_compareAndVerdict(
1570 encode_rawSeqOfRawEnum(valueof(t_msoeValueDiffTypeRaw(first, second, third))),
1571 encode_rawSeqOfRawUnionBT( vl_expected ));
1572 }
1573
1574 testcase tc_RawSeqOfRawEnumBeforeOmit2() runs on RawComp {
1575 var RawSeqOfRawUnionBT vl_expected :={ {e:=third} };
1576 f_compareAndVerdict(
1577 encode_rawSeqOfRawEnum(valueof(t_msoeBeforeOmit2(first, second, third))),
1578 encode_rawSeqOfRawUnionBT( vl_expected ));
1579 }
1580
1581 testcase tc_RawSeqOfRawEnumIntValueBeforeOmit2() runs on RawComp {
1582 var RawSeqOfRawUnionBT32 vl_expected :={ {i:=2011}};
1583 f_compareAndVerdict(
1584 encode_rawSeqOfRawEnum(valueof(t_msoeIntValueBeforeOmit2(first, second, third))),
1585 encode_rawSeqOfRawUnionBT32( vl_expected ));
1586 }
1587
1588 testcase tc_RawSeqOfRawEnumCharStrValueBeforeOmit2() runs on RawComp {
1589 var RawSeqOfRawUnionBT vl_expected :={ {r:="bubu"}};
1590 f_compareAndVerdict(
1591 encode_rawSeqOfRawEnum(valueof(t_msoeCharStrValueBeforeOmit2(first, second, third))),
1592 encode_rawSeqOfRawUnionBT( vl_expected ));
1593 }
1594
1595 testcase tc_RawSeqOfRawEnumBeforeOmit1() runs on RawComp {
1596 var RawSeqOfRawUnionBT vl_expected :={ {e:=second},{e:=third} };
1597 f_compareAndVerdict(
1598 encode_rawSeqOfRawEnum(valueof(t_msoeBeforeOmit1(first, second, third))),
1599 encode_rawSeqOfRawUnionBT( vl_expected ));
1600 }
1601
1602 testcase tc_RawSeqOfRawEnumIntValueBeforeOmit1() runs on RawComp {
1603 var RawSeqOfRawUnionBT32 vl_expected :={ {i:=2011}, {e:=third}};
1604 f_compareAndVerdict(
1605 encode_rawSeqOfRawEnum(valueof(t_msoeIntValueBeforeOmit1(first, second, third))),
1606 encode_rawSeqOfRawUnionBT32( vl_expected ));
1607 }
1608
1609 testcase tc_RawSeqOfRawEnumCharStrValueBeforeOmit1() runs on RawComp {
1610 var RawSeqOfRawUnionBT vl_expected :={ {r:="bubu"},{e:=third}};
1611 f_compareAndVerdict(
1612 encode_rawSeqOfRawEnum(valueof(t_msoeCharStrValueBeforeOmit1(first, second, third))),
1613 encode_rawSeqOfRawUnionBT( vl_expected ));
1614 }
1615
1616 testcase tc_RawSeqOfRawEnumCharStrValueBeforeOmit1_2() runs on RawComp {
1617 var RawSeqOfRawUnionBT vl_expected :={ {e:=second},{r:="bubu"}};
1618 f_compareAndVerdict(
1619 encode_rawSeqOfRawEnum(valueof(t_msoeCharStrValueBeforeOmit1_2(first, second, third))),
1620 encode_rawSeqOfRawUnionBT( vl_expected ));
1621 }
1622
1623 testcase tc_RawSeqOfRawEnumAfterOmit1() runs on RawComp {
1624 var RawSeqOfRawUnionBT vl_expected :={ {e:=first}, {e:=second} } ;
1625 f_compareAndVerdict(
1626 encode_rawSeqOfRawEnum(valueof(t_msoeAfterOmit1(first, second, third))),
1627 encode_rawSeqOfRawUnionBT( vl_expected ));
1628 }
1629
1630 testcase tc_RawSeqOfRawEnumIntValueAfterOmit1() runs on RawComp {
1631 var RawSeqOfRawUnionBT32 vl_expected :={ {e:=first},{i:=2011}};
1632 f_compareAndVerdict(
1633 encode_rawSeqOfRawEnum(valueof(t_msoeIntValueAfterOmit1(first, second, third))),
1634 encode_rawSeqOfRawUnionBT32( vl_expected ));
1635 }
1636
1637 testcase tc_RawSeqOfRawEnumCharStrValueAfterOmit1() runs on RawComp {
1638 var RawSeqOfRawUnionBT vl_expected :={ {e:=first},{r:="bubu"}};
1639 f_compareAndVerdict(
1640 encode_rawSeqOfRawEnum(valueof(t_msoeCharStrValueAfterOmit1(first, second, third))),
1641 encode_rawSeqOfRawUnionBT( vl_expected ));
1642 }
1643
1644 testcase tc_RawSeqOfRawEnumCharStrValueAfterOmit1_2() runs on RawComp {
1645 var RawSeqOfRawUnionBT vl_expected :={ {r:="bubu"},{e:=second}};
1646 f_compareAndVerdict(
1647 encode_rawSeqOfRawEnum(valueof(t_msoeCharStrValueAfterOmit1_2(first, second, third))),
1648 encode_rawSeqOfRawUnionBT( vl_expected ));
1649 }
1650
1651 //Charstring (Charstring)
1652 testcase tc_RawSeqOfCharstringValueDiffType() runs on RawComp {
1653 var RawSeqOfRawUnionBT vl_expected :={ {r:="Pi"}, {r:="Two"}, {b:=true}};
1654 f_compareAndVerdict(
1655 encode_rawSeqOfCharstring(valueof(t_msorValueDiffType("One", "Two", "Three"))),
1656 encode_rawSeqOfRawUnionBT( vl_expected ));
1657 }
1658 testcase tc_RawSeqOfCharstringValueDiffTypeRaw() runs on RawComp {
1659 var RawSeqOfRawUnionBT vl_expected :={ {r:="ABBA"}, {r:="Two"}, {b:=true}};
1660 f_compareAndVerdict(
1661 encode_rawSeqOfCharstring(valueof(t_msorValueDiffTypeRaw("One", "Two", "Three"))),
1662 encode_rawSeqOfRawUnionBT( vl_expected ));
1663 }
1664 testcase tc_RawSeqOfCharstringBeforeOmit2() runs on RawComp {
1665 var RawSeqOfRawUnionBT vl_expected :={ {r:="Three"} };
1666 f_compareAndVerdict(
1667 encode_rawSeqOfCharstring(valueof(t_msorBeforeOmit2("One", "Two", "Three"))),
1668 encode_rawSeqOfRawUnionBT( vl_expected ));
1669 }
1670 testcase tc_RawSeqOfCharstringIntValueBeforeOmit2() runs on RawComp {
1671 var RawSeqOfRawUnionBT32 vl_expected :={ {i:=2011}};
1672 f_compareAndVerdict(
1673 encode_rawSeqOfCharstring(valueof(t_msorIntValueBeforeOmit2("One", "Two", "Three"))),
1674 encode_rawSeqOfRawUnionBT32( vl_expected ));
1675 }
1676 testcase tc_RawSeqOfCharstringCharStrValueBeforeOmit2() runs on RawComp {
1677 var RawSeqOfRawUnionBT vl_expected :={ {r:="bubu"}};
1678 f_compareAndVerdict(
1679 encode_rawSeqOfCharstring(valueof(t_msorCharStrValueBeforeOmit2("One", "Two", "Three"))),
1680 encode_rawSeqOfRawUnionBT( vl_expected ));
1681 }
1682 testcase tc_RawSeqOfCharstringBeforeOmit1() runs on RawComp {
1683 var RawSeqOfRawUnionBT vl_expected :={ {r:="Two"},{r:="Three"} };
1684 f_compareAndVerdict(
1685 encode_rawSeqOfCharstring(valueof(t_msorBeforeOmit1("One", "Two", "Three"))),
1686 encode_rawSeqOfRawUnionBT( vl_expected ));
1687 }
1688 testcase tc_RawSeqOfCharstringIntValueBeforeOmit1() runs on RawComp {
1689 var RawSeqOfRawUnionBT32 vl_expected :={ {i:=2011}, {r:="Three"}};
1690 f_compareAndVerdict(
1691 encode_rawSeqOfCharstring(valueof(t_msorIntValueBeforeOmit1("One", "Two", "Three"))),
1692 encode_rawSeqOfRawUnionBT32( vl_expected ));
1693 }
1694 testcase tc_RawSeqOfCharstringCharStrValueBeforeOmit1() runs on RawComp {
1695 var RawSeqOfRawUnionBT vl_expected :={ {r:="bubu"},{r:="Three"}};
1696 f_compareAndVerdict(
1697 encode_rawSeqOfCharstring(valueof(t_msorCharStrValueBeforeOmit1("One", "Two", "Three"))),
1698 encode_rawSeqOfRawUnionBT( vl_expected ));
1699 }
1700 testcase tc_RawSeqOfCharstringCharStrValueBeforeOmit1_2() runs on RawComp {
1701 var RawSeqOfRawUnionBT vl_expected :={ {r:="Two"},{r:="bubu"}};
1702 f_compareAndVerdict(
1703 encode_rawSeqOfCharstring(valueof(t_msorCharStrValueBeforeOmit1_2("One", "Two", "Three"))),
1704 encode_rawSeqOfRawUnionBT( vl_expected ));
1705 }
1706
1707 testcase tc_RawSeqOfCharstringAfterOmit1() runs on RawComp {
1708 var RawSeqOfRawUnionBT vl_expected :={ {r:="One"}, {r:="Two"} } ;
1709 f_compareAndVerdict(
1710 encode_rawSeqOfCharstring(valueof(t_msorAfterOmit1("One", "Two", "Three"))),
1711 encode_rawSeqOfRawUnionBT( vl_expected ));
1712 }
1713 testcase tc_RawSeqOfCharstringIntValueAfterOmit1() runs on RawComp {
1714 var RawSeqOfRawUnionBT32 vl_expected :={ {r:="One"},{i:=2011}};
1715 f_compareAndVerdict(
1716 encode_rawSeqOfCharstring(valueof(t_msorIntValueAfterOmit1("One", "Two", "Three"))),
1717 encode_rawSeqOfRawUnionBT32( vl_expected ));
1718 }
1719 testcase tc_RawSeqOfCharstringCharStrValueAfterOmit1() runs on RawComp {
1720 var RawSeqOfRawUnionBT vl_expected :={ {r:="One"},{r:="bubu"}};
1721 f_compareAndVerdict(
1722 encode_rawSeqOfCharstring(valueof(t_msorCharStrValueAfterOmit1("One", "Two", "Three"))),
1723 encode_rawSeqOfRawUnionBT( vl_expected ));
1724 }
1725 testcase tc_RawSeqOfCharstringCharStrValueAfterOmit1_2() runs on RawComp {
1726 var RawSeqOfRawUnionBT vl_expected :={ {r:="bubu"},{r:="Two"}};
1727 f_compareAndVerdict(
1728 encode_rawSeqOfCharstring(valueof(t_msorCharStrValueAfterOmit1_2("One", "Two", "Three"))),
1729 encode_rawSeqOfRawUnionBT( vl_expected ));
1730 }
1731 //BIT STRING
1732 //OCTET STRING
1733
1734 //More complex:
1735
1736 template RawSeqOfSeqSeqIntSeqInt2SeqCharstring2 t_msossisi2sr2_omitj(template RawSeqSeqIntSeqInt2SeqCharstring2 p_s1,template RawSeqSeqIntSeqInt2SeqCharstring2 p_s2) :={ p_s1, p_s2}
1737 with { erroneous([0].jkl.jk.j) "value:=omit" }
1738
1739 testcase tc_RawSeqOf_SeqSeqIntSeqInt2SeqCharstring2_omitj() runs on RawComp {
1740 var RawSeqSeqIntSeqInt2SeqCharstring2 vl_s1:={ {1,{2,3}}, {"Three","Four"} }, vl_s2:= {{5,{6,7}}, {"Seven", "Eight"}};
1741 var RawSeqOfRawSeqIntSeqIntSeqInt2optoptSeqCharstring2 vl_expected := { { omit,{1,{2, omit}}, {"Three","Four"} }, { omit,{5,{6,7}}, {"Seven", "Eight"}} }
1742 f_compareAndVerdict(
1743 encode_rawSeqOfSeqSeqIntSeqInt2SeqCharstring2(valueof(t_msossisi2sr2_omitj(vl_s1, vl_s2))),
1744 encode_rawSeqOfRawSeqIntSeqIntSeqInt2optoptSeqCharstring2(vl_expected));
1745
1746 }
1747
1748 testcase tc_RawSeqOf_SeqSeqIntSeqInt2SeqCharstring2_beforeafteromit() runs on RawComp {
1749 var RawSeqSeqIntSeqInt2SeqCharstring2 vl_s1:={ {1,{2,3}}, {"Three","Four"} }, vl_s2:= {{5,{6,7}}, {"Seven", "Eight"}};
1750 var RawSeqOfRawSeqIntSeqIntSeqInt2optoptSeqCharstring2 vl_expected := { { omit,{1,{3,omit}}, {"Three","Four"} }, { omit,{5,{6,omit}}, {"Seven", "Eight"}} }
1751 f_compareAndVerdict(
1752 encode_rawSeqOfSeqSeqIntSeqInt2SeqCharstring2(valueof(t_msossisi2sr2_beforeafteromit(vl_s1, vl_s2))),
1753 encode_rawSeqOfRawSeqIntSeqIntSeqInt2optoptSeqCharstring2(vl_expected));
1754
1755 }
1756
1757 testcase tc_RawSeqOf_SeqSeqIntSeqInt2SeqCharstring2_arglist_omit() runs on RawComp {
1758 var RawSeqSeqIntSeqInt2SeqCharstring2 vl_s1:={ {1,{2,3}}, {"Three","Four"} }, vl_s2:= {{5,{6,7}}, {"Seven", "Eight"}};
1759 var RawSeqOfRawSeqIntSeqIntSeqInt2optoptSeqCharstring2 vl_expected := { { omit,{omit,{2,omit}}, {"Four",omit} }, { omit,{5,{6,omit}}, {"Seven",omit}} }
1760 f_compareAndVerdict(
1761 encode_rawSeqOfSeqSeqIntSeqInt2SeqCharstring2(valueof(t_msossisi2sr2_arglist_omit(vl_s1, vl_s2))),
1762 encode_rawSeqOfRawSeqIntSeqIntSeqInt2optoptSeqCharstring2(vl_expected));
1763 }
1764
1765 testcase tc_RawSeqOf_SeqSeqIntSeqInt2SeqCharstring2_arglist_afteromit() runs on RawComp {
1766 var RawSeqSeqIntSeqInt2SeqCharstring2 vl_s1:={ {1,{2,3}}, {"Three","Four"} }, vl_s2:= {{5,{6,7}}, {"Seven", "Eight"}};
1767 var RawSeqOfRawSeqIntSeqIntSeqInt2optoptSeqCharstring2 vl_expected := { { omit,{1,{2,omit}}, {"Three",omit} }, { omit,{5,{6,omit}}, {"Seven",omit}} }
1768 f_compareAndVerdict(
1769 encode_rawSeqOfSeqSeqIntSeqInt2SeqCharstring2(valueof(t_msossisi2sr2_arglist_afteromit(vl_s1, vl_s2))),
1770 encode_rawSeqOfRawSeqIntSeqIntSeqInt2optoptSeqCharstring2(vl_expected));
1771 }
1772 testcase tc_RawSeqOf_SeqSeqIntSeqInt2SeqCharstring2_arglist_beforeomit() runs on RawComp {
1773 var RawSeqSeqIntSeqInt2SeqCharstring2 vl_s1:={ {1,{2,3}}, {"Three","Four"} }, vl_s2:= {{5,{6,7}}, {"Seven", "Eight"}};
1774 var RawSeqOfRawSeqIntSeqIntSeqInt2optoptSeqCharstring2 vl_expected := { { omit,{1,{3,omit}}, {"Four",omit} }, { omit,{5,{6,omit}}, {"Seven",omit}} }
1775 f_compareAndVerdict(
1776 encode_rawSeqOfSeqSeqIntSeqInt2SeqCharstring2(valueof(t_msossisi2sr2_arglist_beforeomit(vl_s1, vl_s2))),
1777 encode_rawSeqOfRawSeqIntSeqIntSeqInt2optoptSeqCharstring2(vl_expected));
1778 }
1779}//SequenceOf
1780
1781group Set {
1782 //template RawSetInt2opt t_mseti2opt := { i:= 1, j := 2 }
1783 template RawSetInt2opt t_mseti2optomit := { i:= 1, j := omit }
1784 const RawSetInt2 c_mseti2 := { i:= 1, j := 2 }
1785 const RawSetInt2opt c_mseti2opt := { i:= 1, j := 2 }
1786 const RawSetInt2opt c_mseti2optomit := { i:= 1, j := omit }
1787
1788 template RawSetEmpty t_setEmpty :={}
1789 template RawSetBool t_msetb(template boolean p_b) := {b:= p_b}
1790 //template RawSetNull t_msetn := { n:= NULL }
1791
1792 template RawSetInt t_mseti(template integer p_i) := {i:= p_i}
1793 template RawSetInt8 t_mseti8(template integer p_i) := {i:= p_i}
1794 template RawSetInt t_mseti_omit(template integer p_i) := {i:= p_i} with { erroneous (i) "value:= omit" }
1795 template RawSetInt t_mseti_valueSameTypeE(template integer p_i) := {i:= p_i} with { erroneous (i) "value:= int32 : 5" }
1796
1797 //Basic ASN.1 types (eq ttcn types): boolean, integer, octetstring, bitstring, null, objid, ext. objid, enum, embedded pdv, charstring (real), UTFSTR, seq, seq of
1798 template RawSetInt t_mseti_valueDiffTypeExplicitBoolean(template integer p_i) := {i:= p_i} with { erroneous (i) "value:= boolean:true" }
1799 template RawSetInt t_mseti_valueDiffTypeImplicitBoolean(template integer p_i) := {i:= p_i} with { erroneous (i) "value:= true" }
1800
1801 //NegTestTestcases.ttcn:74.3-86: error: Type `NULL' and type `@NegTestTypes.RawSetInt' have no common encoding
1802 template RawSetInt t_mseti_valueDiffTypeExplicitOctStr(template integer p_i) := {i:= p_i} with { erroneous (i) "value:= octetstring:'42414241'O" }
1803 template RawSetInt t_mseti_valueDiffTypeImplicitOctStr(template integer p_i) := {i:= p_i} with { erroneous (i) "value:= '42414241'O" }
1804 template RawSetInt t_mseti_valueDiffTypeExplicitEnum(template integer p_i) := {i:= p_i} with { erroneous (i) "value:= RawEnum:second" }
1805 template RawSetInt t_mseti_valueDiffTypeExplicitCharstring(template integer p_i) := {i:= p_i} with { erroneous (i) "value:= charstring:""Albert""" }
1806 template RawSetInt t_mseti_valueDiffTypeImplicitCharstring(template integer p_i) := {i:= p_i} with { erroneous (i) "value:= ""Albert""" }
1807
1808 template RawSetInt2opt t_mseti2opt (template integer p_i, template integer p_j) := {i:= p_i, j:=p_j}
1809 template RawSetInt2opt32 t_mseti2opt32(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j}
1810 template RawSetInt2 t_mseti2_omiti(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j} with { erroneous (i) "value:= omit" }
1811 template RawSetInt2 t_mseti2_omitj(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j} with { erroneous (j) "value:= omit" }
1812 //template RawSetInt2 t_mseti2_beforeomiti(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j} with { erroneous (i) "before:= omit all" }
1813 template RawSetInt2 t_mseti2_beforeomitj(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j} with { erroneous (i) "value:= omit" }
1814 template RawSetInt2 t_mseti2_afteromiti(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j} with { erroneous (j) "value:= omit" }
1815 //template RawSetInt2 t_mseti2_afteromitj(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j} with { erroneous (j) "after:= omit all" }
1816 template RawSetInt2 t_mseti2_valueSameTypeE(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j} with { erroneous (j) "value:= RawSetInt2.j:5" } //tagged replacement
1817 template RawSetInt2 t_mseti2_valueDiffTypeExplicitCharstring(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j} with { erroneous (j) "value:= charstring:""Albert""" }
1818 template RawSetInt2 t_mseti2_valueDiffTypeImplicitCharstring(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j} with { erroneous (j) "value:= ""Albert""" }
1819 //variable related values:
1820 template RawSetInt2 t_mseti2_valueSeqIntV(template integer p_i, template integer p_j):={i:=p_i, j:=p_j} with { erroneous (j) "value := RawSeqInt2:{i:=1,j:=2}" }
1821 template RawSetInt2 t_mseti2_valueSeqIntOptV(template integer p_i, template integer p_j):={i:=p_i, j:=p_j} with { erroneous (j) "value := RawSeqInt2opt:{i:=1,j:=2}" }
1822 template RawSetInt2 t_mseti2_valueSeqIntC(template integer p_i, template integer p_j):={i:=p_i, j:=p_j} with { erroneous (j) "value := RawSeqInt2:c_msi2" }
1823 template RawSetInt2 t_mseti2_valueSeqIntOptC(template integer p_i, template integer p_j):={i:=p_i, j:=p_j} with { erroneous (j) "value := RawSeqInt2opt:c_msi2opt" }
1824 template RawSetInt2 t_mseti2_valueSeqInt2OptOmitC(template integer p_i, template integer p_j):={i:=p_i, j:=p_j} with { erroneous (j) "value:= c_msi2optomit" }
1825 template RawSetInt2 t_mseti2_valueSeqInt2iiC(template integer p_i, template integer p_j):={i:=p_i, j:=p_j} with { erroneous (i) "value:=c_mseti2.i" };
1826 template RawSetInt2 t_mseti2_valueSeqInt2jjC(template integer p_i, template integer p_j):={i:=p_i, j:=p_j} with { erroneous (j) "value:=c_mseti2.j" };
1827
1828 template RawSetInt2 t_mseti2_valueSeqIntOptFieldC(template integer p_i, template integer p_j):={i:=p_i, j:=p_j} with { erroneous (j) "value:=c_msi2opt.j" } ;//2
1829 template RawSetIntSeqInt2 t_msetisi2_trial(template integer p_i, template integer p_j, template integer p_k) := { i:=p_i, jk:={ i:= p_j,j:= p_k} } //not used yet
1830 template RawSetIntSeqInt2 t_msetisi2(template integer p_i, template integer p_j, template integer p_k) := { i:= p_i, jk:= { i:=p_j, j:=p_k} };
1831 template RawSetIntSeqInt2 t_msetisi2_omitjki(template integer p_i, template integer p_j, template integer p_k) := { i:= p_i, jk:= { i:=p_j, j:=p_k} } with { erroneous (jk.i) "value:= omit" };
1832 template RawSetIntSeqInt2 t_msetisi2_omitjkj(template integer p_i, template integer p_j, template integer p_k) := { i:= p_i, jk:= { i:=p_j, j:=p_k} } with { erroneous (jk.j) "value:= omit" };
1833 template RawSetIntSeqInt2 t_msetisi2_rawjki(template integer p_i, template integer p_j, template integer p_k) := { i:= p_i, jk:= { i:=p_j, j:=p_k} } with {
1834 erroneous (jk.i) "value(raw):= '41424241'O" };
1835 template RawSetIntSeqInt2 t_msetisi2_rawjkj(template integer p_i, template integer p_j, template integer p_k) := { i:= p_i, jk:= { i:=p_j, j:=p_k} } with {
1836 erroneous (jk.j) "value(raw):= '41424241'O" };
1837 template RawSetIntSeqInt2 t_msetisi2_afteribeforej(template integer p_i, template integer p_j, template integer p_k) := { i:= p_i, jk:= { i:=p_j, j:=p_k} } with {
1838 erroneous(i) "after:= '41424241'O";
1839 erroneous(jk.i) "before:='42414241'O"
1840 };
1841 template RawSetIntSeqInt2 t_msetisi2_afterirawbeforejraw(template integer p_i, template integer p_j, template integer p_k) := { i:= p_i, jk:= { i:=p_j, j:=p_k} } with {
1842 erroneous(i) "after(raw):= '41424241'O"; //"ABBA"
1843 erroneous(jk.i) "before(raw):='42414241'O" //"BABA"
1844 };
1845 //
1846 template RawSetInt3 t_mseti3(template integer p_i, template integer p_j, template integer p_k) := {i:= p_i, j:=p_j, k:=p_k}
1847
1848 template RawSetInt4 t_mseti4(template integer p_i, template integer p_j, template integer p_k,template integer p_l ) := {i:= p_i, j:=p_j, k:=p_k, l:=p_l}
1849 template RawSetInt4opt t_mseti4opt(template integer p_i, template integer p_j, template integer p_k,template integer p_l ) := {i:= p_i, j:=p_j, k:=p_k, l:=p_l}
1850 template RawSetInt4 t_mseti4_omiti(template integer p_i, template integer p_j, template integer p_k,template integer p_l ) := {i:= p_i, j:=p_j, k:=p_k, l:=p_l} with { erroneous (i) "value:= omit" }
1851 template RawSetInt4 t_mseti4_omitj(template integer p_i, template integer p_j, template integer p_k,template integer p_l ) := {i:= p_i, j:=p_j, k:=p_k, l:=p_l} with { erroneous (j) "value:= omit" }
1852 template RawSetInt4 t_mseti4_omitk(template integer p_i, template integer p_j, template integer p_k,template integer p_l ) := {i:= p_i, j:=p_j, k:=p_k, l:=p_l} with { erroneous (k) "value:= omit" }
1853 template RawSetInt4 t_mseti4_omitl(template integer p_i, template integer p_j, template integer p_k,template integer p_l ) := {i:= p_i, j:=p_j, k:=p_k, l:=p_l}
1854 with { erroneous (l) "value:= omit" }
1855 template RawSetInt4 t_mseti4_valueiOctetStr(template integer p_i, template integer p_j, template integer p_k, template integer p_l) := {i:= p_i, j:=p_j, k:=p_k,l:=p_l}
1856 with { erroneous(i) "value:= 'FEDCBA98'O" }
1857 template RawSetInt4 t_mseti4_valuejOctetStr(template integer p_i, template integer p_j, template integer p_k,template integer p_l) := {i:= p_i, j:=p_j, k:=p_k,l:=p_l}
1858 with { erroneous(j) "value:= 'FEDCBA98'O" }
1859
1860 template RawSetInt4 t_mseti4_valueiRaw(template integer p_i, template integer p_j, template integer p_k,template integer p_l) := {i:= p_i, j:=p_j, k:=p_k,l:=p_l}
1861 with { erroneous(i) "value(raw):= '41424241'O" }
1862
1863 template RawSetInt4 t_mseti4_valuejRaw(template integer p_i, template integer p_j, template integer p_k,template integer p_l) := {i:= p_i, j:=p_j, k:=p_k,l:=p_l}
1864 with { erroneous(j) "value(raw):= '41424241'O" }
1865
1866 template RawSetInt4 t_mseti4_valuekRaw(template integer p_i, template integer p_j, template integer p_k,template integer p_l) := {i:= p_i, j:=p_j, k:=p_k,l:=p_l}
1867 with { erroneous(k) "value(raw):= '41424241'O" }
1868
1869 template RawSetInt4 t_mseti4_valuelRaw(template integer p_i, template integer p_j, template integer p_k,template integer p_l) := {i:= p_i, j:=p_j, k:=p_k,l:=p_l}
1870 with { erroneous(l) "value(raw):= '41424241'O" }
1871
1872 template RawSetOJKL t_msetojkl(template octetstring p_o, template integer p_j, template integer p_k,template integer p_l ) := {o:= p_o, j:=p_j, k:=p_k, l:=p_l}
1873 template RawSetIOKL t_msetiokl(template integer p_i, template octetstring p_o, template integer p_k,template integer p_l ) := {i:=p_i, o:=p_o, k:=p_k, l:=p_l}
1874
1875 template RawSetISKL t_msetiskl(template integer p_i, template RawSeqInt4 p_s, template integer p_k,template integer p_l ) := {i:=p_i, s:=p_s, k:=p_k, l:=p_l}
1876 template RawSetIS2KLopt t_msetis2klopt(template integer p_i, template RawSeqInt2 p_s, template integer p_k,template integer p_l ) := {i:=p_i, s:=p_s, k:=p_k, l:=p_l}
1877 template RawSetISKL t_msetiskl_valueSISJomit(template integer p_i, template RawSeqInt4 p_s, template integer p_k,template integer p_l ) := {i:=p_i, s:=p_s, k:=p_k, l:=p_l} with {
1878 erroneous(s.i) "value:= omit"
1879 erroneous(s.j) "value:= omit"}
1880
1881 template RawSetISOKL t_msetisokl(template integer p_i, template RawSeqInt4 p_s, template octetstring p_o, template integer p_k, template integer p_l ) :=
1882 {i:=p_i, s:=p_s, o:=p_o, k:=p_k, l:=p_l}
1883 template RawSetISOKLopt t_msetisoklopt(template integer p_i, template RawSeqInt4opt p_s,template octetstring p_o, template integer p_k, template integer p_l ) :=
1884 {i:=p_i, s:=p_s, o:=p_o, k:=p_k, l:=p_l}
1885 template RawSetISOKL t_msetisokl_valueSomit(template integer p_i, template RawSeqInt4 p_s, template octetstring p_o, template integer p_k,template integer p_l ) :=
1886 {i:=p_i, s:=p_s, o:=p_o, k:=p_k, l:=p_l} with {
1887 erroneous(s) "value:= omit" }
1888 template RawSetIOSKLopt t_msetiosklopt(template integer p_i, template octetstring p_o,template RawSeqInt4opt p_s, template integer p_k, template integer p_l ) :=
1889 {i:=p_i, o:=p_o, s:=p_s, k:=p_k, l:=p_l}
1890 template RawSetIOSKL t_msetioskl_valueSomit(template integer p_i, template octetstring p_o, template RawSeqInt4 p_s, template integer p_k,template integer p_l ) :=
1891 {i:=p_i, o:=p_o, s:=p_s,k:=p_k, l:=p_l} with {
1892 erroneous(s) "value:= omit" }
1893 //===seq of seq of seq:==
1894
1895 template RawSetIntSeqIntSeqInt2SeqCharstring2 t_msetisisi2r2_omiti(template integer p_i,template RawSeqIntSeqInt2 p_jkl, template RawSeqCharstring2 p_xy) :=
1896 { i:=p_i, jkl:=p_jkl, xy:=p_xy} with { erroneous(i) "value:=omit"}
1897
1898 template RawSetIntSeqIntSeqInt2SeqCharstring2 t_msetisisi2r2_omitjkl(template integer p_i,template RawSeqIntSeqInt2 p_jkl, template RawSeqCharstring2 p_xy) :=
1899 { i:=p_i, jkl:=p_jkl, xy:=p_xy} with { erroneous(jkl) "value:=omit"}
1900
1901 template RawSetIntSeqIntSeqInt2SeqCharstring2 t_msetisisi2r2_omitxy(template integer p_i,template RawSeqIntSeqInt2 p_jkl, template RawSeqCharstring2 p_xy) :=
1902 { i:=p_i, jkl:=p_jkl, xy:=p_xy} with { erroneous(xy) "value:=omit"}
1903
1904 template RawSetIntSeqIntSeqInt2SeqCharstring2 t_msetisisi2r2_valuexy(template integer p_i,template RawSeqIntSeqInt2 p_jkl, template RawSeqCharstring2 p_xy) :=
1905 { i:=p_i, jkl:=p_jkl, xy:=p_xy} with { erroneous(xy) "value:=RawSetCharstring2:{x:=""Albert"",y:=""Einstein""}"}
1906
1907 template RawSetIntSeqIntSeqInt2SeqCharstring2 t_msetisisi2r2_valuex_y(template integer p_i,template RawSeqIntSeqInt2 p_jkl, template RawSeqCharstring2 p_xy) :=
1908 { i:=p_i, jkl:=p_jkl, xy:=p_xy} with {
1909 erroneous(xy.x) "value:=charstring:""Albert""";
1910 erroneous(xy.y) "value:=charstring:""Einstein"""
1911 }
1912
1913 template RawSetIntSeqIntSeqInt2SeqCharstring2 t_msetisisi2r2_valuex_y_expr1(template integer p_i,template RawSeqIntSeqInt2 p_jkl, template RawSeqCharstring2 p_xy) :=
1914 { i:=p_i, jkl:=p_jkl, xy:=p_xy} with {
1915 erroneous(xy.x) "value:=charstring:""Albert""";
1916 erroneous(xy.y) "value:=charstring:""Einstein"""
1917 }
1918
1919 template RawSetIntSeqIntSeqInt2SeqCharstring2 t_msetisisi2r2_omitjkll(template integer p_i,template RawSeqIntSeqInt2 p_jkl, template RawSeqCharstring2 p_xy) :=
1920 { i:=p_i, jkl:=p_jkl, xy:=p_xy} with { erroneous(jkl.jk.j) "value:=omit"}
1921
1922 //Set of depth 3:
1923
1924 template RawSet_SeqSeqIntSeqInt2SeqCharstring2_SeqSeqIntSeqInt2SeqCharstring2 t_msetssi2sr2ssi2sr2_omit(template RawSeqSeqIntSeqInt2SeqCharstring2 p_s1,template RawSeqSeqIntSeqInt2SeqCharstring2 p_s2)
1925 :={ s1:=p_s1,s2:=p_s2} with { erroneous(s1.jkl.jk.j) "value:=omit" }
1926
1927 //real (charstring)
1928 template RawSetCharstring t_msetr(template charstring p_x) := { x:=p_x }
1929 template RawSetCharstring2 t_msetr2(template charstring p_x, template charstring p_y):={x:=p_x, y:=p_y}
1930
1931 //charstring->VisibleString
1932 template RawSetStr t_msetstr(template charstring p_s) := { s := p_s }
1933
1934 //bitstring:
1935 template RawSetBitStr t_msetbitstr(template bitstring p_b) := { b := p_b };
1936 template RawSetOctStr t_msetos(template octetstring p_o) := { o := p_o };
1937 template RawSetIntCharstring t_msetir(template integer p_i, template charstring p_f ) := { i:=p_i, f:=p_f };
1938
1939 template RawSetIntStr t_msetistr(template integer p_i, template charstring p_s ) := { i:=p_i, s:=p_s };
1940
1941 template RawSetIntBitStr t_msetibitstr(template integer p_i, template bitstring p_b ) := { i:=p_i, b:=p_b };
1942
1943
1944 //================================================
1945 //======== Testcases==============================
1946 //================================================
1947
1948 //======== {integer}===================
1949 //omit
1950 testcase tc_RawSetIntOmit() runs on RawComp {
1951 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
1952 log("i: ",i );
1953 f_compareAndVerdict(
1954 encode_rawSetInt(valueof(t_mseti_omit(i))),
1955 encode_rawSetEmpty(valueof(t_setEmpty)) );
1956 }
1957 }
1958
1959 testcase tc_RawSetIntValueSameTypeE() runs on RawComp {
1960 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
1961 log("i: ",i );
1962 f_compareAndVerdict(
1963 encode_rawSetInt(valueof(t_mseti_valueSameTypeE(i))),
1964 encode_rawSetInt(valueof(t_mseti(5))) );
1965 }
1966 }
1967
1968 template RawSetInt t_mseti_valueSameTypeI(template integer p_i) := {i:= p_i}
1969 with { erroneous (i) "value:= 5" } //implicit type
1970
1971 testcase tc_RawSetIntValueSameTypeI() runs on RawComp {
1972 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
1973 log("i: ",i );
1974 f_compareAndVerdict(
1975 encode_rawSetInt(valueof(t_mseti_valueSameTypeI(i))),
1976 encode_rawSetInt8(valueof(t_mseti8(5))) );
1977 }
1978 }
1979
1980 //Basic ASN.1 types (eq ttcn types): boolean, integer, octetstring, bitstring, null, objid, ext. objid, enum, embedded pdv, charstring (real), UTFSTR, seq, seq of
1981 testcase tc_RawSetIntValueDiffTypeExplicitBool() runs on RawComp {
1982 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
1983 log("i: ",i );
1984 f_compareAndVerdict(
1985 encode_rawSetInt(valueof(t_mseti_valueDiffTypeExplicitBoolean(i))),
1986 encode_rawSetBool(valueof(t_msetb(true))) );
1987 }
1988 }
1989 testcase tc_RawSetIntValueDiffTypeImplicitBool() runs on RawComp {
1990 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
1991 log("i: ",i );
1992 f_compareAndVerdict(
1993 encode_rawSetInt(valueof(t_mseti_valueDiffTypeImplicitBoolean(i))),
1994 encode_rawSetBool(valueof(t_msetb(true))) );
1995 }
1996 }
1997
1998 // testcase tc_RawSetIntValueDiffTypeExplicitNull() runs on RawComp {
1999 // for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
2000 // log("i: ",i );
2001 // f_compareAndVerdict(
2002 // encode_rawSetInt(valueof(t_mseti_valueDiffTypeExplicitNull(i))),
2003 // encode_rawSetNull(valueof(t_msetn)) );
2004 // }
2005 // }
2006 // testcase tc_RawSetIntValueDiffTypeImplicitNull() runs on RawComp {
2007 // for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
2008 // log("i: ",i );
2009 // f_compareAndVerdict(
2010 // encode_rawSetInt(valueof(t_mseti_valueDiffTypeImplicitNull(i))),
2011 // encode_rawSetNull(valueof(t_msetn))) ;
2012 // }
2013 // }
2014
2015
2016 testcase tc_RawSetIntValueDiffTypeExplicitOctStr() runs on RawComp {
2017 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
2018 log("i: ",i );
2019 var octetstring vl_encoded:=encode_rawSetInt(valueof(t_mseti_valueDiffTypeExplicitOctStr(i)));
2020 log(vl_encoded);
2021 var octetstring vl_expected:=encode_rawSetOctStr(valueof(t_msetos('42414241'O)));
2022 log(vl_expected);
2023 f_compareAndVerdict( vl_encoded,vl_expected);
2024 }
2025 }
2026 testcase tc_RawSetIntValueDiffTypeImplicitOctStr() runs on RawComp {
2027 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
2028 log("i: ",i );
2029 f_compareAndVerdict(
2030 encode_rawSetInt(valueof(t_mseti_valueDiffTypeImplicitOctStr(i))),
2031 encode_rawSetOctStr(valueof(t_msetos('42414241'O)))) ;
2032 }
2033 }
2034
2035 const RawSetInt c_mseti_valueDiffTypeExplicitOctStr := {i:= 1} with { erroneous (i) "value:= octetstring:'42414241'O" }
2036
2037 testcase tc_RawSetIntValueDiffTypeExplicitOctStr_const() runs on RawComp {
2038 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
2039 log("i: ",i );
2040 var octetstring vl_encoded:=encode_rawSetInt( c_mseti_valueDiffTypeExplicitOctStr);
2041 log(vl_encoded);
2042 var octetstring vl_expected:=encode_rawSetOctStr(valueof(t_msetos('42414241'O)));
2043 log(vl_expected);
2044 f_compareAndVerdict( vl_encoded,vl_expected);
2045 }
2046 }
2047 testcase tc_RawSetIntValueDiffTypeExplicitEnum() runs on RawComp {
2048 var RawSetRawEnum vl_msme;
2049 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
2050 log("i: ",i );
2051 vl_msme.e:=second;
2052 f_compareAndVerdict(
2053 encode_rawSetInt(valueof(t_mseti_valueDiffTypeExplicitEnum(i))),
2054 encode_rawSetRawEnum(vl_msme) );
2055 }
2056 }
2057 testcase tc_RawSetIntValueDiffTypeExplicitCharstring() runs on RawComp {
2058 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
2059 log("i: ",i );
2060 f_compareAndVerdict(
2061 encode_rawSetInt(valueof(t_mseti_valueDiffTypeExplicitCharstring(i))),
2062 encode_rawSetCharstring(valueof(t_msetr("Albert"))) );
2063 }
2064 }
2065
2066 testcase tc_RawSetIntValueDiffTypeImplicitCharstring() runs on RawComp {
2067 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
2068 log("i: ",i );
2069 f_compareAndVerdict(
2070 encode_rawSetInt(valueof(t_mseti_valueDiffTypeImplicitCharstring(i))),
2071 encode_rawSetCharstring(valueof(t_msetr("Albert"))));
2072 }
2073 }
2074
2075 //RAW
2076 template RawSetInt t_mseti_valueDiffTypeRaw(template integer p_i) := {i:= p_i} with
2077 { erroneous (i) "value(raw):= '4141'O" }
2078
2079 testcase tc_RawSetIntValueDiffTypeRawOctStr() runs on RawComp {
2080 var octetstring vl_expected := char2oct("AA");
2081 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
2082 log("i: ",i );
2083 var octetstring vl_encoded := encode_rawSetInt(valueof(t_mseti_valueDiffTypeRaw(i)));
2084 f_compareAndVerdict(vl_encoded , vl_expected);
2085 }
2086 }
2087 // ============{integer, integer }==============
2088 //omit
2089 testcase tc_RawSetInt2Omiti() runs on RawComp {
2090 var integer j:= 255;
2091 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
2092 log("i: ",i );
2093 f_compareAndVerdict(
2094 encode_rawSetInt2(valueof(t_mseti2_omiti(i,j))), //encoded
2095 encode_rawSetInt2opt32(valueof(t_mseti2opt32(omit,j))) ); //expected
2096 }
2097
2098 }
2099
2100 testcase tc_RawSetInt2Omitj() runs on RawComp {
2101 var integer j:= 255;
2102 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
2103 log("i: ",i );
2104 f_compareAndVerdict(
2105 encode_rawSetInt2(valueof(t_mseti2_omitj(i,j))),//encoded
2106 encode_rawSetInt2opt(valueof(t_mseti2opt(i, omit))) ); //expected
2107 }
2108 }
2109
2110
2111 //before omit j
2112 testcase tc_RawSetInt2BeforeOmitj() runs on RawComp {
2113 var integer j:= 255;
2114 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
2115 log("i: ",i );
2116 f_compareAndVerdict(
2117 encode_rawSetInt2(valueof(t_mseti2_beforeomitj(i,j))),//encoded
2118 encode_rawSetInt2opt32(valueof(t_mseti2opt32(omit,j))) ); //expected
2119 }
2120 }
2121
2122 //after omit i
2123 testcase tc_RawSetInt2AfterOmiti() runs on RawComp {
2124 var integer j:= 255;
2125 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
2126 log("i: ",i );
2127 f_compareAndVerdict(
2128 encode_rawSetInt2(valueof(t_mseti2_afteromiti(i,j))),//encoded
2129 encode_rawSetInt2opt(valueof(t_mseti2opt(i, omit))));//expected
2130 }
2131
2132 }
2133
2134 testcase tc_RawSetInt2ValueSameTypeE() runs on RawComp {
2135 var integer j:= 255;
2136 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
2137 log("i: ",i );
2138 f_compareAndVerdict(
2139 encode_rawSetInt2(valueof(t_mseti2_valueSameTypeE(i,j))),//encoded
2140 encode_rawSetInt2opt32(valueof(t_mseti2opt32(i,5))) ); //expected
2141 }
2142 }
2143
2144 template RawSetInt2 t_mseti2_valueSameTypeI(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j}
2145 with { erroneous (j) "value := 5" }
2146
2147 testcase tc_RawSetInt2ValueSameTypeI() runs on RawComp {
2148 var integer j:= 255;
2149 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
2150 log("i: ",i );
2151 f_compareAndVerdict(
2152 encode_rawSetInt2(valueof(t_mseti2_valueSameTypeI(i,j))),//encoded
2153 encode_rawSetInt2opt(valueof(t_mseti2opt(i,5)))); //expected
2154 }
2155 }
2156
2157 testcase tc_RawSetInt2ValueDiffTypeExplicitCharstring() runs on RawComp {
2158 var integer j:= 255;
2159 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
2160 log("i: ",i );
2161 f_compareAndVerdict(
2162 encode_rawSetInt2(valueof(t_mseti2_valueDiffTypeExplicitCharstring(i,j))),//encoded
2163 encode_rawSetIntCharstring(valueof(t_msetir(i,"Albert")))); //expected
2164 }
2165 }
2166
2167 testcase tc_RawSetInt2ValueDiffTypeImplicitCharstring() runs on RawComp {
2168 var integer j:= 255;
2169 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
2170 log("i: ",i );
2171 f_compareAndVerdict(
2172 encode_rawSetInt2(valueof(t_mseti2_valueDiffTypeImplicitCharstring(i,j))),//encoded
2173 encode_rawSetIntCharstring(valueof(t_msetir(i,"Albert")))); //expected
2174 }
2175 }
2176
2177 testcase tc_RawSetInt2ValueSeqIntV() runs on RawComp {
2178 var integer i:= 10, j:= 15;
2179 //var RawSetIntSeqInt2T vl_expectedT:={i:=10,jk:={1,2}};
2180 var octetstring vl_encoded := encode_rawSetInt2(valueof(t_mseti2_valueSeqIntV(i,j)))
2181 var octetstring vl_expected:= encode_rawSetIntSeqInt2T({i:=10,jk:={1,2}})
2182 f_compareAndVerdict(vl_encoded,vl_expected);
2183 }
2184
2185 testcase tc_RawSetInt2ValueSeqIntOptV() runs on RawComp {
2186 var integer i:= 10, j:= 15;
2187 var octetstring vl_encoded := encode_rawSetInt2(valueof(t_mseti2_valueSeqIntOptV(i,j)))
2188 var octetstring vl_expected:= encode_rawSetIntSeqInt2T({i:=10,jk:={1,2}})
2189 f_compareAndVerdict(vl_encoded,vl_expected);
2190 }
2191
2192 testcase tc_RawSetInt2ValueSeqIntC() runs on RawComp {
2193 var integer i:= 10, j:= 15;
2194 var octetstring vl_encoded := encode_rawSetInt2(valueof(t_mseti2_valueSeqIntC(i,j)))
2195 var octetstring vl_expected:= encode_rawSetIntSeqInt2T({i:=10,jk:={1,2}})
2196 f_compareAndVerdict(vl_encoded,vl_expected);
2197 }
2198
2199 testcase tc_RawSetInt2ValueSeqInt2OptC() runs on RawComp {
2200 var integer i:= 10, j:= 15;
2201 var octetstring vl_encoded := encode_rawSetInt2(valueof(t_mseti2_valueSeqIntOptC(i,j)));
2202 var octetstring vl_expected:= encode_rawSetIntSeqInt2T({i:=10,jk:={1,2}});
2203 f_compareAndVerdict(vl_encoded,vl_expected);
2204 }
2205
2206 testcase tc_RawSetInt2ValueSeqInt2OptOmitC() runs on RawComp {
2207 var integer i:= 10, j:= 15;
2208 var octetstring vl_encoded := encode_rawSetInt2(valueof(t_mseti2_valueSeqInt2OptOmitC(i,j)));
2209 var octetstring vl_expected:= encode_rawSetIntSeqInt2Toptopt({i:=10,jk:={1,omit}})
2210 f_compareAndVerdict(vl_encoded,vl_expected);
2211 }
2212 testcase tc_RawSetInt2ValueSeqInt2iiC() runs on RawComp {
2213 var integer i:= 10, j:= 15;
2214 var octetstring vl_encoded := encode_rawSetInt2(valueof(t_mseti2_valueSeqInt2iiC(i,j)));
2215 var octetstring vl_expected:= encode_rawSetInt2({i:=1,j:=15})
2216 f_compareAndVerdict(vl_encoded,vl_expected);
2217 }
2218
2219 //not possible - two field with the same tag:
2220 template RawSetInt2 t_mseti2_valueSeqInt2ijC(template integer p_i, template integer p_j):={i:=p_i, j:=p_j}
2221 with { erroneous (i) "value:=c_mseti2.j" };
2222
2223 testcase tc_RawSetInt2ValueSeqInt2ijC() runs on RawComp {
2224 var integer i:= 10, j:= 15;
2225 var octetstring vl_encoded := encode_rawSetInt2(valueof(t_mseti2_valueSeqInt2ijC(i,j)));
2226 var octetstring vl_expected:= encode_rawSetInt2({i:=2,j:=15})
2227 f_compareAndVerdict(vl_encoded,vl_expected);
2228 }
2229
2230 template RawSetInt2 t_mseti2_valueSeqInt2jiC(template integer p_i, template integer p_j):={i:=p_i, j:=p_j}
2231 with { erroneous (j) "value:=c_mseti2.i" };
2232
2233 testcase tc_RawSetInt2ValueSeqInt2jiC() runs on RawComp {
2234 var integer i:= 10, j:= 15;
2235 var octetstring vl_encoded := encode_rawSetInt2(valueof(t_mseti2_valueSeqInt2jiC(i,j)));
2236 var octetstring vl_expected:= encode_rawSetInt2({i:=10,j:=1})
2237 f_compareAndVerdict(vl_encoded,vl_expected);
2238 }
2239
2240 testcase tc_RawSetInt2ValueSeqInt2jjC() runs on RawComp {
2241 var integer i:= 10, j:= 15;
2242 var octetstring vl_encoded := encode_rawSetInt2(valueof(t_mseti2_valueSeqInt2jjC(i,j)));
2243 var octetstring vl_expected:= encode_rawSetInt2({i:=10,j:=2})
2244 f_compareAndVerdict(vl_encoded,vl_expected);
2245 }
2246 //=== Set { integer, {integer, integer} )
2247 template RawSetIntSeqInt2 t_msetisi2_omiti(template integer p_i, template integer p_j, template integer p_k) := { i:= p_i, jk:= { i:=p_j, j:=p_k} }
2248 with { erroneous (i) "value:= omit" };
2249
2250 testcase tc_RawSetIntSeqInt2ValueOmiti() runs on RawComp {
2251 var integer i:= 10, j:= 15, k:=16;
2252 var octetstring vl_encoded :=encode_rawSetIntSeqInt2(valueof(t_msetisi2_omiti(i,j,k)))
2253 var octetstring vl_expected:=encode_rawSetIntSeqInt2opt({i:=omit,jk:={15,16}})
2254 f_compareAndVerdict(vl_encoded, vl_expected);
2255 }
2256
2257 testcase tc_RawSetIntSeqInt2ValueOmitjki() runs on RawComp {
2258 var integer i:= 10, j:= 15, k:=16;
2259 f_compareAndVerdict(
2260 encode_rawSetIntSeqInt2(valueof(t_msetisi2_omitjki(i,j,k))),
2261 encode_rawSetIntSeqInt2optopt({i:=10,jk:={16,omit}}) );
2262 }
2263
2264 testcase tc_RawSetIntSeqInt2ValueOmitjkj() runs on RawComp {
2265 var integer i:= 10, j:= 15, k:=16;
2266
2267 log( "encoded value: ", encode_rawSetIntSeqInt2(valueof(t_msetisi2_omitjkj(i,j,k))));
2268
2269 f_compareAndVerdict(
2270 encode_rawSetIntSeqInt2(valueof(t_msetisi2_omitjkj(i,j,k))),
2271 encode_rawSetIntSeqInt2optopt({i:=10,jk:={15,omit}}) );
2272 }
2273
2274 testcase tc_RawSetIntSeqInt2ValueRawjki() runs on RawComp {
2275 var integer i:= 10, j:= 15, k:=16;
2276 var octetstring vl_encoded := encode_rawSetIntSeqInt2(valueof(t_msetisi2_rawjki(i,j,k)));
2277 var octetstring vl_expected:= '0A000000'O & char2oct("ABBA") & '10000000'O;
2278 f_compareAndVerdict(vl_encoded, vl_expected);
2279 }
2280
2281 testcase tc_RawSetIntSeqInt2ValueRawjkj() runs on RawComp {
2282 var integer i:= 10, j:= 15, k:=16;
2283 var octetstring vl_encoded := encode_rawSetIntSeqInt2(valueof(t_msetisi2_rawjkj(i,j,k)));
2284 var octetstring vl_expected:= '0A0000000F000000'O & char2oct("ABBA");
2285 f_compareAndVerdict(vl_encoded, vl_expected);
2286 }
2287
2288 //After-before:
2289 testcase tc_RawSetIntSeqInt2AfteriBeforej() runs on RawComp {
2290 var integer i:= 10, j:= 15, k:=16;
2291 var octetstring vl_encoded := encode_rawSetIntSeqInt2(valueof(t_msetisi2_afteribeforej(i,j,k)));
2292 var octetstring vl_expected:= '0A00000041424241424142410F00000010000000'O;
2293 f_compareAndVerdict(vl_encoded, vl_expected);
2294 }
2295
2296 testcase tc_RawSetIntSeqInt2AfteriRawBeforejRaw() runs on RawComp {
2297 var integer i:= 10, j:= 15, k:=16;
2298 var octetstring vl_encoded := encode_rawSetIntSeqInt2(valueof(t_msetisi2_afterirawbeforejraw(i,j,k)));
2299 var octetstring vl_expected:= '0A00000041424241424142410F00000010000000'O;
2300 f_compareAndVerdict(vl_encoded, vl_expected);
2301 }
2302 //==== {integer, integer, integer, integer} ==============
2303 //omit
2304 testcase tc_RawSetInt4Omiti() runs on RawComp {
2305 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
2306 log("i: ",i);
2307 var octetstring vl_encoded := encode_rawSetInt4(valueof(t_mseti4_omiti(i,2*i,3*i,4*i)));
2308 var octetstring vl_expected:= encode_rawSetInt4opt(valueof(t_mseti4opt(omit,2*i,3*i,4*i)));
2309 f_compareAndVerdict(vl_encoded, vl_expected);
2310 }
2311 }
2312
2313 testcase tc_RawSetInt4Omitj() runs on RawComp {
2314 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
2315 log("i: ",i);
2316 var octetstring vl_encoded := encode_rawSetInt4(valueof(t_mseti4_omitj(i,2*i,3*i,4*i)));
2317 var octetstring vl_expected:= encode_rawSetInt4opt(valueof(t_mseti4opt(i,omit,3*i,4*i)));
2318 f_compareAndVerdict(vl_encoded, vl_expected);
2319 }
2320 }
2321
2322 testcase tc_RawSetInt4Omitk() runs on RawComp {
2323 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
2324 log("i: ",i);
2325 var octetstring vl_encoded := encode_rawSetInt4(valueof(t_mseti4_omitk(i,2*i,3*i,4*i)));
2326 var octetstring vl_expected:= encode_rawSetInt4opt(valueof(t_mseti4opt(i,2*i,omit,4*i)));
2327 f_compareAndVerdict(vl_encoded, vl_expected);
2328 }
2329 }
2330
2331 testcase tc_RawSetInt4Omitl() runs on RawComp {
2332 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
2333 log("i: ",i);
2334 var octetstring vl_encoded := encode_rawSetInt4(valueof(t_mseti4_omitl(i,2*i,3*i,4*i)));
2335 var octetstring vl_expected:= encode_rawSetInt4opt(valueof(t_mseti4opt(i,2*i,3*i,omit)));
2336 f_compareAndVerdict(vl_encoded, vl_expected);
2337 }
2338 }
2339
2340 testcase tc_RawSetInt4ValueiOctetStr() runs on RawComp {
2341 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
2342 log("i: ",i);
2343 var octetstring vl_encoded := encode_rawSetInt4(valueof(t_mseti4_valueiOctetStr(i,2*i,3*i,4*i)));
2344 var octetstring vl_expected:= encode_rawSetOJKL(valueof(t_msetojkl('FEDCBA98'O,2*i,3*i, 4*i)));
2345 f_compareAndVerdict(vl_encoded, vl_expected);
2346 }
2347 }
2348
2349 testcase tc_RawSetInt4ValuejOctetStr() runs on RawComp {
2350 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
2351 log("i: ",i);
2352 var octetstring vl_encoded := encode_rawSetInt4(valueof(t_mseti4_valuejOctetStr(i,2*i,3*i,4*i)));
2353 var octetstring vl_expected:= encode_rawSetIOKL(valueof(t_msetiokl(i,'FEDCBA98'O,3*i, 4*i)));
2354 f_compareAndVerdict(vl_encoded, vl_expected);
2355 }
2356 }
2357
2358 testcase tc_RawSetInt4ValueiRaw() runs on RawComp {
2359 var RoC vl_expectedValue:= {
2360 char2oct("ABBA") & '020000000300000004000000'O,
2361 char2oct("ABBA") & '140000001E00000028000000'O,
2362 char2oct("ABBA") & 'C80000002C01000090010000'O,
2363 char2oct("ABBA") & 'D0070000B80B0000A00F0000'O,
2364 char2oct("ABBA") & 'ECFFFFFFE2FFFFFFD8FFFFFF'O
2365 }
2366
2367 var RoI vl_roi := { 1, 10, 100, 1000,-10};
2368
2369 var integer i:=0;
2370 for(var integer index:=0; index<5;index:=index+1) {
2371 i:=vl_roi[index];
2372 log("i: ",i);
2373 var octetstring vl_encoded := encode_rawSetInt4(valueof(t_mseti4_valueiRaw(i,2*i,3*i,4*i)));
2374 var octetstring vl_expected:= vl_expectedValue[index];
2375 f_compareAndVerdict(vl_encoded, vl_expected);
2376 }
2377 }
2378
2379 testcase tc_RawSetInt4ValuejRaw() runs on RawComp {
2380 var integer i:=1;
2381 var octetstring vl_encoded := encode_rawSetInt4(valueof(t_mseti4_valuejRaw(i,2*i,3*i,4*i)));
2382 var octetstring vl_expected:= '01000000'O & char2oct("ABBA") & '0300000004000000'O;
2383 f_compareAndVerdict(vl_encoded, vl_expected);
2384 }
2385
2386 testcase tc_RawSetInt4ValuekRaw() runs on RawComp {
2387 var integer i:=1;
2388 var octetstring vl_encoded := encode_rawSetInt4(valueof(t_mseti4_valuekRaw(i,2*i,3*i,4*i)));
2389 var octetstring vl_expected:= '0100000002000000'O & char2oct("ABBA") & '04000000'O;
2390 f_compareAndVerdict(vl_encoded, vl_expected);
2391 }
2392
2393 testcase tc_RawSetInt4ValuelRaw() runs on RawComp {
2394 var integer i:=1
2395 var octetstring vl_encoded := encode_rawSetInt4(valueof(t_mseti4_valuelRaw(i,2*i,3*i,4*i)));
2396 var octetstring vl_expected:= '010000000200000003000000'O & char2oct("ABBA");
2397 f_compareAndVerdict(vl_encoded, vl_expected);
2398 }
2399
2400 //To test if a mandatory structure omitted
2401 template RawSetISKL t_msetiskl_valueSomit(template integer p_i, template RawSeqInt4 p_s, template integer p_k,template integer p_l ) := {i:=p_i, s:=p_s, k:=p_k, l:=p_l}
2402 with { erroneous(s) "value:= omit" }
2403
2404 template RawSetISKLopt t_msetisklopt(template integer p_i, template RawSeqInt4opt p_s, template integer p_k,template integer p_l ) := {i:=p_i, s:=p_s, k:=p_k, l:=p_l}
2405
2406 testcase tc_RawSetISKL_ValueSomit() runs on RawComp {
2407 var RawSeqInt4 vl_msi4:={5,6,7,8};
2408 //var charstring vl_expectedValue:= "dumraw";
2409 var octetstring vl_encoded := encode_rawSetISKL (valueof(t_msetiskl_valueSomit(10,vl_msi4,30,40)));
2410 var octetstring vl_expected:= encode_rawSetISKLopt(valueof(t_msetisklopt (10,omit ,30,40)));
2411 f_compareAndVerdict(vl_encoded, vl_expected);
2412 }
2413
2414 template RawSetISKL t_msetiskl_valueSIomit(template integer p_i, template RawSeqInt4 p_s, template integer p_k,template integer p_l ) := {i:=p_i, s:=p_s, k:=p_k, l:=p_l}
2415 with { erroneous(s.i) "value:= omit" }
2416
2417 testcase tc_RawSetISKL_ValueSIomit() runs on RawComp {
2418 var RawSeqInt4 vl_msi4:={5,6,7,8};
2419 var octetstring vl_encoded := encode_rawSetISKL (valueof(t_msetiskl_valueSIomit(10,vl_msi4 ,30,40)));
2420 var octetstring vl_expected:= encode_rawSetISKLopt(valueof(t_msetisklopt (10,{6,7,8,omit},30,40)));
2421 f_compareAndVerdict(vl_encoded, vl_expected);
2422 }
2423
2424 testcase tc_RawSetISKL_ValueSISJomit() runs on RawComp {
2425 var RawSeqInt4 vl_msi4:={5,6,7,8};
2426 var octetstring vl_encoded := encode_rawSetISKL(valueof(t_msetiskl_valueSISJomit(10,vl_msi4,30,40)));
2427 var octetstring vl_expected:= encode_rawSetIS2KLopt(valueof(t_msetis2klopt(10,{7,8},30,40)));
2428 f_compareAndVerdict(vl_encoded, vl_expected);
2429 }
2430
2431 template RawSetISKL t_msetiskl_valueSraw(template integer p_i, template RawSeqInt4 p_s, template integer p_k,template integer p_l ) := {i:=p_i, s:=p_s, k:=p_k, l:=p_l}
2432 with { erroneous (s) "value(raw):= '41424241'O" }
2433
2434 testcase tc_RawSetISKL_ValueSraw() runs on RawComp {
2435 var RawSeqInt4 vl_msi4:={5,6,7,8};
2436 var octetstring vl_encoded := encode_rawSetISKL(valueof(t_msetiskl_valueSraw(10,vl_msi4,30,40)));
2437 var octetstring vl_expected:= '0A000000'O & char2oct("ABBA") & '1E00000028000000'O;
2438 f_compareAndVerdict(vl_encoded, vl_expected);
2439 }
2440
2441 testcase tc_RawSetISOKL_ValueSomit() runs on RawComp {
2442 var RawSeqInt4 vl_msi4:={5,6,7,8};
2443 var octetstring vl_encoded := encode_rawSetISOKL(valueof(t_msetisokl_valueSomit(10,vl_msi4,'42414241'O,30,40)));
2444 var octetstring vl_expected:= encode_rawSetISOKLopt(valueof(t_msetisoklopt(10,omit,'42414241'O,30,40)));
2445 f_compareAndVerdict(vl_encoded, vl_expected);
2446 }
2447
2448 testcase tc_RawSetIOSKL_ValueSomit() runs on RawComp {
2449 var RawSeqInt4 vl_msi4:={5,6,7,8};
2450 var octetstring vl_encoded := encode_rawSetIOSKL(valueof(t_msetioskl_valueSomit(10,'42414241'O,vl_msi4,30,40)));
2451 var octetstring vl_expected:= encode_rawSetIOSKLopt(valueof(t_msetiosklopt(10,'42414241'O,omit,30,40)));
2452 f_compareAndVerdict(vl_encoded, vl_expected);
2453 }
2454
2455 //===== sequence of sequence of sequence ====
2456 testcase tc_RawSetIntSeqIntSeqInt2SeqCharstring2_omiti() runs on RawComp {
2457 var octetstring vl_encoded := encode_rawSetIntSeqIntSeqInt2SeqCharstring2(valueof(t_msetisisi2r2_omiti(1, {2,{3,4}}, {"Albert","Einstein"} )));
2458 var octetstring vl_expected:= encode_rawSetSeqIntSeqInt2SeqCharstring2({jkl:={2,{3,4}},xy:={"Albert","Einstein"}});
2459 f_compareAndVerdict(vl_encoded, vl_expected);
2460 }
2461
2462 testcase tc_RawSetIntSeqIntSeqInt2SeqCharstring2_omitjkl() runs on RawComp {
2463 var octetstring vl_encoded := encode_rawSetIntSeqIntSeqInt2SeqCharstring2(valueof(t_msetisisi2r2_omitjkl(1, {2,{3,4}}, {"Albert","Einstein"} )));
2464 var octetstring vl_expected:= encode_rawSetIntSeqCharstring2({i:= 1, xy:={"Albert","Einstein"}});
2465 f_compareAndVerdict(vl_encoded, vl_expected);
2466 }
2467
2468 testcase tc_RawSetIntSeqIntSeqInt2SeqCharstring2_omitxy() runs on RawComp {
2469 var octetstring vl_encoded := encode_rawSetIntSeqIntSeqInt2SeqCharstring2(valueof(t_msetisisi2r2_omitxy(1, {2,{3,4}}, {"Albert","Einstein"} )));
2470 var octetstring vl_expected:= encode_rawSetIntSeqIntSeqInt2({ i:=1, jkl:={2,{3,4}} });
2471 f_compareAndVerdict(vl_encoded, vl_expected);
2472 }
2473
2474 //...with { erroneous(jkl.jk.j) "value:=omit"}
2475 testcase tc_RawSetIntSeqIntSeqInt2SeqCharstring2_omitjkll() runs on RawComp {
2476 var octetstring vl_encoded := encode_rawSetIntSeqIntSeqInt2SeqCharstring2(
2477 valueof(t_msetisisi2r2_omitjkll(1, {2,{3,4}}, {"Albert","Einstein"} )));
2478 var octetstring vl_expected:= encode_rawSetIntSeqIntSeqInt2optoptSeqCharstring2({i:=1,jkl:={2,{3,omit}},xy:= {"Albert","Einstein"}});
2479 f_compareAndVerdict(vl_encoded, vl_expected);
2480 }
2481
2482 testcase tc_RawSetIntSeqIntSeqInt2SeqCharstring2_valuexy() runs on RawComp {
2483 //var RawSetIntSeqIntSeqInt2SeqCharstring2 vl_msisisi2r2;
2484 var octetstring vl_encoded := encode_rawSetIntSeqIntSeqInt2SeqCharstring2(valueof(t_msetisisi2r2_valuexy(1, {2,{3,4}}, {"Albert","Einstein"} )));
2485 var octetstring vl_expected:= encode_rawSetIntSeqIntSeqInt2SeqCharstring2({i:=1,jkl:={2,{3,4}}, xy:={"Albert","Einstein"}})
2486 f_compareAndVerdict(vl_encoded, vl_expected);
2487 }
2488
2489 testcase tc_RawSetIntSeqIntSeqInt2SeqCharstring2_valuex_y() runs on RawComp {
2490 var octetstring vl_encoded := encode_rawSetIntSeqIntSeqInt2SeqCharstring2(
2491 valueof(t_msetisisi2r2_valuex_y(1, {2,{3,4}}, {"Albert","Einstein"} )));
2492 var octetstring vl_expected:= encode_rawSetIntSeqIntSeqInt2SeqCharstring2({i:=1,jkl:={2,{3,4}},xy:= {"Albert","Einstein"}});
2493 f_compareAndVerdict(vl_encoded, vl_expected);
2494 }
2495
2496 testcase tc_RawSet_SeqSeqIntSeqInt2SeqCharstring2_SeqSeqIntSeqInt2SeqCharstring2_omit() runs on RawComp {
2497 var RawSeqSeqIntSeqInt2SeqCharstring2 vl_s1:={jkl:={1,{2,3}},xy:={"Three","Four"} }, vl_s2:= {jkl:={5,{6,7}},xy:={"Seven", "Eight"}};
2498 var RawSet_SeqSeqIntSeqInt2optoptSeqCharstring2_SeqSeqIntSeqInt2optoptSeqCharstring2 vl_etalon :=
2499 { s1:={ omit,{1,{2, omit}}, {"Three","Four"} },s2:= { omit,{5,{6,7}}, {"Seven", "Eight"}} };
2500
2501 var octetstring vl_encoded := encode_rawSet_SeqSeqIntSeqInt2SeqCharstring2_SeqSeqIntSeqInt2SeqCharstring2(valueof(t_msetssi2sr2ssi2sr2_omit(vl_s1, vl_s2)));
2502 var octetstring vl_expected:= encode_rawSet_SeqSeqIntSeqInt2optoptSeqCharstring2_SeqSeqIntSeqInt2optoptSeqCharstring2(vl_etalon);
2503 f_compareAndVerdict(vl_encoded, vl_expected);
2504 }
2505
2506}//group Set
2507
2508
2509group SetOf { //====set of related templates====
2510
2511 template RawSetOfBool t_msetofb(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 };
2512 template RawSetOfInt t_msetofi(template integer p_i1, template integer p_i2, template integer p_i3):={p_i1,p_i2,p_i3};
2513 template RawSetOfRawEnum t_msetofme(template RawEnum p_e1, template RawEnum p_e2,template RawEnum p_e3) := {p_e1,p_e2,p_e3};
2514 template RawSetOfCharstring t_msetofr(template charstring p_f1, template charstring p_f2, template charstring p_f3, template charstring p_f4):= {p_f1, p_f2,p_f3,p_f4}
2515 template RawSetOfBitStr t_msetofbs(template bitstring p_bs1, template bitstring p_bs2, template bitstring p_bs3):={p_bs1, p_bs2, p_bs3}
2516 template RawSetOfOctStr t_msetofos(template octetstring p_os1, template octetstring p_os2, template octetstring p_os3):={p_os1, p_os2, p_os3}
2517
2518 template RawSetOfBool t_msetofbValueSameType(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
2519 with { erroneous ([0]) "value:= boolean:true"; erroneous ([2]) "value:= boolean:true" };
2520
2521 template RawSetOfBool t_msetofbValueDiffType(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
2522 with { erroneous ([0]) "value:= ""Pi"""; erroneous ([2]) "value:= int32 : 2011" };
2523
2524 template RawSetOfBool t_msetofbValueOmit(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
2525 with { erroneous ([0]) "value:=omit"; erroneous ([1]) "value:= omit" };
2526
2527 template RawSetOfBool t_msetofbAfterOmit(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
2528 with { erroneous ([0]) "after:=omit all" };
2529
2530 template RawSetOfBool t_msetofbValueAfterOmit(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
2531 with { erroneous ([0]) "after:=omit all"; erroneous ([0]) "value:=true" };
2532
2533 template RawSetOfBool t_msetofbBeforeOmit2(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
2534 with { erroneous ([2]) "before:=omit all" };
2535
2536 template RawSetOfBool t_msetofbValueBeforeOmit2(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
2537 with { erroneous ([2]) "before:=omit all"; erroneous ([2]) "value:=true" };
2538
2539 template RawSetOfBool t_msetofbBeforeOmit1(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
2540 with { erroneous ([1]) "before:=omit all" };
2541
2542 template RawSetOfBool t_msetofbValueBeforeOmit1(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
2543 with { erroneous ([1]) "before:=omit all"; erroneous ([1]) "value:=true" };
2544
2545 //INTEGER
2546 template RawSetOfInt t_msetofiBeforeOmit2(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
2547 with { erroneous ([2]) "before:= omit all" };
2548 template RawSetOfInt t_msetofiCharStrValueBeforeOmit2(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
2549 with { erroneous ([2]) "before:= omit all"; erroneous ([2]) "value:= ""bubu"""};
2550 template RawSetOfInt t_msetofiBeforeOmit1(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
2551 with { erroneous ([1]) "before:= omit all" };
2552 template RawSetOfInt t_msetofiCharStrValueBeforeOmit1(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
2553 with { erroneous ([1]) "before:= omit all"; erroneous ([1]) "value:= ""bubu"""};
2554 template RawSetOfInt t_msetofiCharStrValueBeforeOmit1_2(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
2555 with { erroneous ([1]) "before:= omit all"; erroneous ([2]) "value:= ""bubu"""};
2556
2557 template RawSetOfInt t_msetofiAfterOmit1(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
2558 with { erroneous ([1]) "after:= omit all" };
2559 template RawSetOfInt t_msetofiCharStrValueAfterOmit1(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
2560 with { erroneous ([1]) "after:= omit all"; erroneous ([1]) "value:= ""bubu"""};
2561 template RawSetOfInt t_msetofiCharStrValueAfterOmit1_2(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
2562 with { erroneous ([1]) "after:= omit all"; erroneous ([0]) "value:= ""bubu"""};
2563 //RawEnum
2564 template RawSetOfRawEnum t_msetofeValueDiffType(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
2565 with { erroneous ([0]) "value:= ""Pi"""; erroneous ([2]) "value:= true" };
2566 template RawSetOfRawEnum t_msetofeBeforeOmit2(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
2567 with { erroneous ([2]) "before:= omit all" };
2568 template RawSetOfRawEnum t_msetofeIntValueBeforeOmit2(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
2569 with { erroneous ([2]) "before:= omit all"; erroneous ([2]) "value:= int32 : 2011"};
2570 template RawSetOfRawEnum t_msetofeCharStrValueBeforeOmit2(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
2571 with { erroneous ([2]) "before:= omit all"; erroneous ([2]) "value:= ""bubu"""};
2572 template RawSetOfRawEnum t_msetofeBeforeOmit1(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
2573 with { erroneous ([1]) "before:= omit all" };
2574 template RawSetOfRawEnum t_msetofeIntValueBeforeOmit1(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
2575 with { erroneous ([1]) "before:= omit all"; erroneous ([1]) "value:= int32 : 2011"};
2576 template RawSetOfRawEnum t_msetofeCharStrValueBeforeOmit1(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
2577 with { erroneous ([1]) "before:= omit all"; erroneous ([1]) "value:= ""bubu"""};
2578 template RawSetOfRawEnum t_msetofeCharStrValueBeforeOmit1_2(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
2579 with { erroneous ([1]) "before:= omit all"; erroneous ([2]) "value:= ""bubu"""};
2580
2581 template RawSetOfRawEnum t_msetofeAfterOmit1(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
2582 with { erroneous ([1]) "after:= omit all" };
2583 template RawSetOfRawEnum t_msetofeIntValueAfterOmit1(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
2584 with { erroneous ([1]) "after:= omit all"; erroneous ([1]) "value:= int32 : 2011"};
2585 template RawSetOfRawEnum t_msetofeCharStrValueAfterOmit1(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
2586 with { erroneous ([1]) "after:= omit all"; erroneous ([1]) "value:= ""bubu"""};
2587 template RawSetOfRawEnum t_msetofeCharStrValueAfterOmit1_2(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
2588 with { erroneous ([1]) "after:= omit all"; erroneous ([0]) "value:= ""bubu"""};
2589 //Charstring (charstring):
2590 template RawSetOfCharstring t_msetofrValueDiffType(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
2591 with { erroneous ([0]) "value:= ""Pi"""; erroneous ([2]) "value:= true" };
2592 template RawSetOfCharstring t_msetofrValueDiffTypeRaw(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
2593 with { erroneous ([0]) "value(raw):= '0101FF'O"; erroneous ([2]) "value:= true" };
2594 template RawSetOfCharstring t_msetofrBeforeOmit2(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
2595 with { erroneous ([2]) "before:= omit all" };
2596 template RawSetOfCharstring t_msetofrIntValueBeforeOmit2(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
2597 with { erroneous ([2]) "before:= omit all"; erroneous ([2]) "value:= int32 : 2011"};
2598 template RawSetOfCharstring t_msetofrCharStrValueBeforeOmit2(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
2599 with { erroneous ([2]) "before:= omit all"; erroneous ([2]) "value:= ""bubu"""};
2600 template RawSetOfCharstring t_msetofrBeforeOmit1(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
2601 with { erroneous ([1]) "before:= omit all" };
2602 template RawSetOfCharstring t_msetofrIntValueBeforeOmit1(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
2603 with { erroneous ([1]) "before:= omit all"; erroneous ([1]) "value:= int32 : 2011"};
2604 template RawSetOfCharstring t_msetofrCharStrValueBeforeOmit1(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
2605 with { erroneous ([1]) "before:= omit all"; erroneous ([1]) "value:= ""bubu"""};
2606 template RawSetOfCharstring t_msetofrCharStrValueBeforeOmit1_2(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
2607 with { erroneous ([1]) "before:= omit all"; erroneous ([2]) "value:= ""bubu"""};
2608
2609 template RawSetOfCharstring t_msetofrAfterOmit1(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
2610 with { erroneous ([1]) "after:= omit all" };
2611 template RawSetOfCharstring t_msetofrIntValueAfterOmit1(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
2612 with { erroneous ([1]) "after:= omit all"; erroneous ([1]) "value:= int32 : 2011"};
2613 template RawSetOfCharstring t_msetofrCharStrValueAfterOmit1(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
2614 with { erroneous ([1]) "after:= omit all"; erroneous ([1]) "value:= ""bubu"""};
2615 template RawSetOfCharstring t_msetofrCharStrValueAfterOmit1_2(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
2616 with { erroneous ([1]) "after:= omit all"; erroneous ([0]) "value:= ""bubu"""};
2617 //more complex:
2618 template RawSetOfSeqSeqIntSeqInt2SeqCharstring2 t_msetofssisi2sr2_omitj(template RawSeqSeqIntSeqInt2SeqCharstring2 p_s1,template RawSeqSeqIntSeqInt2SeqCharstring2 p_s2) :={ p_s1, p_s2}
2619 with { erroneous([0].jkl.jk.j) "value:=omit" }
2620
2621 template RawSetOfSeqSeqIntSeqInt2SeqCharstring2 t_msetofssisi2sr2_beforeomitj(template RawSeqSeqIntSeqInt2SeqCharstring2 p_s1,template RawSeqSeqIntSeqInt2SeqCharstring2 p_s2) :={ p_s1, p_s2}
2622 with { erroneous([0].jkl.jk.j) "before:=omit all" erroneous([1].jkl.jk.i) "after:=omit all"}
2623
2624 template RawSetOfSeqSeqIntSeqInt2SeqCharstring2 t_msetofssisi2sr2_beforeafteromit(
2625 template RawSeqSeqIntSeqInt2SeqCharstring2 p_s1,template RawSeqSeqIntSeqInt2SeqCharstring2 p_s2) :={ p_s1, p_s2}
2626 with { erroneous([0].jkl.jk.j) "before:=omit all" erroneous([1].jkl.jk.i) "after:=omit all"}
2627
2628 template RawSetOfSeqSeqIntSeqInt2SeqCharstring2 t_msetofssisi2sr2_arglist_omit(
2629 template RawSeqSeqIntSeqInt2SeqCharstring2 p_s1,template RawSeqSeqIntSeqInt2SeqCharstring2 p_s2) :={ p_s1, p_s2}
2630 with { erroneous([0].jkl.i, [0].jkl.jk.j, [0].xy.x) "value:=omit" erroneous([1].jkl.jk.i, [1].xy.x) "after:=omit all"}
2631
2632 template RawSetOfSeqSeqIntSeqInt2SeqCharstring2 t_msetofssisi2sr2_arglist_afteromit(
2633 template RawSeqSeqIntSeqInt2SeqCharstring2 p_s1,template RawSeqSeqIntSeqInt2SeqCharstring2 p_s2) :={ p_s1, p_s2}
2634 with { erroneous([0].jkl.jk.i, [0].xy.x) "after:=omit all" erroneous([1].jkl.jk.i, [1].xy.x) "after:=omit all"}
2635
2636 template RawSetOfSeqSeqIntSeqInt2SeqCharstring2 t_msetofssisi2sr2_arglist_beforeomit(
2637 template RawSeqSeqIntSeqInt2SeqCharstring2 p_s1,template RawSeqSeqIntSeqInt2SeqCharstring2 p_s2) :={ p_s1, p_s2}
2638 with { erroneous([0].jkl.jk.j, [0].xy.y) "before:=omit all" erroneous([1].jkl.jk.i, [1].xy.x) "after:=omit all"}
2639 //============ Testcases====================
2640 //Testcase of same type
2641 testcase tc_RawSetOfBoolValueSameType1() runs on RawComp {
2642 f_compareAndVerdict(
2643 encode_rawSetOfBool(valueof(t_msetofbValueSameType(false, false,false))),
2644 encode_rawSetOfBool(valueof(t_msetofb(true, false, true))));
2645 }
2646
2647 testcase tc_RawSetOfBoolValueSameType2() runs on RawComp {
2648 f_compareAndVerdict(
2649 encode_rawSetOfBool(valueof(t_msetofbValueSameType(true, true,true))),
2650 encode_rawSetOfBool(valueof(t_msetofb(true, true, true))));
2651 }
2652
2653 template RawSetOfBool t_msetofbValueDiffTypeRaw(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
2654 with { erroneous ([0]) "value(raw) := '02010A'O" erroneous ([2]) "value := int32 : 2011" };
2655
2656 testcase tc_RawSetOfBoolValueDiffType() runs on RawComp {
2657 var RawSetOfRawUnionBT32 vl_expected :={ {r:="Pi"}, {b:=true}, {i:=2011}};
2658 f_compareAndVerdict(
2659 encode_rawSetOfBool(valueof(t_msetofbValueDiffType(true, true,true))),
2660 encode_rawSetOfRawUnionBT32( vl_expected ));
2661 }
2662
2663 testcase tc_RawSetOfBoolValueRaw() runs on RawComp {
2664 var octetstring actual := encode_rawSetOfBool(valueof(t_msetofbValueDiffTypeRaw(true, true, true)));
2665 var RawSetOfBoolBogus vl_expected := { true, 2011 };
2666 var octetstring expected:= '02010A'O & encode_rawSetOfBoolBogus(vl_expected);
2667 f_compareAndVerdict(actual, expected);
2668 }
2669
2670 testcase tc_RawSetOfBoolValueOmit() runs on RawComp {
2671 var RawSetOfRawUnionBT vl_expected :={ {b:=true} };
2672 f_compareAndVerdict(
2673 encode_rawSetOfBool(valueof(t_msetofbValueOmit(false, false,true))),
2674 encode_rawSetOfRawUnionBT( vl_expected ));
2675 }
2676
2677 testcase tc_RawSetOfBoolAfterOmit() runs on RawComp {
2678 var RawSetOfRawUnionBT vl_expected :={ {b:=false} };
2679 f_compareAndVerdict(
2680 encode_rawSetOfBool(valueof(t_msetofbAfterOmit(false, true,true))),
2681 encode_rawSetOfRawUnionBT( vl_expected ));
2682 }
2683
2684 testcase tc_RawSetOfBoolValueAfterOmit() runs on RawComp {
2685 var RawSetOfRawUnionBT vl_expected :={ {b:=true} };
2686 f_compareAndVerdict(
2687 encode_rawSetOfBool(valueof(t_msetofbValueAfterOmit(false, false,false))),
2688 encode_rawSetOfRawUnionBT( vl_expected ));
2689 }
2690
2691 testcase tc_RawSetOfBoolBeforeOmit2() runs on RawComp {
2692 var RawSetOfRawUnionBT vl_expected :={ {b:=true} };
2693 f_compareAndVerdict(
2694 encode_rawSetOfBool(valueof(t_msetofbBeforeOmit2(false, false,true))),
2695 encode_rawSetOfRawUnionBT( vl_expected ));
2696 }
2697
2698 testcase tc_RawSetOfBoolValueBeforeOmit2() runs on RawComp {
2699 var RawSetOfRawUnionBT vl_expected :={ {b:=true} };
2700 f_compareAndVerdict(
2701 encode_rawSetOfBool(valueof(t_msetofbValueBeforeOmit2(false, false,false))),
2702 encode_rawSetOfRawUnionBT( vl_expected ));
2703 }
2704
2705 testcase tc_RawSetOfBoolBeforeOmit1() runs on RawComp {
2706 var RawSetOfRawUnionBT vl_expected :={ {b:=false},{b:=true} };
2707 f_compareAndVerdict(
2708 encode_rawSetOfBool(valueof(t_msetofbBeforeOmit1(true, false,true))),
2709 encode_rawSetOfRawUnionBT( vl_expected ));
2710 }
2711
2712 testcase tc_RawSetOfBoolValueBeforeOmit1() runs on RawComp {
2713 var RawSetOfRawUnionBT vl_expected :={ {b:=true},{b:=false} };
2714 f_compareAndVerdict(
2715 encode_rawSetOfBool(valueof(t_msetofbValueBeforeOmit1(false, false,false))),
2716 encode_rawSetOfRawUnionBT( vl_expected ));
2717 }
2718
2719 //INTEGER
2720 template RawSetOfInt32 t_msetofiValueDiffType(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
2721 with { erroneous ([0]) "value:= ""Pi"""; erroneous ([2]) "value:= true" };
2722
2723 testcase tc_RawSetOfIntValueDiffType() runs on RawComp {
2724 var RawSetOfRawUnionBT32 vl_expected :={ {r:="Pi"}, {i:=2}, {b:=true}};
2725 f_compareAndVerdict(
2726 encode_rawSetOfInt32(valueof(t_msetofiValueDiffType(1,2,3))),
2727 encode_rawSetOfRawUnionBT32( vl_expected ));
2728 }
2729
2730 template RawSetOfInt32 t_msetofiValueDiffTypeRaw(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
2731 with { erroneous ([0]) "value(raw):= '0101FF'O"; erroneous ([2]) "value:= true" };
2732
2733 testcase tc_RawSetOfIntValueDiffTypeRaw() runs on RawComp {
2734 var RawSetOfRawUnionBT32 vl_expected :={ {r:="\x01\x01\xFF"}, {i:=2}, {b:=true}}; // oct2char('0101FF'O)
2735 f_compareAndVerdict(
2736 encode_rawSetOfInt32(valueof(t_msetofiValueDiffTypeRaw(1,2,3))),
51fa56b9 2737 '0101FF0200000001'O);
970ed795
EL
2738 f_compareAndVerdict(
2739 encode_rawSetOfInt32(valueof(t_msetofiValueDiffTypeRaw(1,2,3))),
2740 encode_rawSetOfRawUnionBT32( vl_expected ));
2741 }
2742 testcase tc_RawSetOfIntBeforeOmit2() runs on RawComp {
2743 var RawSetOfRawUnionBT vl_expected :={ {i:=3} };
2744 f_compareAndVerdict(
2745 encode_rawSetOfInt(valueof(t_msetofiBeforeOmit2(1,2,3))),
2746 encode_rawSetOfRawUnionBT( vl_expected ));
2747 }
2748
2749 template RawSetOfInt t_msetofiIntValueBeforeOmit2(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
2750 with { erroneous ([2]) "before:= omit all"; erroneous ([2]) "value:= int32 : 2011"};
2751
2752 testcase tc_RawSetOfIntIntValueBeforeOmit2() runs on RawComp {
2753 var RawSetOfRawUnionBT32 vl_expected :={ {i:=2011}};
2754 f_compareAndVerdict(
2755 encode_rawSetOfInt(valueof(t_msetofiIntValueBeforeOmit2(1,2,3))),
2756 encode_rawSetOfRawUnionBT32( vl_expected ));
2757 }
2758 testcase tc_RawSetOfIntCharStrValueBeforeOmit2() runs on RawComp {
2759 var RawSetOfRawUnionBT vl_expected :={ {r:="bubu"}};
2760 f_compareAndVerdict(
2761 encode_rawSetOfInt(valueof(t_msetofiCharStrValueBeforeOmit2(1,2,3))),
2762 encode_rawSetOfRawUnionBT( vl_expected ));
2763 }
2764 testcase tc_RawSetOfIntBeforeOmit1() runs on RawComp {
2765 var RawSetOfRawUnionBT vl_expected :={ {i:=2},{i:=3} };
2766 f_compareAndVerdict(
2767 encode_rawSetOfInt(valueof(t_msetofiBeforeOmit1(1,2,3))),
2768 encode_rawSetOfRawUnionBT( vl_expected ));
2769 }
2770
2771 template RawSetOfInt32 t_msetofiIntValueBeforeOmit1(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
2772 with { erroneous ([1]) "before:= omit all"; erroneous ([1]) "value:= int32 : 2011"};
2773
2774 testcase tc_RawSetOfIntIntValueBeforeOmit1() runs on RawComp {
2775 var RawSetOfRawUnionBT32 vl_expected :={ {i:=2011}, {i:=3}};
2776 f_compareAndVerdict(
2777 encode_rawSetOfInt32(valueof(t_msetofiIntValueBeforeOmit1(1,2,3))),
2778 encode_rawSetOfRawUnionBT32( vl_expected ));
2779 }
2780 testcase tc_RawSetOfIntCharStrValueBeforeOmit1() runs on RawComp {
2781 var RawSetOfRawUnionBT vl_expected :={ {r:="bubu"},{i:=3}};
2782 f_compareAndVerdict(
2783 encode_rawSetOfInt(valueof(t_msetofiCharStrValueBeforeOmit1(1,2,3))),
2784 encode_rawSetOfRawUnionBT( vl_expected ));
2785 }
2786 testcase tc_RawSetOfIntCharStrValueBeforeOmit1_2() runs on RawComp {
2787 var RawSetOfRawUnionBT vl_expected :={ {i:=2},{r:="bubu"}};
2788 f_compareAndVerdict(
2789 encode_rawSetOfInt(valueof(t_msetofiCharStrValueBeforeOmit1_2(1,2,3))),
2790 encode_rawSetOfRawUnionBT( vl_expected ));
2791 }
2792
2793 testcase tc_RawSetOfIntAfterOmit1() runs on RawComp {
2794 var RawSetOfRawUnionBT vl_expected :={ {i:=1}, {i:=2} } ;
2795 f_compareAndVerdict(
2796 encode_rawSetOfInt(valueof(t_msetofiAfterOmit1(1,2,3))),
2797 encode_rawSetOfRawUnionBT( vl_expected ));
2798 }
2799
2800 template RawSetOfInt32 t_msetofiIntValueAfterOmit1(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
2801 with { erroneous ([1]) "after:= omit all"; erroneous ([1]) "value:= int32 : 2011"};
2802
2803 testcase tc_RawSetOfIntIntValueAfterOmit1() runs on RawComp {
2804 var RawSetOfRawUnionBT32 vl_expected :={ {i:=1},{i:=2011}};
2805 f_compareAndVerdict(
2806 encode_rawSetOfInt32(valueof(t_msetofiIntValueAfterOmit1(1,2,3))),
2807 encode_rawSetOfRawUnionBT32( vl_expected ));
2808 }
2809
2810 testcase tc_RawSetOfIntCharStrValueAfterOmit1() runs on RawComp {
2811 var RawSetOfRawUnionBT vl_expected :={ {i:=1},{r:="bubu"}};
2812 f_compareAndVerdict(
2813 encode_rawSetOfInt(valueof(t_msetofiCharStrValueAfterOmit1(1,2,3))),
2814 encode_rawSetOfRawUnionBT( vl_expected ));
2815 }
2816
2817 testcase tc_RawSetOfIntCharStrValueAfterOmit1_2() runs on RawComp {
2818 var RawSetOfRawUnionBT vl_expected :={ {r:="bubu"},{i:=2}};
2819 f_compareAndVerdict(
2820 encode_rawSetOfInt(valueof(t_msetofiCharStrValueAfterOmit1_2(1,2,3))),
2821 encode_rawSetOfRawUnionBT( vl_expected ));
2822 }
2823 //RawEnum
2824 testcase tc_RawSetOfRawEnumValueDiffType() runs on RawComp {
2825 var RawSetOfRawUnionBT vl_expected :={ {r:="Pi"}, {e:=second}, {b:=true}};
2826 f_compareAndVerdict(
2827 encode_rawSetOfRawEnum(valueof(t_msetofeValueDiffType(first, second, third))),
2828 encode_rawSetOfRawUnionBT( vl_expected ));
2829 }
2830
2831 template RawSetOfRawEnum t_msetofeValueDiffTypeRaw(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
2832 with { erroneous ([0]) "value(raw):= '0101FF'O"; erroneous ([2]) "value:= true" };
2833
2834 testcase tc_RawSetOfRawEnumValueDiffTypeRaw() runs on RawComp {
2835 var octetstring actual := encode_rawSetOfRawEnum(valueof(t_msetofeValueDiffTypeRaw(first, second, third)));
2836 f_compareAndVerdict(
2837 actual,
2838 '0101FF'O // first raw value
51fa56b9 2839 & '06'O); // bottom 2 bits: '10'B for second, 3rd bit is '1'B for true, top 5 bits are '00000'B (filler zeros)
2840 //'06'O = bit2oct('00000'B & '1'B & '10'B)
970ed795
EL
2841 var RawSetOfRawUnionBT vl_expected :={ {os:='0101FF'O}, {e:=second}, {b:=true}};
2842 var octetstring expected := encode_rawSetOfRawUnionBT(vl_expected);
2843 f_compareAndVerdict(actual, expected);
2844 }
2845 testcase tc_RawSetOfRawEnumBeforeOmit2() runs on RawComp {
2846 var RawSetOfRawUnionBT vl_expected :={ {e:=third} };
2847 f_compareAndVerdict(
2848 encode_rawSetOfRawEnum(valueof(t_msetofeBeforeOmit2(first, second, third))),
2849 encode_rawSetOfRawUnionBT( vl_expected ));
2850 }
2851 testcase tc_RawSetOfRawEnumIntValueBeforeOmit2() runs on RawComp {
2852 var RawSetOfRawUnionBT32 vl_expected :={ {i:=2011}};
2853 f_compareAndVerdict(
2854 encode_rawSetOfRawEnum(valueof(t_msetofeIntValueBeforeOmit2(first, second, third))),
2855 encode_rawSetOfRawUnionBT32( vl_expected ));
2856 }
2857 testcase tc_RawSetOfRawEnumCharStrValueBeforeOmit2() runs on RawComp {
2858 var RawSetOfRawUnionBT vl_expected :={ {r:="bubu"}};
2859 f_compareAndVerdict(
2860 encode_rawSetOfRawEnum(valueof(t_msetofeCharStrValueBeforeOmit2(first, second, third))),
2861 encode_rawSetOfRawUnionBT( vl_expected ));
2862 }
2863 testcase tc_RawSetOfRawEnumBeforeOmit1() runs on RawComp {
2864 var RawSetOfRawUnionBT vl_expected :={ {e:=second},{e:=third} };
2865 f_compareAndVerdict(
2866 encode_rawSetOfRawEnum(valueof(t_msetofeBeforeOmit1(first, second, third))),
2867 encode_rawSetOfRawUnionBT( vl_expected ));
2868 }
2869 testcase tc_RawSetOfRawEnumIntValueBeforeOmit1() runs on RawComp {
2870 var RawSetOfRawUnionBT32 vl_expected :={ {i:=2011}, {e:=third}};
2871 f_compareAndVerdict(
2872 encode_rawSetOfRawEnum(valueof(t_msetofeIntValueBeforeOmit1(first, second, third))),
2873 encode_rawSetOfRawUnionBT32( vl_expected ));
2874 }
2875 testcase tc_RawSetOfRawEnumCharStrValueBeforeOmit1() runs on RawComp {
2876 var RawSetOfRawUnionBT vl_expected :={ {r:="bubu"},{e:=third}};
2877 f_compareAndVerdict(
2878 encode_rawSetOfRawEnum(valueof(t_msetofeCharStrValueBeforeOmit1(first, second, third))),
2879 encode_rawSetOfRawUnionBT( vl_expected ));
2880 }
2881 testcase tc_RawSetOfRawEnumCharStrValueBeforeOmit1_2() runs on RawComp {
2882 var RawSetOfRawUnionBT vl_expected :={ {e:=second},{r:="bubu"}};
2883 f_compareAndVerdict(
2884 encode_rawSetOfRawEnum(valueof(t_msetofeCharStrValueBeforeOmit1_2(first, second, third))),
2885 encode_rawSetOfRawUnionBT( vl_expected ));
2886 }
2887
2888 testcase tc_RawSetOfRawEnumAfterOmit1() runs on RawComp {
2889 var RawSetOfRawUnionBT vl_expected :={ {e:=first}, {e:=second} } ;
2890 f_compareAndVerdict(
2891 encode_rawSetOfRawEnum(valueof(t_msetofeAfterOmit1(first, second, third))),
2892 encode_rawSetOfRawUnionBT( vl_expected ));
2893 }
2894 testcase tc_RawSetOfRawEnumIntValueAfterOmit1() runs on RawComp {
2895 var RawSetOfRawUnionBT32 vl_expected :={ {e:=first},{i:=2011}};
2896 f_compareAndVerdict(
2897 encode_rawSetOfRawEnum(valueof(t_msetofeIntValueAfterOmit1(first, second, third))),
2898 encode_rawSetOfRawUnionBT32( vl_expected ));
2899 }
2900 testcase tc_RawSetOfRawEnumCharStrValueAfterOmit1() runs on RawComp {
2901 var RawSetOfRawUnionBT vl_expected :={ {e:=first},{r:="bubu"}};
2902 f_compareAndVerdict(
2903 encode_rawSetOfRawEnum(valueof(t_msetofeCharStrValueAfterOmit1(first, second, third))),
2904 encode_rawSetOfRawUnionBT( vl_expected ));
2905 }
2906 testcase tc_RawSetOfRawEnumCharStrValueAfterOmit1_2() runs on RawComp {
2907 var RawSetOfRawUnionBT vl_expected :={ {r:="bubu"},{e:=second}};
2908 f_compareAndVerdict(
2909 encode_rawSetOfRawEnum(valueof(t_msetofeCharStrValueAfterOmit1_2(first, second, third))),
2910 encode_rawSetOfRawUnionBT( vl_expected ));
2911 }
2912
2913 //Charstring (Charstring)
2914 testcase tc_RawSetOfCharstringValueDiffType() runs on RawComp {
2915 var RawSetOfRawUnionBT vl_expected :={ {r:="Pi"}, {r:="Two"}, {b:=true}};
2916 f_compareAndVerdict(
2917 encode_rawSetOfCharstring(valueof(t_msetofrValueDiffType("One", "Two", "Three"))),
2918 encode_rawSetOfRawUnionBT( vl_expected ));
2919 }
2920 testcase tc_RawSetOfCharstringValueDiffTypeRaw() runs on RawComp {
2921 //var RawSetOfRawUnionBT vl_expected :={ {b:=true}, {r:="Two"}, {b:=true}};
2922 f_compareAndVerdict(
2923 encode_rawSetOfCharstring(valueof(t_msetofrValueDiffTypeRaw("One", "Two", "Three"))),
51fa56b9 2924 '0101FF'O & char2oct("Two") & '01'O
970ed795
EL
2925 ); //'0101FF'O
2926 //encode_rawSetOfRawUnionBT( vl_expected ));
2927 }
2928 testcase tc_RawSetOfCharstringBeforeOmit2() runs on RawComp {
2929 var RawSetOfRawUnionBT vl_expected :={ {r:="Three"} };
2930 f_compareAndVerdict(
2931 encode_rawSetOfCharstring(valueof(t_msetofrBeforeOmit2("One", "Two", "Three"))),
2932 encode_rawSetOfRawUnionBT( vl_expected ));
2933 }
2934 testcase tc_RawSetOfCharstringIntValueBeforeOmit2() runs on RawComp {
2935 var RawSetOfRawUnionBT32 vl_expected :={ {i:=2011}};
2936 f_compareAndVerdict(
2937 encode_rawSetOfCharstring(valueof(t_msetofrIntValueBeforeOmit2("One", "Two", "Three"))),
2938 encode_rawSetOfRawUnionBT32( vl_expected ));
2939 }
2940 testcase tc_RawSetOfCharstringCharStrValueBeforeOmit2() runs on RawComp {
2941 var RawSetOfRawUnionBT vl_expected :={ {r:="bubu"}};
2942 f_compareAndVerdict(
2943 encode_rawSetOfCharstring(valueof(t_msetofrCharStrValueBeforeOmit2("One", "Two", "Three"))),
2944 encode_rawSetOfRawUnionBT( vl_expected ));
2945 }
2946 testcase tc_RawSetOfCharstringBeforeOmit1() runs on RawComp {
2947 var RawSetOfRawUnionBT vl_expected :={ {r:="Two"},{r:="Three"} };
2948 f_compareAndVerdict(
2949 encode_rawSetOfCharstring(valueof(t_msetofrBeforeOmit1("One", "Two", "Three"))),
2950 encode_rawSetOfRawUnionBT( vl_expected ));
2951 }
2952 testcase tc_RawSetOfCharstringIntValueBeforeOmit1() runs on RawComp {
2953 var RawSetOfRawUnionBT32 vl_expected :={ {i:=2011}, {r:="Three"}};
2954 f_compareAndVerdict(
2955 encode_rawSetOfCharstring(valueof(t_msetofrIntValueBeforeOmit1("One", "Two", "Three"))),
2956 encode_rawSetOfRawUnionBT32( vl_expected ));
2957 }
2958 testcase tc_RawSetOfCharstringCharStrValueBeforeOmit1() runs on RawComp {
2959 var RawSetOfRawUnionBT vl_expected :={ {r:="bubu"},{r:="Three"}};
2960 f_compareAndVerdict(
2961 encode_rawSetOfCharstring(valueof(t_msetofrCharStrValueBeforeOmit1("One", "Two", "Three"))),
2962 encode_rawSetOfRawUnionBT( vl_expected ));
2963 }
2964 testcase tc_RawSetOfCharstringCharStrValueBeforeOmit1_2() runs on RawComp {
2965 var RawSetOfRawUnionBT vl_expected :={ {r:="Two"},{r:="bubu"}};
2966 f_compareAndVerdict(
2967 encode_rawSetOfCharstring(valueof(t_msetofrCharStrValueBeforeOmit1_2("One", "Two", "Three"))),
2968 encode_rawSetOfRawUnionBT( vl_expected ));
2969 }
2970
2971 testcase tc_RawSetOfCharstringAfterOmit1() runs on RawComp {
2972 var RawSetOfRawUnionBT vl_expected :={ {r:="One"}, {r:="Two"} } ;
2973 f_compareAndVerdict(
2974 encode_rawSetOfCharstring(valueof(t_msetofrAfterOmit1("One", "Two", "Three"))),
2975 encode_rawSetOfRawUnionBT( vl_expected ));
2976 }
2977 testcase tc_RawSetOfCharstringIntValueAfterOmit1() runs on RawComp {
2978 var RawSetOfRawUnionBT32 vl_expected :={ {r:="One"},{i:=2011}};
2979 f_compareAndVerdict(
2980 encode_rawSetOfCharstring(valueof(t_msetofrIntValueAfterOmit1("One", "Two", "Three"))),
2981 encode_rawSetOfRawUnionBT32( vl_expected ));
2982 }
2983 testcase tc_RawSetOfCharstringCharStrValueAfterOmit1() runs on RawComp {
2984 var RawSetOfRawUnionBT vl_expected :={ {r:="One"},{r:="bubu"}};
2985 f_compareAndVerdict(
2986 encode_rawSetOfCharstring(valueof(t_msetofrCharStrValueAfterOmit1("One", "Two", "Three"))),
2987 encode_rawSetOfRawUnionBT( vl_expected ));
2988 }
2989 testcase tc_RawSetOfCharstringCharStrValueAfterOmit1_2() runs on RawComp {
2990 var RawSetOfRawUnionBT vl_expected :={ {r:="bubu"},{r:="Two"}};
2991 f_compareAndVerdict(
2992 encode_rawSetOfCharstring(valueof(t_msetofrCharStrValueAfterOmit1_2("One", "Two", "Three"))),
2993 encode_rawSetOfRawUnionBT( vl_expected ));
2994 }
2995
2996} //SetOf
2997
2998group Union {
2999
3000 template RawUnionBasicTypesT t_mubt_boolean3( template boolean p_b) := { b:= p_b }
3001 with { erroneous(b) "value:=false" } //encoded into ''O
3002
3003 testcase tc_rawUnionBasicTypes_boolean3() runs on RawComp {
3004 //0. just for fun:
3005 var RawUnionBasicTypesT vl_mubt:={b:=true};
51fa56b9 3006 f_compareAndVerdict(encode_rawUnionBasicTypesT(vl_mubt), '01'O);
970ed795
EL
3007 //1.
3008 vl_mubt:={b:=false};
3009 f_compareAndVerdict(
3010 encode_rawUnionBasicTypesT(valueof(t_mubt_boolean3(true))),
3011 encode_rawUnionBasicTypesT( vl_mubt ) );
3012 }
3013
3014 template RawUnionBasicTypesT t_mubt_booleanRaw( template boolean p_b) := { b:= p_b }
3015 with { erroneous(b) "value(raw):='41424241'O" }
3016
3017 testcase tc_rawUnionBasicTypes_booleanRaw() runs on RawComp {
3018 f_compareAndVerdict( encode_rawUnionBasicTypesT(valueof(t_mubt_booleanRaw(true))), char2oct("ABBA"))
3019 }//tc_
3020
3021 template RawUnionBasicTypesT t_mubt_integerRaw( template integer p_i) := { i:= p_i }
3022 with { erroneous(i) "value(raw):='41424241'O" }
3023
3024 testcase tc_rawUnionBasicTypes_integerRaw() runs on RawComp {
3025 f_compareAndVerdict(encode_rawUnionBasicTypesT(valueof(t_mubt_integerRaw(129))),char2oct("ABBA"))
3026 }//tc_
3027
3028 template RawUnionBasicTypesT t_mubt_enumRaw( template RawEnum p_e) := { e:= p_e }
3029 with { erroneous(e) "value(raw):='41424241'O" }
3030
3031 testcase tc_rawUnionBasicTypes_enumRaw() runs on RawComp {
3032 f_compareAndVerdict(encode_rawUnionBasicTypesT(valueof(t_mubt_enumRaw(second))), char2oct("ABBA") )
3033 }//tc_
3034
3035 template RawUnionBasicTypesT t_mubt_stringRaw( template charstring p_r) := { r:= p_r }
3036 with { erroneous(r) "value(raw):='41424241'O" }
3037
3038 testcase tc_rawUnionBasicTypes_stringRaw() runs on RawComp {
3039 f_compareAndVerdict(encode_rawUnionBasicTypesT(valueof(t_mubt_stringRaw("Three"))), char2oct("ABBA") )
3040 }//tc_
3041
3042 template RawUnionBasicTypesT t_mubt_bitstrRaw( template bitstring p_bs) := { bs:= p_bs }
3043 with { erroneous(bs) "value(raw):='41424241'O" }
3044
3045 testcase tc_rawUnionBasicTypes_bitstrRaw() runs on RawComp {
3046 f_compareAndVerdict(encode_rawUnionBasicTypesT(valueof(t_mubt_bitstrRaw('101011111'B))), char2oct("ABBA") )
3047 }//tc_
3048
3049 template RawUnionBasicTypesT t_mubt_octetstrRaw( template octetstring p_os) := { os:= p_os }
3050 with { erroneous(os) "value(raw):='41424241'O" }
3051
3052 testcase tc_rawUnionBasicTypes_octetstrRaw() runs on RawComp {
3053 f_compareAndVerdict(encode_rawUnionBasicTypesT(valueof(t_mubt_octetstrRaw('BABAB0B0'O))), char2oct("ABBA") )
3054 }//tc_
3055
3056 template RawUnionBasicTypesT t_mubt_objidRaw( template objid p_oi) := { oi:= p_oi }
3057 with { erroneous(oi) "value(raw):='41424241'O" }
3058
3059 testcase tc_rawUnionBasicTypes_objidRaw() runs on RawComp {
3060 f_compareAndVerdict(
3061 encode_rawUnionBasicTypesT(valueof(t_mubt_objidRaw(objid{ itu_t identified_organization etsi(0) inDomain(1)}))),
3062 char2oct("ABBA") )
3063 }//tc_
3064
3065 template RawUnionComplexTypes t_muct_0_1( template charstring p_f1, template charstring p_f2, template charstring p_f3)
3066 := { sofcharstring:={p_f1,p_f2,p_f3} }
3067 with { erroneous(sofcharstring[0], sofcharstring[1]) "value :=omit" }
3068
3069 testcase tc_rawUnionComplexTypes_omit_0_1() runs on RawComp {
3070 f_compareAndVerdict(encode_rawUnionComplexTypes(valueof(t_muct_0_1( "One","Two","Three" ) )), char2oct("Three") );
3071 }//tc_
3072
3073 template RawUnionComplexTypes t_muct_0_2( template charstring p_f1, template charstring p_f2, template charstring p_f3)
3074 := { sofcharstring:={p_f1,p_f2,p_f3} }
3075 with { erroneous(sofcharstring[0], sofcharstring[2]) "value :=omit" }
3076
3077 testcase tc_rawUnionComplexTypes_omit_0_2() runs on RawComp {
3078 f_compareAndVerdict(encode_rawUnionComplexTypes(valueof(t_muct_0_2( "One","Two","Three" ) )), char2oct("Two") );
3079 }//tc_
3080
3081 template RawUnionComplexTypes t_muct_1_2( template charstring p_f1, template charstring p_f2, template charstring p_f3)
3082 := { sofcharstring:={p_f1,p_f2,p_f3} }
3083 with { erroneous(sofcharstring[1], sofcharstring[2]) "value :=omit" }
3084
3085 testcase tc_rawUnionComplexTypes_omit_1_2() runs on RawComp {
3086 f_compareAndVerdict(encode_rawUnionComplexTypes(valueof(t_muct_1_2( "One","Two","Three" ) )), char2oct("One") );
3087 }//tc_
3088
3089 template RawUnionComplexTypes t_muct_2_1( template charstring p_f1, template charstring p_f2, template charstring p_f3)
3090 := { sofcharstring:={p_f1,p_f2,p_f3} }
3091 with { erroneous(sofcharstring[2], sofcharstring[1]) "value :=omit" }
3092
3093 testcase tc_rawUnionComplexTypes_omit_2_1() runs on RawComp {
3094 f_compareAndVerdict(encode_rawUnionComplexTypes(valueof(t_muct_2_1( "One","Two","Three" ) )), char2oct("One") );
3095 }//tc_
3096
3097 template RawUnionComplexTypes t_muct_0_1_2( template charstring p_f1, template charstring p_f2, template charstring p_f3)
3098 := { sofcharstring:={p_f1,p_f2,p_f3} }
3099 with { erroneous(sofcharstring[0], sofcharstring[1], sofcharstring[2]) "value :=omit" }
3100
3101 testcase tc_rawUnionComplexTypes_omit_0_1_2() runs on RawComp {
3102 //var RawSeqOfCharstring vl_expected:= { }
3103 f_compareAndVerdict(encode_rawUnionComplexTypes(valueof(t_muct_0_1_2 ( "Ten","One","Two" ) )), char2oct("") );
3104 }//tc_
3105
3106 template RawUnionComplexTypes t_muct_0_2_1( template charstring p_f1, template charstring p_f2, template charstring p_f3)
3107 := { sofcharstring:={p_f1,p_f2,p_f3} }
3108 with { erroneous(sofcharstring[0], sofcharstring[2], sofcharstring[1]) "value :=omit" }
3109
3110 testcase tc_rawUnionComplexTypes_omit_0_2_1() runs on RawComp {
3111 //var RawSeqOfCharstring vl_expected:= { }
3112 f_compareAndVerdict(encode_rawUnionComplexTypes(valueof(t_muct_0_2_1 ( "One","Two","Three" ) )), char2oct("") );
3113 }//tc_
3114
3115}//group Union
3116
3117
3118control {
3119 //SEQUENCE:
3120 execute(tc_rawSeqIntOmit());
3121 execute(tc_rawSeqIntValueSameTypeE());
3122 execute(tc_rawSeqIntValueSameTypeI());
3123 execute(tc_rawSeqIntValueDiffTypeExplicitBool());
3124 execute(tc_rawSeqIntValueDiffTypeImplicitBool());
3125 execute(tc_rawSeqIntValueDiffTypeExplicitOctStr());
3126 execute(tc_rawSeqIntValueDiffTypeImplicitOctStr());
3127 execute(tc_rawSeqIntValueDiffTypeExplicitEnum());
3128 execute(tc_rawSeqIntValueDiffTypeExplicitCharstring());
3129 execute(tc_rawSeqIntValueDiffTypeImplicitCharstring());
3130 execute(tc_rawSeqIntValueDiffTypeExplicitStr());
3131 execute(tc_rawSeqIntValueDiffTypeRawOctStr());
3132 execute(tc_rawSeqInt2Omiti());
3133 execute(tc_rawSeqInt2Omitj());
3134 execute(tc_rawSeqInt2BeforeOmitj());
3135 execute(tc_rawSeqInt2AfterOmiti());
3136 execute(tc_rawSeqInt2ValueSameTypeE());
3137 execute(tc_rawSeqInt2ValueSameTypeI());
3138 execute(tc_rawSeqInt2ValueDiffTypeExplicitCharstring());
3139 execute(tc_rawSeqInt2ValueDiffTypeImplicitCharstring());
3140 execute(tc_rawSeqInt2ValueDiffTypeExplicitStr());
3141 execute(tc_rawSeqInt2ValueSeqIntV());
3142 execute(tc_rawSeqInt2ValueSeqIntOptV());
3143 execute(tc_rawSeqInt2ValueSeqIntC());
3144 execute(tc_rawSeqInt2ValueSeqInt2OptC());
3145 execute(tc_rawSeqInt2ValueSeqInt2OptOmitC());
3146 execute(tc_rawSeqInt2ValueSeqInt2iiC());
3147 execute(tc_rawSeqInt2ValueSeqInt2ijC());
3148 execute(tc_rawSeqInt2ValueSeqInt2jiC());
3149 execute(tc_rawSeqInt2ValueSeqInt2jjC());
3150 execute(tc_rawSeqIntSeqInt2ValueOmiti());
3151 execute(tc_rawSeqIntSeqInt2ValueOmitjki());
3152 execute(tc_rawSeqIntSeqInt2ValueOmitjkj());
3153 execute(tc_rawSeqIntSeqInt2ValueRawjki());
3154 execute(tc_rawSeqIntSeqInt2ValueRawjkj());
3155 execute(tc_rawSeqIntSeqInt2AfteriBeforej());
3156 execute(tc_rawSeqIntSeqInt2AfteriRawBeforejRaw());
3157 execute(tc_rawSeqInt4Omiti());
3158 execute(tc_rawSeqInt4Omitj());
3159 execute(tc_rawSeqInt4Omitk());
3160 execute(tc_rawSeqInt4Omitl());
3161 execute(tc_rawSeqInt4ValueiOctetStr());
3162 execute(tc_rawSeqInt4ValuejOctetStr());
3163 execute(tc_rawSeqInt4ValueiRaw());
3164 execute(tc_rawSeqInt4ValuejRaw());
3165 execute(tc_rawSeqInt4ValuekRaw());
3166 execute(tc_rawSeqInt4ValuelRaw());
3167 execute(tc_rawSeqISKL_ValueSomit());
3168 execute(tc_rawSeqISKL_ValueSIomit());
3169 execute(tc_rawSeqISKL_ValueSISJomit());
3170 execute(tc_rawSeqISKL_ValueSraw());
3171 execute(tc_RawSeqIntSeqIntSeqInt2SeqCharstring2_omiti());
3172 execute(tc_RawSeqIntSeqIntSeqInt2SeqCharstring2_omitjkl());
3173 execute(tc_RawSeqIntSeqIntSeqInt2SeqCharstring2_omitxy());
3174 execute(tc_RawSeqIntSeqIntSeqInt2SeqCharstring2_omitjkll());
3175 execute(tc_RawSeqIntSeqIntSeqInt2SeqCharstring2_valuexy());
3176 execute(tc_RawSeqIntSeqIntSeqInt2SeqCharstring2_valuex_y());
3177 execute(tc_RawSeqIntSeqIntSeqInt2SeqCharstring2_valuex_y_expr1());
3178 execute(tc_RawSeqIntSeqIntSeqInt2SeqCharstring2_valuex_y_expr2());
3179 execute(tc_RawSeq_SeqSeqIntSeqInt2SeqCharstring2_SeqSeqIntSeqInt2SeqCharstring2_omit());
3180
3181 execute(tc_RawSeqInt2opt_before_raw());
3182 execute(tc_RawSeqInt2opt_value_raw());
3183 execute(tc_RawSeqInt2opt_after_raw());
3184
3185 execute(tc_RawSeqInt2opt_before());
3186 execute(tc_RawSeqInt2opt_value());
3187 execute(tc_RawSeqInt2opt_after());
3188
3189 //========= SEQUENCE OF=====================
3190 //Bool:
3191 execute(tc_RawSeqOfBoolValueSameType1());
3192 execute(tc_RawSeqOfBoolValueSameType2());
3193 execute(tc_RawSeqOfBoolValueDiffType());
3194 execute(tc_RawSeqOfBoolValueRaw());
3195 execute(tc_RawSeqOfBoolValueOmit());
3196 execute(tc_RawSeqOfBoolAfterOmit());
3197 execute(tc_RawSeqOfBoolValueAfterOmit());
3198 execute(tc_RawSeqOfBoolBeforeOmit2());
3199 execute(tc_RawSeqOfBoolValueBeforeOmit2());
3200 execute(tc_RawSeqOfBoolBeforeOmit1());
3201 execute(tc_RawSeqOfBoolValueBeforeOmit1());
3202 //INTEGER:
3203 execute(tc_RawSeqOfIntValueDiffType());
3204 execute(tc_RawSeqOfIntValueDiffTypeRaw());
3205 execute(tc_RawSeqOfIntBeforeOmit2());
3206 execute(tc_RawSeqOfIntIntValueBeforeOmit2());
3207 execute(tc_RawSeqOfIntCharStrValueBeforeOmit2());
3208 execute(tc_RawSeqOfIntBeforeOmit1());
3209 execute(tc_RawSeqOfIntIntValueBeforeOmit1());
3210 execute(tc_RawSeqOfIntCharStrValueBeforeOmit1() );
3211 execute(tc_RawSeqOfIntCharStrValueBeforeOmit1_2());
3212 execute(tc_RawSeqOfIntAfterOmit1());
3213 execute(tc_RawSeqOfIntIntValueAfterOmit1());
3214 execute(tc_RawSeqOfIntCharStrValueAfterOmit1() );
3215 execute(tc_RawSeqOfIntCharStrValueAfterOmit1_2());
3216 //RawEnum
3217 execute(tc_RawSeqOfRawEnumValueDiffType());
3218 execute(tc_RawSeqOfRawEnumValueDiffTypeRaw());
3219 execute(tc_RawSeqOfRawEnumBeforeOmit2());
3220 execute(tc_RawSeqOfRawEnumIntValueBeforeOmit2());
3221 execute(tc_RawSeqOfRawEnumCharStrValueBeforeOmit2());
3222 execute(tc_RawSeqOfRawEnumBeforeOmit1());
3223 execute(tc_RawSeqOfRawEnumIntValueBeforeOmit1());
3224 execute(tc_RawSeqOfRawEnumCharStrValueBeforeOmit1() );
3225 execute(tc_RawSeqOfRawEnumCharStrValueBeforeOmit1_2());
3226 execute(tc_RawSeqOfRawEnumAfterOmit1());
3227 execute(tc_RawSeqOfRawEnumIntValueAfterOmit1());
3228 execute(tc_RawSeqOfRawEnumCharStrValueAfterOmit1() );
3229 execute(tc_RawSeqOfRawEnumCharStrValueAfterOmit1_2());
3230 //REAL (charstring)
3231 execute(tc_RawSeqOfCharstringValueDiffType());
3232 execute(tc_RawSeqOfCharstringValueDiffTypeRaw());
3233 execute(tc_RawSeqOfCharstringBeforeOmit2());
3234 execute(tc_RawSeqOfCharstringIntValueBeforeOmit2());
3235 execute(tc_RawSeqOfCharstringCharStrValueBeforeOmit2());
3236 execute(tc_RawSeqOfCharstringBeforeOmit1());
3237 execute(tc_RawSeqOfCharstringIntValueBeforeOmit1());
3238 execute(tc_RawSeqOfCharstringCharStrValueBeforeOmit1() );
3239 execute(tc_RawSeqOfCharstringCharStrValueBeforeOmit1_2());
3240 execute(tc_RawSeqOfCharstringAfterOmit1());
3241 execute(tc_RawSeqOfCharstringIntValueAfterOmit1());
3242 execute(tc_RawSeqOfCharstringCharStrValueAfterOmit1() );
3243 execute(tc_RawSeqOfCharstringCharStrValueAfterOmit1_2());
3244 //Depth 3-4:
3245 execute(tc_RawSeqOf_SeqSeqIntSeqInt2SeqCharstring2_omitj());
3246 execute(tc_RawSeqOf_SeqSeqIntSeqInt2SeqCharstring2_beforeafteromit());
3247 execute(tc_RawSeqOf_SeqSeqIntSeqInt2SeqCharstring2_arglist_omit());
3248 execute(tc_RawSeqOf_SeqSeqIntSeqInt2SeqCharstring2_arglist_afteromit());
3249 execute(tc_RawSeqOf_SeqSeqIntSeqInt2SeqCharstring2_arglist_beforeomit());
3250 //========= SET ============================
3251 execute(tc_RawSetIntOmit()); // <========{ integer }
3252 execute(tc_RawSetIntValueSameTypeE());
3253 execute(tc_RawSetIntValueSameTypeI());
3254 execute(tc_RawSetIntValueDiffTypeExplicitBool());
3255 execute(tc_RawSetIntValueDiffTypeImplicitBool());
3256 execute(tc_RawSetIntValueDiffTypeExplicitOctStr());
3257 execute(tc_RawSetIntValueDiffTypeImplicitOctStr());
3258 execute(tc_RawSetIntValueDiffTypeExplicitOctStr_const());
3259 execute(tc_RawSetIntValueDiffTypeExplicitEnum());
3260 execute(tc_RawSetIntValueDiffTypeExplicitCharstring());
3261 execute(tc_RawSetIntValueDiffTypeImplicitCharstring());
3262 execute(tc_RawSetIntValueDiffTypeRawOctStr());
3263 execute(tc_RawSetInt2Omiti());//<===== {integer, integer}
3264 execute(tc_RawSetInt2Omitj());
3265 execute(tc_RawSetInt2BeforeOmitj());
3266 execute(tc_RawSetInt2AfterOmiti());
3267 execute(tc_RawSetInt2ValueSameTypeE());
3268 execute(tc_RawSetInt2ValueSameTypeI());
3269 execute(tc_RawSetInt2ValueDiffTypeExplicitCharstring());
3270 execute(tc_RawSetInt2ValueDiffTypeImplicitCharstring());
3271 execute(tc_RawSetInt2ValueSeqIntV());
3272 execute(tc_RawSetInt2ValueSeqIntOptV());
3273 execute(tc_RawSetInt2ValueSeqIntC());
3274 execute(tc_RawSetInt2ValueSeqInt2OptC());
3275 execute(tc_RawSetInt2ValueSeqInt2OptOmitC());
3276 execute(tc_RawSetInt2ValueSeqInt2iiC());
3277 execute(tc_RawSetInt2ValueSeqInt2ijC());
3278 execute(tc_RawSetInt2ValueSeqInt2jiC());
3279 execute(tc_RawSetInt2ValueSeqInt2jjC());
3280 execute(tc_RawSetIntSeqInt2ValueOmiti());
3281 //=== Set { integer, {integer, integer} )
3282 execute(tc_RawSetIntSeqInt2ValueOmitjki());
3283 execute(tc_RawSetIntSeqInt2ValueOmitjkj());
3284 execute(tc_RawSetIntSeqInt2ValueRawjki());
3285 execute(tc_RawSetIntSeqInt2ValueRawjkj());
3286 execute(tc_RawSetIntSeqInt2AfteriBeforej());
3287 execute(tc_RawSetIntSeqInt2AfteriRawBeforejRaw());
3288 //<===== {integer, integer,integer, integer}
3289 execute(tc_RawSetInt4Omiti());
3290 execute(tc_RawSetInt4Omitj());
3291 execute(tc_RawSetInt4Omitk());
3292 execute(tc_RawSetInt4Omitl());
3293 execute(tc_RawSetInt4ValueiOctetStr());
3294 execute(tc_RawSetInt4ValuejOctetStr());
3295 execute(tc_RawSetInt4ValueiRaw());
3296 execute(tc_RawSetInt4ValuejRaw());
3297 execute(tc_RawSetInt4ValuekRaw());
3298 execute(tc_RawSetInt4ValuelRaw());
3299 execute(tc_RawSetISKL_ValueSomit());
3300 execute(tc_RawSetISKL_ValueSIomit());
3301 execute(tc_RawSetISKL_ValueSISJomit());
3302 execute(tc_RawSetISKL_ValueSraw());
3303 execute(tc_RawSetISOKL_ValueSomit()); //pass
3304 execute(tc_RawSetIOSKL_ValueSomit());
3305
3306 //========= SET OF =========================
3307 //Bool:
3308 execute(tc_RawSetOfBoolValueSameType1());
3309 execute(tc_RawSetOfBoolValueSameType2());
3310 execute(tc_RawSetOfBoolValueDiffType());
3311 execute(tc_RawSetOfBoolValueRaw());
3312 execute(tc_RawSetOfBoolValueOmit());
3313 execute(tc_RawSetOfBoolAfterOmit());
3314 execute(tc_RawSetOfBoolValueAfterOmit());
3315 execute(tc_RawSetOfBoolBeforeOmit2());
3316 execute(tc_RawSetOfBoolValueBeforeOmit2());
3317 execute(tc_RawSetOfBoolBeforeOmit1());
3318 execute(tc_RawSetOfBoolValueBeforeOmit1());
3319 //INTEGER:
3320 execute(tc_RawSetOfIntValueDiffType());
3321 execute(tc_RawSetOfIntValueDiffTypeRaw());
3322 execute(tc_RawSetOfIntBeforeOmit2());
3323 execute(tc_RawSetOfIntIntValueBeforeOmit2());
3324 execute(tc_RawSetOfIntCharStrValueBeforeOmit2());
3325 execute(tc_RawSetOfIntBeforeOmit1());
3326 execute(tc_RawSetOfIntIntValueBeforeOmit1());
3327 execute(tc_RawSetOfIntCharStrValueBeforeOmit1() );
3328 execute(tc_RawSetOfIntCharStrValueBeforeOmit1_2());
3329 execute(tc_RawSetOfIntAfterOmit1());
3330 execute(tc_RawSetOfIntIntValueAfterOmit1());
3331 execute(tc_RawSetOfIntCharStrValueAfterOmit1() );
3332 execute(tc_RawSetOfIntCharStrValueAfterOmit1_2());
3333 //RawEnum
3334 execute(tc_RawSetOfRawEnumValueDiffType());
3335 execute(tc_RawSetOfRawEnumValueDiffTypeRaw());
3336 execute(tc_RawSetOfRawEnumBeforeOmit2());
3337 execute(tc_RawSetOfRawEnumIntValueBeforeOmit2());
3338 execute(tc_RawSetOfRawEnumCharStrValueBeforeOmit2());
3339 execute(tc_RawSetOfRawEnumBeforeOmit1());
3340 execute(tc_RawSetOfRawEnumIntValueBeforeOmit1());
3341 execute(tc_RawSetOfRawEnumCharStrValueBeforeOmit1() );
3342 execute(tc_RawSetOfRawEnumCharStrValueBeforeOmit1_2());
3343 execute(tc_RawSetOfRawEnumAfterOmit1());
3344 execute(tc_RawSetOfRawEnumIntValueAfterOmit1());
3345 execute(tc_RawSetOfRawEnumCharStrValueAfterOmit1() );
3346 execute(tc_RawSetOfRawEnumCharStrValueAfterOmit1_2());
3347 //REAL (charstring)
3348 execute(tc_RawSetOfCharstringValueDiffType());
3349 execute(tc_RawSetOfCharstringValueDiffTypeRaw());
3350 execute(tc_RawSetOfCharstringBeforeOmit2());
3351 execute(tc_RawSetOfCharstringIntValueBeforeOmit2());
3352 execute(tc_RawSetOfCharstringCharStrValueBeforeOmit2());
3353 execute(tc_RawSetOfCharstringBeforeOmit1());
3354 execute(tc_RawSetOfCharstringIntValueBeforeOmit1());
3355 execute(tc_RawSetOfCharstringCharStrValueBeforeOmit1() );
3356 execute(tc_RawSetOfCharstringCharStrValueBeforeOmit1_2());
3357 execute(tc_RawSetOfCharstringAfterOmit1());
3358 execute(tc_RawSetOfCharstringIntValueAfterOmit1());
3359 execute(tc_RawSetOfCharstringCharStrValueAfterOmit1() );
3360 execute(tc_RawSetOfCharstringCharStrValueAfterOmit1_2());
3361
3362 //========= UNION ==========================
3363 execute(tc_rawUnionBasicTypes_boolean3());
3364 execute(tc_rawUnionBasicTypes_booleanRaw());
3365 execute(tc_rawUnionBasicTypes_integerRaw());
3366 execute(tc_rawUnionBasicTypes_enumRaw());
3367 execute(tc_rawUnionBasicTypes_stringRaw());
3368 execute(tc_rawUnionBasicTypes_octetstrRaw());
3369 execute(tc_rawUnionComplexTypes_omit_0_1());
3370 execute(tc_rawUnionComplexTypes_omit_0_2());
3371 execute(tc_rawUnionComplexTypes_omit_1_2());
3372 execute(tc_rawUnionComplexTypes_omit_2_1());
3373 execute(tc_rawUnionComplexTypes_omit_0_1_2());
3374 execute(tc_rawUnionComplexTypes_omit_0_2_1());
3375}
3376
3377}
This page took 0.149968 seconds and 5 git commands to generate.