Sync with 5.1.0
[deliverable/titan.core.git] / regression_test / negativeTest / NegTest_TEXT_Testcases.ttcn
CommitLineData
970ed795
EL
1/******************************************************************************
2 * Copyright (c) 2000-2014 Ericsson Telecom AB
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_TEXT_Testcases {
9
10// Test for NegativeTest of TEXT encoding
11// Last modified:2011-03-22 ETHBAAT
12
13modulepar {
14 integer tsp_maxInt := 1000000;
15 integer tsp_step := -10;
16}
17
18import from NegTest_TEXT_Types all;
19
20type component MyComp {};
21
22//seq
23external function encode_myInteger10( in MyInteger10 pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
24external function encode_mySeqEmpty(in MySeqEmpty pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
25external function encode_mySeqBool(in MySeqBool pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
26external function encode_mySeqInt(in MySeqInt pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
27external function encode_mySeqMyEnum(in MySeqMyEnum pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
28external function encode_mySeqInt2( in MySeqInt2 pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
29external function encode_mySeqIntSeqInt2( in MySeqIntSeqInt2 pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
30external function encode_mySeqIntSeqInt2opt( in MySeqIntSeqInt2opt pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
31external function encode_mySeqIntSeqInt2optopt( in MySeqIntSeqInt2optopt pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
32external function encode_mySeqInt3( in MySeqInt3 pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
33external function encode_mySeqInt3opt( in MySeqInt3opt pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
34external function encode_mySeqInt4( in MySeqInt4 pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
35external function encode_mySeqOJKL( in MySeqOJKL pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
36external function encode_mySeqIOKL( in MySeqIOKL pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
37external function encode_mySeqCharstring(in MySeqCharstring pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
38external function encode_mySeqStr(in MySeqStr pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
39external function encode_mySeqBitStr(in MySeqBitStr pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
40external function encode_mySeqOctStr(in MySeqOctStr pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
41external function encode_mySeqIntCharstring( in MySeqIntCharstring pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
42external function encode_mySeqIntStr( in MySeqIntStr pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
43external function encode_mySeqIntBitStr( in MySeqIntBitStr pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
44external function encode_mySeqISKL( in MySeqISKL pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
45external function encode_mySeqIntSeqIntSeqInt2( in MySeqIntSeqIntSeqInt2 pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
46external function encode_mySeqIntSeqIntSeqInt2SeqCharstring2( in MySeqIntSeqIntSeqInt2SeqCharstring2 pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
47external function encode_mySeqIntSeqCharstring2( in MySeqIntSeqCharstring2 pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
48external function encode_mySeqSeqIntSeqInt2SeqCharstring2( in MySeqSeqIntSeqInt2SeqCharstring2 pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
49external function encode_mySeqIntSeqIntSeqInt2optoptSeqCharstring2( in MySeqIntSeqIntSeqInt2optoptSeqCharstring2 pdu) return charstring
50with { extension "prototype(convert) encode(TEXT)" }
51external function encode_mySeq_SeqSeqIntSeqInt2SeqCharstring2_SeqSeqIntSeqInt2SeqCharstring2( in MySeq_SeqSeqIntSeqInt2SeqCharstring2_SeqSeqIntSeqInt2SeqCharstring2 pdu) return charstring
52with { extension "prototype(convert) encode(TEXT)" }
53external function encode_mySeq_SeqSeqIntSeqInt2optoptSeqCharstring2_SeqSeqIntSeqInt2optoptSeqCharstring2(
54 in MySeq_SeqSeqIntSeqInt2optoptSeqCharstring2_SeqSeqIntSeqInt2optoptSeqCharstring2 pdu) return charstring
55with { extension "prototype(convert) encode(TEXT)" }
56
57//seq of
58external function encode_mySeqOfBool(in MySeqOfBool pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
59external function encode_mySeqOfInt(in MySeqOfInt pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
60external function encode_mySeqOfMyEnum(in MySeqOfMyEnum pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
61external function encode_mySeqOfCharstring( in MySeqOfCharstring pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
62external function encode_mySeqOfBitStr(in MySeqOfBitStr pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
63external function encode_mySeqOfOctStr(in MySeqOfOctStr pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
64external function encode_mySeqOfObjId(in MySeqOfObjId pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
65external function encode_mySeqOfMyUnionBT(in MySeqOfMyUnionBT pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
66external function encode_mySeqOfSeqSeqIntSeqInt2SeqCharstring2(in MySeqOfSeqSeqIntSeqInt2SeqCharstring2 pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
67external function encode_mySeqOfMySeqIntSeqIntSeqInt2optoptSeqCharstring2(in MySeqOfMySeqIntSeqIntSeqInt2optoptSeqCharstring2 pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
68
69//set
70external function encode_mySetEmpty(in MySetEmpty pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
71external function encode_mySetBool(in MySetBool pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
72external function encode_mySetInt(in MySetInt pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
73external function encode_mySetMyEnum(in MySetMyEnum pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
74external function encode_mySetInt2( in MySetInt2 pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
75external function encode_mySetInt2opt( in MySetInt2opt pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
76external function encode_mySetIntSeqInt2( in MySetIntSeqInt2 pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
77external function encode_mySetIntSeqInt2T( in MySetIntSeqInt2T pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
78external function encode_mySetIntSeqInt2opt( in MySetIntSeqInt2opt pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
79external function encode_mySetIntSeqInt2Topt( in MySetIntSeqInt2Topt pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
80external function encode_mySetIntSeqInt2optopt( in MySetIntSeqInt2optopt pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
81external function encode_mySetIntSeqInt2Toptopt( in MySetIntSeqInt2Toptopt pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
82external function encode_mySetInt3( in MySetInt3 pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
83external function encode_mySetInt3opt( in MySetInt3opt pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
84external function encode_mySetInt4( in MySetInt4 pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
85external function encode_mySetInt4opt( in MySetInt4opt pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
86external function encode_mySetOJKL( in MySetOJKL pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
87external function encode_mySetIOKL( in MySetIOKL pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
88external function encode_mySetCharstring(in MySetCharstring pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
89external function encode_mySetStr(in MySetStr pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
90external function encode_mySetBitStr(in MySetBitStr pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
91external function encode_mySetOctStr(in MySetOctStr pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
92external function encode_mySetIntCharstring( in MySetIntCharstring pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
93external function encode_mySetIntStr( in MySetIntStr pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
94external function encode_mySetIntBitStr( in MySetIntBitStr pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
95external function encode_mySetISKL( in MySetISKL pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
96external function encode_mySetISKLopt( in MySetISKLopt pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
97external function encode_mySetIS2KLopt( in MySetIS2KLopt pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
98external function encode_mySetISOKL( in MySetISOKL pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
99external function encode_mySetISOKLopt( in MySetISOKLopt pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
100external function encode_mySetIOSKL( in MySetIOSKL pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
101external function encode_mySetIOSKLopt( in MySetIOSKLopt pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
102external function encode_mySetIntSeqIntSeqInt2( in MySetIntSeqIntSeqInt2 pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
103external function encode_mySetIntSeqIntSeqInt2SeqCharstring2( in MySetIntSeqIntSeqInt2SeqCharstring2 pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
104external function encode_mySetIntSeqCharstring2( in MySetIntSeqCharstring2 pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
105external function encode_mySetSeqIntSeqInt2SeqCharstring2( in MySetSeqIntSeqInt2SeqCharstring2 pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
106external function encode_mySetIntSeqIntSeqInt2optoptSeqCharstring2( in MySetIntSeqIntSeqInt2optoptSeqCharstring2 pdu) return charstring
107with { extension "prototype(convert) encode(TEXT)" }
108external function encode_mySet_SeqSeqIntSeqInt2SeqCharstring2_SeqSeqIntSeqInt2SeqCharstring2( in MySet_SeqSeqIntSeqInt2SeqCharstring2_SeqSeqIntSeqInt2SeqCharstring2 pdu) return charstring
109with { extension "prototype(convert) encode(TEXT)" }
110external function encode_mySet_SeqSeqIntSeqInt2optoptSeqCharstring2_SeqSeqIntSeqInt2optoptSeqCharstring2(
111 in MySet_SeqSeqIntSeqInt2optoptSeqCharstring2_SeqSeqIntSeqInt2optoptSeqCharstring2 pdu) return charstring
112with { extension "prototype(convert) encode(TEXT)" }
113
114//set of
115external function encode_mySetOfBool(in MySetOfBool pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
116external function encode_mySetOfInt(in MySetOfInt pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
117external function encode_mySetOfMyEnum(in MySetOfMyEnum pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
118external function encode_mySetOfCharstring( in MySetOfCharstring pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
119external function encode_mySetOfBitStr(in MySetOfBitStr pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
120external function encode_mySetOfOctStr(in MySetOfOctStr pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
121external function encode_mySetOfObjId(in MySetOfObjId pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
122external function encode_mySetOfMyUnionBT(in MySetOfMyUnionBT pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
123external function encode_mySetOfSeqSeqIntSeqInt2SeqCharstring2(in MySetOfSeqSeqIntSeqInt2SeqCharstring2 pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
124
125//union
126external function encode_myUnionBasicTypes( in MyUnionBasicTypes pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
127external function encode_myUnionBasicTypesT( in MyUnionBasicTypesT pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
128external function encode_myUnionComplexTypes( in MyUnionComplexTypes pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
129external function decode_myUnionComplexTypes( in charstring s) return MyUnionComplexTypes with { extension "prototype(convert) decode(TEXT)" }
130
131
132group Sequences{
133 template MySeqInt2opt t_msi2opt := { i:= 1, j := 2 }
134 template MySeqInt2opt t_msi2optomit := { i:= 1, j := omit }
135 const MySeqInt2 c_msi2 := { i:= 1, j := 2 }
136 const MySeqInt2opt c_msi2opt := { i:= 1, j := 2 }
137 const MySeqInt2opt c_msi2optomit := { i:= 1, j := omit }
138
139 template MySeqEmpty t_seqEmpty :={}
140
141 template MySeqBool t_msb(template boolean p_b) := {b:= p_b}
142 template MySeqInt t_msi(template integer p_i) := {i:= p_i}
143 template MySeqInt t_msi_omit(template integer p_i) := {i:= p_i} with { erroneous (i) "value:= omit" }
144 template MySeqInt t_msi_valueSameTypeE(template integer p_i) := {i:= p_i} with { erroneous (i) "value:= integer:5" }
145 template MySeqInt t_msi_valueSameTypeI(template integer p_i) := {i:= p_i} with { erroneous (i) "value:= 5" } //implicit type
146 template MySeqInt t_msi_valueDiffTypeExplicitString(template integer p_i) := {i:= p_i} with { erroneous (i) "value:= charstring:\"subidubi\"" }
147
148 template MySeqInt t_msi_valueDiffTypeExplicitBoolean(template integer p_i) := {i:= p_i} with { erroneous (i) "value:= boolean:true" }
149 template MySeqInt t_msi_valueDiffTypeImplicitBoolean(template integer p_i) := {i:= p_i} with { erroneous (i) "value:= true" }
150 template MySeqInt t_msi_valueDiffTypeExplicitOctStr(template integer p_i) := {i:= p_i} with { erroneous (i) "value:= octetstring:'42414241'O" } //"BABA"
151 template MySeqInt t_msi_valueDiffTypeImplicitOctStr(template integer p_i) := {i:= p_i} with { erroneous (i) "value:= '42414241'O" }
152 template MySeqInt t_msi_valueDiffTypeExplicitEnum(template integer p_i) := {i:= p_i} with { erroneous (i) "value:= MyEnum:second" }
153 template MySeqInt t_msi_valueDiffTypeExplicitCharstring(template integer p_i) := {i:= p_i} with { erroneous (i) "value:= charstring:\"Albert\"" }
154 template MySeqInt t_msi_valueDiffTypeImplicitCharstring(template integer p_i) := {i:= p_i} with { erroneous (i) "value:= \"Albert\"" }
155 template MySeqInt t_msi_valueDiffTypeRaw(template integer p_i) := {i:= p_i} with { erroneous (i) "value(raw):= '4141'O" }
156
157 template MySeqInt2 t_msi2(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j}
158 template MySeqInt2 t_msi2_omiti(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j} with { erroneous (i) "value:= omit" }
159 template MySeqInt2 t_msi2_omitj(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j} with { erroneous (j) "value:= omit" }
160 template MySeqInt2 t_msi2_beforeomitj(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j} with { erroneous (j) "before:= omit all" }
161 template MySeqInt2 t_msi2_afteromiti(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j} with { erroneous (i) "after:= omit all" }
162 template MySeqInt2 t_msi2_valueSameTypeE(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j} with { erroneous (j) "value:= integer:5" }
163 template MySeqInt2 t_msi2_valueSameTypeI(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j} with { erroneous (j) "value := 5" }
164 template MySeqInt2 t_msi2_valueDiffTypeExplicitCharstring(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j} with { erroneous (j) "value:= charstring:\"Albert\"" }
165 template MySeqInt2 t_msi2_valueDiffTypeImplicitCharstring(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j} with { erroneous (j) "value:= \"Albert\"" }
166 template MySeqInt2 t_msi2_valueDiffTypeExplicitString(template integer p_i, template integer p_j):={i:=p_i, j:=p_j} with { erroneous (j) "value:= charstring:\"subidubi\"" }
167 //variable related values:
168 template MySeqInt2 t_msi2_valueSeqIntV(template integer p_i, template integer p_j):={i:=p_i, j:=p_j} with { erroneous (j) "value := MySeqInt2:{1,2}" }
169 template MySeqInt2 t_msi2_valueSeqIntOptV(template integer p_i, template integer p_j):={i:=p_i, j:=p_j} with { erroneous (j) "value := MySeqInt2opt:{1,2}" }
170 template MySeqInt2 t_msi2_valueSeqIntC(template integer p_i, template integer p_j):={i:=p_i, j:=p_j} with { erroneous (j) "value := MySeqInt2:c_msi2" }
171 template MySeqInt2 t_msi2_valueSeqIntOptC(template integer p_i, template integer p_j):={i:=p_i, j:=p_j} with { erroneous (j) "value := MySeqInt2opt:c_msi2opt" }
172 template MySeqInt2 t_msi2_valueSeqInt2OptOmitC(template integer p_i, template integer p_j):={i:=p_i, j:=p_j} with { erroneous (j) "value:= c_msi2optomit" }
173 template MySeqInt2 t_msi2_valueSeqInt2iiC(template integer p_i, template integer p_j):={i:=p_i, j:=p_j} with { erroneous (i) "value:=integer:c_msi2.i" }
174 template MySeqInt2 t_msi2_valueSeqInt2ijC(template integer p_i, template integer p_j):={i:=p_i, j:=p_j} with { erroneous (i) "value:=integer:c_msi2.j" }
175 template MySeqInt2 t_msi2_valueSeqInt2jiC(template integer p_i, template integer p_j):={i:=p_i, j:=p_j} with { erroneous (j) "value:=integer:c_msi2.i" }
176 template MySeqInt2 t_msi2_valueSeqInt2jjC(template integer p_i, template integer p_j):={i:=p_i, j:=p_j} with { erroneous (j) "value:=integer:c_msi2.j" }
177 template MySeqInt2 t_msi2_valueSeqIntOptFieldC(template integer p_i, template integer p_j):={i:=p_i, j:=p_j} with { erroneous (j) "value:=integer:c_msi2opt.j" } ;//2
178
179 template MySeqIntSeqInt2 t_msisi2_trial(template integer p_i, template integer p_j, template integer p_k) := { p_i, { p_j, p_k} } //not used yet
180 template MySeqIntSeqInt2 t_msisi2(template integer p_i, template integer p_j, template integer p_k) := { i:= p_i, jk:= { i:=p_j, j:=p_k} };
181 template MySeqIntSeqInt2 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} } with { erroneous (i) "value:= omit" };
182 template MySeqIntSeqInt2 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} } with { erroneous (jk.i) "value:= omit" };
183 template MySeqIntSeqInt2 t_msisi2_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" };
184 template MySeqIntSeqInt2 t_msisi2_rawjki(template integer p_i, template integer p_j, template integer p_k) := { i:= p_i, jk:= { i:=p_j, j:=p_k} } with {
185 erroneous (jk.i) "value(raw):= '41424241'O" }; //"ABBA"
186 template MySeqIntSeqInt2 t_msisi2_rawjkj(template integer p_i, template integer p_j, template integer p_k) := { i:= p_i, jk:= { i:=p_j, j:=p_k} } with {
187 erroneous (jk.j) "value(raw):= '41424241'O" };
188 template MySeqIntSeqInt2 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} } with {
189 erroneous(i) "after:= '41424241'O";
190 erroneous(jk.i) "before:='42414241'O";
191 };
192 template MySeqIntSeqInt2 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} } with {
193 erroneous(i) "after(raw):= '41424241'O"; //"ABBA"
194 erroneous(jk.i) "before(raw):='42414241'O"; //"BABA"
195 }; //"ABBA", "BABA"
196 //
197 template MySeqInt3 t_msi3(template integer p_i, template integer p_j, template integer p_k) := {i:= p_i, j:=p_j, k:=p_k}
198
199 template MySeqInt4 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}
200 template MySeqInt4 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} with { erroneous (i) "value:= omit" }
201 template MySeqInt4 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} with { erroneous (j) "value:= omit" }
202 template MySeqInt4 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} with { erroneous (k) "value:= omit" }
203 template MySeqInt4 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}
204 with { erroneous (l) "value:= omit" }
205 template MySeqInt4 t_msi4_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}
206 with { erroneous (i) "value:= 'FEDCBA98'O" }
207 template MySeqInt4 t_msi4_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}
208 with { erroneous (j) "value:= 'FEDCBA98'O" }
209
210 template MySeqInt4 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}
211 with { erroneous (i) "value(raw):= '41424241'O" }
212
213 template MySeqInt4 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}
214 with { erroneous (j) "value(raw):= '41424241'O" }
215
216 template MySeqInt4 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}
217 with { erroneous (k) "value(raw):= '41424241'O" }
218
219 template MySeqInt4 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}
220 with { erroneous (l) "value(raw):= '41424241'O" }
221
222 template MySeqOJKL t_msojkl(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}
223 template MySeqIOKL t_msiokl(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}
224
225 template MySeqISKL t_msiskl(template integer p_i, template MySeqInt4 p_s, template integer p_k,template integer p_l ) := {i:=p_i, s:=p_s, k:=p_k, l:=p_l}
226 template MySeqISKL t_msiskl_valueSomit(template integer p_i, template MySeqInt4 p_s, template integer p_k,template integer p_l ) := {i:=p_i, s:=p_s, k:=p_k, l:=p_l} with { erroneous (s) "value:= omit" }
227 template MySeqISKL t_msiskl_valueSIomit(template integer p_i, template MySeqInt4 p_s, template integer p_k,template integer p_l ) := {i:=p_i, s:=p_s, k:=p_k, l:=p_l} with { erroneous (s.i) "value:= omit" }
228 template MySeqISKL t_msiskl_valueSISJomit(template integer p_i, template MySeqInt4 p_s, template integer p_k,template integer p_l ) := {i:=p_i, s:=p_s, k:=p_k, l:=p_l} with { erroneous (s.i) "value:= omit"
229 erroneous (s.j) "value:= omit"}
230 template MySeqISKL t_msiskl_valueSraw(template integer p_i, template MySeqInt4 p_s, template integer p_k,template integer p_l ) := {i:=p_i, s:=p_s, k:=p_k, l:=p_l} with { erroneous (s) "value(raw):= '41424241'O" }
231 //===seq of seq of seq:==
232
233 template MySeqIntSeqIntSeqInt2SeqCharstring2 t_msisisi2r2_omiti(template integer p_i,template MySeqIntSeqInt2 p_jkl, template MySeqCharstring2 p_xy) :=
234 { i:=p_i, jkl:=p_jkl, xy:=p_xy} with { erroneous(i) "value:=omit"}
235
236 template MySeqIntSeqIntSeqInt2SeqCharstring2 t_msisisi2r2_omitjkl(template integer p_i,template MySeqIntSeqInt2 p_jkl, template MySeqCharstring2 p_xy) :=
237 { i:=p_i, jkl:=p_jkl, xy:=p_xy} with { erroneous(jkl) "value:=omit"}
238
239 template MySeqIntSeqIntSeqInt2SeqCharstring2 t_msisisi2r2_omitxy(template integer p_i,template MySeqIntSeqInt2 p_jkl, template MySeqCharstring2 p_xy) :=
240 { i:=p_i, jkl:=p_jkl, xy:=p_xy} with { erroneous(xy) "value:=omit"}
241
242 template MySeqIntSeqIntSeqInt2SeqCharstring2 t_msisisi2r2_valuexy(template integer p_i,template MySeqIntSeqInt2 p_jkl, template MySeqCharstring2 p_xy) :=
243 { i:=p_i, jkl:=p_jkl, xy:=p_xy} with { erroneous(xy) "value:=MySeqCharstring2:{\"Bonnie\",\"Tyler\"}"}
244
245 template MySeqIntSeqIntSeqInt2SeqCharstring2 t_msisisi2r2_valuex_y(template integer p_i,template MySeqIntSeqInt2 p_jkl, template MySeqCharstring2 p_xy) :=
246 { i:=p_i, jkl:=p_jkl, xy:=p_xy} with {
247 erroneous(xy.x) "value:=charstring:\"Albert\"";
248 erroneous(xy.y) "value:=charstring:\"Einstein\""
249 }
250
251 template MySeqIntSeqIntSeqInt2SeqCharstring2 t_msisisi2r2_valuex_y_expr1(template integer p_i,template MySeqIntSeqInt2 p_jkl, template MySeqCharstring2 p_xy) :=
252 { i:=p_i, jkl:=p_jkl, xy:=p_xy} with {
253 erroneous(xy.x) "value:=integer:9*5";
254 erroneous(xy.y) "value:=integer:16*4"
255 }
256 template MySeqIntSeqIntSeqInt2SeqCharstring2 t_msisisi2r2_valuex_y_expr2(template integer p_i,template MySeqIntSeqInt2 p_jkl, template MySeqCharstring2 p_xy) :=
257 { i:=p_i, jkl:=p_jkl, xy:=p_xy} with {
258 erroneous(xy.x) "value:=integer:(1+10*(2+10*(3+10*(4+10*(5+10*6)))))"; //Horner
259 erroneous(xy.y) "value:=integer:16/5"
260 }
261 template MySeqIntSeqIntSeqInt2SeqCharstring2 t_msisisi2r2_omitjkll(template integer p_i,template MySeqIntSeqInt2 p_jkl, template MySeqCharstring2 p_xy) :=
262 { i:=p_i, jkl:=p_jkl, xy:=p_xy} with { erroneous(jkl.jk.j) "value:=omit"}
263
264 //Sequence of depth 3:
265
266 template MySeq_SeqSeqIntSeqInt2SeqCharstring2_SeqSeqIntSeqInt2SeqCharstring2 t_msssi2sr2ssi2sr2_omit(template MySeqSeqIntSeqInt2SeqCharstring2 p_s1,template MySeqSeqIntSeqInt2SeqCharstring2 p_s2)
267 :={ s1:=p_s1,s2:=p_s2} with { erroneous(s1.jkl.jk.j) "value:=omit" }
268
269 //real (charstring)
270 template MySeqCharstring t_msr(template charstring p_x) := { x:=p_x }
271 template MySeqCharstring2 t_mr2(template charstring p_x, template charstring p_y):={x:=p_x, y:=p_y}
272
273 //charstring->VisibleString
274 template MySeqStr t_msstr(template charstring p_s) := { s := p_s }
275
276 //bitstring:
277 template MySeqBitStr t_msbitstr(template bitstring p_b) := { b := p_b };
278 template MySeqOctStr t_msos(template octetstring p_o) := { o := p_o };
279 template MySeqIntCharstring t_msir(template integer p_i, template charstring p_x ) := { i:=p_i, x:=p_x };
280
281 template MySeqIntStr t_msistr(template integer p_i, template charstring p_s ) := { i:=p_i, s:=p_s };
282
283 template MySeqIntBitStr t_msibitstr(template integer p_i, template bitstring p_b ) := { i:=p_i, b:=p_b };
284
285
286 //====set of related templates ========
287
288 //==== union related templates ========
289 // It caused Seg fault - earlier :)
290 template MyUnionBasicTypes t_mubt_boolean1( template boolean p_b) := { b:= p_b } with { erroneous(b) "value:=omit" }
291 template MyUnionBasicTypesT t_mubt_boolean3( template boolean p_b) := { b:= p_b } with { erroneous(b) "value:=false" } //encoded into ''O
292 template MyUnionBasicTypesT t_mubt_booleanRaw( template boolean p_b) := { b:= p_b } with { erroneous(b) "value(raw):='41424241'O" }
293 template MyUnionBasicTypesT t_mubt_integerRaw( template integer p_i) := { i:= p_i } with { erroneous(i) "value(raw):='41424241'O" }
294 template MyUnionBasicTypesT t_mubt_enumRaw( template MyEnum p_e) := { e:= p_e } with { erroneous(e) "value(raw):='41424241'O" }
295 template MyUnionBasicTypesT t_mubt_stringRaw( template charstring p_r) := { r:= p_r } with { erroneous(r) "value(raw):='41424241'O" }
296 template MyUnionBasicTypesT t_mubt_bitstrRaw( template bitstring p_bs) := { bs:= p_bs } with { erroneous(bs) "value(raw):='41424241'O" }
297 template MyUnionBasicTypesT t_mubt_octetstrRaw( template octetstring p_os) := { os:= p_os } with { erroneous(os) "value(raw):='41424241'O" }
298 template MyUnionBasicTypesT t_mubt_objidRaw( template objid p_oi) := { oi:= p_oi } with { erroneous(oi) "value(raw):='41424241'O" }
299
300 template MyUnionComplexTypes t_muct_0_1( template charstring p_f1, template charstring p_f2, template charstring p_f3) := { sofcharstring:={p_f1,p_f2,p_f3} } with { erroneous(sofcharstring[0], sofcharstring[1]) "value :=omit" }
301 template MyUnionComplexTypes t_muct_0_2( template charstring p_f1, template charstring p_f2, template charstring p_f3) := { sofcharstring:={p_f1,p_f2,p_f3} } with { erroneous(sofcharstring[0], sofcharstring[2]) "value :=omit" }
302 template MyUnionComplexTypes t_muct_1_2( template charstring p_f1, template charstring p_f2, template charstring p_f3) := { sofcharstring:={p_f1,p_f2,p_f3} } with { erroneous(sofcharstring[1], sofcharstring[2]) "value :=omit" }
303 template MyUnionComplexTypes t_muct_2_1( template charstring p_f1, template charstring p_f2, template charstring p_f3) := { sofcharstring:={p_f1,p_f2,p_f3} } with { erroneous(sofcharstring[2], sofcharstring[1]) "value :=omit" }
304 template MyUnionComplexTypes t_muct_0_1_2( template charstring p_f1, template charstring p_f2, template charstring p_f3) := { sofcharstring:={p_f1,p_f2,p_f3} } with { erroneous(sofcharstring[0], sofcharstring[1], sofcharstring[2]) "value :=omit" }
305 template MyUnionComplexTypes t_muct_0_2_1( template charstring p_f1, template charstring p_f2, template charstring p_f3) := { sofcharstring:={p_f1,p_f2,p_f3} } with { erroneous(sofcharstring[0], sofcharstring[2], sofcharstring[1]) "value :=omit" }
306 //================================================
307 //======== Functions==============================
308 //================================================
309 function f_compareAndVerdict(in charstring pl_encoded, in charstring pl_expected) {
310 log("Encoded value: ", pl_encoded); //switch off from cfg file !
311 log("Expected value: ", pl_expected);
312 if( pl_encoded == pl_expected ) {
313 setverdict(pass);
314 } else {
315 setverdict(fail, "encoded value: ", pl_encoded, ";expected value: ", pl_expected );
316 }
317 }
318 //================================================
319 //======== Testcases==============================
320 //================================================
321
322 //======== {integer}===================
323 //omit
324 testcase tc_mySeqIntOmit() runs on MyComp {
325 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
326 f_compareAndVerdict(
327 encode_mySeqInt(valueof(t_msi_omit(i))),
328 encode_mySeqEmpty(valueof(t_seqEmpty)) );
329 }
330 }
331
332 testcase tc_mySeqIntValueSameTypeE() runs on MyComp {
333 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
334 f_compareAndVerdict(
335 encode_mySeqInt(valueof(t_msi_valueSameTypeE(i))),
336 encode_mySeqInt(valueof(t_msi(5))) );
337 }
338 }
339
340 testcase tc_mySeqIntValueSameTypeI() runs on MyComp {
341 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
342 f_compareAndVerdict(
343 encode_mySeqInt(valueof(t_msi_valueSameTypeI(i))),
344 encode_mySeqInt(valueof(t_msi(5))) );
345 }
346 }
347
348 //Basic ASN.1 types (eq ttcn types): boolean, integer, octetstring, bitstring, null, objid, ext. objid, enum, embedded pdv, charstring (real), UTFSTR, seq, seq of
349 testcase tc_mySeqIntValueDiffTypeExplicitBool() runs on MyComp {
350 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
351 f_compareAndVerdict(
352 encode_mySeqInt(valueof(t_msi_valueDiffTypeExplicitBoolean(i))),
353 encode_mySeqBool(valueof(t_msb(true))) );
354 }
355 }
356 testcase tc_mySeqIntValueDiffTypeImplicitBool() runs on MyComp {
357 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
358 f_compareAndVerdict(
359 encode_mySeqInt(valueof(t_msi_valueDiffTypeImplicitBoolean(i))),
360 encode_mySeqBool(valueof(t_msb(true))) );
361 }
362 }
363
364 testcase tc_mySeqIntValueDiffTypeExplicitOctStr() runs on MyComp {
365 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
366 f_compareAndVerdict(
367 encode_mySeqInt(valueof(t_msi_valueDiffTypeExplicitOctStr(i))),
368 encode_mySeqOctStr(valueof(t_msos('42414241'O)))) ;
369 }
370 }
371 testcase tc_mySeqIntValueDiffTypeImplicitOctStr() runs on MyComp {
372 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
373 f_compareAndVerdict(
374 encode_mySeqInt(valueof(t_msi_valueDiffTypeImplicitOctStr(i))),
375 encode_mySeqOctStr(valueof(t_msos('42414241'O)))) ;
376 }
377 }
378
379 testcase tc_mySeqIntValueDiffTypeExplicitEnum() runs on MyComp {
380 var MySeqMyEnum vl_msme;
381 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
382 vl_msme.e:=second;
383 f_compareAndVerdict(
384 encode_mySeqInt(valueof(t_msi_valueDiffTypeExplicitEnum(i))),
385 encode_mySeqMyEnum(vl_msme) );
386 }
387 }
388 testcase tc_mySeqIntValueDiffTypeExplicitCharstring() runs on MyComp {
389 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
390 f_compareAndVerdict(
391 encode_mySeqInt(valueof(t_msi_valueDiffTypeExplicitCharstring(i))),
392 encode_mySeqCharstring(valueof(t_msr("Albert"))) );
393 }
394 }
395
396 testcase tc_mySeqIntValueDiffTypeImplicitCharstring() runs on MyComp {
397 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
398 f_compareAndVerdict(
399 encode_mySeqInt(valueof(t_msi_valueDiffTypeImplicitCharstring(i))),
400 encode_mySeqCharstring(valueof(t_msr("Albert"))));
401 }
402 }
403
404 testcase tc_mySeqIntValueDiffTypeExplicitStr() runs on MyComp {
405 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
406 f_compareAndVerdict(
407 encode_mySeqInt(valueof( t_msi_valueDiffTypeExplicitString(i))),
408 encode_mySeqStr(valueof(t_msstr("subidubi"))) );
409 }
410 }
411
412 //RAW
413 testcase tc_mySeqIntValueDiffTypeRawOctStr() runs on MyComp {
414 var charstring vl_expectedValue:= "<MySeq>AA</MySeq>";
415 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
416 f_compareAndVerdict( encode_mySeqInt(valueof(t_msi_valueDiffTypeRaw(i))), vl_expectedValue)
417 }
418 }
419 // ============{integer, integer }==============
420 //omit
421 testcase tc_mySeqInt2Omiti() runs on MyComp {
422 var integer j:= 255;
423 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
424 f_compareAndVerdict(
425 encode_mySeqInt2(valueof(t_msi2_omiti(i,j))), //encoded
426 encode_mySeqInt(valueof(t_msi(j))) ); //expected
427 }
428 }
429
430 testcase tc_mySeqInt2Omitj() runs on MyComp {
431 var integer j:= 255;
432 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
433 f_compareAndVerdict(
434 encode_mySeqInt2(valueof(t_msi2_omitj(i,j))),//encoded
435 encode_mySeqInt(valueof(t_msi(i))) ); //expected
436 }
437 }
438
439 //before omit j
440 testcase tc_mySeqInt2BeforeOmitj() runs on MyComp {
441 var integer j:= 255;
442 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
443 f_compareAndVerdict(
444 encode_mySeqInt2(valueof(t_msi2_beforeomitj(i,j))),//encoded
445 encode_mySeqInt(valueof(t_msi(j))) ); //expected
446 }
447 }
448
449 //after omit i
450 testcase tc_mySeqInt2AfterOmiti() runs on MyComp {
451 var integer j:= 255;
452 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
453 f_compareAndVerdict(
454 encode_mySeqInt2(valueof(t_msi2_afteromiti(i,j))),//encoded
455 encode_mySeqInt(valueof(t_msi(i))));//expected
456 }
457 }
458
459 testcase tc_mySeqInt2ValueSameTypeE() runs on MyComp {
460 var integer j:= 255;
461 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
462 f_compareAndVerdict(
463 encode_mySeqInt2(valueof(t_msi2_valueSameTypeE(i,j))),//encoded
464 encode_mySeqInt2(valueof(t_msi2(i,5))) ); //expected
465 }
466 }
467
468 testcase tc_mySeqInt2ValueSameTypeI() runs on MyComp {
469 var integer j:= 255;
470 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
471 f_compareAndVerdict(
472 encode_mySeqInt2(valueof(t_msi2_valueSameTypeI(i,j))),//encoded
473 encode_mySeqInt2(valueof(t_msi2(i,5)))); //expected
474 }
475 }
476
477 testcase tc_mySeqInt2ValueDiffTypeExplicitCharstring() runs on MyComp {
478 var integer j:= 255;
479 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
480 f_compareAndVerdict(
481 encode_mySeqInt2(valueof(t_msi2_valueDiffTypeExplicitCharstring(i,j))),//encoded
482 encode_mySeqIntCharstring(valueof(t_msir(i,"Albert")))); //expected
483 }
484 }
485
486 testcase tc_mySeqInt2ValueDiffTypeImplicitCharstring() runs on MyComp {
487 var integer j:= 255;
488 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
489 f_compareAndVerdict(
490 encode_mySeqInt2(valueof(t_msi2_valueDiffTypeImplicitCharstring(i,j))),//encoded
491 encode_mySeqIntCharstring(valueof(t_msir(i,"Albert")))); //expected
492 }
493 }
494
495 testcase tc_mySeqInt2ValueDiffTypeExplicitStr() runs on MyComp {
496 var integer j:= 255;
497 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
498 f_compareAndVerdict(
499 encode_mySeqInt2(valueof( t_msi2_valueDiffTypeExplicitString(i, j))),//encoded
500 encode_mySeqIntStr(valueof(t_msistr(i, "subidubi"))) ); //expected
501 }
502 }
503
504 testcase tc_mySeqInt2ValueSeqIntV() runs on MyComp {
505 var integer i:= 10, j:= 15;
506 var charstring vl_encoded := encode_mySeqInt2(valueof(t_msi2_valueSeqIntV(i,j)))
507 var charstring vl_expected:= encode_mySeqIntSeqInt2({10,{1,2}})
508 f_compareAndVerdict(vl_encoded,vl_expected);
509 }
510
511 testcase tc_mySeqInt2ValueSeqIntOptV() runs on MyComp {
512 var integer i:= 10, j:= 15;
513 var charstring vl_encoded := encode_mySeqInt2(valueof(t_msi2_valueSeqIntOptV(i,j)))
514 var charstring vl_expected:= encode_mySeqIntSeqInt2({10,{1,2}})
515 f_compareAndVerdict(vl_encoded,vl_expected);
516 }
517
518 testcase tc_mySeqInt2ValueSeqIntC() runs on MyComp {
519 var integer i:= 10, j:= 15;
520 var charstring vl_encoded := encode_mySeqInt2(valueof(t_msi2_valueSeqIntC(i,j)))
521 var charstring vl_expected:= encode_mySeqIntSeqInt2({10,{1,2}})
522 f_compareAndVerdict(vl_encoded,vl_expected);
523 }
524
525 testcase tc_mySeqInt2ValueSeqInt2OptC() runs on MyComp {
526 var integer i:= 10, j:= 15;
527 var charstring vl_encoded := encode_mySeqInt2(valueof(t_msi2_valueSeqIntOptC(i,j)));
528 var charstring vl_expected:= encode_mySeqIntSeqInt2({10,{1,2}});
529 f_compareAndVerdict(vl_encoded,vl_expected);
530 }
531
532 testcase tc_mySeqInt2ValueSeqInt2OptOmitC() runs on MyComp {
533 var integer i:= 10, j:= 15;
534 var charstring vl_encoded := encode_mySeqInt2(valueof(t_msi2_valueSeqInt2OptOmitC(i,j)));
535 var charstring vl_expected:= encode_mySeqIntSeqInt2optopt({10,{1,omit}})
536 f_compareAndVerdict(vl_encoded,vl_expected);
537 }
538 testcase tc_mySeqInt2ValueSeqInt2iiC() runs on MyComp {
539 var integer i:= 10, j:= 15;
540 var charstring vl_encoded := encode_mySeqInt2(valueof(t_msi2_valueSeqInt2iiC(i,j)));
541 var charstring vl_expected:= encode_mySeqInt2({1,15})
542 f_compareAndVerdict(vl_encoded,vl_expected);
543 }
544
545 testcase tc_mySeqInt2ValueSeqInt2ijC() runs on MyComp {
546 var integer i:= 10, j:= 15;
547 var charstring vl_encoded := encode_mySeqInt2(valueof(t_msi2_valueSeqInt2ijC(i,j)));
548 var charstring vl_expected:= encode_mySeqInt2({2,15})
549 f_compareAndVerdict(vl_encoded,vl_expected);
550 }
551 testcase tc_mySeqInt2ValueSeqInt2jiC() runs on MyComp {
552 var integer i:= 10, j:= 15;
553 var charstring vl_encoded := encode_mySeqInt2(valueof(t_msi2_valueSeqInt2jiC(i,j)));
554 var charstring vl_expected:= encode_mySeqInt2({10,1})
555 f_compareAndVerdict(vl_encoded,vl_expected);
556 }
557
558 testcase tc_mySeqInt2ValueSeqInt2jjC() runs on MyComp {
559 var integer i:= 10, j:= 15;
560 var charstring vl_encoded := encode_mySeqInt2(valueof(t_msi2_valueSeqInt2jjC(i,j)));
561 var charstring vl_expected:= encode_mySeqInt2({10,2})
562 f_compareAndVerdict(vl_encoded,vl_expected);
563 }
564 //=== Sequence { integer, {integer, integer} )
565 testcase tc_mySeqIntSeqInt2ValueOmiti() runs on MyComp {
566 var integer i:= 10, j:= 15, k:=16;
567 var charstring vl_encoded :=encode_mySeqIntSeqInt2(valueof(t_msisi2_omiti(i,j,k)))
568 var charstring vl_expected:=encode_mySeqIntSeqInt2opt({omit,{15,16}})
569 f_compareAndVerdict(vl_encoded,vl_expected);
570 }
571
572 testcase tc_mySeqIntSeqInt2ValueOmitjki() runs on MyComp {
573 var integer i:= 10, j:= 15, k:=16;
574 f_compareAndVerdict(
575 encode_mySeqIntSeqInt2(valueof(t_msisi2_omitjki(i,j,k))),
576 encode_mySeqIntSeqInt2optopt({10,{16,omit}}) );
577 }
578
579 testcase tc_mySeqIntSeqInt2ValueOmitjkj() runs on MyComp {
580 var integer i:= 10, j:= 15, k:=16;
581 f_compareAndVerdict( encode_mySeqIntSeqInt2(valueof(t_msisi2_omitjkj(i,j,k))), encode_mySeqIntSeqInt2optopt({10,{15,omit}}) );
582 }
583
584 testcase tc_mySeqIntSeqInt2ValueRawjki() runs on MyComp {
585 var integer i:= 10, j:= 15, k:=16;
586 f_compareAndVerdict( encode_mySeqIntSeqInt2(valueof(t_msisi2_rawjki(i,j,k))), "<MySeq>10<MySeq>ABBA16</MySeq></MySeq>" );
587 }
588
589 testcase tc_mySeqIntSeqInt2ValueRawjkj() runs on MyComp {
590 var integer i:= 10, j:= 15, k:=16;
591 f_compareAndVerdict( encode_mySeqIntSeqInt2(valueof(t_msisi2_rawjkj(i,j,k))), "<MySeq>10<MySeq>15ABBA</MySeq></MySeq>" )
592 }
593
594 //After-before:
595 testcase tc_mySeqIntSeqInt2AfteriBeforej() runs on MyComp {
596 var integer i:= 10, j:= 15, k:=16;
597 f_compareAndVerdict( encode_mySeqIntSeqInt2(valueof(t_msisi2_afteribeforej(i,j,k))), "<MySeq>1041424241<MySeq>424142411516</MySeq></MySeq>")
598 }
599
600 testcase tc_mySeqIntSeqInt2AfteriRawBeforejRaw() runs on MyComp {
601 var integer i:= 10, j:= 15, k:=16;
602 f_compareAndVerdict( encode_mySeqIntSeqInt2(valueof(t_msisi2_afterirawbeforejraw(i,j,k))), "<MySeq>10ABBA<MySeq>BABA1516</MySeq></MySeq>")
603 }
604
605 //==== {integer, integer, integer, integer} ==============
606 //omit
607 testcase tc_mySeqInt4Omiti() runs on MyComp {
608 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
609 f_compareAndVerdict( encode_mySeqInt4(valueof(t_msi4_omiti(i,2*i,3*i,4*i))),encode_mySeqInt3(valueof(t_msi3(2*i,3*i,4*i))) )
610 }
611 }
612
613 testcase tc_mySeqInt4Omitj() runs on MyComp {
614 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
615 f_compareAndVerdict( encode_mySeqInt4(valueof(t_msi4_omitj(i,2*i,3*i,4*i))),encode_mySeqInt3(valueof(t_msi3(i,3*i,4*i))) );
616 }
617 }
618
619 testcase tc_mySeqInt4Omitk() runs on MyComp {
620 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
621 f_compareAndVerdict( encode_mySeqInt4(valueof(t_msi4_omitk(i,2*i,3*i,4*i))),encode_mySeqInt3(valueof(t_msi3(i,2*i,4*i))) )
622 }
623 }
624
625 testcase tc_mySeqInt4Omitl() runs on MyComp {
626 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
627 f_compareAndVerdict( encode_mySeqInt4(valueof(t_msi4_omitl(i,2*i,3*i,4*i))), encode_mySeqInt3(valueof(t_msi3(i,2*i,3*i))) )
628 }
629 }
630
631 testcase tc_mySeqInt4ValueiOctetStr() runs on MyComp {
632 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
633 f_compareAndVerdict(
634 encode_mySeqInt4(valueof(t_msi4_valueiOctetStr(i,2*i,3*i,4*i))),
635 encode_mySeqOJKL(valueof(t_msojkl('FEDCBA98'O,2*i,3*i, 4*i))) )
636 }
637 }
638
639 testcase tc_mySeqInt4ValuejOctetStr() runs on MyComp {
640 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
641 f_compareAndVerdict(
642 encode_mySeqInt4(valueof(t_msi4_valuejOctetStr(i,2*i,3*i,4*i))), encode_mySeqIOKL(valueof(t_msiokl(i,'FEDCBA98'O,3*i, 4*i))) )
643 }
644 }
645
646 type record of charstring RoC;
647 type record of integer RoI;
648
649 testcase tc_mySeqInt4ValueiRaw() runs on MyComp {
650 var RoC vl_expectedValue:= {
651 "<MySeq>ABBA234</MySeq>",
652 "<MySeq>ABBA203040</MySeq>",
653 "<MySeq>ABBA200300400</MySeq>",
654 "<MySeq>ABBA200030004000</MySeq>",
655 "<MySeq>ABBA-20-30-40</MySeq>"
656 }
657 //if i=1
658 var RoI vl_roi := { 1, 10, 100, 1000,-10};
659
660 var integer i:=0;
661 for(var integer index:=0; index<5;index:=index+1) {
662 i:=vl_roi[index];
663 f_compareAndVerdict( encode_mySeqInt4(valueof(t_msi4_valueiRaw(i,2*i,3*i,4*i))),vl_expectedValue[index] )
664 }
665 }
666
667 testcase tc_mySeqInt4ValuejRaw() runs on MyComp {
668 var charstring vl_expectedValue:= "<MySeq>1ABBA34</MySeq>";
669 var integer i:=1;
670 f_compareAndVerdict( encode_mySeqInt4(valueof(t_msi4_valuejRaw(i,2*i,3*i,4*i))), vl_expectedValue);
671 }
672
673 testcase tc_mySeqInt4ValuekRaw() runs on MyComp {
674 var charstring vl_expectedValue:= "<MySeq>12ABBA4</MySeq>";
675 var integer i:=1;
676 f_compareAndVerdict( encode_mySeqInt4(valueof(t_msi4_valuekRaw(i,2*i,3*i,4*i))),vl_expectedValue )
677 }
678
679 testcase tc_mySeqInt4ValuelRaw() runs on MyComp {
680 var charstring vl_expectedValue:= "<MySeq>123ABBA</MySeq>";
681 var integer i:=1
682 f_compareAndVerdict( encode_mySeqInt4(valueof(t_msi4_valuelRaw(i,2*i,3*i,4*i))),vl_expectedValue ) ;
683 }
684
685 //To test if a mandatory structure omitted
686 testcase tc_mySeqISKL_ValueSomit() runs on MyComp {
687 var MySeqInt4 vl_msi4:={5,6,7,8};
688 var charstring vl_expectedValue:="<MySeq>103040</MySeq>";
689 f_compareAndVerdict( encode_mySeqISKL(valueof(t_msiskl_valueSomit(10,vl_msi4,30,40))), vl_expectedValue )
690 }
691
692 testcase tc_mySeqISKL_ValueSIomit() runs on MyComp {
693 var MySeqInt4 vl_msi4:={5,6,7,8};
694 var charstring vl_expectedValue:="<MySeq>10<MySeq>678</MySeq>3040</MySeq>";
695 f_compareAndVerdict( encode_mySeqISKL(valueof(t_msiskl_valueSIomit(10,vl_msi4,30,40))),vl_expectedValue )
696 }
697
698 testcase tc_mySeqISKL_ValueSISJomit() runs on MyComp {
699 var MySeqInt4 vl_msi4:={5,6,7,8};
700 var charstring vl_expectedValue:="<MySeq>10<MySeq>78</MySeq>3040</MySeq>";
701 f_compareAndVerdict( encode_mySeqISKL(valueof(t_msiskl_valueSISJomit(10,vl_msi4,30,40))),vl_expectedValue )
702 }
703
704 testcase tc_mySeqISKL_ValueSraw() runs on MyComp {
705 var MySeqInt4 vl_msi4:={5,6,7,8};
706 var charstring vl_expectedValue:= "<MySeq>10ABBA3040</MySeq>";
707 f_compareAndVerdict( encode_mySeqISKL(valueof(t_msiskl_valueSraw(10,vl_msi4,30,40))),vl_expectedValue )
708 }
709
710 //===== sequence of sequence of sequence ====
711 testcase tc_MySeqIntSeqIntSeqInt2SeqCharstring2_omiti() runs on MyComp {
712 var MySeqSeqIntSeqInt2SeqCharstring2 vl_expected:= {{2,{3,4}},{"Albert","Einstein"}};
713 f_compareAndVerdict(
714 encode_mySeqIntSeqIntSeqInt2SeqCharstring2(valueof(t_msisisi2r2_omiti(1, {2,{3,4}}, {"Albert","Einstein"} ))),
715 encode_mySeqSeqIntSeqInt2SeqCharstring2(vl_expected))
716 }
717 testcase tc_MySeqIntSeqIntSeqInt2SeqCharstring2_omitjkl() runs on MyComp {
718 var MySeqIntSeqCharstring2 vl_expected:= { 1, {"Albert","Einstein"}};
719 f_compareAndVerdict( encode_mySeqIntSeqIntSeqInt2SeqCharstring2(
720 valueof(t_msisisi2r2_omitjkl(1, {2,{3,4}}, {"Albert","Einstein"} ))),
721 encode_mySeqIntSeqCharstring2(vl_expected));
722 }
723
724 testcase tc_MySeqIntSeqIntSeqInt2SeqCharstring2_omitxy() runs on MyComp {
725 var MySeqIntSeqIntSeqInt2 vl_expected:= { 1, {2,{3,4}} };
726 f_compareAndVerdict(
727 encode_mySeqIntSeqIntSeqInt2SeqCharstring2(valueof(t_msisisi2r2_omitxy(1, {2,{3,4}}, {"Albert","Einstein"} ))),
728 encode_mySeqIntSeqIntSeqInt2(vl_expected))
729 }
730
731 //...with { erroneous(jkl.jk.j) "value:=omit"}
732 testcase tc_MySeqIntSeqIntSeqInt2SeqCharstring2_omitjkll() runs on MyComp {
733 var MySeqIntSeqIntSeqInt2optoptSeqCharstring2 vl_expected:= {1,{2,{3,omit}}, {"Albert","Einstein"}};
734 f_compareAndVerdict( encode_mySeqIntSeqIntSeqInt2SeqCharstring2(
735 valueof(t_msisisi2r2_omitjkll(1, {2,{3,4}}, {"Albert","Einstein"} ))),
736 encode_mySeqIntSeqIntSeqInt2optoptSeqCharstring2(vl_expected))
737 }
738
739 testcase tc_MySeqIntSeqIntSeqInt2SeqCharstring2_valuexy() runs on MyComp {
740 //var MySeqIntSeqIntSeqInt2SeqCharstring2 vl_msisisi2r2;
741 var MySeqIntSeqIntSeqInt2SeqCharstring2 vl_expected:= {1,{2,{3,4}}, {"Bonnie","Tyler"}};
742 f_compareAndVerdict(
743 encode_mySeqIntSeqIntSeqInt2SeqCharstring2(valueof(t_msisisi2r2_valuexy(1, {2,{3,4}}, {"Albert","Einstein"} ))),
744 encode_mySeqIntSeqIntSeqInt2SeqCharstring2(vl_expected))
745 }
746
747 testcase tc_MySeqIntSeqIntSeqInt2SeqCharstring2_valuex_y() runs on MyComp {
748
749 var MySeqIntSeqIntSeqInt2SeqCharstring2 vl_expected:= {1,{2,{3,4}}, {"Albert","Einstein"}};
750 f_compareAndVerdict( encode_mySeqIntSeqIntSeqInt2SeqCharstring2(
751 valueof(t_msisisi2r2_valuex_y(1, {2,{3,4}}, {"Albert","Einstein"} ))),
752 encode_mySeqIntSeqIntSeqInt2SeqCharstring2(vl_expected));
753 }
754
755 //expression evaluation in attribue section:
756 testcase tc_MySeqIntSeqIntSeqInt2SeqCharstring2_valuex_y_expr1() runs on MyComp {
757
758 var MySeqIntSeqIntSeqInt2SeqCharstring2 vl_expected:= {1,{2,{3,4}}, {"45","64"}};
759 f_compareAndVerdict(
760 encode_mySeqIntSeqIntSeqInt2SeqCharstring2(valueof(t_msisisi2r2_valuex_y_expr1(1, {2,{3,4}}, {"Albert","Four"} ))),
761 encode_mySeqIntSeqIntSeqInt2SeqCharstring2(vl_expected))
762 }
763
764 testcase tc_MySeqIntSeqIntSeqInt2SeqCharstring2_valuex_y_expr2() runs on MyComp {
765 var MySeqIntSeqIntSeqInt2SeqCharstring2 vl_expected:= {1,{2,{3,4}}, { "654321", "3"}};
766 f_compareAndVerdict(
767 encode_mySeqIntSeqIntSeqInt2SeqCharstring2(valueof(t_msisisi2r2_valuex_y_expr2(1, {2,{3,4}}, {"Albert","Four"} ))),
768 encode_mySeqIntSeqIntSeqInt2SeqCharstring2(vl_expected))
769 }
770
771 testcase tc_MySeq_SeqSeqIntSeqInt2SeqCharstring2_SeqSeqIntSeqInt2SeqCharstring2_omit() runs on MyComp {
772 var MySeqSeqIntSeqInt2SeqCharstring2 vl_s1:={ {1,{2,3}}, {"Three","Four"} }, vl_s2:= {{5,{6,7}}, {"Seven", "Eight"}};
773 var MySeq_SeqSeqIntSeqInt2optoptSeqCharstring2_SeqSeqIntSeqInt2optoptSeqCharstring2 vl_expected := { { omit,{1,{2, omit}}, {"Three","Four"} }, { omit,{5,{6,7}}, {"Seven", "Eight"}} }
774 f_compareAndVerdict(
775 encode_mySeq_SeqSeqIntSeqInt2SeqCharstring2_SeqSeqIntSeqInt2SeqCharstring2(valueof(t_msssi2sr2ssi2sr2_omit(vl_s1, vl_s2))),
776 encode_mySeq_SeqSeqIntSeqInt2optoptSeqCharstring2_SeqSeqIntSeqInt2optoptSeqCharstring2(vl_expected));
777 }
778
779 const MySeqIntSeqInt2opt c_r2bp := { 42, {13, 17} }
780 with { erroneous (i) "before := ""fourty-two="" " };
781
782 const MySeqIntSeqInt2opt c_r2bo := { omit, {13, 17} }
783 with { erroneous (i) "before := ""fourty-two="" " };
784
785 testcase tc_MySeqInt2opt_before () runs on MyComp {
786 //
787 var charstring actual := encode_mySeqIntSeqInt2opt(c_r2bp);
788 var charstring expected := "<MySeq>fourty-two=42<MySeq>1317</MySeq></MySeq>";
789 f_compareAndVerdict(actual, expected);
790
791 actual := encode_mySeqIntSeqInt2opt(c_r2bo);
792 expected := "<MySeq>fourty-two=<MySeq>1317</MySeq></MySeq>";
793 f_compareAndVerdict(actual, expected);
794 }
795
796 const MySeqIntSeqInt2opt c_r2vp := { 42, {13, 17} }
797 with { erroneous (i) "value := ""fourty-two"" " };
798
799 const MySeqIntSeqInt2opt c_r2vo := { omit, {13, 17} }
800 with { erroneous (i) "value := ""fourty-two"" " };
801
802 testcase tc_MySeqInt2opt_value () runs on MyComp {
803 //
804 var charstring actual := encode_mySeqIntSeqInt2opt(c_r2vp);
805 var charstring expected := "<MySeq>fourty-two<MySeq>1317</MySeq></MySeq>";
806 f_compareAndVerdict(actual, expected);
807
808 actual := encode_mySeqIntSeqInt2opt(c_r2vo);
809 //expected should be the same
810 f_compareAndVerdict(actual, expected);
811 }
812
813 const MySeqIntSeqInt2opt c_r2ap := { 42, {13, 17} }
814 with { erroneous (i) "after := ""=fourty-two"" " };
815
816 const MySeqIntSeqInt2opt c_r2ao := { omit, {13, 17} }
817 with { erroneous (i) "after := ""=fourty-two"" " };
818
819 testcase tc_MySeqInt2opt_after () runs on MyComp {
820 //
821 var charstring actual := encode_mySeqIntSeqInt2opt(c_r2ap);
822 var charstring expected := "<MySeq>42=fourty-two<MySeq>1317</MySeq></MySeq>";
823 f_compareAndVerdict(actual, expected);
824
825 actual := encode_mySeqIntSeqInt2opt(c_r2ao);
826 expected := "<MySeq>=fourty-two<MySeq>1317</MySeq></MySeq>";
827 f_compareAndVerdict(actual, expected);
828 }
829
830}//group Sequences
831
832
833//group Set
834group SequenceOf {
835 //====sequence of related templates====
836 template MySeqOfBool t_msob(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 };
837 template MySeqOfInt t_msoi(template integer p_i1, template integer p_i2, template integer p_i3):={p_i1,p_i2,p_i3};
838 template MySeqOfMyEnum t_msome(template MyEnum p_e1, template MyEnum p_e2,template MyEnum p_e3) := {p_e1,p_e2,p_e3};
839 template MySeqOfCharstring 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}
840 template MySeqOfBitStr t_msobs(template bitstring p_bs1, template bitstring p_bs2, template bitstring p_bs3):={p_bs1, p_bs2, p_bs3}
841 template MySeqOfOctStr t_msoos(template octetstring p_os1, template octetstring p_os2, template octetstring p_os3):={p_os1, p_os2, p_os3}
842
843 template MySeqOfBool t_msobValueSameType(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
844 with { erroneous ([0]) "value:= boolean:true"; erroneous ([2]) "value:= boolean:true" };
845
846 template MySeqOfBool t_msobValueDiffType(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
847 with { erroneous ([0]) "value:= \"Pi\""; erroneous ([2]) "value:= 2011" };
848
849 template MySeqOfBool t_msobValueDiffTypeRaw(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
850 with { erroneous ([0]) "value(raw):='41424142'O"; erroneous ([2]) "value:= 2011" };
851
852 template MySeqOfBool t_msobValueOmit(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
853 with { erroneous ([0]) "value:=omit"; erroneous ([1]) "value:= omit" };
854
855 template MySeqOfBool t_msobAfterOmit(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
856 with { erroneous ([0]) "after:=omit all" };
857
858 template MySeqOfBool t_msobValueAfterOmit(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
859 with { erroneous ([0]) "after:=omit all"; erroneous ([0]) "value:=true" };
860
861 template MySeqOfBool t_msobBeforeOmit2(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
862 with { erroneous ([2]) "before:=omit all" };
863
864 template MySeqOfBool t_msobValueBeforeOmit2(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
865 with { erroneous ([2]) "before:=omit all"; erroneous ([2]) "value:=true" };
866
867 template MySeqOfBool t_msobBeforeOmit1(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
868 with { erroneous ([1]) "before:=omit all" };
869
870 template MySeqOfBool t_msobValueBeforeOmit1(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
871 with { erroneous ([1]) "before:=omit all"; erroneous ([1]) "value:=true" };
872
873 // This would cause compilation error - correct behavior:
874 //template MySeqOfBool t_msobAfterOmit(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
875 // with { erroneous ([0]) "after:=omit all"; erroneous ([1]) "value:= 4" };
876
877 //INTEGER
878 template MySeqOfInt t_msoiValueDiffType(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
879 with { erroneous ([0]) "value:= \"bubu\""; erroneous ([2]) "value:= true" };
880 template MySeqOfInt t_msoiValueDiffTypeRaw(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
881 with { erroneous ([0]) "value(raw):= '41424241'O"; erroneous ([2]) "value:= true" };
882 template MySeqOfInt t_msoiBeforeOmit2(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
883 with { erroneous ([2]) "before:= omit all" };
884 template MySeqOfInt t_msoiIntValueBeforeOmit2(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
885 with { erroneous ([2]) "before:= omit all"; erroneous ([2]) "value:= 2011"};
886 template MySeqOfInt t_msoiCharStrValueBeforeOmit2(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
887 with { erroneous ([2]) "before:= omit all"; erroneous ([2]) "value:= \"bubu\""};
888 template MySeqOfInt t_msoiBeforeOmit1(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
889 with { erroneous ([1]) "before:= omit all" };
890 template MySeqOfInt t_msoiIntValueBeforeOmit1(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
891 with { erroneous ([1]) "before:= omit all"; erroneous ([1]) "value:= 2011"};
892 template MySeqOfInt t_msoiCharStrValueBeforeOmit1(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
893 with { erroneous ([1]) "before:= omit all"; erroneous ([1]) "value:= \"bubu\""};
894 template MySeqOfInt t_msoiCharStrValueBeforeOmit1_2(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
895 with { erroneous ([1]) "before:= omit all"; erroneous ([2]) "value:= \"bubu\""};
896
897 template MySeqOfInt t_msoiAfterOmit1(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
898 with { erroneous ([1]) "after:= omit all" };
899 template MySeqOfInt t_msoiIntValueAfterOmit1(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
900 with { erroneous ([1]) "after:= omit all"; erroneous ([1]) "value:= 2011"};
901 template MySeqOfInt t_msoiCharStrValueAfterOmit1(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
902 with { erroneous ([1]) "after:= omit all"; erroneous ([1]) "value:= \"bubu\""};
903 template MySeqOfInt t_msoiCharStrValueAfterOmit1_2(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
904 with { erroneous ([1]) "after:= omit all"; erroneous ([0]) "value:= \"bubu\""};
905 //MyEnum
906 template MySeqOfMyEnum t_msoeValueDiffType(MyEnum p_i, MyEnum p_j, MyEnum p_k) := { p_i, p_j, p_k }
907 with { erroneous ([0]) "value:= \"Pi\""; erroneous ([2]) "value:= true" };
908 template MySeqOfMyEnum t_msoeValueDiffTypeRaw(MyEnum p_i, MyEnum p_j, MyEnum p_k) := { p_i, p_j, p_k }
909 with { erroneous ([0]) "value(raw):= '41424241'O"; erroneous ([2]) "value:= true" };
910 template MySeqOfMyEnum t_msoeBeforeOmit2(MyEnum p_i, MyEnum p_j, MyEnum p_k) := { p_i, p_j, p_k }
911 with { erroneous ([2]) "before:= omit all" };
912 template MySeqOfMyEnum t_msoeIntValueBeforeOmit2(MyEnum p_i, MyEnum p_j, MyEnum p_k) := { p_i, p_j, p_k }
913 with { erroneous ([2]) "before:= omit all"; erroneous ([2]) "value:= 2011"};
914 template MySeqOfMyEnum t_msoeCharStrValueBeforeOmit2(MyEnum p_i, MyEnum p_j, MyEnum p_k) := { p_i, p_j, p_k }
915 with { erroneous ([2]) "before:= omit all"; erroneous ([2]) "value:= \"bubu\""};
916 template MySeqOfMyEnum t_msoeBeforeOmit1(MyEnum p_i, MyEnum p_j, MyEnum p_k) := { p_i, p_j, p_k }
917 with { erroneous ([1]) "before:= omit all" };
918 template MySeqOfMyEnum t_msoeIntValueBeforeOmit1(MyEnum p_i, MyEnum p_j, MyEnum p_k) := { p_i, p_j, p_k }
919 with { erroneous ([1]) "before:= omit all"; erroneous ([1]) "value:= 2011"};
920 template MySeqOfMyEnum t_msoeCharStrValueBeforeOmit1(MyEnum p_i, MyEnum p_j, MyEnum p_k) := { p_i, p_j, p_k }
921 with { erroneous ([1]) "before:= omit all"; erroneous ([1]) "value:= \"bubu\""};
922 template MySeqOfMyEnum t_msoeCharStrValueBeforeOmit1_2(MyEnum p_i, MyEnum p_j, MyEnum p_k) := { p_i, p_j, p_k }
923 with { erroneous ([1]) "before:= omit all"; erroneous ([2]) "value:= \"bubu\""};
924
925 template MySeqOfMyEnum t_msoeAfterOmit1(MyEnum p_i, MyEnum p_j, MyEnum p_k) := { p_i, p_j, p_k }
926 with { erroneous ([1]) "after:= omit all" };
927 template MySeqOfMyEnum t_msoeIntValueAfterOmit1(MyEnum p_i, MyEnum p_j, MyEnum p_k) := { p_i, p_j, p_k }
928 with { erroneous ([1]) "after:= omit all"; erroneous ([1]) "value:= 2011"};
929 template MySeqOfMyEnum t_msoeCharStrValueAfterOmit1(MyEnum p_i, MyEnum p_j, MyEnum p_k) := { p_i, p_j, p_k }
930 with { erroneous ([1]) "after:= omit all"; erroneous ([1]) "value:= \"bubu\""};
931 template MySeqOfMyEnum t_msoeCharStrValueAfterOmit1_2(MyEnum p_i, MyEnum p_j, MyEnum p_k) := { p_i, p_j, p_k }
932 with { erroneous ([1]) "after:= omit all"; erroneous ([0]) "value:= \"bubu\""};
933 //Charstring (charstring):
934 template MySeqOfCharstring t_msorValueDiffType(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
935 with { erroneous ([0]) "value:= \"Pi\""; erroneous ([2]) "value:= true" };
936 template MySeqOfCharstring t_msorValueDiffTypeRaw(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
937 with { erroneous ([0]) "value(raw):= '41424241'O"; erroneous ([2]) "value:= true" };
938 template MySeqOfCharstring t_msorBeforeOmit2(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
939 with { erroneous ([2]) "before:= omit all" };
940 template MySeqOfCharstring t_msorIntValueBeforeOmit2(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
941 with { erroneous ([2]) "before:= omit all"; erroneous ([2]) "value:= 2011"};
942 template MySeqOfCharstring t_msorCharStrValueBeforeOmit2(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
943 with { erroneous ([2]) "before:= omit all"; erroneous ([2]) "value:= \"bubu\""};
944 template MySeqOfCharstring t_msorBeforeOmit1(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
945 with { erroneous ([1]) "before:= omit all" };
946 template MySeqOfCharstring t_msorIntValueBeforeOmit1(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
947 with { erroneous ([1]) "before:= omit all"; erroneous ([1]) "value:= 2011"};
948 template MySeqOfCharstring t_msorCharStrValueBeforeOmit1(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
949 with { erroneous ([1]) "before:= omit all"; erroneous ([1]) "value:= \"bubu\""};
950 template MySeqOfCharstring t_msorCharStrValueBeforeOmit1_2(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
951 with { erroneous ([1]) "before:= omit all"; erroneous ([2]) "value:= \"bubu\""};
952
953 template MySeqOfCharstring t_msorAfterOmit1(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
954 with { erroneous ([1]) "after:= omit all" };
955 template MySeqOfCharstring t_msorIntValueAfterOmit1(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
956 with { erroneous ([1]) "after:= omit all"; erroneous ([1]) "value:= 2011"};
957 template MySeqOfCharstring t_msorCharStrValueAfterOmit1(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
958 with { erroneous ([1]) "after:= omit all"; erroneous ([1]) "value:= \"bubu\""};
959 template MySeqOfCharstring t_msorCharStrValueAfterOmit1_2(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
960 with { erroneous ([1]) "after:= omit all"; erroneous ([0]) "value:= \"bubu\""};
961 //more complex:
962 template MySeqOfSeqSeqIntSeqInt2SeqCharstring2 t_msossisi2sr2_omitj(template MySeqSeqIntSeqInt2SeqCharstring2 p_s1,template MySeqSeqIntSeqInt2SeqCharstring2 p_s2) :={ p_s1, p_s2}
963 with { erroneous([0].jkl.jk.j) "value:=omit" }
964
965 template MySeqOfSeqSeqIntSeqInt2SeqCharstring2 t_msossisi2sr2_beforeomitj(template MySeqSeqIntSeqInt2SeqCharstring2 p_s1,template MySeqSeqIntSeqInt2SeqCharstring2 p_s2) :={ p_s1, p_s2}
966 with { erroneous([0].jkl.jk.j) "before:=omit all" erroneous([1].jkl.jk.i) "after:=omit all"}
967
968 template MySeqOfSeqSeqIntSeqInt2SeqCharstring2 t_msossisi2sr2_beforeafteromit(
969 template MySeqSeqIntSeqInt2SeqCharstring2 p_s1,template MySeqSeqIntSeqInt2SeqCharstring2 p_s2) :={ p_s1, p_s2}
970 with { erroneous([0].jkl.jk.j) "before:=omit all" erroneous([1].jkl.jk.i) "after:=omit all"}
971
972 template MySeqOfSeqSeqIntSeqInt2SeqCharstring2 t_msossisi2sr2_arglist_omit(
973 template MySeqSeqIntSeqInt2SeqCharstring2 p_s1,template MySeqSeqIntSeqInt2SeqCharstring2 p_s2) :={ p_s1, p_s2}
974 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"}
975
976 template MySeqOfSeqSeqIntSeqInt2SeqCharstring2 t_msossisi2sr2_arglist_afteromit(
977 template MySeqSeqIntSeqInt2SeqCharstring2 p_s1,template MySeqSeqIntSeqInt2SeqCharstring2 p_s2) :={ p_s1, p_s2}
978 with { erroneous([0].jkl.jk.i, [0].xy.x) "after:=omit all" erroneous([1].jkl.jk.i, [1].xy.x) "after:=omit all"}
979
980 template MySeqOfSeqSeqIntSeqInt2SeqCharstring2 t_msossisi2sr2_arglist_beforeomit(
981 template MySeqSeqIntSeqInt2SeqCharstring2 p_s1,template MySeqSeqIntSeqInt2SeqCharstring2 p_s2) :={ p_s1, p_s2}
982 with { erroneous([0].jkl.jk.j, [0].xy.y) "before:=omit all" erroneous([1].jkl.jk.i, [1].xy.x) "after:=omit all"}
983 //============ Testcases====================
984 //Testcase of same type
985 testcase tc_MySeqOfBoolValueSameType1() runs on MyComp {
986 f_compareAndVerdict(
987 encode_mySeqOfBool(valueof(t_msobValueSameType(false, false,false))),
988 encode_mySeqOfBool(valueof(t_msob(true, false, true))));
989 }
990
991 testcase tc_MySeqOfBoolValueSameType2() runs on MyComp {
992 f_compareAndVerdict(
993 encode_mySeqOfBool(valueof(t_msobValueSameType(true, true,true))),
994 encode_mySeqOfBool(valueof(t_msob(true, true, true))));
995 }
996
997 testcase tc_MySeqOfBoolValueDiffType() runs on MyComp {
998 var MySeqOfMyUnionBT vl_expected :={ {r:="Pi"}, {b:=true}, {i:=2011}};
999 f_compareAndVerdict(
1000 encode_mySeqOfBool(valueof(t_msobValueDiffType(true, true,true))),
1001 encode_mySeqOfMyUnionBT( vl_expected ));
1002 }
1003
1004 testcase tc_MySeqOfBoolValueRaw() runs on MyComp {
1005 var MySeqOfMyUnionBT vl_expected :={ {r:="ABAB"}, {b:=true}, {i:=2011}};
1006 f_compareAndVerdict(
1007 encode_mySeqOfBool(valueof(t_msobValueDiffTypeRaw(true, true,true))),
1008 encode_mySeqOfMyUnionBT( vl_expected ));
1009 }
1010
1011 testcase tc_MySeqOfBoolValueOmit() runs on MyComp {
1012 var MySeqOfMyUnionBT vl_expected :={ {b:=true} };
1013 f_compareAndVerdict(
1014 encode_mySeqOfBool(valueof(t_msobValueOmit(false, false,true))),
1015 encode_mySeqOfMyUnionBT( vl_expected ));
1016 }
1017
1018 testcase tc_MySeqOfBoolAfterOmit() runs on MyComp {
1019 var MySeqOfMyUnionBT vl_expected :={ {b:=false} };
1020 f_compareAndVerdict(
1021 encode_mySeqOfBool(valueof(t_msobAfterOmit(false, true,true))),
1022 encode_mySeqOfMyUnionBT( vl_expected ));
1023 }
1024
1025 testcase tc_MySeqOfBoolValueAfterOmit() runs on MyComp {
1026 var MySeqOfMyUnionBT vl_expected :={ {b:=true} };
1027 f_compareAndVerdict(
1028 encode_mySeqOfBool(valueof(t_msobValueAfterOmit(false, false,false))),
1029 encode_mySeqOfMyUnionBT( vl_expected ));
1030 }
1031
1032 testcase tc_MySeqOfBoolBeforeOmit2() runs on MyComp {
1033 var MySeqOfMyUnionBT vl_expected :={ {b:=true} };
1034 f_compareAndVerdict(
1035 encode_mySeqOfBool(valueof(t_msobBeforeOmit2(false, false,true))),
1036 encode_mySeqOfMyUnionBT( vl_expected ));
1037 }
1038
1039 testcase tc_MySeqOfBoolValueBeforeOmit2() runs on MyComp {
1040 var MySeqOfMyUnionBT vl_expected :={ {b:=true} };
1041 f_compareAndVerdict(
1042 encode_mySeqOfBool(valueof(t_msobValueBeforeOmit2(false, false,false))),
1043 encode_mySeqOfMyUnionBT( vl_expected ));
1044 }
1045
1046 testcase tc_MySeqOfBoolBeforeOmit1() runs on MyComp {
1047 var MySeqOfMyUnionBT vl_expected :={ {b:=false},{b:=true} };
1048 f_compareAndVerdict(
1049 encode_mySeqOfBool(valueof(t_msobBeforeOmit1(true, false,true))),
1050 encode_mySeqOfMyUnionBT( vl_expected ));
1051 }
1052
1053 testcase tc_MySeqOfBoolValueBeforeOmit1() runs on MyComp {
1054 var MySeqOfMyUnionBT vl_expected :={ {b:=true},{b:=false} };
1055 f_compareAndVerdict(
1056 encode_mySeqOfBool(valueof(t_msobValueBeforeOmit1(false, false,false))),
1057 encode_mySeqOfMyUnionBT( vl_expected ));
1058 }
1059
1060 //INTEGER
1061 testcase tc_MySeqOfIntValueDiffType() runs on MyComp {
1062 var MySeqOfMyUnionBT vl_expected :={ {r:="bubu"}, {i:=2}, {b:=true}};
1063 f_compareAndVerdict(
1064 encode_mySeqOfInt(valueof(t_msoiValueDiffType(1,2,3))),
1065 encode_mySeqOfMyUnionBT( vl_expected ));
1066 }
1067 testcase tc_MySeqOfIntValueDiffTypeRaw() runs on MyComp {
1068 var MySeqOfMyUnionBT vl_expected :={ {r:="ABBA"}, {i:=2}, {b:=true}};
1069 f_compareAndVerdict(
1070 encode_mySeqOfInt(valueof(t_msoiValueDiffTypeRaw(1,2,3))),
1071 encode_mySeqOfMyUnionBT( vl_expected ));
1072 }
1073 testcase tc_MySeqOfIntBeforeOmit2() runs on MyComp {
1074 var MySeqOfMyUnionBT vl_expected :={ {i:=3} };
1075 f_compareAndVerdict(
1076 encode_mySeqOfInt(valueof(t_msoiBeforeOmit2(1,2,3))),
1077 encode_mySeqOfMyUnionBT( vl_expected ));
1078 }
1079 testcase tc_MySeqOfIntIntValueBeforeOmit2() runs on MyComp {
1080 var MySeqOfMyUnionBT vl_expected :={ {i:=2011}};
1081 f_compareAndVerdict(
1082 encode_mySeqOfInt(valueof(t_msoiIntValueBeforeOmit2(1,2,3))),
1083 encode_mySeqOfMyUnionBT( vl_expected ));
1084 }
1085 testcase tc_MySeqOfIntCharStrValueBeforeOmit2() runs on MyComp {
1086 var MySeqOfMyUnionBT vl_expected :={ {r:="bubu"}};
1087 f_compareAndVerdict(
1088 encode_mySeqOfInt(valueof(t_msoiCharStrValueBeforeOmit2(1,2,3))),
1089 encode_mySeqOfMyUnionBT( vl_expected ));
1090 }
1091 testcase tc_MySeqOfIntBeforeOmit1() runs on MyComp {
1092 var MySeqOfMyUnionBT vl_expected :={ {i:=2},{i:=3} };
1093 f_compareAndVerdict(
1094 encode_mySeqOfInt(valueof(t_msoiBeforeOmit1(1,2,3))),
1095 encode_mySeqOfMyUnionBT( vl_expected ));
1096 }
1097 testcase tc_MySeqOfIntIntValueBeforeOmit1() runs on MyComp {
1098 var MySeqOfMyUnionBT vl_expected :={ {i:=2011}, {i:=3}};
1099 f_compareAndVerdict(
1100 encode_mySeqOfInt(valueof(t_msoiIntValueBeforeOmit1(1,2,3))),
1101 encode_mySeqOfMyUnionBT( vl_expected ));
1102 }
1103 testcase tc_MySeqOfIntCharStrValueBeforeOmit1() runs on MyComp {
1104 var MySeqOfMyUnionBT vl_expected :={ {r:="bubu"},{i:=3}};
1105 f_compareAndVerdict(
1106 encode_mySeqOfInt(valueof(t_msoiCharStrValueBeforeOmit1(1,2,3))),
1107 encode_mySeqOfMyUnionBT( vl_expected ));
1108 }
1109 testcase tc_MySeqOfIntCharStrValueBeforeOmit1_2() runs on MyComp {
1110 var MySeqOfMyUnionBT vl_expected :={ {i:=2},{r:="bubu"}};
1111 f_compareAndVerdict(
1112 encode_mySeqOfInt(valueof(t_msoiCharStrValueBeforeOmit1_2(1,2,3))),
1113 encode_mySeqOfMyUnionBT( vl_expected ));
1114 }
1115
1116 testcase tc_MySeqOfIntAfterOmit1() runs on MyComp {
1117 var MySeqOfMyUnionBT vl_expected :={ {i:=1}, {i:=2} } ;
1118 f_compareAndVerdict(
1119 encode_mySeqOfInt(valueof(t_msoiAfterOmit1(1,2,3))),
1120 encode_mySeqOfMyUnionBT( vl_expected ));
1121 }
1122 testcase tc_MySeqOfIntIntValueAfterOmit1() runs on MyComp {
1123 var MySeqOfMyUnionBT vl_expected :={ {i:=1},{i:=2011}};
1124 f_compareAndVerdict(
1125 encode_mySeqOfInt(valueof(t_msoiIntValueAfterOmit1(1,2,3))),
1126 encode_mySeqOfMyUnionBT( vl_expected ));
1127 }
1128 testcase tc_MySeqOfIntCharStrValueAfterOmit1() runs on MyComp {
1129 var MySeqOfMyUnionBT vl_expected :={ {i:=1},{r:="bubu"}};
1130 f_compareAndVerdict(
1131 encode_mySeqOfInt(valueof(t_msoiCharStrValueAfterOmit1(1,2,3))),
1132 encode_mySeqOfMyUnionBT( vl_expected ));
1133 }
1134 testcase tc_MySeqOfIntCharStrValueAfterOmit1_2() runs on MyComp {
1135 var MySeqOfMyUnionBT vl_expected :={ {r:="bubu"},{i:=2}};
1136 f_compareAndVerdict(
1137 encode_mySeqOfInt(valueof(t_msoiCharStrValueAfterOmit1_2(1,2,3))),
1138 encode_mySeqOfMyUnionBT( vl_expected ));
1139 }
1140 //MyEnum
1141 testcase tc_MySeqOfMyEnumValueDiffType() runs on MyComp {
1142 var MySeqOfMyUnionBT vl_expected :={ {r:="Pi"}, {e:=second}, {b:=true}};
1143 f_compareAndVerdict(
1144 encode_mySeqOfMyEnum(valueof(t_msoeValueDiffType(first, second, third))),
1145 encode_mySeqOfMyUnionBT( vl_expected ));
1146 }
1147 testcase tc_MySeqOfMyEnumValueDiffTypeRaw() runs on MyComp {
1148 var MySeqOfMyUnionBT vl_expected :={ {r:="ABBA"}, {e:=second}, {b:=true}};
1149 f_compareAndVerdict(
1150 encode_mySeqOfMyEnum(valueof(t_msoeValueDiffTypeRaw(first, second, third))),
1151 encode_mySeqOfMyUnionBT( vl_expected ));
1152 }
1153 testcase tc_MySeqOfMyEnumBeforeOmit2() runs on MyComp {
1154 var MySeqOfMyUnionBT vl_expected :={ {e:=third} };
1155 f_compareAndVerdict(
1156 encode_mySeqOfMyEnum(valueof(t_msoeBeforeOmit2(first, second, third))),
1157 encode_mySeqOfMyUnionBT( vl_expected ));
1158 }
1159 testcase tc_MySeqOfMyEnumIntValueBeforeOmit2() runs on MyComp {
1160 var MySeqOfMyUnionBT vl_expected :={ {i:=2011}};
1161 f_compareAndVerdict(
1162 encode_mySeqOfMyEnum(valueof(t_msoeIntValueBeforeOmit2(first, second, third))),
1163 encode_mySeqOfMyUnionBT( vl_expected ));
1164 }
1165 testcase tc_MySeqOfMyEnumCharStrValueBeforeOmit2() runs on MyComp {
1166 var MySeqOfMyUnionBT vl_expected :={ {r:="bubu"}};
1167 f_compareAndVerdict(
1168 encode_mySeqOfMyEnum(valueof(t_msoeCharStrValueBeforeOmit2(first, second, third))),
1169 encode_mySeqOfMyUnionBT( vl_expected ));
1170 }
1171 testcase tc_MySeqOfMyEnumBeforeOmit1() runs on MyComp {
1172 var MySeqOfMyUnionBT vl_expected :={ {e:=second},{e:=third} };
1173 f_compareAndVerdict(
1174 encode_mySeqOfMyEnum(valueof(t_msoeBeforeOmit1(first, second, third))),
1175 encode_mySeqOfMyUnionBT( vl_expected ));
1176 }
1177 testcase tc_MySeqOfMyEnumIntValueBeforeOmit1() runs on MyComp {
1178 var MySeqOfMyUnionBT vl_expected :={ {i:=2011}, {e:=third}};
1179 f_compareAndVerdict(
1180 encode_mySeqOfMyEnum(valueof(t_msoeIntValueBeforeOmit1(first, second, third))),
1181 encode_mySeqOfMyUnionBT( vl_expected ));
1182 }
1183 testcase tc_MySeqOfMyEnumCharStrValueBeforeOmit1() runs on MyComp {
1184 var MySeqOfMyUnionBT vl_expected :={ {r:="bubu"},{e:=third}};
1185 f_compareAndVerdict(
1186 encode_mySeqOfMyEnum(valueof(t_msoeCharStrValueBeforeOmit1(first, second, third))),
1187 encode_mySeqOfMyUnionBT( vl_expected ));
1188 }
1189 testcase tc_MySeqOfMyEnumCharStrValueBeforeOmit1_2() runs on MyComp {
1190 var MySeqOfMyUnionBT vl_expected :={ {e:=second},{r:="bubu"}};
1191 f_compareAndVerdict(
1192 encode_mySeqOfMyEnum(valueof(t_msoeCharStrValueBeforeOmit1_2(first, second, third))),
1193 encode_mySeqOfMyUnionBT( vl_expected ));
1194 }
1195
1196 testcase tc_MySeqOfMyEnumAfterOmit1() runs on MyComp {
1197 var MySeqOfMyUnionBT vl_expected :={ {e:=first}, {e:=second} } ;
1198 f_compareAndVerdict(
1199 encode_mySeqOfMyEnum(valueof(t_msoeAfterOmit1(first, second, third))),
1200 encode_mySeqOfMyUnionBT( vl_expected ));
1201 }
1202 testcase tc_MySeqOfMyEnumIntValueAfterOmit1() runs on MyComp {
1203 var MySeqOfMyUnionBT vl_expected :={ {e:=first},{i:=2011}};
1204 f_compareAndVerdict(
1205 encode_mySeqOfMyEnum(valueof(t_msoeIntValueAfterOmit1(first, second, third))),
1206 encode_mySeqOfMyUnionBT( vl_expected ));
1207 }
1208 testcase tc_MySeqOfMyEnumCharStrValueAfterOmit1() runs on MyComp {
1209 var MySeqOfMyUnionBT vl_expected :={ {e:=first},{r:="bubu"}};
1210 f_compareAndVerdict(
1211 encode_mySeqOfMyEnum(valueof(t_msoeCharStrValueAfterOmit1(first, second, third))),
1212 encode_mySeqOfMyUnionBT( vl_expected ));
1213 }
1214 testcase tc_MySeqOfMyEnumCharStrValueAfterOmit1_2() runs on MyComp {
1215 var MySeqOfMyUnionBT vl_expected :={ {r:="bubu"},{e:=second}};
1216 f_compareAndVerdict(
1217 encode_mySeqOfMyEnum(valueof(t_msoeCharStrValueAfterOmit1_2(first, second, third))),
1218 encode_mySeqOfMyUnionBT( vl_expected ));
1219 }
1220
1221 //Charstring (Charstring)
1222 testcase tc_MySeqOfCharstringValueDiffType() runs on MyComp {
1223 var MySeqOfMyUnionBT vl_expected :={ {r:="Pi"}, {r:="Two"}, {b:=true}};
1224 f_compareAndVerdict(
1225 encode_mySeqOfCharstring(valueof(t_msorValueDiffType("One", "Two", "Three"))),
1226 encode_mySeqOfMyUnionBT( vl_expected ));
1227 }
1228 testcase tc_MySeqOfCharstringValueDiffTypeRaw() runs on MyComp {
1229 var MySeqOfMyUnionBT vl_expected :={ {r:="ABBA"}, {r:="Two"}, {b:=true}};
1230 f_compareAndVerdict(
1231 encode_mySeqOfCharstring(valueof(t_msorValueDiffTypeRaw("One", "Two", "Three"))),
1232 encode_mySeqOfMyUnionBT( vl_expected ));
1233 }
1234 testcase tc_MySeqOfCharstringBeforeOmit2() runs on MyComp {
1235 var MySeqOfMyUnionBT vl_expected :={ {r:="Three"} };
1236 f_compareAndVerdict(
1237 encode_mySeqOfCharstring(valueof(t_msorBeforeOmit2("One", "Two", "Three"))),
1238 encode_mySeqOfMyUnionBT( vl_expected ));
1239 }
1240 testcase tc_MySeqOfCharstringIntValueBeforeOmit2() runs on MyComp {
1241 var MySeqOfMyUnionBT vl_expected :={ {i:=2011}};
1242 f_compareAndVerdict(
1243 encode_mySeqOfCharstring(valueof(t_msorIntValueBeforeOmit2("One", "Two", "Three"))),
1244 encode_mySeqOfMyUnionBT( vl_expected ));
1245 }
1246 testcase tc_MySeqOfCharstringCharStrValueBeforeOmit2() runs on MyComp {
1247 var MySeqOfMyUnionBT vl_expected :={ {r:="bubu"}};
1248 f_compareAndVerdict(
1249 encode_mySeqOfCharstring(valueof(t_msorCharStrValueBeforeOmit2("One", "Two", "Three"))),
1250 encode_mySeqOfMyUnionBT( vl_expected ));
1251 }
1252 testcase tc_MySeqOfCharstringBeforeOmit1() runs on MyComp {
1253 var MySeqOfMyUnionBT vl_expected :={ {r:="Two"},{r:="Three"} };
1254 f_compareAndVerdict(
1255 encode_mySeqOfCharstring(valueof(t_msorBeforeOmit1("One", "Two", "Three"))),
1256 encode_mySeqOfMyUnionBT( vl_expected ));
1257 }
1258 testcase tc_MySeqOfCharstringIntValueBeforeOmit1() runs on MyComp {
1259 var MySeqOfMyUnionBT vl_expected :={ {i:=2011}, {r:="Three"}};
1260 f_compareAndVerdict(
1261 encode_mySeqOfCharstring(valueof(t_msorIntValueBeforeOmit1("One", "Two", "Three"))),
1262 encode_mySeqOfMyUnionBT( vl_expected ));
1263 }
1264 testcase tc_MySeqOfCharstringCharStrValueBeforeOmit1() runs on MyComp {
1265 var MySeqOfMyUnionBT vl_expected :={ {r:="bubu"},{r:="Three"}};
1266 f_compareAndVerdict(
1267 encode_mySeqOfCharstring(valueof(t_msorCharStrValueBeforeOmit1("One", "Two", "Three"))),
1268 encode_mySeqOfMyUnionBT( vl_expected ));
1269 }
1270 testcase tc_MySeqOfCharstringCharStrValueBeforeOmit1_2() runs on MyComp {
1271 var MySeqOfMyUnionBT vl_expected :={ {r:="Two"},{r:="bubu"}};
1272 f_compareAndVerdict(
1273 encode_mySeqOfCharstring(valueof(t_msorCharStrValueBeforeOmit1_2("One", "Two", "Three"))),
1274 encode_mySeqOfMyUnionBT( vl_expected ));
1275 }
1276
1277 testcase tc_MySeqOfCharstringAfterOmit1() runs on MyComp {
1278 var MySeqOfMyUnionBT vl_expected :={ {r:="One"}, {r:="Two"} } ;
1279 f_compareAndVerdict(
1280 encode_mySeqOfCharstring(valueof(t_msorAfterOmit1("One", "Two", "Three"))),
1281 encode_mySeqOfMyUnionBT( vl_expected ));
1282 }
1283 testcase tc_MySeqOfCharstringIntValueAfterOmit1() runs on MyComp {
1284 var MySeqOfMyUnionBT vl_expected :={ {r:="One"},{i:=2011}};
1285 f_compareAndVerdict(
1286 encode_mySeqOfCharstring(valueof(t_msorIntValueAfterOmit1("One", "Two", "Three"))),
1287 encode_mySeqOfMyUnionBT( vl_expected ));
1288 }
1289 testcase tc_MySeqOfCharstringCharStrValueAfterOmit1() runs on MyComp {
1290 var MySeqOfMyUnionBT vl_expected :={ {r:="One"},{r:="bubu"}};
1291 f_compareAndVerdict(
1292 encode_mySeqOfCharstring(valueof(t_msorCharStrValueAfterOmit1("One", "Two", "Three"))),
1293 encode_mySeqOfMyUnionBT( vl_expected ));
1294 }
1295 testcase tc_MySeqOfCharstringCharStrValueAfterOmit1_2() runs on MyComp {
1296 var MySeqOfMyUnionBT vl_expected :={ {r:="bubu"},{r:="Two"}};
1297 f_compareAndVerdict(
1298 encode_mySeqOfCharstring(valueof(t_msorCharStrValueAfterOmit1_2("One", "Two", "Three"))),
1299 encode_mySeqOfMyUnionBT( vl_expected ));
1300 }
1301 //BIT STRING
1302 //OCTET STRING
1303
1304 //More complex:
1305
1306 testcase tc_MySeqOf_SeqSeqIntSeqInt2SeqCharstring2_omitj() runs on MyComp {
1307 var MySeqSeqIntSeqInt2SeqCharstring2 vl_s1:={ {1,{2,3}}, {"Three","Four"} }, vl_s2:= {{5,{6,7}}, {"Seven", "Eight"}};
1308 var MySeqOfMySeqIntSeqIntSeqInt2optoptSeqCharstring2 vl_expected := { { omit,{1,{2, omit}}, {"Three","Four"} }, { omit,{5,{6,7}}, {"Seven", "Eight"}} }
1309 f_compareAndVerdict(
1310 encode_mySeqOfSeqSeqIntSeqInt2SeqCharstring2(valueof(t_msossisi2sr2_omitj(vl_s1, vl_s2))),
1311 encode_mySeqOfMySeqIntSeqIntSeqInt2optoptSeqCharstring2(vl_expected));
1312
1313 }
1314
1315 testcase tc_MySeqOf_SeqSeqIntSeqInt2SeqCharstring2_beforeafteromit() runs on MyComp {
1316 var MySeqSeqIntSeqInt2SeqCharstring2 vl_s1:={ {1,{2,3}}, {"Three","Four"} }, vl_s2:= {{5,{6,7}}, {"Seven", "Eight"}};
1317 var MySeqOfMySeqIntSeqIntSeqInt2optoptSeqCharstring2 vl_expected := { { omit,{1,{3,omit}}, {"Three","Four"} }, { omit,{5,{6,omit}}, {"Seven", "Eight"}} }
1318 f_compareAndVerdict(
1319 encode_mySeqOfSeqSeqIntSeqInt2SeqCharstring2(valueof(t_msossisi2sr2_beforeafteromit(vl_s1, vl_s2))),
1320 encode_mySeqOfMySeqIntSeqIntSeqInt2optoptSeqCharstring2(vl_expected));
1321
1322 }
1323
1324 testcase tc_MySeqOf_SeqSeqIntSeqInt2SeqCharstring2_arglist_omit() runs on MyComp {
1325 var MySeqSeqIntSeqInt2SeqCharstring2 vl_s1:={ {1,{2,3}}, {"Three","Four"} }, vl_s2:= {{5,{6,7}}, {"Seven", "Eight"}};
1326 var MySeqOfMySeqIntSeqIntSeqInt2optoptSeqCharstring2 vl_expected := { { omit,{omit,{2,omit}}, {"Four",omit} }, { omit,{5,{6,omit}}, {"Seven",omit}} }
1327 f_compareAndVerdict(
1328 encode_mySeqOfSeqSeqIntSeqInt2SeqCharstring2(valueof(t_msossisi2sr2_arglist_omit(vl_s1, vl_s2))),
1329 encode_mySeqOfMySeqIntSeqIntSeqInt2optoptSeqCharstring2(vl_expected));
1330 }
1331
1332 testcase tc_MySeqOf_SeqSeqIntSeqInt2SeqCharstring2_arglist_afteromit() runs on MyComp {
1333 var MySeqSeqIntSeqInt2SeqCharstring2 vl_s1:={ {1,{2,3}}, {"Three","Four"} }, vl_s2:= {{5,{6,7}}, {"Seven", "Eight"}};
1334 var MySeqOfMySeqIntSeqIntSeqInt2optoptSeqCharstring2 vl_expected := { { omit,{1,{2,omit}}, {"Three",omit} }, { omit,{5,{6,omit}}, {"Seven",omit}} }
1335 f_compareAndVerdict(
1336 encode_mySeqOfSeqSeqIntSeqInt2SeqCharstring2(valueof(t_msossisi2sr2_arglist_afteromit(vl_s1, vl_s2))),
1337 encode_mySeqOfMySeqIntSeqIntSeqInt2optoptSeqCharstring2(vl_expected));
1338 }
1339 testcase tc_MySeqOf_SeqSeqIntSeqInt2SeqCharstring2_arglist_beforeomit() runs on MyComp {
1340 var MySeqSeqIntSeqInt2SeqCharstring2 vl_s1:={ {1,{2,3}}, {"Three","Four"} }, vl_s2:= {{5,{6,7}}, {"Seven", "Eight"}};
1341 var MySeqOfMySeqIntSeqIntSeqInt2optoptSeqCharstring2 vl_expected := { { omit,{1,{3,omit}}, {"Four",omit} }, { omit,{5,{6,omit}}, {"Seven",omit}} }
1342 f_compareAndVerdict(
1343 encode_mySeqOfSeqSeqIntSeqInt2SeqCharstring2(valueof(t_msossisi2sr2_arglist_beforeomit(vl_s1, vl_s2))),
1344 encode_mySeqOfMySeqIntSeqIntSeqInt2optoptSeqCharstring2(vl_expected));
1345 }
1346}//SequenceOf
1347
1348group Set {
1349 template MySetInt2opt t_mseti2opt := { i:= 1, j := 2 }
1350 template MySetInt2opt t_mseti2optomit := { i:= 1, j := omit }
1351 const MySetInt2 c_mseti2 := { i:= 1, j := 2 }
1352 const MySetInt2opt c_mseti2opt := { i:= 1, j := 2 }
1353 const MySetInt2opt c_mseti2optomit := { i:= 1, j := omit }
1354
1355 template MySetEmpty t_setEmpty :={}
1356 template MySetBool t_msetb(template boolean p_b) := {b:= p_b}
1357 //template MySetNull t_msetn := { n:= NULL }
1358
1359 template MySetInt t_mseti(template integer p_i) := {i:= p_i}
1360 template MySetInt t_mseti_omit(template integer p_i) := {i:= p_i} with { erroneous (i) "value:= omit" }
1361 template MySetInt t_mseti_valueSameTypeE(template integer p_i) := {i:= p_i} with { erroneous (i) "value:= integer:5" }
1362 template MySetInt t_mseti_valueSameTypeI(template integer p_i) := {i:= p_i} with { erroneous (i) "value:= 5" } //implicit type
1363
1364 //Basic ASN.1 types (eq ttcn types): boolean, integer, octetstring, bitstring, null, objid, ext. objid, enum, embedded pdv, charstring (real), UTFSTR, seq, seq of
1365 template MySetInt t_mseti_valueDiffTypeExplicitBoolean(template integer p_i) := {i:= p_i} with { erroneous (i) "value:= boolean:true" }
1366 template MySetInt t_mseti_valueDiffTypeImplicitBoolean(template integer p_i) := {i:= p_i} with { erroneous (i) "value:= true" }
1367
1368 //NegTestTestcases.ttcn:74.3-86: error: Type `NULL' and type `@NegTestTypes.MySetInt' have no common encoding
1369 template MySetInt t_mseti_valueDiffTypeExplicitOctStr(template integer p_i) := {i:= p_i} with { erroneous (i) "value:= octetstring:'42414241'O" }
1370 template MySetInt t_mseti_valueDiffTypeImplicitOctStr(template integer p_i) := {i:= p_i} with { erroneous (i) "value:= '42414241'O" }
1371 template MySetInt t_mseti_valueDiffTypeExplicitEnum(template integer p_i) := {i:= p_i} with { erroneous (i) "value:= MyEnum:second" }
1372 template MySetInt t_mseti_valueDiffTypeExplicitCharstring(template integer p_i) := {i:= p_i} with { erroneous (i) "value:= charstring:\"Albert\"" }
1373 template MySetInt t_mseti_valueDiffTypeImplicitCharstring(template integer p_i) := {i:= p_i} with { erroneous (i) "value:= \"Albert\"" }
1374 template MySetInt t_mseti_valueDiffTypeRaw(template integer p_i) := {i:= p_i} with { erroneous (i) "value(raw):= '4141'O" }
1375
1376 template MySetInt2opt t_mseti2(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j}
1377 template MySetInt2 t_mseti2_omiti(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j} with { erroneous (i) "value:= omit" }
1378 template MySetInt2 t_mseti2_omitj(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j} with { erroneous (j) "value:= omit" }
1379 //template MySetInt2 t_mseti2_beforeomiti(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j} with { erroneous (i) "before:= omit all" }
1380 template MySetInt2 t_mseti2_beforeomitj(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j} with { erroneous (i) "value:= omit" }
1381 template MySetInt2 t_mseti2_afteromiti(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j} with { erroneous (j) "value:= omit" }
1382 //template MySetInt2 t_mseti2_afteromitj(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j} with { erroneous (j) "after:= omit all" }
1383 template MySetInt2 t_mseti2_valueSameTypeE(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j} with { erroneous (j) "value:= MySetInt2.j:5" } //tagged replacement
1384 template MySetInt2 t_mseti2_valueSameTypeI(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j} with { erroneous (j) "value := 5" }
1385 template MySetInt2 t_mseti2_valueDiffTypeExplicitCharstring(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j} with { erroneous (j) "value:= charstring:\"Albert\"" }
1386 template MySetInt2 t_mseti2_valueDiffTypeImplicitCharstring(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j} with { erroneous (j) "value:= \"Albert\"" }
1387 //variable related values:
1388 template MySetInt2 t_mseti2_valueSeqIntV(template integer p_i, template integer p_j):={i:=p_i, j:=p_j} with { erroneous (j) "value := MySeqInt2:{i:=1,j:=2}" }
1389 template MySetInt2 t_mseti2_valueSeqIntOptV(template integer p_i, template integer p_j):={i:=p_i, j:=p_j} with { erroneous (j) "value := MySeqInt2opt:{i:=1,j:=2}" }
1390 template MySetInt2 t_mseti2_valueSeqIntC(template integer p_i, template integer p_j):={i:=p_i, j:=p_j} with { erroneous (j) "value := MySeqInt2:c_msi2" }
1391 template MySetInt2 t_mseti2_valueSeqIntOptC(template integer p_i, template integer p_j):={i:=p_i, j:=p_j} with { erroneous (j) "value := MySeqInt2opt:c_msi2opt" }
1392 template MySetInt2 t_mseti2_valueSeqInt2OptOmitC(template integer p_i, template integer p_j):={i:=p_i, j:=p_j} with { erroneous (j) "value:= c_msi2optomit" }
1393 template MySetInt2 t_mseti2_valueSeqInt2iiC(template integer p_i, template integer p_j):={i:=p_i, j:=p_j} with { erroneous (i) "value:=c_mseti2.i" };
1394 template MySetInt2 t_mseti2_valueSeqInt2ijC(template integer p_i, template integer p_j):={i:=p_i, j:=p_j} with { erroneous (i) "value:=c_mseti2.j" };
1395 template MySetInt2 t_mseti2_valueSeqInt2jiC(template integer p_i, template integer p_j):={i:=p_i, j:=p_j} with { erroneous (j) "value:=c_mseti2.i" };
1396 template MySetInt2 t_mseti2_valueSeqInt2jjC(template integer p_i, template integer p_j):={i:=p_i, j:=p_j} with { erroneous (j) "value:=c_mseti2.j" };
1397
1398 template MySetInt2 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
1399 template MySetIntSeqInt2 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
1400 template MySetIntSeqInt2 t_msetisi2(template integer p_i, template integer p_j, template integer p_k) := { i:= p_i, jk:= { i:=p_j, j:=p_k} };
1401 template MySetIntSeqInt2 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} } with { erroneous (i) "value:= omit" };
1402 template MySetIntSeqInt2 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" };
1403 template MySetIntSeqInt2 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" };
1404 template MySetIntSeqInt2 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 {
1405 erroneous (jk.i) "value(raw):= '41424241'O" };
1406 template MySetIntSeqInt2 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 {
1407 erroneous (jk.j) "value(raw):= '41424241'O" };
1408 template MySetIntSeqInt2 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 {
1409 erroneous(i) "after:= '41424241'O";
1410 erroneous(jk.i) "before:='42414241'O"
1411 };
1412 template MySetIntSeqInt2 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 {
1413 erroneous(i) "after(raw):= '41424241'O"; //"ABBA"
1414 erroneous(jk.i) "before(raw):='42414241'O" //"BABA"
1415 };
1416 //
1417 template MySetInt3 t_mseti3(template integer p_i, template integer p_j, template integer p_k) := {i:= p_i, j:=p_j, k:=p_k}
1418
1419 template MySetInt4 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}
1420 template MySetInt4opt 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}
1421 template MySetInt4 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" }
1422 template MySetInt4 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" }
1423 template MySetInt4 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" }
1424 template MySetInt4 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}
1425 with { erroneous (l) "value:= omit" }
1426 template MySetInt4 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}
1427 with { erroneous(i) "value:= 'FEDCBA98'O" }
1428 template MySetInt4 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}
1429 with { erroneous(j) "value:= 'FEDCBA98'O" }
1430
1431 template MySetInt4 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}
1432 with { erroneous(i) "value(raw):= '41424241'O" }
1433
1434 template MySetInt4 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}
1435 with { erroneous(j) "value(raw):= '41424241'O" }
1436
1437 template MySetInt4 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}
1438 with { erroneous(k) "value(raw):= '41424241'O" }
1439
1440 template MySetInt4 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}
1441 with { erroneous(l) "value(raw):= '41424241'O" }
1442
1443 template MySetOJKL 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}
1444 template MySetIOKL 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}
1445
1446 template MySetISKL t_msetiskl(template integer p_i, template MySeqInt4 p_s, template integer p_k,template integer p_l ) := {i:=p_i, s:=p_s, k:=p_k, l:=p_l}
1447 template MySetISKLopt t_msetisklopt(template integer p_i, template MySeqInt4opt p_s, template integer p_k,template integer p_l ) := {i:=p_i, s:=p_s, k:=p_k, l:=p_l}
1448 template MySetIS2KLopt t_msetis2klopt(template integer p_i, template MySeqInt2 p_s, template integer p_k,template integer p_l ) := {i:=p_i, s:=p_s, k:=p_k, l:=p_l}
1449 template MySetISKL t_msetiskl_valueSomit(template integer p_i, template MySeqInt4 p_s, template integer p_k,template integer p_l ) := {i:=p_i, s:=p_s, k:=p_k, l:=p_l} with {
1450 erroneous(s) "value:= omit" }
1451 template MySetISKL t_msetiskl_valueSIomit(template integer p_i, template MySeqInt4 p_s, template integer p_k,template integer p_l ) := {i:=p_i, s:=p_s, k:=p_k, l:=p_l} with {
1452 erroneous(s.i) "value:= omit" }
1453 template MySetISKL t_msetiskl_valueSISJomit(template integer p_i, template MySeqInt4 p_s, template integer p_k,template integer p_l ) := {i:=p_i, s:=p_s, k:=p_k, l:=p_l} with {
1454 erroneous(s.i) "value:= omit"
1455 erroneous(s.j) "value:= omit"}
1456 template MySetISKL t_msetiskl_valueSraw(template integer p_i, template MySeqInt4 p_s, template integer p_k,template integer p_l ) := {i:=p_i, s:=p_s, k:=p_k, l:=p_l} with { erroneous (s) "value(raw):= '41424241'O" }
1457
1458 template MySetISOKL t_msetisokl(template integer p_i, template MySeqInt4 p_s, template octetstring p_o, template integer p_k, template integer p_l ) :=
1459 {i:=p_i, s:=p_s, o:=p_o, k:=p_k, l:=p_l}
1460 template MySetISOKLopt t_msetisoklopt(template integer p_i, template MySeqInt4opt p_s,template octetstring p_o, template integer p_k, template integer p_l ) :=
1461 {i:=p_i, s:=p_s, o:=p_o, k:=p_k, l:=p_l}
1462 template MySetISOKL t_msetisokl_valueSomit(template integer p_i, template MySeqInt4 p_s, template octetstring p_o, template integer p_k,template integer p_l ) :=
1463 {i:=p_i, s:=p_s, o:=p_o, k:=p_k, l:=p_l} with {
1464 erroneous(s) "value:= omit" }
1465 template MySetIOSKLopt t_msetiosklopt(template integer p_i, template octetstring p_o,template MySeqInt4opt p_s, template integer p_k, template integer p_l ) :=
1466 {i:=p_i, o:=p_o, s:=p_s, k:=p_k, l:=p_l}
1467 template MySetIOSKL t_msetioskl_valueSomit(template integer p_i, template octetstring p_o, template MySeqInt4 p_s, template integer p_k,template integer p_l ) :=
1468 {i:=p_i, o:=p_o, s:=p_s,k:=p_k, l:=p_l} with {
1469 erroneous(s) "value:= omit" }
1470 //===seq of seq of seq:==
1471
1472 template MySetIntSeqIntSeqInt2SeqCharstring2 t_msetisisi2r2_omiti(template integer p_i,template MySeqIntSeqInt2 p_jkl, template MySeqCharstring2 p_xy) :=
1473 { i:=p_i, jkl:=p_jkl, xy:=p_xy} with { erroneous(i) "value:=omit"}
1474
1475 template MySetIntSeqIntSeqInt2SeqCharstring2 t_msetisisi2r2_omitjkl(template integer p_i,template MySeqIntSeqInt2 p_jkl, template MySeqCharstring2 p_xy) :=
1476 { i:=p_i, jkl:=p_jkl, xy:=p_xy} with { erroneous(jkl) "value:=omit"}
1477
1478 template MySetIntSeqIntSeqInt2SeqCharstring2 t_msetisisi2r2_omitxy(template integer p_i,template MySeqIntSeqInt2 p_jkl, template MySeqCharstring2 p_xy) :=
1479 { i:=p_i, jkl:=p_jkl, xy:=p_xy} with { erroneous(xy) "value:=omit"}
1480
1481 template MySetIntSeqIntSeqInt2SeqCharstring2 t_msetisisi2r2_valuexy(template integer p_i,template MySeqIntSeqInt2 p_jkl, template MySeqCharstring2 p_xy) :=
1482 { i:=p_i, jkl:=p_jkl, xy:=p_xy} with { erroneous(xy) "value:=MySetCharstring2:{x:=\"Albert\",y:=\"Einstein\"}"}
1483
1484 template MySetIntSeqIntSeqInt2SeqCharstring2 t_msetisisi2r2_valuex_y(template integer p_i,template MySeqIntSeqInt2 p_jkl, template MySeqCharstring2 p_xy) :=
1485 { i:=p_i, jkl:=p_jkl, xy:=p_xy} with {
1486 erroneous(xy.x) "value:=charstring:\"Albert\"";
1487 erroneous(xy.y) "value:=charstring:\"Einstein\""
1488 }
1489
1490 template MySetIntSeqIntSeqInt2SeqCharstring2 t_msetisisi2r2_valuex_y_expr1(template integer p_i,template MySeqIntSeqInt2 p_jkl, template MySeqCharstring2 p_xy) :=
1491 { i:=p_i, jkl:=p_jkl, xy:=p_xy} with {
1492 erroneous(xy.x) "value:=charstring:\"Albert\"";
1493 erroneous(xy.y) "value:=charstring:\"Einstein\""
1494 }
1495
1496 template MySetIntSeqIntSeqInt2SeqCharstring2 t_msetisisi2r2_omitjkll(template integer p_i,template MySeqIntSeqInt2 p_jkl, template MySeqCharstring2 p_xy) :=
1497 { i:=p_i, jkl:=p_jkl, xy:=p_xy} with { erroneous(jkl.jk.j) "value:=omit"}
1498
1499 //Set of depth 3:
1500
1501 template MySet_SeqSeqIntSeqInt2SeqCharstring2_SeqSeqIntSeqInt2SeqCharstring2 t_msetssi2sr2ssi2sr2_omit(template MySeqSeqIntSeqInt2SeqCharstring2 p_s1,template MySeqSeqIntSeqInt2SeqCharstring2 p_s2)
1502 :={ s1:=p_s1,s2:=p_s2} with { erroneous(s1.jkl.jk.j) "value:=omit" }
1503
1504 //real (charstring)
1505 template MySetCharstring t_msetr(template charstring p_x) := { x:=p_x }
1506 template MySetCharstring2 t_msetr2(template charstring p_x, template charstring p_y):={x:=p_x, y:=p_y}
1507
1508 //charstring->VisibleString
1509 template MySetStr t_msetstr(template charstring p_s) := { s := p_s }
1510
1511 //bitstring:
1512 template MySetBitStr t_msetbitstr(template bitstring p_b) := { b := p_b };
1513 template MySetOctStr t_msetos(template octetstring p_o) := { o := p_o };
1514 template MySetIntCharstring t_msetir(template integer p_i, template charstring p_f ) := { i:=p_i, f:=p_f };
1515
1516 template MySetIntStr t_msetistr(template integer p_i, template charstring p_s ) := { i:=p_i, s:=p_s };
1517
1518 template MySetIntBitStr t_msetibitstr(template integer p_i, template bitstring p_b ) := { i:=p_i, b:=p_b };
1519
1520
1521 //================================================
1522 //======== Testcases==============================
1523 //================================================
1524
1525 //======== {integer}===================
1526 //omit
1527 testcase tc_MySetIntOmit() runs on MyComp {
1528 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
1529 log("i: ",i );
1530 f_compareAndVerdict(
1531 encode_mySetInt(valueof(t_mseti_omit(i))),
1532 encode_mySetEmpty(valueof(t_setEmpty)) );
1533 }
1534 }
1535
1536 testcase tc_MySetIntValueSameTypeE() runs on MyComp {
1537 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
1538 log("i: ",i );
1539 f_compareAndVerdict(
1540 encode_mySetInt(valueof(t_mseti_valueSameTypeE(i))),
1541 encode_mySetInt(valueof(t_mseti(5))) );
1542 }
1543 }
1544
1545 testcase tc_MySetIntValueSameTypeI() runs on MyComp {
1546 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
1547 log("i: ",i );
1548 f_compareAndVerdict(
1549 encode_mySetInt(valueof(t_mseti_valueSameTypeI(i))),
1550 encode_mySetInt(valueof(t_mseti(5))) );
1551 }
1552 }
1553
1554 //Basic ASN.1 types (eq ttcn types): boolean, integer, octetstring, bitstring, null, objid, ext. objid, enum, embedded pdv, charstring (real), UTFSTR, seq, seq of
1555 testcase tc_MySetIntValueDiffTypeExplicitBool() runs on MyComp {
1556 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
1557 log("i: ",i );
1558 f_compareAndVerdict(
1559 encode_mySetInt(valueof(t_mseti_valueDiffTypeExplicitBoolean(i))),
1560 encode_mySetBool(valueof(t_msetb(true))) );
1561 }
1562 }
1563 testcase tc_MySetIntValueDiffTypeImplicitBool() runs on MyComp {
1564 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
1565 log("i: ",i );
1566 f_compareAndVerdict(
1567 encode_mySetInt(valueof(t_mseti_valueDiffTypeImplicitBoolean(i))),
1568 encode_mySetBool(valueof(t_msetb(true))) );
1569 }
1570 }
1571
1572 // testcase tc_MySetIntValueDiffTypeExplicitNull() runs on MyComp {
1573 // for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
1574 // log("i: ",i );
1575 // f_compareAndVerdict(
1576 // encode_mySetInt(valueof(t_mseti_valueDiffTypeExplicitNull(i))),
1577 // encode_mySetNull(valueof(t_msetn)) );
1578 // }
1579 // }
1580 // testcase tc_MySetIntValueDiffTypeImplicitNull() runs on MyComp {
1581 // for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
1582 // log("i: ",i );
1583 // f_compareAndVerdict(
1584 // encode_mySetInt(valueof(t_mseti_valueDiffTypeImplicitNull(i))),
1585 // encode_mySetNull(valueof(t_msetn))) ;
1586 // }
1587 // }
1588
1589
1590 testcase tc_MySetIntValueDiffTypeExplicitOctStr() runs on MyComp {
1591 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
1592 log("i: ",i );
1593 var charstring vl_encoded:=encode_mySetInt(valueof(t_mseti_valueDiffTypeExplicitOctStr(i)));
1594 log(vl_encoded);
1595 var charstring vl_expected:=encode_mySetOctStr(valueof(t_msetos('42414241'O)));
1596 log(vl_expected);
1597 f_compareAndVerdict( vl_encoded,vl_expected);
1598 }
1599 }
1600 testcase tc_MySetIntValueDiffTypeImplicitOctStr() runs on MyComp {
1601 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
1602 log("i: ",i );
1603 f_compareAndVerdict(
1604 encode_mySetInt(valueof(t_mseti_valueDiffTypeImplicitOctStr(i))),
1605 encode_mySetOctStr(valueof(t_msetos('42414241'O)))) ;
1606 }
1607 }
1608
1609 const MySetInt c_mseti_valueDiffTypeExplicitOctStr := {i:= 1} with { erroneous (i) "value:= octetstring:'42414241'O" }
1610
1611 testcase tc_MySetIntValueDiffTypeExplicitOctStr_const() runs on MyComp {
1612 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
1613 log("i: ",i );
1614 var charstring vl_encoded:=encode_mySetInt( c_mseti_valueDiffTypeExplicitOctStr);
1615 log(vl_encoded);
1616 var charstring vl_expected:=encode_mySetOctStr(valueof(t_msetos('42414241'O)));
1617 log(vl_expected);
1618 f_compareAndVerdict( vl_encoded,vl_expected);
1619 }
1620 }
1621 testcase tc_MySetIntValueDiffTypeExplicitEnum() runs on MyComp {
1622 var MySetMyEnum vl_msme;
1623 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
1624 log("i: ",i );
1625 vl_msme.e:=second;
1626 f_compareAndVerdict(
1627 encode_mySetInt(valueof(t_mseti_valueDiffTypeExplicitEnum(i))),
1628 encode_mySetMyEnum(vl_msme) );
1629 }
1630 }
1631 testcase tc_MySetIntValueDiffTypeExplicitCharstring() runs on MyComp {
1632 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
1633 log("i: ",i );
1634 f_compareAndVerdict(
1635 encode_mySetInt(valueof(t_mseti_valueDiffTypeExplicitCharstring(i))),
1636 encode_mySetCharstring(valueof(t_msetr("Albert"))) );
1637 }
1638 }
1639
1640 testcase tc_MySetIntValueDiffTypeImplicitCharstring() runs on MyComp {
1641 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
1642 log("i: ",i );
1643 f_compareAndVerdict(
1644 encode_mySetInt(valueof(t_mseti_valueDiffTypeImplicitCharstring(i))),
1645 encode_mySetCharstring(valueof(t_msetr("Albert"))));
1646 }
1647 }
1648
1649 //RAW
1650 testcase tc_MySetIntValueDiffTypeRawOctStr() runs on MyComp {
1651 var charstring vl_expectedValue:= "<MySet>AA</MySet>";
1652 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
1653 log("i: ",i );
1654 f_compareAndVerdict( encode_mySetInt(valueof(t_mseti_valueDiffTypeRaw(i))), vl_expectedValue)
1655 }
1656 }
1657 // ============{integer, integer }==============
1658 //omit
1659 testcase tc_MySetInt2Omiti() runs on MyComp {
1660 var integer j:= 255;
1661 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
1662 log("i: ",i );
1663 f_compareAndVerdict(
1664 encode_mySetInt2(valueof(t_mseti2_omiti(i,j))), //encoded
1665 encode_mySetInt2opt(valueof(t_mseti2(omit,j))) ); //expected
1666 }
1667
1668 }
1669
1670 testcase tc_MySetInt2Omitj() runs on MyComp {
1671 var integer j:= 255;
1672 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
1673 log("i: ",i );
1674 f_compareAndVerdict(
1675 encode_mySetInt2(valueof(t_mseti2_omitj(i,j))),//encoded
1676 encode_mySetInt2opt(valueof(t_mseti2(i, omit))) ); //expected
1677 }
1678 }
1679
1680
1681 //before omit j
1682 testcase tc_MySetInt2BeforeOmitj() runs on MyComp {
1683 var integer j:= 255;
1684 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
1685 log("i: ",i );
1686 f_compareAndVerdict(
1687 encode_mySetInt2(valueof(t_mseti2_beforeomitj(i,j))),//encoded
1688 encode_mySetInt2opt(valueof(t_mseti2(omit,j))) ); //expected
1689 }
1690 }
1691
1692 //after omit i
1693 testcase tc_MySetInt2AfterOmiti() runs on MyComp {
1694 var integer j:= 255;
1695 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
1696 log("i: ",i );
1697 f_compareAndVerdict(
1698 encode_mySetInt2(valueof(t_mseti2_afteromiti(i,j))),//encoded
1699 encode_mySetInt2opt(valueof(t_mseti2(i, omit))));//expected
1700 }
1701
1702 }
1703
1704 testcase tc_MySetInt2ValueSameTypeE() runs on MyComp {
1705 var integer j:= 255;
1706 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
1707 log("i: ",i );
1708 f_compareAndVerdict(
1709 encode_mySetInt2(valueof(t_mseti2_valueSameTypeE(i,j))),//encoded
1710 encode_mySetInt2opt(valueof(t_mseti2(i,5))) ); //expected
1711 }
1712 }
1713
1714 testcase tc_MySetInt2ValueSameTypeI() runs on MyComp {
1715 var integer j:= 255;
1716 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
1717 log("i: ",i );
1718 f_compareAndVerdict(
1719 encode_mySetInt2(valueof(t_mseti2_valueSameTypeI(i,j))),//encoded
1720 encode_mySetInt2opt(valueof(t_mseti2(i,5)))); //expected
1721 }
1722 }
1723
1724 testcase tc_MySetInt2ValueDiffTypeExplicitCharstring() runs on MyComp {
1725 var integer j:= 255;
1726 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
1727 log("i: ",i );
1728 f_compareAndVerdict(
1729 encode_mySetInt2(valueof(t_mseti2_valueDiffTypeExplicitCharstring(i,j))),//encoded
1730 encode_mySetIntCharstring(valueof(t_msetir(i,"Albert")))); //expected
1731 }
1732 }
1733
1734 testcase tc_MySetInt2ValueDiffTypeImplicitCharstring() runs on MyComp {
1735 var integer j:= 255;
1736 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
1737 log("i: ",i );
1738 f_compareAndVerdict(
1739 encode_mySetInt2(valueof(t_mseti2_valueDiffTypeImplicitCharstring(i,j))),//encoded
1740 encode_mySetIntCharstring(valueof(t_msetir(i,"Albert")))); //expected
1741 }
1742 }
1743
1744 testcase tc_MySetInt2ValueSeqIntV() runs on MyComp {
1745 var integer i:= 10, j:= 15;
1746 //var MySetIntSeqInt2T vl_expectedT:={i:=10,jk:={1,2}};
1747 var charstring vl_encoded := encode_mySetInt2(valueof(t_mseti2_valueSeqIntV(i,j)))
1748 var charstring vl_expected:= encode_mySetIntSeqInt2T({i:=10,jk:={1,2}})
1749 f_compareAndVerdict(vl_encoded,vl_expected);
1750 }
1751
1752 testcase tc_MySetInt2ValueSeqIntOptV() runs on MyComp {
1753 var integer i:= 10, j:= 15;
1754 var charstring vl_encoded := encode_mySetInt2(valueof(t_mseti2_valueSeqIntOptV(i,j)))
1755 var charstring vl_expected:= encode_mySetIntSeqInt2T({i:=10,jk:={1,2}})
1756 f_compareAndVerdict(vl_encoded,vl_expected);
1757 }
1758
1759 testcase tc_MySetInt2ValueSeqIntC() runs on MyComp {
1760 var integer i:= 10, j:= 15;
1761 var charstring vl_encoded := encode_mySetInt2(valueof(t_mseti2_valueSeqIntC(i,j)))
1762 var charstring vl_expected:= encode_mySetIntSeqInt2T({i:=10,jk:={1,2}})
1763 f_compareAndVerdict(vl_encoded,vl_expected);
1764 }
1765
1766 testcase tc_MySetInt2ValueSeqInt2OptC() runs on MyComp {
1767 var integer i:= 10, j:= 15;
1768 var charstring vl_encoded := encode_mySetInt2(valueof(t_mseti2_valueSeqIntOptC(i,j)));
1769 var charstring vl_expected:= encode_mySetIntSeqInt2T({i:=10,jk:={1,2}});
1770 f_compareAndVerdict(vl_encoded,vl_expected);
1771 }
1772
1773 testcase tc_MySetInt2ValueSeqInt2OptOmitC() runs on MyComp {
1774 var integer i:= 10, j:= 15;
1775 var charstring vl_encoded := encode_mySetInt2(valueof(t_mseti2_valueSeqInt2OptOmitC(i,j)));
1776 var charstring vl_expected:= encode_mySetIntSeqInt2Toptopt({i:=10,jk:={1,omit}})
1777 f_compareAndVerdict(vl_encoded,vl_expected);
1778 }
1779 testcase tc_MySetInt2ValueSeqInt2iiC() runs on MyComp {
1780 var integer i:= 10, j:= 15;
1781 var charstring vl_encoded := encode_mySetInt2(valueof(t_mseti2_valueSeqInt2iiC(i,j)));
1782 var charstring vl_expected:= encode_mySetInt2({i:=1,j:=15})
1783 f_compareAndVerdict(vl_encoded,vl_expected);
1784 }
1785
1786 //not possible - two field with the same tag:
1787 testcase tc_MySetInt2ValueSeqInt2ijC() runs on MyComp {
1788 var integer i:= 10, j:= 15;
1789 var charstring vl_encoded := encode_mySetInt2(valueof(t_mseti2_valueSeqInt2ijC(i,j)));
1790 var charstring vl_expected:= encode_mySetInt2({i:=2,j:=15})
1791 f_compareAndVerdict(vl_encoded,vl_expected);
1792 }
1793 testcase tc_MySetInt2ValueSeqInt2jiC() runs on MyComp {
1794 var integer i:= 10, j:= 15;
1795 var charstring vl_encoded := encode_mySetInt2(valueof(t_mseti2_valueSeqInt2jiC(i,j)));
1796 var charstring vl_expected:= encode_mySetInt2({i:=10,j:=1})
1797 f_compareAndVerdict(vl_encoded,vl_expected);
1798 }
1799
1800 testcase tc_MySetInt2ValueSeqInt2jjC() runs on MyComp {
1801 var integer i:= 10, j:= 15;
1802 var charstring vl_encoded := encode_mySetInt2(valueof(t_mseti2_valueSeqInt2jjC(i,j)));
1803 var charstring vl_expected:= encode_mySetInt2({i:=10,j:=2})
1804 f_compareAndVerdict(vl_encoded,vl_expected);
1805 }
1806 //=== Set { integer, {integer, integer} )
1807 testcase tc_MySetIntSeqInt2ValueOmiti() runs on MyComp {
1808 var integer i:= 10, j:= 15, k:=16;
1809 var charstring vl_encoded :=encode_mySetIntSeqInt2(valueof(t_msetisi2_omiti(i,j,k)))
1810 var charstring vl_expected:=encode_mySetIntSeqInt2opt({i:=omit,jk:={15,16}})
1811 f_compareAndVerdict(vl_encoded,vl_expected);
1812 }
1813
1814 testcase tc_MySetIntSeqInt2ValueOmitjki() runs on MyComp {
1815 var integer i:= 10, j:= 15, k:=16;
1816 f_compareAndVerdict(
1817 encode_mySetIntSeqInt2(valueof(t_msetisi2_omitjki(i,j,k))),
1818 encode_mySetIntSeqInt2optopt({i:=10,jk:={16,omit}}) );
1819 }
1820
1821 testcase tc_MySetIntSeqInt2ValueOmitjkj() runs on MyComp {
1822 var integer i:= 10, j:= 15, k:=16;
1823
1824 log( "encoded value: ", encode_mySetIntSeqInt2(valueof(t_msetisi2_omitjkj(i,j,k))));
1825
1826 f_compareAndVerdict(
1827 encode_mySetIntSeqInt2(valueof(t_msetisi2_omitjkj(i,j,k))),
1828 encode_mySetIntSeqInt2optopt({i:=10,jk:={15,omit}}) );
1829 }
1830
1831 testcase tc_MySetIntSeqInt2ValueRawjki() runs on MyComp {
1832 var integer i:= 10, j:= 15, k:=16;
1833 f_compareAndVerdict( encode_mySetIntSeqInt2(valueof(t_msetisi2_rawjki(i,j,k))), "<MySet>10<MySeq>ABBA16</MySeq></MySet>" );
1834 }
1835
1836 testcase tc_MySetIntSeqInt2ValueRawjkj() runs on MyComp {
1837 var integer i:= 10, j:= 15, k:=16;
1838 f_compareAndVerdict( encode_mySetIntSeqInt2(valueof(t_msetisi2_rawjkj(i,j,k))), "<MySet>10<MySeq>15ABBA</MySeq></MySet>" )
1839 }
1840
1841 //After-before:
1842 testcase tc_MySetIntSeqInt2AfteriBeforej() runs on MyComp {
1843 var integer i:= 10, j:= 15, k:=16;
1844 f_compareAndVerdict( encode_mySetIntSeqInt2(valueof(t_msetisi2_afteribeforej(i,j,k))),"<MySet>1041424241<MySeq>424142411516</MySeq></MySet>")
1845 }
1846
1847 testcase tc_MySetIntSeqInt2AfteriRawBeforejRaw() runs on MyComp {
1848 var integer i:= 10, j:= 15, k:=16;
1849 f_compareAndVerdict( encode_mySetIntSeqInt2(valueof(t_msetisi2_afterirawbeforejraw(i,j,k))), "<MySet>10ABBA<MySeq>BABA1516</MySeq></MySet>")
1850 }
1851 //==== {integer, integer, integer, integer} ==============
1852 //omit
1853 testcase tc_MySetInt4Omiti() runs on MyComp {
1854 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
1855 log("i: ",i);
1856 f_compareAndVerdict(
1857 encode_mySetInt4(valueof(t_mseti4_omiti(i,2*i,3*i,4*i))),
1858 encode_mySetInt4opt(valueof(t_mseti4opt(omit,2*i,3*i,4*i))) )
1859 }
1860 }
1861
1862 testcase tc_MySetInt4Omitj() runs on MyComp {
1863 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
1864 log("i: ",i);
1865 f_compareAndVerdict( encode_mySetInt4(valueof(t_mseti4_omitj(i,2*i,3*i,4*i))),encode_mySetInt4opt(valueof(t_mseti4opt(i,omit,3*i,4*i))) );
1866 }
1867 }
1868
1869 testcase tc_MySetInt4Omitk() runs on MyComp {
1870 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
1871 log("i: ",i);
1872 f_compareAndVerdict( encode_mySetInt4(valueof(t_mseti4_omitk(i,2*i,3*i,4*i))),encode_mySetInt4opt(valueof(t_mseti4opt(i,2*i,omit,4*i))) )
1873 }
1874 }
1875
1876 testcase tc_MySetInt4Omitl() runs on MyComp {
1877 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
1878 log("i: ",i);
1879 f_compareAndVerdict( encode_mySetInt4(valueof(t_mseti4_omitl(i,2*i,3*i,4*i))), encode_mySetInt4opt(valueof(t_mseti4opt(i,2*i,3*i,omit))) )
1880 }
1881 }
1882
1883 testcase tc_MySetInt4ValueiOctetStr() runs on MyComp {
1884 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
1885 log("i: ",i);
1886 f_compareAndVerdict(
1887 encode_mySetInt4(valueof(t_mseti4_valueiOctetStr(i,2*i,3*i,4*i))),
1888 encode_mySetOJKL(valueof(t_msetojkl('FEDCBA98'O,2*i,3*i, 4*i))) )
1889 }
1890 }
1891
1892 testcase tc_MySetInt4ValuejOctetStr() runs on MyComp {
1893 for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
1894 log("i: ",i);
1895 f_compareAndVerdict(
1896 encode_mySetInt4(valueof(t_mseti4_valuejOctetStr(i,2*i,3*i,4*i))),
1897 encode_mySetIOKL(valueof(t_msetiokl(i,'FEDCBA98'O,3*i, 4*i))) )
1898 }
1899 }
1900
1901 testcase tc_MySetInt4ValueiRaw() runs on MyComp {
1902 var RoC vl_expectedValue:= {
1903 "<MySet>ABBA234</MySet>",
1904 "<MySet>ABBA203040</MySet>",
1905 "<MySet>ABBA200300400</MySet>",
1906 "<MySet>ABBA200030004000</MySet>",
1907 "<MySet>ABBA-20-30-40</MySet>"
1908 }
1909
1910 var RoI vl_roi := { 1, 10, 100, 1000,-10};
1911
1912 var integer i:=0;
1913 for(var integer index:=0; index<5;index:=index+1) {
1914 i:=vl_roi[index];
1915 log("i: ",i);
1916 f_compareAndVerdict( encode_mySetInt4(valueof(t_mseti4_valueiRaw(i,2*i,3*i,4*i))),vl_expectedValue[index] )
1917 }
1918 }
1919
1920 testcase tc_MySetInt4ValuejRaw() runs on MyComp {
1921 var charstring vl_expectedValue:="<MySet>1ABBA34</MySet>";
1922 var integer i:=1;
1923 f_compareAndVerdict( encode_mySetInt4(valueof(t_mseti4_valuejRaw(i,2*i,3*i,4*i))),vl_expectedValue ) ;
1924 }
1925
1926 testcase tc_MySetInt4ValuekRaw() runs on MyComp {
1927 var charstring vl_expectedValue:= "<MySet>12ABBA4</MySet>";
1928 var integer i:=1;
1929 f_compareAndVerdict( encode_mySetInt4(valueof(t_mseti4_valuekRaw(i,2*i,3*i,4*i))),vl_expectedValue )
1930 }
1931
1932 testcase tc_MySetInt4ValuelRaw() runs on MyComp {
1933 var charstring vl_expectedValue:= "<MySet>123ABBA</MySet>";
1934 var integer i:=1
1935 f_compareAndVerdict( encode_mySetInt4(valueof(t_mseti4_valuelRaw(i,2*i,3*i,4*i))),vl_expectedValue ) ;
1936 }
1937
1938 //To test if a mandatory structure omitted
1939 testcase tc_MySetISKL_ValueSomit() runs on MyComp {
1940 var MySeqInt4 vl_msi4:={5,6,7,8};
1941 f_compareAndVerdict(
1942 encode_mySetISKL(valueof(t_msetiskl_valueSomit(10,vl_msi4,30,40))),
1943 encode_mySetISKLopt(valueof(t_msetisklopt(10,omit,30,40))) );
1944 }
1945
1946 testcase tc_MySetISKL_ValueSIomit() runs on MyComp {
1947 var MySeqInt4 vl_msi4:={5,6,7,8};
1948 f_compareAndVerdict(
1949 encode_mySetISKL(valueof(t_msetiskl_valueSIomit(10,vl_msi4,30,40))),
1950 encode_mySetISKLopt(valueof(t_msetisklopt(10,{6,7,8,omit},30,40))));
1951
1952 }
1953
1954 testcase tc_MySetISKL_ValueSISJomit() runs on MyComp {
1955 var MySeqInt4 vl_msi4:={5,6,7,8};
1956 f_compareAndVerdict( encode_mySetISKL(valueof(t_msetiskl_valueSISJomit(10,vl_msi4,30,40))),
1957 encode_mySetIS2KLopt(valueof(t_msetis2klopt(10,{7,8},30,40))));
1958 }
1959
1960 testcase tc_MySetISKL_ValueSraw() runs on MyComp {
1961 var MySeqInt4 vl_msi4:={5,6,7,8};
1962 var charstring vl_expectedValue:= "<MySet>10ABBA3040</MySet>";
1963 f_compareAndVerdict( encode_mySetISKL(valueof(t_msetiskl_valueSraw(10,vl_msi4,30,40))),vl_expectedValue )
1964 }
1965
1966 testcase tc_MySetISOKL_ValueSomit() runs on MyComp {
1967 var MySeqInt4 vl_msi4:={5,6,7,8};
1968 f_compareAndVerdict(
1969 encode_mySetISOKL(valueof(t_msetisokl_valueSomit(10,vl_msi4,'42414241'O,30,40))),
1970 encode_mySetISOKLopt(valueof(t_msetisoklopt(10,omit,'42414241'O,30,40))) );
1971 }
1972
1973 testcase tc_MySetIOSKL_ValueSomit() runs on MyComp {
1974 var MySeqInt4 vl_msi4:={5,6,7,8};
1975 f_compareAndVerdict(
1976 encode_mySetIOSKL(valueof(t_msetioskl_valueSomit(10,'42414241'O,vl_msi4,30,40))),
1977 encode_mySetIOSKLopt(valueof(t_msetiosklopt(10,'42414241'O,omit,30,40))) );
1978 }
1979
1980 //===== sequence of sequence of sequence ====
1981 testcase tc_MySetIntSeqIntSeqInt2SeqCharstring2_omiti() runs on MyComp {
1982 var MySetSeqIntSeqInt2SeqCharstring2 vl_expected:= {jkl:={2,{3,4}},xy:={"Albert","Einstein"}};
1983 f_compareAndVerdict(
1984 encode_mySetIntSeqIntSeqInt2SeqCharstring2(valueof(t_msetisisi2r2_omiti(1, {2,{3,4}}, {"Albert","Einstein"} ))),
1985 encode_mySetSeqIntSeqInt2SeqCharstring2(vl_expected))
1986 }
1987 testcase tc_MySetIntSeqIntSeqInt2SeqCharstring2_omitjkl() runs on MyComp {
1988 var MySetIntSeqCharstring2 vl_expected:= {i:= 1, xy:={"Albert","Einstein"}};
1989 f_compareAndVerdict( encode_mySetIntSeqIntSeqInt2SeqCharstring2(
1990 valueof(t_msetisisi2r2_omitjkl(1, {2,{3,4}}, {"Albert","Einstein"} ))),
1991 encode_mySetIntSeqCharstring2(vl_expected));
1992 }
1993
1994 testcase tc_MySetIntSeqIntSeqInt2SeqCharstring2_omitxy() runs on MyComp {
1995 var MySetIntSeqIntSeqInt2 vl_expected:= { i:=1, jkl:={2,{3,4}} };
1996 f_compareAndVerdict(
1997 encode_mySetIntSeqIntSeqInt2SeqCharstring2(valueof(t_msetisisi2r2_omitxy(1, {2,{3,4}}, {"Albert","Einstein"} ))),
1998 encode_mySetIntSeqIntSeqInt2(vl_expected))
1999 }
2000
2001 //...with { erroneous(jkl.jk.j) "value:=omit"}
2002 testcase tc_MySetIntSeqIntSeqInt2SeqCharstring2_omitjkll() runs on MyComp {
2003 var MySetIntSeqIntSeqInt2optoptSeqCharstring2 vl_expected:= {i:=1,jkl:={2,{3,omit}},xy:= {"Albert","Einstein"}};
2004 f_compareAndVerdict( encode_mySetIntSeqIntSeqInt2SeqCharstring2(
2005 valueof(t_msetisisi2r2_omitjkll(1, {2,{3,4}}, {"Albert","Einstein"} ))),
2006 encode_mySetIntSeqIntSeqInt2optoptSeqCharstring2(vl_expected))
2007 }
2008
2009 testcase tc_MySetIntSeqIntSeqInt2SeqCharstring2_valuexy() runs on MyComp {
2010 var MySetIntSeqIntSeqInt2SeqCharstring2 vl_expected:= {i:=1,jkl:={2,{3,4}}, xy:={"Albert","Einstein"}};
2011 f_compareAndVerdict(
2012 encode_mySetIntSeqIntSeqInt2SeqCharstring2(valueof(t_msetisisi2r2_valuexy(1, {2,{3,4}}, {"Albert","Einstein"} ))),
2013 encode_mySetIntSeqIntSeqInt2SeqCharstring2(vl_expected))
2014 }
2015
2016 testcase tc_MySetIntSeqIntSeqInt2SeqCharstring2_valuex_y() runs on MyComp {
2017
2018 var MySetIntSeqIntSeqInt2SeqCharstring2 vl_expected:= {i:=1,jkl:={2,{3,4}},xy:= {"Albert","Einstein"}};
2019 f_compareAndVerdict( encode_mySetIntSeqIntSeqInt2SeqCharstring2(
2020 valueof(t_msetisisi2r2_valuex_y(1, {2,{3,4}}, {"Albert","Einstein"} ))),
2021 encode_mySetIntSeqIntSeqInt2SeqCharstring2(vl_expected));
2022 }
2023
2024 testcase tc_MySet_SeqSeqIntSeqInt2SeqCharstring2_SeqSeqIntSeqInt2SeqCharstring2_omit() runs on MyComp {
2025 var MySeqSeqIntSeqInt2SeqCharstring2 vl_s1:={jkl:={1,{2,3}},xy:={"Three","Four"} }, vl_s2:= {jkl:={5,{6,7}},xy:={"Seven", "Eight"}};
2026 var MySet_SeqSeqIntSeqInt2optoptSeqCharstring2_SeqSeqIntSeqInt2optoptSeqCharstring2 vl_expected :=
2027 { s1:={ omit,{1,{2, omit}}, {"Three","Four"} },s2:= { omit,{5,{6,7}}, {"Seven", "Eight"}} };
2028 f_compareAndVerdict(
2029 encode_mySet_SeqSeqIntSeqInt2SeqCharstring2_SeqSeqIntSeqInt2SeqCharstring2(valueof(t_msetssi2sr2ssi2sr2_omit(vl_s1, vl_s2))),
2030 encode_mySet_SeqSeqIntSeqInt2optoptSeqCharstring2_SeqSeqIntSeqInt2optoptSeqCharstring2(vl_expected));
2031 }
2032
2033}//group Set
2034
2035
2036//****************************** SET OF ****************************************************
2037
2038
2039group SetOf { //====set of related templates====
2040
2041 template MySetOfBool t_msetofb(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 };
2042 template MySetOfInt t_msetofi(template integer p_i1, template integer p_i2, template integer p_i3):={p_i1,p_i2,p_i3};
2043 template MySetOfMyEnum t_msetofme(template MyEnum p_e1, template MyEnum p_e2,template MyEnum p_e3) := {p_e1,p_e2,p_e3};
2044 template MySetOfCharstring 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}
2045 template MySetOfBitStr t_msetofbs(template bitstring p_bs1, template bitstring p_bs2, template bitstring p_bs3):={p_bs1, p_bs2, p_bs3}
2046 template MySetOfOctStr t_msetofos(template octetstring p_os1, template octetstring p_os2, template octetstring p_os3):={p_os1, p_os2, p_os3}
2047
2048 template MySetOfBool t_msetofbValueSameType(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
2049 with { erroneous ([0]) "value:= boolean:true"; erroneous ([2]) "value:= boolean:true" };
2050
2051 template MySetOfBool t_msetofbValueDiffType(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
2052 with { erroneous ([0]) "value:= \"Pi\""; erroneous ([2]) "value:= 2011" };
2053
2054 template MySetOfBool t_msetofbValueDiffTypeRaw(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
2055 with { erroneous ([0]) "value(raw):='02010A'O"; erroneous ([2]) "value:= 2011" };
2056
2057 template MySetOfBool t_msetofbValueOmit(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
2058 with { erroneous ([0]) "value:=omit"; erroneous ([1]) "value:= omit" };
2059
2060 template MySetOfBool t_msetofbAfterOmit(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
2061 with { erroneous ([0]) "after:=omit all" };
2062
2063 template MySetOfBool t_msetofbValueAfterOmit(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
2064 with { erroneous ([0]) "after:=omit all"; erroneous ([0]) "value:=true" };
2065
2066 template MySetOfBool t_msetofbBeforeOmit2(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
2067 with { erroneous ([2]) "before:=omit all" };
2068
2069 template MySetOfBool t_msetofbValueBeforeOmit2(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
2070 with { erroneous ([2]) "before:=omit all"; erroneous ([2]) "value:=true" };
2071
2072 template MySetOfBool t_msetofbBeforeOmit1(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
2073 with { erroneous ([1]) "before:=omit all" };
2074
2075 template MySetOfBool t_msetofbValueBeforeOmit1(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
2076 with { erroneous ([1]) "before:=omit all"; erroneous ([1]) "value:=true" };
2077
2078 //INTEGER
2079 template MySetOfInt t_msetofiValueDiffType(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
2080 with { erroneous ([0]) "value:= \"Pi\""; erroneous ([2]) "value:= true" };
2081 template MySetOfInt t_msetofiValueDiffTypeRaw(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
2082 with { erroneous ([0]) "value(raw):= '0101FF'O"; erroneous ([2]) "value:= true" };
2083 template MySetOfInt t_msetofiBeforeOmit2(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
2084 with { erroneous ([2]) "before:= omit all" };
2085 template MySetOfInt t_msetofiIntValueBeforeOmit2(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
2086 with { erroneous ([2]) "before:= omit all"; erroneous ([2]) "value:= 2011"};
2087 template MySetOfInt t_msetofiCharStrValueBeforeOmit2(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
2088 with { erroneous ([2]) "before:= omit all"; erroneous ([2]) "value:= \"bubu\""};
2089 template MySetOfInt t_msetofiBeforeOmit1(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
2090 with { erroneous ([1]) "before:= omit all" };
2091 template MySetOfInt t_msetofiIntValueBeforeOmit1(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
2092 with { erroneous ([1]) "before:= omit all"; erroneous ([1]) "value:= 2011"};
2093 template MySetOfInt t_msetofiCharStrValueBeforeOmit1(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
2094 with { erroneous ([1]) "before:= omit all"; erroneous ([1]) "value:= \"bubu\""};
2095 template MySetOfInt t_msetofiCharStrValueBeforeOmit1_2(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
2096 with { erroneous ([1]) "before:= omit all"; erroneous ([2]) "value:= \"bubu\""};
2097
2098 template MySetOfInt t_msetofiAfterOmit1(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
2099 with { erroneous ([1]) "after:= omit all" };
2100 template MySetOfInt t_msetofiIntValueAfterOmit1(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
2101 with { erroneous ([1]) "after:= omit all"; erroneous ([1]) "value:= 2011"};
2102 template MySetOfInt t_msetofiCharStrValueAfterOmit1(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
2103 with { erroneous ([1]) "after:= omit all"; erroneous ([1]) "value:= \"bubu\""};
2104 template MySetOfInt t_msetofiCharStrValueAfterOmit1_2(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
2105 with { erroneous ([1]) "after:= omit all"; erroneous ([0]) "value:= \"bubu\""};
2106 //MyEnum
2107 template MySetOfMyEnum t_msetofeValueDiffType(MyEnum p_i, MyEnum p_j, MyEnum p_k) := { p_i, p_j, p_k }
2108 with { erroneous ([0]) "value:= \"Pi\""; erroneous ([2]) "value:= true" };
2109 template MySetOfMyEnum t_msetofeValueDiffTypeRaw(MyEnum p_i, MyEnum p_j, MyEnum p_k) := { p_i, p_j, p_k }
2110 with { erroneous ([0]) "value(raw):= '0101FF'O"; erroneous ([2]) "value:= true" };
2111 template MySetOfMyEnum t_msetofeBeforeOmit2(MyEnum p_i, MyEnum p_j, MyEnum p_k) := { p_i, p_j, p_k }
2112 with { erroneous ([2]) "before:= omit all" };
2113 template MySetOfMyEnum t_msetofeIntValueBeforeOmit2(MyEnum p_i, MyEnum p_j, MyEnum p_k) := { p_i, p_j, p_k }
2114 with { erroneous ([2]) "before:= omit all"; erroneous ([2]) "value:= 2011"};
2115 template MySetOfMyEnum t_msetofeCharStrValueBeforeOmit2(MyEnum p_i, MyEnum p_j, MyEnum p_k) := { p_i, p_j, p_k }
2116 with { erroneous ([2]) "before:= omit all"; erroneous ([2]) "value:= \"bubu\""};
2117 template MySetOfMyEnum t_msetofeBeforeOmit1(MyEnum p_i, MyEnum p_j, MyEnum p_k) := { p_i, p_j, p_k }
2118 with { erroneous ([1]) "before:= omit all" };
2119 template MySetOfMyEnum t_msetofeIntValueBeforeOmit1(MyEnum p_i, MyEnum p_j, MyEnum p_k) := { p_i, p_j, p_k }
2120 with { erroneous ([1]) "before:= omit all"; erroneous ([1]) "value:= 2011"};
2121 template MySetOfMyEnum t_msetofeCharStrValueBeforeOmit1(MyEnum p_i, MyEnum p_j, MyEnum p_k) := { p_i, p_j, p_k }
2122 with { erroneous ([1]) "before:= omit all"; erroneous ([1]) "value:= \"bubu\""};
2123 template MySetOfMyEnum t_msetofeCharStrValueBeforeOmit1_2(MyEnum p_i, MyEnum p_j, MyEnum p_k) := { p_i, p_j, p_k }
2124 with { erroneous ([1]) "before:= omit all"; erroneous ([2]) "value:= \"bubu\""};
2125
2126 template MySetOfMyEnum t_msetofeAfterOmit1(MyEnum p_i, MyEnum p_j, MyEnum p_k) := { p_i, p_j, p_k }
2127 with { erroneous ([1]) "after:= omit all" };
2128 template MySetOfMyEnum t_msetofeIntValueAfterOmit1(MyEnum p_i, MyEnum p_j, MyEnum p_k) := { p_i, p_j, p_k }
2129 with { erroneous ([1]) "after:= omit all"; erroneous ([1]) "value:= 2011"};
2130 template MySetOfMyEnum t_msetofeCharStrValueAfterOmit1(MyEnum p_i, MyEnum p_j, MyEnum p_k) := { p_i, p_j, p_k }
2131 with { erroneous ([1]) "after:= omit all"; erroneous ([1]) "value:= \"bubu\""};
2132 template MySetOfMyEnum t_msetofeCharStrValueAfterOmit1_2(MyEnum p_i, MyEnum p_j, MyEnum p_k) := { p_i, p_j, p_k }
2133 with { erroneous ([1]) "after:= omit all"; erroneous ([0]) "value:= \"bubu\""};
2134 //Charstring (charstring):
2135 template MySetOfCharstring t_msetofrValueDiffType(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
2136 with { erroneous ([0]) "value:= \"Pi\""; erroneous ([2]) "value:= true" };
2137 template MySetOfCharstring t_msetofrValueDiffTypeRaw(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
2138 with { erroneous ([0]) "value(raw):= '0101FF'O"; erroneous ([2]) "value:= true" };
2139 template MySetOfCharstring t_msetofrBeforeOmit2(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
2140 with { erroneous ([2]) "before:= omit all" };
2141 template MySetOfCharstring t_msetofrIntValueBeforeOmit2(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
2142 with { erroneous ([2]) "before:= omit all"; erroneous ([2]) "value:= 2011"};
2143 template MySetOfCharstring t_msetofrCharStrValueBeforeOmit2(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
2144 with { erroneous ([2]) "before:= omit all"; erroneous ([2]) "value:= \"bubu\""};
2145 template MySetOfCharstring t_msetofrBeforeOmit1(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
2146 with { erroneous ([1]) "before:= omit all" };
2147 template MySetOfCharstring t_msetofrIntValueBeforeOmit1(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
2148 with { erroneous ([1]) "before:= omit all"; erroneous ([1]) "value:= 2011"};
2149 template MySetOfCharstring t_msetofrCharStrValueBeforeOmit1(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
2150 with { erroneous ([1]) "before:= omit all"; erroneous ([1]) "value:= \"bubu\""};
2151 template MySetOfCharstring t_msetofrCharStrValueBeforeOmit1_2(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
2152 with { erroneous ([1]) "before:= omit all"; erroneous ([2]) "value:= \"bubu\""};
2153
2154 template MySetOfCharstring t_msetofrAfterOmit1(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
2155 with { erroneous ([1]) "after:= omit all" };
2156 template MySetOfCharstring t_msetofrIntValueAfterOmit1(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
2157 with { erroneous ([1]) "after:= omit all"; erroneous ([1]) "value:= 2011"};
2158 template MySetOfCharstring t_msetofrCharStrValueAfterOmit1(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
2159 with { erroneous ([1]) "after:= omit all"; erroneous ([1]) "value:= \"bubu\""};
2160 template MySetOfCharstring t_msetofrCharStrValueAfterOmit1_2(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
2161 with { erroneous ([1]) "after:= omit all"; erroneous ([0]) "value:= \"bubu\""};
2162 //more complex:
2163 template MySetOfSeqSeqIntSeqInt2SeqCharstring2 t_msetofssisi2sr2_omitj(template MySeqSeqIntSeqInt2SeqCharstring2 p_s1,template MySeqSeqIntSeqInt2SeqCharstring2 p_s2) :={ p_s1, p_s2}
2164 with { erroneous([0].jkl.jk.j) "value:=omit" }
2165
2166 template MySetOfSeqSeqIntSeqInt2SeqCharstring2 t_msetofssisi2sr2_beforeomitj(template MySeqSeqIntSeqInt2SeqCharstring2 p_s1,template MySeqSeqIntSeqInt2SeqCharstring2 p_s2) :={ p_s1, p_s2}
2167 with { erroneous([0].jkl.jk.j) "before:=omit all" erroneous([1].jkl.jk.i) "after:=omit all"}
2168
2169 template MySetOfSeqSeqIntSeqInt2SeqCharstring2 t_msetofssisi2sr2_beforeafteromit(
2170 template MySeqSeqIntSeqInt2SeqCharstring2 p_s1,template MySeqSeqIntSeqInt2SeqCharstring2 p_s2) :={ p_s1, p_s2}
2171 with { erroneous([0].jkl.jk.j) "before:=omit all" erroneous([1].jkl.jk.i) "after:=omit all"}
2172
2173 template MySetOfSeqSeqIntSeqInt2SeqCharstring2 t_msetofssisi2sr2_arglist_omit(
2174 template MySeqSeqIntSeqInt2SeqCharstring2 p_s1,template MySeqSeqIntSeqInt2SeqCharstring2 p_s2) :={ p_s1, p_s2}
2175 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"}
2176
2177 template MySetOfSeqSeqIntSeqInt2SeqCharstring2 t_msetofssisi2sr2_arglist_afteromit(
2178 template MySeqSeqIntSeqInt2SeqCharstring2 p_s1,template MySeqSeqIntSeqInt2SeqCharstring2 p_s2) :={ p_s1, p_s2}
2179 with { erroneous([0].jkl.jk.i, [0].xy.x) "after:=omit all" erroneous([1].jkl.jk.i, [1].xy.x) "after:=omit all"}
2180
2181 template MySetOfSeqSeqIntSeqInt2SeqCharstring2 t_msetofssisi2sr2_arglist_beforeomit(
2182 template MySeqSeqIntSeqInt2SeqCharstring2 p_s1,template MySeqSeqIntSeqInt2SeqCharstring2 p_s2) :={ p_s1, p_s2}
2183 with { erroneous([0].jkl.jk.j, [0].xy.y) "before:=omit all" erroneous([1].jkl.jk.i, [1].xy.x) "after:=omit all"}
2184 //============ Testcases====================
2185 //Testcase of same type
2186 testcase tc_MySetOfBoolValueSameType1() runs on MyComp {
2187 f_compareAndVerdict(
2188 encode_mySetOfBool(valueof(t_msetofbValueSameType(false, false,false))),
2189 encode_mySetOfBool(valueof(t_msetofb(true, false, true))));
2190 }
2191
2192 testcase tc_MySetOfBoolValueSameType2() runs on MyComp {
2193 f_compareAndVerdict(
2194 encode_mySetOfBool(valueof(t_msetofbValueSameType(true, true,true))),
2195 encode_mySetOfBool(valueof(t_msetofb(true, true, true))));
2196 }
2197
2198 testcase tc_MySetOfBoolValueDiffType() runs on MyComp {
2199 var MySetOfMyUnionBT vl_expected :={ {r:="Pi"}, {b:=true}, {i:=2011}};
2200 f_compareAndVerdict(
2201 encode_mySetOfBool(valueof(t_msetofbValueDiffType(true, true,true))),
2202 encode_mySetOfMyUnionBT( vl_expected ));
2203 }
2204
2205 testcase tc_MySetOfBoolValueRaw() runs on MyComp {
2206 f_compareAndVerdict(
2207 encode_mySetOfBool(valueof(t_msetofbValueDiffTypeRaw(true, true,true))),
2208 "<MySetOf>" & char(0, 0, 0, 2) & char(0, 0, 0, 1) & "\ntrue2011</MySetOf>"); //'02010A'O
2209 }
2210
2211 testcase tc_MySetOfBoolValueOmit() runs on MyComp {
2212 var MySetOfMyUnionBT vl_expected :={ {b:=true} };
2213 f_compareAndVerdict(
2214 encode_mySetOfBool(valueof(t_msetofbValueOmit(false, false,true))),
2215 encode_mySetOfMyUnionBT( vl_expected ));
2216 }
2217
2218 testcase tc_MySetOfBoolAfterOmit() runs on MyComp {
2219 var MySetOfMyUnionBT vl_expected :={ {b:=false} };
2220 f_compareAndVerdict(
2221 encode_mySetOfBool(valueof(t_msetofbAfterOmit(false, true,true))),
2222 encode_mySetOfMyUnionBT( vl_expected ));
2223 }
2224
2225 testcase tc_MySetOfBoolValueAfterOmit() runs on MyComp {
2226 var MySetOfMyUnionBT vl_expected :={ {b:=true} };
2227 f_compareAndVerdict(
2228 encode_mySetOfBool(valueof(t_msetofbValueAfterOmit(false, false,false))),
2229 encode_mySetOfMyUnionBT( vl_expected ));
2230 }
2231
2232 testcase tc_MySetOfBoolBeforeOmit2() runs on MyComp {
2233 var MySetOfMyUnionBT vl_expected :={ {b:=true} };
2234 f_compareAndVerdict(
2235 encode_mySetOfBool(valueof(t_msetofbBeforeOmit2(false, false,true))),
2236 encode_mySetOfMyUnionBT( vl_expected ));
2237 }
2238
2239 testcase tc_MySetOfBoolValueBeforeOmit2() runs on MyComp {
2240 var MySetOfMyUnionBT vl_expected :={ {b:=true} };
2241 f_compareAndVerdict(
2242 encode_mySetOfBool(valueof(t_msetofbValueBeforeOmit2(false, false,false))),
2243 encode_mySetOfMyUnionBT( vl_expected ));
2244 }
2245
2246 testcase tc_MySetOfBoolBeforeOmit1() runs on MyComp {
2247 var MySetOfMyUnionBT vl_expected :={ {b:=false},{b:=true} };
2248 f_compareAndVerdict(
2249 encode_mySetOfBool(valueof(t_msetofbBeforeOmit1(true, false,true))),
2250 encode_mySetOfMyUnionBT( vl_expected ));
2251 }
2252
2253 testcase tc_MySetOfBoolValueBeforeOmit1() runs on MyComp {
2254 var MySetOfMyUnionBT vl_expected :={ {b:=true},{b:=false} };
2255 f_compareAndVerdict(
2256 encode_mySetOfBool(valueof(t_msetofbValueBeforeOmit1(false, false,false))),
2257 encode_mySetOfMyUnionBT( vl_expected ));
2258 }
2259
2260 //INTEGER
2261 testcase tc_MySetOfIntValueDiffType() runs on MyComp {
2262 var MySetOfMyUnionBT vl_expected :={ {r:="Pi"}, {i:=2}, {b:=true}};
2263 f_compareAndVerdict(
2264 encode_mySetOfInt(valueof(t_msetofiValueDiffType(1,2,3))),
2265 encode_mySetOfMyUnionBT( vl_expected ));
2266 }
2267 testcase tc_MySetOfIntValueDiffTypeRaw() runs on MyComp {
2268 //var MySetOfMyUnionBT vl_expected :={ {r:=oct2char('0101FF'O)}, {i:=2}, {b:=true}};
2269 f_compareAndVerdict(
2270 encode_mySetOfInt(valueof(t_msetofiValueDiffTypeRaw(1,2,3))),
2271 "<MySetOf>" & char(0, 0, 0, 1) & char(0, 0, 0, 1) & char(0, 0, 0, 255) & "2true</MySetOf>");
2272 //encode_mySetOfMyUnionBT( vl_expected )
2273 }
2274 testcase tc_MySetOfIntBeforeOmit2() runs on MyComp {
2275 var MySetOfMyUnionBT vl_expected :={ {i:=3} };
2276 f_compareAndVerdict(
2277 encode_mySetOfInt(valueof(t_msetofiBeforeOmit2(1,2,3))),
2278 encode_mySetOfMyUnionBT( vl_expected ));
2279 }
2280 testcase tc_MySetOfIntIntValueBeforeOmit2() runs on MyComp {
2281 var MySetOfMyUnionBT vl_expected :={ {i:=2011}};
2282 f_compareAndVerdict(
2283 encode_mySetOfInt(valueof(t_msetofiIntValueBeforeOmit2(1,2,3))),
2284 encode_mySetOfMyUnionBT( vl_expected ));
2285 }
2286 testcase tc_MySetOfIntCharStrValueBeforeOmit2() runs on MyComp {
2287 var MySetOfMyUnionBT vl_expected :={ {r:="bubu"}};
2288 f_compareAndVerdict(
2289 encode_mySetOfInt(valueof(t_msetofiCharStrValueBeforeOmit2(1,2,3))),
2290 encode_mySetOfMyUnionBT( vl_expected ));
2291 }
2292 testcase tc_MySetOfIntBeforeOmit1() runs on MyComp {
2293 var MySetOfMyUnionBT vl_expected :={ {i:=2},{i:=3} };
2294 f_compareAndVerdict(
2295 encode_mySetOfInt(valueof(t_msetofiBeforeOmit1(1,2,3))),
2296 encode_mySetOfMyUnionBT( vl_expected ));
2297 }
2298 testcase tc_MySetOfIntIntValueBeforeOmit1() runs on MyComp {
2299 var MySetOfMyUnionBT vl_expected :={ {i:=2011}, {i:=3}};
2300 f_compareAndVerdict(
2301 encode_mySetOfInt(valueof(t_msetofiIntValueBeforeOmit1(1,2,3))),
2302 encode_mySetOfMyUnionBT( vl_expected ));
2303 }
2304 testcase tc_MySetOfIntCharStrValueBeforeOmit1() runs on MyComp {
2305 var MySetOfMyUnionBT vl_expected :={ {r:="bubu"},{i:=3}};
2306 f_compareAndVerdict(
2307 encode_mySetOfInt(valueof(t_msetofiCharStrValueBeforeOmit1(1,2,3))),
2308 encode_mySetOfMyUnionBT( vl_expected ));
2309 }
2310 testcase tc_MySetOfIntCharStrValueBeforeOmit1_2() runs on MyComp {
2311 var MySetOfMyUnionBT vl_expected :={ {i:=2},{r:="bubu"}};
2312 f_compareAndVerdict(
2313 encode_mySetOfInt(valueof(t_msetofiCharStrValueBeforeOmit1_2(1,2,3))),
2314 encode_mySetOfMyUnionBT( vl_expected ));
2315 }
2316
2317 testcase tc_MySetOfIntAfterOmit1() runs on MyComp {
2318 var MySetOfMyUnionBT vl_expected :={ {i:=1}, {i:=2} } ;
2319 f_compareAndVerdict(
2320 encode_mySetOfInt(valueof(t_msetofiAfterOmit1(1,2,3))),
2321 encode_mySetOfMyUnionBT( vl_expected ));
2322 }
2323 testcase tc_MySetOfIntIntValueAfterOmit1() runs on MyComp {
2324 var MySetOfMyUnionBT vl_expected :={ {i:=1},{i:=2011}};
2325 f_compareAndVerdict(
2326 encode_mySetOfInt(valueof(t_msetofiIntValueAfterOmit1(1,2,3))),
2327 encode_mySetOfMyUnionBT( vl_expected ));
2328 }
2329 testcase tc_MySetOfIntCharStrValueAfterOmit1() runs on MyComp {
2330 var MySetOfMyUnionBT vl_expected :={ {i:=1},{r:="bubu"}};
2331 f_compareAndVerdict(
2332 encode_mySetOfInt(valueof(t_msetofiCharStrValueAfterOmit1(1,2,3))),
2333 encode_mySetOfMyUnionBT( vl_expected ));
2334 }
2335 testcase tc_MySetOfIntCharStrValueAfterOmit1_2() runs on MyComp {
2336 var MySetOfMyUnionBT vl_expected :={ {r:="bubu"},{i:=2}};
2337 f_compareAndVerdict(
2338 encode_mySetOfInt(valueof(t_msetofiCharStrValueAfterOmit1_2(1,2,3))),
2339 encode_mySetOfMyUnionBT( vl_expected ));
2340 }
2341 //MyEnum
2342 testcase tc_MySetOfMyEnumValueDiffType() runs on MyComp {
2343 var MySetOfMyUnionBT vl_expected :={ {r:="Pi"}, {e:=second}, {b:=true}};
2344 f_compareAndVerdict(
2345 encode_mySetOfMyEnum(valueof(t_msetofeValueDiffType(first, second, third))),
2346 encode_mySetOfMyUnionBT( vl_expected ));
2347 }
2348 testcase tc_MySetOfMyEnumValueDiffTypeRaw() runs on MyComp {
2349 //var MySetOfMyUnionBT vl_expected :={ {os:='0101FF'O}, {e:=second}, {b:=true}};
2350 f_compareAndVerdict(
2351 encode_mySetOfMyEnum(valueof(t_msetofeValueDiffTypeRaw(first, second, third))),
2352 "<MySetOf>" & char(0, 0, 0, 1) & char(0, 0, 0, 1) & char(0, 0, 0, 255) & "<MyEnum>second</MyEnum>true</MySetOf>");
2353 }
2354 testcase tc_MySetOfMyEnumBeforeOmit2() runs on MyComp {
2355 var MySetOfMyUnionBT vl_expected :={ {e:=third} };
2356 f_compareAndVerdict(
2357 encode_mySetOfMyEnum(valueof(t_msetofeBeforeOmit2(first, second, third))),
2358 encode_mySetOfMyUnionBT( vl_expected ));
2359 }
2360 testcase tc_MySetOfMyEnumIntValueBeforeOmit2() runs on MyComp {
2361 var MySetOfMyUnionBT vl_expected :={ {i:=2011}};
2362 f_compareAndVerdict(
2363 encode_mySetOfMyEnum(valueof(t_msetofeIntValueBeforeOmit2(first, second, third))),
2364 encode_mySetOfMyUnionBT( vl_expected ));
2365 }
2366 testcase tc_MySetOfMyEnumCharStrValueBeforeOmit2() runs on MyComp {
2367 var MySetOfMyUnionBT vl_expected :={ {r:="bubu"}};
2368 f_compareAndVerdict(
2369 encode_mySetOfMyEnum(valueof(t_msetofeCharStrValueBeforeOmit2(first, second, third))),
2370 encode_mySetOfMyUnionBT( vl_expected ));
2371 }
2372 testcase tc_MySetOfMyEnumBeforeOmit1() runs on MyComp {
2373 var MySetOfMyUnionBT vl_expected :={ {e:=second},{e:=third} };
2374 f_compareAndVerdict(
2375 encode_mySetOfMyEnum(valueof(t_msetofeBeforeOmit1(first, second, third))),
2376 encode_mySetOfMyUnionBT( vl_expected ));
2377 }
2378 testcase tc_MySetOfMyEnumIntValueBeforeOmit1() runs on MyComp {
2379 var MySetOfMyUnionBT vl_expected :={ {i:=2011}, {e:=third}};
2380 f_compareAndVerdict(
2381 encode_mySetOfMyEnum(valueof(t_msetofeIntValueBeforeOmit1(first, second, third))),
2382 encode_mySetOfMyUnionBT( vl_expected ));
2383 }
2384 testcase tc_MySetOfMyEnumCharStrValueBeforeOmit1() runs on MyComp {
2385 var MySetOfMyUnionBT vl_expected :={ {r:="bubu"},{e:=third}};
2386 f_compareAndVerdict(
2387 encode_mySetOfMyEnum(valueof(t_msetofeCharStrValueBeforeOmit1(first, second, third))),
2388 encode_mySetOfMyUnionBT( vl_expected ));
2389 }
2390 testcase tc_MySetOfMyEnumCharStrValueBeforeOmit1_2() runs on MyComp {
2391 var MySetOfMyUnionBT vl_expected :={ {e:=second},{r:="bubu"}};
2392 f_compareAndVerdict(
2393 encode_mySetOfMyEnum(valueof(t_msetofeCharStrValueBeforeOmit1_2(first, second, third))),
2394 encode_mySetOfMyUnionBT( vl_expected ));
2395 }
2396
2397 testcase tc_MySetOfMyEnumAfterOmit1() runs on MyComp {
2398 var MySetOfMyUnionBT vl_expected :={ {e:=first}, {e:=second} } ;
2399 f_compareAndVerdict(
2400 encode_mySetOfMyEnum(valueof(t_msetofeAfterOmit1(first, second, third))),
2401 encode_mySetOfMyUnionBT( vl_expected ));
2402 }
2403 testcase tc_MySetOfMyEnumIntValueAfterOmit1() runs on MyComp {
2404 var MySetOfMyUnionBT vl_expected :={ {e:=first},{i:=2011}};
2405 f_compareAndVerdict(
2406 encode_mySetOfMyEnum(valueof(t_msetofeIntValueAfterOmit1(first, second, third))),
2407 encode_mySetOfMyUnionBT( vl_expected ));
2408 }
2409 testcase tc_MySetOfMyEnumCharStrValueAfterOmit1() runs on MyComp {
2410 var MySetOfMyUnionBT vl_expected :={ {e:=first},{r:="bubu"}};
2411 f_compareAndVerdict(
2412 encode_mySetOfMyEnum(valueof(t_msetofeCharStrValueAfterOmit1(first, second, third))),
2413 encode_mySetOfMyUnionBT( vl_expected ));
2414 }
2415 testcase tc_MySetOfMyEnumCharStrValueAfterOmit1_2() runs on MyComp {
2416 var MySetOfMyUnionBT vl_expected :={ {r:="bubu"},{e:=second}};
2417 f_compareAndVerdict(
2418 encode_mySetOfMyEnum(valueof(t_msetofeCharStrValueAfterOmit1_2(first, second, third))),
2419 encode_mySetOfMyUnionBT( vl_expected ));
2420 }
2421
2422 //Charstring (Charstring)
2423 testcase tc_MySetOfCharstringValueDiffType() runs on MyComp {
2424 var MySetOfMyUnionBT vl_expected :={ {r:="Pi"}, {r:="Two"}, {b:=true}};
2425 f_compareAndVerdict(
2426 encode_mySetOfCharstring(valueof(t_msetofrValueDiffType("One", "Two", "Three"))),
2427 encode_mySetOfMyUnionBT( vl_expected ));
2428 }
2429 testcase tc_MySetOfCharstringValueDiffTypeRaw() runs on MyComp {
2430 //var MySetOfMyUnionBT vl_expected :={ {b:=true}, {r:="Two"}, {b:=true}};
2431 f_compareAndVerdict(
2432 encode_mySetOfCharstring(valueof(t_msetofrValueDiffTypeRaw("One", "Two", "Three"))),
2433 "<MySetOf>" & char(0, 0, 0, 1) & char(0, 0, 0, 1) & char(0, 0, 0, 255) & "Twotrue</MySetOf>"); //'0101FF'O
2434 //encode_mySetOfMyUnionBT( vl_expected ));
2435 }
2436 testcase tc_MySetOfCharstringBeforeOmit2() runs on MyComp {
2437 var MySetOfMyUnionBT vl_expected :={ {r:="Three"} };
2438 f_compareAndVerdict(
2439 encode_mySetOfCharstring(valueof(t_msetofrBeforeOmit2("One", "Two", "Three"))),
2440 encode_mySetOfMyUnionBT( vl_expected ));
2441 }
2442 testcase tc_MySetOfCharstringIntValueBeforeOmit2() runs on MyComp {
2443 var MySetOfMyUnionBT vl_expected :={ {i:=2011}};
2444 f_compareAndVerdict(
2445 encode_mySetOfCharstring(valueof(t_msetofrIntValueBeforeOmit2("One", "Two", "Three"))),
2446 encode_mySetOfMyUnionBT( vl_expected ));
2447 }
2448 testcase tc_MySetOfCharstringCharStrValueBeforeOmit2() runs on MyComp {
2449 var MySetOfMyUnionBT vl_expected :={ {r:="bubu"}};
2450 f_compareAndVerdict(
2451 encode_mySetOfCharstring(valueof(t_msetofrCharStrValueBeforeOmit2("One", "Two", "Three"))),
2452 encode_mySetOfMyUnionBT( vl_expected ));
2453 }
2454 testcase tc_MySetOfCharstringBeforeOmit1() runs on MyComp {
2455 var MySetOfMyUnionBT vl_expected :={ {r:="Two"},{r:="Three"} };
2456 f_compareAndVerdict(
2457 encode_mySetOfCharstring(valueof(t_msetofrBeforeOmit1("One", "Two", "Three"))),
2458 encode_mySetOfMyUnionBT( vl_expected ));
2459 }
2460 testcase tc_MySetOfCharstringIntValueBeforeOmit1() runs on MyComp {
2461 var MySetOfMyUnionBT vl_expected :={ {i:=2011}, {r:="Three"}};
2462 f_compareAndVerdict(
2463 encode_mySetOfCharstring(valueof(t_msetofrIntValueBeforeOmit1("One", "Two", "Three"))),
2464 encode_mySetOfMyUnionBT( vl_expected ));
2465 }
2466 testcase tc_MySetOfCharstringCharStrValueBeforeOmit1() runs on MyComp {
2467 var MySetOfMyUnionBT vl_expected :={ {r:="bubu"},{r:="Three"}};
2468 f_compareAndVerdict(
2469 encode_mySetOfCharstring(valueof(t_msetofrCharStrValueBeforeOmit1("One", "Two", "Three"))),
2470 encode_mySetOfMyUnionBT( vl_expected ));
2471 }
2472 testcase tc_MySetOfCharstringCharStrValueBeforeOmit1_2() runs on MyComp {
2473 var MySetOfMyUnionBT vl_expected :={ {r:="Two"},{r:="bubu"}};
2474 f_compareAndVerdict(
2475 encode_mySetOfCharstring(valueof(t_msetofrCharStrValueBeforeOmit1_2("One", "Two", "Three"))),
2476 encode_mySetOfMyUnionBT( vl_expected ));
2477 }
2478
2479 testcase tc_MySetOfCharstringAfterOmit1() runs on MyComp {
2480 var MySetOfMyUnionBT vl_expected :={ {r:="One"}, {r:="Two"} } ;
2481 f_compareAndVerdict(
2482 encode_mySetOfCharstring(valueof(t_msetofrAfterOmit1("One", "Two", "Three"))),
2483 encode_mySetOfMyUnionBT( vl_expected ));
2484 }
2485 testcase tc_MySetOfCharstringIntValueAfterOmit1() runs on MyComp {
2486 var MySetOfMyUnionBT vl_expected :={ {r:="One"},{i:=2011}};
2487 f_compareAndVerdict(
2488 encode_mySetOfCharstring(valueof(t_msetofrIntValueAfterOmit1("One", "Two", "Three"))),
2489 encode_mySetOfMyUnionBT( vl_expected ));
2490 }
2491 testcase tc_MySetOfCharstringCharStrValueAfterOmit1() runs on MyComp {
2492 var MySetOfMyUnionBT vl_expected :={ {r:="One"},{r:="bubu"}};
2493 f_compareAndVerdict(
2494 encode_mySetOfCharstring(valueof(t_msetofrCharStrValueAfterOmit1("One", "Two", "Three"))),
2495 encode_mySetOfMyUnionBT( vl_expected ));
2496 }
2497 testcase tc_MySetOfCharstringCharStrValueAfterOmit1_2() runs on MyComp {
2498 var MySetOfMyUnionBT vl_expected :={ {r:="bubu"},{r:="Two"}};
2499 f_compareAndVerdict(
2500 encode_mySetOfCharstring(valueof(t_msetofrCharStrValueAfterOmit1_2("One", "Two", "Three"))),
2501 encode_mySetOfMyUnionBT( vl_expected ));
2502 }
2503
2504}//SetOf
2505
2506
2507
2508group Union {
2509
2510 testcase tc_myUnionBasicTypes_boolean3() runs on MyComp {
2511 //0. just for fun:
2512 var MyUnionBasicTypesT vl_mubt:={b:=true};
2513 f_compareAndVerdict(encode_myUnionBasicTypesT(vl_mubt),"<MyUnion>true</MyUnion>");
2514 //1.
2515 vl_mubt:={b:=false};
2516 f_compareAndVerdict(
2517 encode_myUnionBasicTypesT(valueof(t_mubt_boolean3(true))),
2518 encode_myUnionBasicTypesT( vl_mubt ) );
2519 }
2520
2521 testcase tc_myUnionBasicTypes_booleanRaw() runs on MyComp {
2522 f_compareAndVerdict( encode_myUnionBasicTypesT(valueof(t_mubt_booleanRaw(true))), "<MyUnion>ABBA</MyUnion>")
2523 }//tc_
2524
2525 testcase tc_myUnionBasicTypes_integerRaw() runs on MyComp {
2526 f_compareAndVerdict(encode_myUnionBasicTypesT(valueof(t_mubt_integerRaw(129))),"<MyUnion>ABBA</MyUnion>")
2527 }//tc_
2528
2529 testcase tc_myUnionBasicTypes_enumRaw() runs on MyComp {
2530 f_compareAndVerdict(encode_myUnionBasicTypesT(valueof(t_mubt_enumRaw(second))), "<MyUnion>ABBA</MyUnion>" )
2531 }//tc_
2532
2533 testcase tc_myUnionBasicTypes_stringRaw() runs on MyComp {
2534 f_compareAndVerdict(encode_myUnionBasicTypesT(valueof(t_mubt_stringRaw("Three"))), "<MyUnion>ABBA</MyUnion>" )
2535 }//tc_
2536
2537 testcase tc_myUnionBasicTypes_bitstrRaw() runs on MyComp {
2538 f_compareAndVerdict(encode_myUnionBasicTypesT(valueof(t_mubt_bitstrRaw('101011111'B))), "<MyUnion>ABBA</MyUnion>" )
2539 }//tc_
2540
2541 testcase tc_myUnionBasicTypes_octetstrRaw() runs on MyComp {
2542 f_compareAndVerdict(encode_myUnionBasicTypesT(valueof(t_mubt_octetstrRaw('BABAB0B0'O))), "<MyUnion>ABBA</MyUnion>" )
2543 }//tc_
2544
2545 testcase tc_myUnionBasicTypes_objidRaw() runs on MyComp {
2546 f_compareAndVerdict(encode_myUnionBasicTypesT(valueof(t_mubt_objidRaw(objid{ itu_t identified_organization etsi(0) inDomain(1)}))), "<MyUnion>ABBA</MyUnion>" )
2547 }//tc_
2548
2549 testcase tc_myUnionComplexTypes_omit_0_1() runs on MyComp {
2550 f_compareAndVerdict(encode_myUnionComplexTypes(valueof(t_muct_0_1( "One","Two","Three" ) )), "<MySeq><MySeqOf>Three</MySeqOf></MySeq>" );
2551 }//tc_
2552
2553 testcase tc_myUnionComplexTypes_omit_0_2() runs on MyComp {
2554 f_compareAndVerdict(encode_myUnionComplexTypes(valueof(t_muct_0_2( "One","Two","Three" ) )), "<MySeq><MySeqOf>Two</MySeqOf></MySeq>" );
2555 }//tc_
2556
2557 testcase tc_myUnionComplexTypes_omit_1_2() runs on MyComp {
2558 f_compareAndVerdict(encode_myUnionComplexTypes(valueof(t_muct_1_2( "One","Two","Three" ) )), "<MySeq><MySeqOf>One</MySeqOf></MySeq>" );
2559 }//tc_
2560 testcase tc_myUnionComplexTypes_omit_2_1() runs on MyComp {
2561 f_compareAndVerdict(encode_myUnionComplexTypes(valueof(t_muct_2_1( "One","Two","Three" ) )), "<MySeq><MySeqOf>One</MySeqOf></MySeq>" );
2562 }//tc_
2563 testcase tc_myUnionComplexTypes_omit_0_1_2() runs on MyComp {
2564 var MySeqOfCharstring vl_expected:= { }
2565 f_compareAndVerdict(encode_myUnionComplexTypes(valueof(t_muct_0_1_2 ( "Ten","One","Two" ) )), "<MySeq><MySeqOf></MySeqOf></MySeq>" );
2566 }//tc_
2567
2568 testcase tc_myUnionComplexTypes_omit_0_2_1() runs on MyComp {
2569 var MySeqOfCharstring vl_expected:= { }
2570 f_compareAndVerdict(encode_myUnionComplexTypes(valueof(t_muct_0_2_1 ( "One","Two","Three" ) )), "<MySeq><MySeqOf></MySeqOf></MySeq>" );
2571
2572 }//tc_
2573
2574}//group Union
2575
2576group Separator{
2577
2578 type record My3Str {charstring s1, charstring s2, charstring s3}
2579 with { variant "BEGIN('<BEGIN>')"; variant "END('<END>')"; variant "SEPARATOR(';')" variant "TEXT_CODING()"}
2580
2581 external function encode_My3Str(in My3Str pdu) return charstring with { extension "prototype(convert) encode(TEXT)" }
2582
2583 template My3Str t_My3Str_before_after(template charstring p_s1, template charstring p_s2, template charstring p_s3) :={ s1:=p_s1, s2:=p_s2, s3:=p_s3 }
2584 with {
2585 erroneous(s1) "before:=""little"""
2586 erroneous(s1) "value:=\"red\""
2587 erroneous(s1) "after:=\"riding\""
2588 erroneous(s2) "before:=""hood"""
2589 erroneous(s2) "value:=""walked"""
2590 erroneous(s2) "after:=""in"""
2591 erroneous(s3) "before:=""the"""
2592 erroneous(s3) "value:=""dark"""
2593 erroneous(s3) "after:=""wood"""
2594 }
2595 testcase tc_separator() runs on MyComp {
2596 var My3Str vl_str:={ "ali","baba","forty"};
2597 f_compareAndVerdict(
2598 encode_My3Str(valueof(t_My3Str_before_after("ali","baba","forty"))),
2599 "<BEGIN>little;red;riding;hood;walked;in;the;dark;wood<END>");
2600 }
2601}
2602
2603control {
2604 execute(tc_separator());
2605 //SEQUENCE:
2606 execute(tc_mySeqIntOmit()); // <========{ integer }
2607 execute(tc_mySeqIntValueSameTypeE());
2608 execute(tc_mySeqIntValueSameTypeI());
2609 execute(tc_mySeqIntValueDiffTypeExplicitBool());
2610 execute(tc_mySeqIntValueDiffTypeImplicitBool());
2611 execute(tc_mySeqIntValueDiffTypeExplicitOctStr());
2612 execute(tc_mySeqIntValueDiffTypeImplicitOctStr());
2613 execute(tc_mySeqIntValueDiffTypeExplicitEnum());
2614 execute(tc_mySeqIntValueDiffTypeExplicitCharstring());
2615 execute(tc_mySeqIntValueDiffTypeImplicitCharstring());
2616 execute(tc_mySeqIntValueDiffTypeExplicitStr());
2617 execute(tc_mySeqIntValueDiffTypeRawOctStr());
2618 execute(tc_mySeqInt2Omiti());//<===== {integer, integer}
2619 execute(tc_mySeqInt2Omitj());
2620 execute(tc_mySeqInt2BeforeOmitj());
2621 execute(tc_mySeqInt2AfterOmiti());
2622 execute(tc_mySeqInt2ValueSameTypeE());
2623 execute(tc_mySeqInt2ValueSameTypeI());
2624 execute(tc_mySeqInt2ValueDiffTypeExplicitCharstring());
2625 execute(tc_mySeqInt2ValueDiffTypeImplicitCharstring());
2626 execute(tc_mySeqInt2ValueDiffTypeExplicitStr());
2627 execute(tc_mySeqInt2ValueSeqIntV());
2628 execute(tc_mySeqInt2ValueSeqIntOptV());
2629 execute(tc_mySeqInt2ValueSeqIntC());
2630 execute(tc_mySeqInt2ValueSeqInt2OptC());
2631 execute(tc_mySeqInt2ValueSeqInt2OptOmitC());
2632 execute(tc_mySeqInt2ValueSeqInt2iiC());
2633 execute(tc_mySeqInt2ValueSeqInt2ijC());
2634 execute(tc_mySeqInt2ValueSeqInt2jiC());
2635 execute(tc_mySeqInt2ValueSeqInt2jjC());
2636
2637 execute(tc_mySeqIntSeqInt2ValueOmiti()); //=== Sequence { integer, {integer, integer} )
2638 execute(tc_mySeqIntSeqInt2ValueOmitjki());
2639 execute(tc_mySeqIntSeqInt2ValueOmitjkj());
2640
2641 execute(tc_mySeqIntSeqInt2ValueRawjki());
2642 execute(tc_mySeqIntSeqInt2ValueRawjkj());
2643 execute(tc_mySeqIntSeqInt2AfteriBeforej());
2644 execute(tc_mySeqIntSeqInt2AfteriRawBeforejRaw());
2645 //<===== {integer, integer,integer, integer}
2646 execute(tc_mySeqInt4Omiti());
2647 execute(tc_mySeqInt4Omitj());
2648 execute(tc_mySeqInt4Omitk());
2649 execute(tc_mySeqInt4Omitl());
2650 execute(tc_mySeqInt4ValueiOctetStr());
2651 execute(tc_mySeqInt4ValuejOctetStr());
2652 execute(tc_mySeqInt4ValueiRaw());
2653 execute(tc_mySeqInt4ValuejRaw());
2654 execute(tc_mySeqInt4ValuekRaw());
2655 execute(tc_mySeqInt4ValuelRaw());
2656 execute(tc_mySeqISKL_ValueSomit());
2657 execute(tc_mySeqISKL_ValueSIomit());
2658 execute(tc_mySeqISKL_ValueSISJomit());
2659 execute(tc_mySeqISKL_ValueSraw());
2660 //===== sequence of sequence of sequence ====
2661 execute(tc_MySeqIntSeqIntSeqInt2SeqCharstring2_omiti());
2662 execute(tc_MySeqIntSeqIntSeqInt2SeqCharstring2_omitjkl());
2663 execute(tc_MySeqIntSeqIntSeqInt2SeqCharstring2_omitxy() );
2664 execute(tc_MySeqIntSeqIntSeqInt2SeqCharstring2_omitjkll());
2665 execute(tc_MySeqIntSeqIntSeqInt2SeqCharstring2_valuexy());
2666 execute(tc_MySeqIntSeqIntSeqInt2SeqCharstring2_valuex_y());
2667 execute(tc_MySeqIntSeqIntSeqInt2SeqCharstring2_valuex_y());
2668 execute(tc_MySeqIntSeqIntSeqInt2SeqCharstring2_valuex_y_expr1());
2669 execute(tc_MySeqIntSeqIntSeqInt2SeqCharstring2_valuex_y_expr2());
2670 execute(tc_MySeq_SeqSeqIntSeqInt2SeqCharstring2_SeqSeqIntSeqInt2SeqCharstring2_omit());
2671
2672 execute(tc_MySeqInt2opt_value());
2673 execute(tc_MySeqInt2opt_before());
2674 execute(tc_MySeqInt2opt_after());
2675
2676 //Deeper encapsulation: -
2677 //========= SEQUENCE OF=====================
2678 //Bool:
2679 execute(tc_MySeqOfBoolValueSameType1());
2680 execute(tc_MySeqOfBoolValueSameType2());
2681 execute(tc_MySeqOfBoolValueDiffType());
2682 execute(tc_MySeqOfBoolValueRaw());
2683 execute(tc_MySeqOfBoolValueOmit());
2684 execute(tc_MySeqOfBoolAfterOmit());
2685 execute(tc_MySeqOfBoolValueAfterOmit());
2686 execute(tc_MySeqOfBoolBeforeOmit2());
2687 execute(tc_MySeqOfBoolValueBeforeOmit2());
2688 execute(tc_MySeqOfBoolBeforeOmit1());
2689 execute(tc_MySeqOfBoolValueBeforeOmit1());
2690 //INTEGER:
2691 execute(tc_MySeqOfIntValueDiffType());
2692 execute(tc_MySeqOfIntValueDiffTypeRaw());
2693 execute(tc_MySeqOfIntBeforeOmit2());
2694 execute(tc_MySeqOfIntIntValueBeforeOmit2());
2695 execute(tc_MySeqOfIntCharStrValueBeforeOmit2());
2696 execute(tc_MySeqOfIntBeforeOmit1());
2697 execute(tc_MySeqOfIntIntValueBeforeOmit1());
2698 execute(tc_MySeqOfIntCharStrValueBeforeOmit1() );
2699 execute(tc_MySeqOfIntCharStrValueBeforeOmit1_2());
2700 execute(tc_MySeqOfIntAfterOmit1());
2701 execute(tc_MySeqOfIntIntValueAfterOmit1());
2702 execute(tc_MySeqOfIntCharStrValueAfterOmit1() );
2703 execute(tc_MySeqOfIntCharStrValueAfterOmit1_2());
2704 //MyEnum
2705 execute(tc_MySeqOfMyEnumValueDiffType());
2706 execute(tc_MySeqOfMyEnumValueDiffTypeRaw());
2707 execute(tc_MySeqOfMyEnumBeforeOmit2());
2708 execute(tc_MySeqOfMyEnumIntValueBeforeOmit2());
2709 execute(tc_MySeqOfMyEnumCharStrValueBeforeOmit2());
2710 execute(tc_MySeqOfMyEnumBeforeOmit1());
2711 execute(tc_MySeqOfMyEnumIntValueBeforeOmit1());
2712 execute(tc_MySeqOfMyEnumCharStrValueBeforeOmit1() );
2713 execute(tc_MySeqOfMyEnumCharStrValueBeforeOmit1_2());
2714 execute(tc_MySeqOfMyEnumAfterOmit1());
2715 execute(tc_MySeqOfMyEnumIntValueAfterOmit1());
2716 execute(tc_MySeqOfMyEnumCharStrValueAfterOmit1() );
2717 execute(tc_MySeqOfMyEnumCharStrValueAfterOmit1_2());
2718 //REAL (charstring)
2719 execute(tc_MySeqOfCharstringValueDiffType());
2720 execute(tc_MySeqOfCharstringValueDiffTypeRaw());
2721 execute(tc_MySeqOfCharstringBeforeOmit2());
2722 execute(tc_MySeqOfCharstringIntValueBeforeOmit2());
2723 execute(tc_MySeqOfCharstringCharStrValueBeforeOmit2());
2724 execute(tc_MySeqOfCharstringBeforeOmit1());
2725 execute(tc_MySeqOfCharstringIntValueBeforeOmit1());
2726 execute(tc_MySeqOfCharstringCharStrValueBeforeOmit1() );
2727 execute(tc_MySeqOfCharstringCharStrValueBeforeOmit1_2());
2728 execute(tc_MySeqOfCharstringAfterOmit1());
2729 execute(tc_MySeqOfCharstringIntValueAfterOmit1());
2730 execute(tc_MySeqOfCharstringCharStrValueAfterOmit1() );
2731 execute(tc_MySeqOfCharstringCharStrValueAfterOmit1_2());
2732 //Depth 3-4:
2733 execute(tc_MySeqOf_SeqSeqIntSeqInt2SeqCharstring2_omitj());
2734 execute(tc_MySeqOf_SeqSeqIntSeqInt2SeqCharstring2_beforeafteromit());
2735 execute(tc_MySeqOf_SeqSeqIntSeqInt2SeqCharstring2_arglist_omit());
2736 execute(tc_MySeqOf_SeqSeqIntSeqInt2SeqCharstring2_arglist_afteromit());
2737 execute(tc_MySeqOf_SeqSeqIntSeqInt2SeqCharstring2_arglist_beforeomit());
2738 //========= SET ============================
2739 execute(tc_MySetIntOmit()); // <========{ integer }
2740 execute(tc_MySetIntValueSameTypeE());
2741 execute(tc_MySetIntValueSameTypeI());
2742 execute(tc_MySetIntValueDiffTypeExplicitBool());
2743 execute(tc_MySetIntValueDiffTypeImplicitBool());
2744 execute(tc_MySetIntValueDiffTypeExplicitOctStr());
2745 execute(tc_MySetIntValueDiffTypeImplicitOctStr());
2746 execute(tc_MySetIntValueDiffTypeExplicitOctStr_const());
2747 execute(tc_MySetIntValueDiffTypeExplicitEnum());
2748 execute(tc_MySetIntValueDiffTypeExplicitCharstring());
2749 execute(tc_MySetIntValueDiffTypeImplicitCharstring());
2750 execute(tc_MySetIntValueDiffTypeRawOctStr());
2751 execute(tc_MySetInt2Omiti());//<===== {integer, integer}
2752 execute(tc_MySetInt2Omitj());
2753 execute(tc_MySetInt2BeforeOmitj());
2754 execute(tc_MySetInt2AfterOmiti());
2755 execute(tc_MySetInt2ValueSameTypeE());
2756 execute(tc_MySetInt2ValueSameTypeI());
2757 execute(tc_MySetInt2ValueDiffTypeExplicitCharstring());
2758 execute(tc_MySetInt2ValueDiffTypeImplicitCharstring());
2759 execute(tc_MySetInt2ValueSeqIntV());
2760 execute(tc_MySetInt2ValueSeqIntOptV());
2761 execute(tc_MySetInt2ValueSeqIntC());
2762 execute(tc_MySetInt2ValueSeqInt2OptC());
2763 execute(tc_MySetInt2ValueSeqInt2OptOmitC());
2764 execute(tc_MySetInt2ValueSeqInt2iiC());
2765 execute(tc_MySetInt2ValueSeqInt2ijC());
2766 execute(tc_MySetInt2ValueSeqInt2jiC());
2767 execute(tc_MySetInt2ValueSeqInt2jjC());
2768 execute(tc_MySetIntSeqInt2ValueOmiti());
2769 //=== Set { integer, {integer, integer} )
2770 execute(tc_MySetIntSeqInt2ValueOmitjki());
2771 execute(tc_MySetIntSeqInt2ValueOmitjkj());
2772 execute(tc_MySetIntSeqInt2ValueRawjki());
2773 execute(tc_MySetIntSeqInt2ValueRawjkj());
2774 execute(tc_MySetIntSeqInt2AfteriBeforej());
2775 execute(tc_MySetIntSeqInt2AfteriRawBeforejRaw());
2776 //<===== {integer, integer,integer, integer}
2777 execute(tc_MySetInt4Omiti());
2778 execute(tc_MySetInt4Omitj());
2779 execute(tc_MySetInt4Omitk());
2780 execute(tc_MySetInt4Omitl());
2781 execute(tc_MySetInt4ValueiOctetStr());
2782 execute(tc_MySetInt4ValuejOctetStr());
2783 execute(tc_MySetInt4ValueiRaw());
2784 execute(tc_MySetInt4ValuejRaw());
2785 execute(tc_MySetInt4ValuekRaw());
2786 execute(tc_MySetInt4ValuelRaw());
2787 execute(tc_MySetISKL_ValueSomit());
2788 execute(tc_MySetISKL_ValueSIomit());
2789 execute(tc_MySetISKL_ValueSISJomit());
2790 execute(tc_MySetISKL_ValueSraw());
2791 execute(tc_MySetISOKL_ValueSomit()); //pass
2792 execute(tc_MySetIOSKL_ValueSomit());
2793 //========= SET OF =========================
2794 //Bool:
2795 execute(tc_MySetOfBoolValueSameType1());
2796 execute(tc_MySetOfBoolValueSameType2());
2797 execute(tc_MySetOfBoolValueDiffType());
2798 execute(tc_MySetOfBoolValueRaw());
2799 execute(tc_MySetOfBoolValueOmit());
2800 execute(tc_MySetOfBoolAfterOmit());
2801 execute(tc_MySetOfBoolValueAfterOmit());
2802 execute(tc_MySetOfBoolBeforeOmit2());
2803 execute(tc_MySetOfBoolValueBeforeOmit2());
2804 execute(tc_MySetOfBoolBeforeOmit1());
2805 execute(tc_MySetOfBoolValueBeforeOmit1());
2806 //INTEGER:
2807 execute(tc_MySetOfIntValueDiffType());
2808 execute(tc_MySetOfIntValueDiffTypeRaw());
2809 execute(tc_MySetOfIntBeforeOmit2());
2810 execute(tc_MySetOfIntIntValueBeforeOmit2());
2811 execute(tc_MySetOfIntCharStrValueBeforeOmit2());
2812 execute(tc_MySetOfIntBeforeOmit1());
2813 execute(tc_MySetOfIntIntValueBeforeOmit1());
2814 execute(tc_MySetOfIntCharStrValueBeforeOmit1() );
2815 execute(tc_MySetOfIntCharStrValueBeforeOmit1_2());
2816 execute(tc_MySetOfIntAfterOmit1());
2817 execute(tc_MySetOfIntIntValueAfterOmit1());
2818 execute(tc_MySetOfIntCharStrValueAfterOmit1() );
2819 execute(tc_MySetOfIntCharStrValueAfterOmit1_2());
2820 //MyEnum
2821 execute(tc_MySetOfMyEnumValueDiffType());
2822 execute(tc_MySetOfMyEnumValueDiffTypeRaw());
2823 execute(tc_MySetOfMyEnumBeforeOmit2());
2824 execute(tc_MySetOfMyEnumIntValueBeforeOmit2());
2825 execute(tc_MySetOfMyEnumCharStrValueBeforeOmit2());
2826 execute(tc_MySetOfMyEnumBeforeOmit1());
2827 execute(tc_MySetOfMyEnumIntValueBeforeOmit1());
2828 execute(tc_MySetOfMyEnumCharStrValueBeforeOmit1() );
2829 execute(tc_MySetOfMyEnumCharStrValueBeforeOmit1_2());
2830 execute(tc_MySetOfMyEnumAfterOmit1());
2831 execute(tc_MySetOfMyEnumIntValueAfterOmit1());
2832 execute(tc_MySetOfMyEnumCharStrValueAfterOmit1() );
2833 execute(tc_MySetOfMyEnumCharStrValueAfterOmit1_2());
2834 //REAL (charstring)
2835 execute(tc_MySetOfCharstringValueDiffType());
2836 execute(tc_MySetOfCharstringValueDiffTypeRaw());
2837 execute(tc_MySetOfCharstringBeforeOmit2());
2838 execute(tc_MySetOfCharstringIntValueBeforeOmit2());
2839 execute(tc_MySetOfCharstringCharStrValueBeforeOmit2());
2840 execute(tc_MySetOfCharstringBeforeOmit1());
2841 execute(tc_MySetOfCharstringIntValueBeforeOmit1());
2842 execute(tc_MySetOfCharstringCharStrValueBeforeOmit1() );
2843 execute(tc_MySetOfCharstringCharStrValueBeforeOmit1_2());
2844 execute(tc_MySetOfCharstringAfterOmit1());
2845 execute(tc_MySetOfCharstringIntValueAfterOmit1());
2846 execute(tc_MySetOfCharstringCharStrValueAfterOmit1() );
2847 execute(tc_MySetOfCharstringCharStrValueAfterOmit1_2());
2848
2849 //========= UNION ==========================
2850 execute(tc_myUnionBasicTypes_boolean3());
2851 execute(tc_myUnionBasicTypes_booleanRaw());
2852 execute(tc_myUnionBasicTypes_integerRaw());
2853 execute(tc_myUnionBasicTypes_enumRaw());
2854 execute(tc_myUnionBasicTypes_stringRaw());
2855 execute(tc_myUnionBasicTypes_octetstrRaw());
2856 execute(tc_myUnionComplexTypes_omit_0_1());
2857 execute(tc_myUnionComplexTypes_omit_0_2());
2858 execute(tc_myUnionComplexTypes_omit_1_2());
2859 execute(tc_myUnionComplexTypes_omit_2_1());
2860 execute(tc_myUnionComplexTypes_omit_0_1_2());
2861 execute(tc_myUnionComplexTypes_omit_0_2_1());
2862
2863 //Study:
2864}
2865
2866} with { encode "TEXT" }
This page took 0.129489 seconds and 5 git commands to generate.