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(testSetOfExternal).
26
-include_lib("test_server/include/test_server.hrl").
27
-include("External.hrl").
29
-record('NT',{os, bool}).
30
-record('Imp',{os, bool}).
31
-record('Exp',{os, bool}).
35
compile(Config,Rules,Options) ->
37
?line DataDir = ?config(data_dir,Config),
38
?line OutDir = ?config(priv_dir,Config),
39
?line true = code:add_patha(?config(priv_dir,Config)),
40
?line ok = asn1ct:compile(DataDir ++ "SetOfExternal",[Rules,{outdir,OutDir}]++Options).
47
asn1_wrapper:encode('SetOfExternal','NTNT',[#'NT'{bool = true, os = "kalle"},
48
#'NT'{bool = true, os = "kalle"}]),
49
?line {ok,[{'NT',[107,97,108,108,101],true},{'NT',[107,97,108,108,101],true}]} =
50
asn1_wrapper:decode('SetOfExternal','NTNT',lists:flatten(Bytes11)),
53
asn1_wrapper:encode('SetOfExternal','ImpNT',[#'NT'{bool = true, os = "kalle"},
54
#'NT'{bool = true, os = "kalle"}]),
55
?line {ok,[{'NT',[107,97,108,108,101],true},{'NT',[107,97,108,108,101],true}]} =
56
asn1_wrapper:decode('SetOfExternal','ImpNT',lists:flatten(Bytes12)),
59
asn1_wrapper:encode('SetOfExternal','ExpNT',[#'NT'{bool = true, os = "kalle"},
60
#'NT'{bool = true, os = "kalle"}]),
61
?line {ok,[{'NT',[107,97,108,108,101],true},{'NT',[107,97,108,108,101],true}]} =
62
asn1_wrapper:decode('SetOfExternal','ExpNT',lists:flatten(Bytes13)),
67
asn1_wrapper:encode('SetOfExternal','NTImp',[#'Imp'{bool = true, os = "kalle"},
68
#'Imp'{bool = true, os = "kalle"}]),
69
?line {ok,[{'Imp',[107,97,108,108,101],true},{'Imp',[107,97,108,108,101],true}]} =
70
asn1_wrapper:decode('SetOfExternal','NTImp',lists:flatten(Bytes21)),
73
asn1_wrapper:encode('SetOfExternal','ImpImp',[#'Imp'{bool = true, os = "kalle"},
74
#'Imp'{bool = true, os = "kalle"}]),
75
?line {ok,[{'Imp',[107,97,108,108,101],true},{'Imp',[107,97,108,108,101],true}]} =
76
asn1_wrapper:decode('SetOfExternal','ImpImp',lists:flatten(Bytes22)),
79
asn1_wrapper:encode('SetOfExternal','ExpImp',[#'Imp'{bool = true, os = "kalle"},
80
#'Imp'{bool = true, os = "kalle"}]),
81
?line {ok,[{'Imp',[107,97,108,108,101],true},{'Imp',[107,97,108,108,101],true}]} =
82
asn1_wrapper:decode('SetOfExternal','ExpImp',lists:flatten(Bytes23)),
87
asn1_wrapper:encode('SetOfExternal','NTExp',[#'Exp'{bool = true, os = "kalle"},
88
#'Exp'{bool = true, os = "kalle"}]),
89
?line {ok,[{'Exp',[107,97,108,108,101],true},{'Exp',[107,97,108,108,101],true}]} =
90
asn1_wrapper:decode('SetOfExternal','NTExp',lists:flatten(Bytes31)),
93
asn1_wrapper:encode('SetOfExternal','ImpExp',[#'Exp'{bool = true, os = "kalle"},
94
#'Exp'{bool = true, os = "kalle"}]),
95
?line {ok,[{'Exp',[107,97,108,108,101],true},{'Exp',[107,97,108,108,101],true}]} =
96
asn1_wrapper:decode('SetOfExternal','ImpExp',lists:flatten(Bytes32)),
99
asn1_wrapper:encode('SetOfExternal','ExpExp',[#'Exp'{bool = true, os = "kalle"},
100
#'Exp'{bool = true, os = "kalle"}]),
101
?line {ok,[{'Exp',[107,97,108,108,101],true},{'Exp',[107,97,108,108,101],true}]} =
102
asn1_wrapper:decode('SetOfExternal','ExpExp',lists:flatten(Bytes33)),
111
asn1_wrapper:encode('SetOfExternal','XNTNT',[#'XSetNT'{bool = true, os = "kalle"},
112
#'XSetNT'{bool = true, os = "kalle"}]),
113
?line {ok,[{'XSetNT',[107,97,108,108,101],true},{'XSetNT',[107,97,108,108,101],true}]} =
114
asn1_wrapper:decode('SetOfExternal','XNTNT',lists:flatten(Bytes41)),
117
asn1_wrapper:encode('SetOfExternal','XImpNT',[#'XSetNT'{bool = true, os = "kalle"},
118
#'XSetNT'{bool = true, os = "kalle"}]),
119
?line {ok,[{'XSetNT',[107,97,108,108,101],true},{'XSetNT',[107,97,108,108,101],true}]} =
120
asn1_wrapper:decode('SetOfExternal','XImpNT',lists:flatten(Bytes42)),
123
asn1_wrapper:encode('SetOfExternal','XExpNT',[#'XSetNT'{bool = true, os = "kalle"},
124
#'XSetNT'{bool = true, os = "kalle"}]),
125
?line {ok,[{'XSetNT',[107,97,108,108,101],true},{'XSetNT',[107,97,108,108,101],true}]} =
126
asn1_wrapper:decode('SetOfExternal','XExpNT',lists:flatten(Bytes43)),
131
asn1_wrapper:encode('SetOfExternal','XNTImp',[#'XSetImp'{bool = true, os = "kalle"},
132
#'XSetImp'{bool = true, os = "kalle"}]),
133
?line {ok,[{'XSetImp',[107,97,108,108,101],true},{'XSetImp',[107,97,108,108,101],true}]} =
134
asn1_wrapper:decode('SetOfExternal','XNTImp',lists:flatten(Bytes51)),
137
asn1_wrapper:encode('SetOfExternal','XImpImp',[#'XSetImp'{bool = true, os = "kalle"},
138
#'XSetImp'{bool = true, os = "kalle"}]),
139
?line {ok,[{'XSetImp',[107,97,108,108,101],true},{'XSetImp',[107,97,108,108,101],true}]} =
140
asn1_wrapper:decode('SetOfExternal','XImpImp',lists:flatten(Bytes52)),
143
asn1_wrapper:encode('SetOfExternal','XExpImp',[#'XSetImp'{bool = true, os = "kalle"},
144
#'XSetImp'{bool = true, os = "kalle"}]),
145
?line {ok,[{'XSetImp',[107,97,108,108,101],true},{'XSetImp',[107,97,108,108,101],true}]} =
146
asn1_wrapper:decode('SetOfExternal','XExpImp',lists:flatten(Bytes53)),
151
asn1_wrapper:encode('SetOfExternal','XNTExp',[#'XSetExp'{bool = true, os = "kalle"},
152
#'XSetExp'{bool = true, os = "kalle"}]),
153
?line {ok,[{'XSetExp',[107,97,108,108,101],true},{'XSetExp',[107,97,108,108,101],true}]} =
154
asn1_wrapper:decode('SetOfExternal','XNTExp',lists:flatten(Bytes61)),
157
asn1_wrapper:encode('SetOfExternal','XImpExp',[#'XSetExp'{bool = true, os = "kalle"},
158
#'XSetExp'{bool = true, os = "kalle"}]),
159
?line {ok,[{'XSetExp',[107,97,108,108,101],true},{'XSetExp',[107,97,108,108,101],true}]} =
160
asn1_wrapper:decode('SetOfExternal','XImpExp',lists:flatten(Bytes62)),
163
asn1_wrapper:encode('SetOfExternal','XExpExp',[#'XSetExp'{bool = true, os = "kalle"},
164
#'XSetExp'{bool = true, os = "kalle"}]),
165
?line {ok,[{'XSetExp',[107,97,108,108,101],true},{'XSetExp',[107,97,108,108,101],true}]} =
166
asn1_wrapper:decode('SetOfExternal','XExpExp',lists:flatten(Bytes63)),