4
%% Copyright Ericsson AB 1997-2009. 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(testSeqOfTag).
26
-include("test_server.hrl").
27
-include("External.hrl").
30
-record('SeqTagNt',{nt}).
31
-record('SeqTagNtI',{imp}).
32
-record('SeqTagNtE',{exp}).
33
-record('SeqTagI',{nt}).
34
-record('SeqTagII',{imp}).
35
-record('SeqTagIE',{exp}).
36
-record('SeqTagE',{nt}).
37
-record('SeqTagEI',{imp}).
38
-record('SeqTagEE',{exp}).
39
-record('SeqTagXNt',{xnt}).
40
-record('SeqTagXI',{ximp}).
41
-record('SeqTagXE',{xexp}).
42
-record('SeqTagImpX',{xnt, ximp, xexp}).
43
-record('SeqTagExpX',{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 ++ "SeqOfTag",[Rules,{outdir,OutDir}]++Options).
62
asn1_wrapper:encode('SeqOfTag','SeqTagNt',
63
#'SeqTagNt'{nt = [#'NT'{bool = true, os = "kalle"},
64
#'NT'{bool = true, os = "kalle"}]}),
65
?line {ok,{'SeqTagNt',
66
[{'NT',[107,97,108,108,101],true},{'NT',[107,97,108,108,101],true}]}} =
67
asn1_wrapper:decode('SeqOfTag','SeqTagNt',lists:flatten(Bytes11)),
70
asn1_wrapper:encode('SeqOfTag','SeqTagNtI',
71
#'SeqTagNtI'{imp = [#'Imp'{bool = true, os = "kalle"},
72
#'Imp'{bool = true, os = "kalle"}]}),
73
?line {ok,{'SeqTagNtI',
74
[{'Imp',[107,97,108,108,101],true},{'Imp',[107,97,108,108,101],true}]}} =
75
asn1_wrapper:decode('SeqOfTag','SeqTagNtI',lists:flatten(Bytes12)),
78
asn1_wrapper:encode('SeqOfTag','SeqTagNtE',
79
#'SeqTagNtE'{exp = [#'Exp'{bool = true, os = "kalle"},
80
#'Exp'{bool = true, os = "kalle"}]}),
81
?line {ok,{'SeqTagNtE',
82
[{'Exp',[107,97,108,108,101],true},{'Exp',[107,97,108,108,101],true}]}} =
83
asn1_wrapper:decode('SeqOfTag','SeqTagNtE',lists:flatten(Bytes13)),
88
asn1_wrapper:encode('SeqOfTag','SeqTagI',
89
#'SeqTagI'{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('SeqOfTag','SeqTagI',lists:flatten(Bytes21)),
96
asn1_wrapper:encode('SeqOfTag','SeqTagII',
97
#'SeqTagII'{imp = [#'Imp'{bool = true, os = "kalle"},
98
#'Imp'{bool = true, os = "kalle"}]}),
99
?line {ok,{'SeqTagII',
100
[{'Imp',[107,97,108,108,101],true},{'Imp',[107,97,108,108,101],true}]}} =
101
asn1_wrapper:decode('SeqOfTag','SeqTagII',lists:flatten(Bytes22)),
104
asn1_wrapper:encode('SeqOfTag','SeqTagIE',
105
#'SeqTagIE'{exp = [#'Exp'{bool = true, os = "kalle"},
106
#'Exp'{bool = true, os = "kalle"}]}),
107
?line {ok,{'SeqTagIE',
108
[{'Exp',[107,97,108,108,101],true},{'Exp',[107,97,108,108,101],true}]}} =
109
asn1_wrapper:decode('SeqOfTag','SeqTagIE',lists:flatten(Bytes23)),
114
asn1_wrapper:encode('SeqOfTag','SeqTagE',
115
#'SeqTagE'{nt = [#'NT'{bool = true, os = "kalle"},
116
#'NT'{bool = true, os = "kalle"}]}),
117
?line {ok,{'SeqTagE',
118
[{'NT',[107,97,108,108,101],true},{'NT',[107,97,108,108,101],true}]}} =
119
asn1_wrapper:decode('SeqOfTag','SeqTagE',lists:flatten(Bytes31)),
122
asn1_wrapper:encode('SeqOfTag','SeqTagEI',
123
#'SeqTagEI'{imp = [#'Imp'{bool = true, os = "kalle"},
124
#'Imp'{bool = true, os = "kalle"}]}),
125
?line {ok,{'SeqTagEI',
126
[{'Imp',[107,97,108,108,101],true},{'Imp',[107,97,108,108,101],true}]}} =
127
asn1_wrapper:decode('SeqOfTag','SeqTagEI',lists:flatten(Bytes32)),
130
asn1_wrapper:encode('SeqOfTag','SeqTagEE',
131
#'SeqTagEE'{exp = [#'Exp'{bool = true, os = "kalle"},
132
#'Exp'{bool = true, os = "kalle"}]}),
133
?line {ok,{'SeqTagEE',
134
[{'Exp',[107,97,108,108,101],true},{'Exp',[107,97,108,108,101],true}]}} =
135
asn1_wrapper:decode('SeqOfTag','SeqTagEE',lists:flatten(Bytes33)),
144
asn1_wrapper:encode('SeqOfTag','SeqTagXNt',
145
#'SeqTagXNt'{xnt = [#'XSeqNT'{bool = true, os = "kalle"},
146
#'XSeqNT'{bool = true, os = "kalle"}]}),
147
?line {ok,{'SeqTagXNt',
148
[{'XSeqNT',[107,97,108,108,101],true},{'XSeqNT',[107,97,108,108,101],true}]}} =
149
asn1_wrapper:decode('SeqOfTag','SeqTagXNt',lists:flatten(Bytes41)),
152
asn1_wrapper:encode('SeqOfTag','SeqTagXI',
153
#'SeqTagXI'{ximp = [#'XSeqImp'{bool = true, os = "kalle"},
154
#'XSeqImp'{bool = true, os = "kalle"}]}),
155
?line {ok,{'SeqTagXI',
156
[{'XSeqImp',[107,97,108,108,101],true},{'XSeqImp',[107,97,108,108,101],true}]}} =
157
asn1_wrapper:decode('SeqOfTag','SeqTagXI',lists:flatten(Bytes42)),
160
asn1_wrapper:encode('SeqOfTag','SeqTagXE',
161
#'SeqTagXE'{xexp = [#'XSeqExp'{bool = true, os = "kalle"},
162
#'XSeqExp'{bool = true, os = "kalle"}]}),
163
?line {ok,{'SeqTagXE',
164
[{'XSeqExp',[107,97,108,108,101],true},{'XSeqExp',[107,97,108,108,101],true}]}} =
165
asn1_wrapper:decode('SeqOfTag','SeqTagXE',lists:flatten(Bytes43)),
172
asn1_wrapper:encode('SeqOfTag','SeqTagImpX',
173
#'SeqTagImpX'{xnt = [#'XSeqNT'{bool = true, os = "kalle"},
174
#'XSeqNT'{bool = true, os = "kalle"}],
175
ximp = [#'XSeqImp'{bool = true, os = "kalle"},
176
#'XSeqImp'{bool = true, os = "kalle"}],
177
xexp = [#'XSeqExp'{bool = true, os = "kalle"},
178
#'XSeqExp'{bool = true, os = "kalle"}]}),
179
?line {ok,{'SeqTagImpX',
180
[{'XSeqNT',[107,97,108,108,101],true},{'XSeqNT',[107,97,108,108,101],true}],
181
[{'XSeqImp',[107,97,108,108,101],true},{'XSeqImp',[107,97,108,108,101],true}],
182
[{'XSeqExp',[107,97,108,108,101],true},{'XSeqExp',[107,97,108,108,101],true}]}} =
183
asn1_wrapper:decode('SeqOfTag','SeqTagImpX',lists:flatten(Bytes51)),
188
asn1_wrapper:encode('SeqOfTag','SeqTagExpX',
189
#'SeqTagExpX'{xnt = [#'XSeqNT'{bool = true, os = "kalle"},
190
#'XSeqNT'{bool = true, os = "kalle"}],
191
ximp = [#'XSeqImp'{bool = true, os = "kalle"},
192
#'XSeqImp'{bool = true, os = "kalle"}],
193
xexp = [#'XSeqExp'{bool = true, os = "kalle"},
194
#'XSeqExp'{bool = true, os = "kalle"}]}),
195
?line {ok,{'SeqTagExpX',
196
[{'XSeqNT',[107,97,108,108,101],true},{'XSeqNT',[107,97,108,108,101],true}],
197
[{'XSeqImp',[107,97,108,108,101],true},{'XSeqImp',[107,97,108,108,101],true}],
198
[{'XSeqExp',[107,97,108,108,101],true},{'XSeqExp',[107,97,108,108,101],true}]}} =
199
asn1_wrapper:decode('SeqOfTag','SeqTagExpX',lists:flatten(Bytes52)),