4
%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
6
%% The contents of this file are subject to the Erlang Public License,
7
%% Version 1.1, (the "License"); you may not use this file except in
8
%% compliance with the License. You should have received a copy of the
9
%% Erlang Public License along with this software. If not, it can be
10
%% retrieved online at http://www.erlang.org/.
12
%% Software distributed under the License is distributed on an "AS IS"
13
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
14
%% the License for the specific language governing rights and limitations
20
-module(testSetOfTag).
26
-include_lib("test_server/include/test_server.hrl").
27
-include("External.hrl").
30
-record('SetTagNt',{nt}).
31
-record('SetTagNtI',{imp}).
32
-record('SetTagNtE',{exp}).
33
-record('SetTagI',{nt}).
34
-record('SetTagII',{imp}).
35
-record('SetTagIE',{exp}).
36
-record('SetTagE',{nt}).
37
-record('SetTagEI',{imp}).
38
-record('SetTagEE',{exp}).
39
-record('SetTagXNt',{xnt}).
40
-record('SetTagXI',{ximp}).
41
-record('SetTagXE',{xexp}).
42
-record('SetTagImpX',{xnt, ximp, xexp}).
43
-record('SetTagExpX',{xnt, ximp, xexp}).
44
-record('NT',{os, bool}).
45
-record('Imp',{os, bool}).
46
-record('Exp',{os, bool}).
50
compile(Config,Rules,Options) ->
52
?line DataDir = ?config(data_dir,Config),
53
?line OutDir = ?config(priv_dir,Config),
54
?line true = code:add_patha(?config(priv_dir,Config)),
55
?line ok = asn1ct:compile(DataDir ++ "SetOfTag",[Rules,{outdir,OutDir}]++Options).
62
asn1_wrapper:encode('SetOfTag','SetTagNt',
63
#'SetTagNt'{nt = [#'NT'{bool = true, os = "kalle"},
64
#'NT'{bool = true, os = "kalle"}]}),
65
?line {ok,{'SetTagNt',
66
[{'NT',[107,97,108,108,101],true},{'NT',[107,97,108,108,101],true}]}} =
67
asn1_wrapper:decode('SetOfTag','SetTagNt',lists:flatten(Bytes11)),
70
asn1_wrapper:encode('SetOfTag','SetTagNtI',
71
#'SetTagNtI'{imp = [#'Imp'{bool = true, os = "kalle"},
72
#'Imp'{bool = true, os = "kalle"}]}),
73
?line {ok,{'SetTagNtI',
74
[{'Imp',[107,97,108,108,101],true},{'Imp',[107,97,108,108,101],true}]}} =
75
asn1_wrapper:decode('SetOfTag','SetTagNtI',lists:flatten(Bytes12)),
78
asn1_wrapper:encode('SetOfTag','SetTagNtE',
79
#'SetTagNtE'{exp = [#'Exp'{bool = true, os = "kalle"},
80
#'Exp'{bool = true, os = "kalle"}]}),
81
?line {ok,{'SetTagNtE',
82
[{'Exp',[107,97,108,108,101],true},{'Exp',[107,97,108,108,101],true}]}} =
83
asn1_wrapper:decode('SetOfTag','SetTagNtE',lists:flatten(Bytes13)),
88
asn1_wrapper:encode('SetOfTag','SetTagI',
89
#'SetTagI'{nt = [#'NT'{bool = true, os = "kalle"},
90
#'NT'{bool = true, os = "kalle"}]}),
92
[{'NT',[107,97,108,108,101],true},{'NT',[107,97,108,108,101],true}]}} =
93
asn1_wrapper:decode('SetOfTag','SetTagI',lists:flatten(Bytes21)),
96
asn1_wrapper:encode('SetOfTag','SetTagII',
97
#'SetTagII'{imp = [#'Imp'{bool = true, os = "kalle"},
98
#'Imp'{bool = true, os = "kalle"}]}),
99
?line {ok,{'SetTagII',
100
[{'Imp',[107,97,108,108,101],true},{'Imp',[107,97,108,108,101],true}]}} =
101
asn1_wrapper:decode('SetOfTag','SetTagII',lists:flatten(Bytes22)),
104
asn1_wrapper:encode('SetOfTag','SetTagIE',
105
#'SetTagIE'{exp = [#'Exp'{bool = true, os = "kalle"},
106
#'Exp'{bool = true, os = "kalle"}]}),
107
?line {ok,{'SetTagIE',
108
[{'Exp',[107,97,108,108,101],true},{'Exp',[107,97,108,108,101],true}]}} =
109
asn1_wrapper:decode('SetOfTag','SetTagIE',lists:flatten(Bytes23)),
114
asn1_wrapper:encode('SetOfTag','SetTagE',
115
#'SetTagE'{nt = [#'NT'{bool = true, os = "kalle"},
116
#'NT'{bool = true, os = "kalle"}]}),
117
?line {ok,{'SetTagE',
118
[{'NT',[107,97,108,108,101],true},{'NT',[107,97,108,108,101],true}]}} =
119
asn1_wrapper:decode('SetOfTag','SetTagE',lists:flatten(Bytes31)),
122
asn1_wrapper:encode('SetOfTag','SetTagEI',
123
#'SetTagEI'{imp = [#'Imp'{bool = true, os = "kalle"},
124
#'Imp'{bool = true, os = "kalle"}]}),
125
?line {ok,{'SetTagEI',
126
[{'Imp',[107,97,108,108,101],true},{'Imp',[107,97,108,108,101],true}]}} =
127
asn1_wrapper:decode('SetOfTag','SetTagEI',lists:flatten(Bytes32)),
130
asn1_wrapper:encode('SetOfTag','SetTagEE',
131
#'SetTagEE'{exp = [#'Exp'{bool = true, os = "kalle"},
132
#'Exp'{bool = true, os = "kalle"}]}),
133
?line {ok,{'SetTagEE',
134
[{'Exp',[107,97,108,108,101],true},{'Exp',[107,97,108,108,101],true}]}} =
135
asn1_wrapper:decode('SetOfTag','SetTagEE',lists:flatten(Bytes33)),
144
asn1_wrapper:encode('SetOfTag','SetTagXNt',
145
#'SetTagXNt'{xnt = [#'XSetNT'{bool = true, os = "kalle"},
146
#'XSetNT'{bool = true, os = "kalle"}]}),
147
?line {ok,{'SetTagXNt',
148
[{'XSetNT',[107,97,108,108,101],true},{'XSetNT',[107,97,108,108,101],true}]}} =
149
asn1_wrapper:decode('SetOfTag','SetTagXNt',lists:flatten(Bytes41)),
152
asn1_wrapper:encode('SetOfTag','SetTagXI',
153
#'SetTagXI'{ximp = [#'XSetImp'{bool = true, os = "kalle"},
154
#'XSetImp'{bool = true, os = "kalle"}]}),
155
?line {ok,{'SetTagXI',
156
[{'XSetImp',[107,97,108,108,101],true},{'XSetImp',[107,97,108,108,101],true}]}} =
157
asn1_wrapper:decode('SetOfTag','SetTagXI',lists:flatten(Bytes42)),
160
asn1_wrapper:encode('SetOfTag','SetTagXE',
161
#'SetTagXE'{xexp = [#'XSetExp'{bool = true, os = "kalle"},
162
#'XSetExp'{bool = true, os = "kalle"}]}),
163
?line {ok,{'SetTagXE',
164
[{'XSetExp',[107,97,108,108,101],true},{'XSetExp',[107,97,108,108,101],true}]}} =
165
asn1_wrapper:decode('SetOfTag','SetTagXE',lists:flatten(Bytes43)),
172
asn1_wrapper:encode('SetOfTag','SetTagImpX',
173
#'SetTagImpX'{xnt = [#'XSetNT'{bool = true, os = "kalle"},
174
#'XSetNT'{bool = true, os = "kalle"}],
175
ximp = [#'XSetImp'{bool = true, os = "kalle"},
176
#'XSetImp'{bool = true, os = "kalle"}],
177
xexp = [#'XSetExp'{bool = true, os = "kalle"},
178
#'XSetExp'{bool = true, os = "kalle"}]}),
179
?line {ok,{'SetTagImpX',
180
[{'XSetNT',[107,97,108,108,101],true},{'XSetNT',[107,97,108,108,101],true}],
181
[{'XSetImp',[107,97,108,108,101],true},{'XSetImp',[107,97,108,108,101],true}],
182
[{'XSetExp',[107,97,108,108,101],true},{'XSetExp',[107,97,108,108,101],true}]}} =
183
asn1_wrapper:decode('SetOfTag','SetTagImpX',lists:flatten(Bytes51)),
188
asn1_wrapper:encode('SetOfTag','SetTagExpX',
189
#'SetTagExpX'{xnt = [#'XSetNT'{bool = true, os = "kalle"},
190
#'XSetNT'{bool = true, os = "kalle"}],
191
ximp = [#'XSetImp'{bool = true, os = "kalle"},
192
#'XSetImp'{bool = true, os = "kalle"}],
193
xexp = [#'XSetExp'{bool = true, os = "kalle"},
194
#'XSetExp'{bool = true, os = "kalle"}]}),
195
?line {ok,{'SetTagExpX',
196
[{'XSetNT',[107,97,108,108,101],true},{'XSetNT',[107,97,108,108,101],true}],
197
[{'XSetImp',[107,97,108,108,101],true},{'XSetImp',[107,97,108,108,101],true}],
198
[{'XSetExp',[107,97,108,108,101],true},{'XSetExp',[107,97,108,108,101],true}]}} =
199
asn1_wrapper:decode('SetOfTag','SetTagExpX',lists:flatten(Bytes52)),