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(testSeqOfExternal).
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 ++ "SeqOfExternal",[Rules,{outdir,OutDir}]++Options).
47
asn1_wrapper:encode('SeqOfExternal','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('SeqOfExternal','NTNT',lists:flatten(Bytes11)),
53
asn1_wrapper:encode('SeqOfExternal','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('SeqOfExternal','ImpNT',lists:flatten(Bytes12)),
59
asn1_wrapper:encode('SeqOfExternal','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('SeqOfExternal','ExpNT',lists:flatten(Bytes13)),
67
asn1_wrapper:encode('SeqOfExternal','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('SeqOfExternal','NTImp',lists:flatten(Bytes21)),
73
asn1_wrapper:encode('SeqOfExternal','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('SeqOfExternal','ImpImp',lists:flatten(Bytes22)),
79
asn1_wrapper:encode('SeqOfExternal','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('SeqOfExternal','ExpImp',lists:flatten(Bytes23)),
87
asn1_wrapper:encode('SeqOfExternal','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('SeqOfExternal','NTExp',lists:flatten(Bytes31)),
93
asn1_wrapper:encode('SeqOfExternal','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('SeqOfExternal','ImpExp',lists:flatten(Bytes32)),
99
asn1_wrapper:encode('SeqOfExternal','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('SeqOfExternal','ExpExp',lists:flatten(Bytes33)),
111
asn1_wrapper:encode('SeqOfExternal','XNTNT',[#'XSeqNT'{bool = true, os = "kalle"},
112
#'XSeqNT'{bool = true, os = "kalle"}]),
113
?line {ok,[{'XSeqNT',[107,97,108,108,101],true},{'XSeqNT',[107,97,108,108,101],true}]} =
114
asn1_wrapper:decode('SeqOfExternal','XNTNT',lists:flatten(Bytes41)),
117
asn1_wrapper:encode('SeqOfExternal','XImpNT',[#'XSeqNT'{bool = true, os = "kalle"},
118
#'XSeqNT'{bool = true, os = "kalle"}]),
119
?line {ok,[{'XSeqNT',[107,97,108,108,101],true},{'XSeqNT',[107,97,108,108,101],true}]} =
120
asn1_wrapper:decode('SeqOfExternal','XImpNT',lists:flatten(Bytes42)),
123
asn1_wrapper:encode('SeqOfExternal','XExpNT',[#'XSeqNT'{bool = true, os = "kalle"},
124
#'XSeqNT'{bool = true, os = "kalle"}]),
125
?line {ok,[{'XSeqNT',[107,97,108,108,101],true},{'XSeqNT',[107,97,108,108,101],true}]} =
126
asn1_wrapper:decode('SeqOfExternal','XExpNT',lists:flatten(Bytes43)),
131
asn1_wrapper:encode('SeqOfExternal','XNTImp',[#'XSeqImp'{bool = true, os = "kalle"},
132
#'XSeqImp'{bool = true, os = "kalle"}]),
133
?line {ok,[{'XSeqImp',[107,97,108,108,101],true},{'XSeqImp',[107,97,108,108,101],true}]} =
134
asn1_wrapper:decode('SeqOfExternal','XNTImp',lists:flatten(Bytes51)),
137
asn1_wrapper:encode('SeqOfExternal','XImpImp',[#'XSeqImp'{bool = true, os = "kalle"},
138
#'XSeqImp'{bool = true, os = "kalle"}]),
139
?line {ok,[{'XSeqImp',[107,97,108,108,101],true},{'XSeqImp',[107,97,108,108,101],true}]} =
140
asn1_wrapper:decode('SeqOfExternal','XImpImp',lists:flatten(Bytes52)),
143
asn1_wrapper:encode('SeqOfExternal','XExpImp',[#'XSeqImp'{bool = true, os = "kalle"},
144
#'XSeqImp'{bool = true, os = "kalle"}]),
145
?line {ok,[{'XSeqImp',[107,97,108,108,101],true},{'XSeqImp',[107,97,108,108,101],true}]} =
146
asn1_wrapper:decode('SeqOfExternal','XExpImp',lists:flatten(Bytes53)),
151
asn1_wrapper:encode('SeqOfExternal','XNTExp',[#'XSeqExp'{bool = true, os = "kalle"},
152
#'XSeqExp'{bool = true, os = "kalle"}]),
153
?line {ok,[{'XSeqExp',[107,97,108,108,101],true},{'XSeqExp',[107,97,108,108,101],true}]} =
154
asn1_wrapper:decode('SeqOfExternal','XNTExp',lists:flatten(Bytes61)),
157
asn1_wrapper:encode('SeqOfExternal','XImpExp',[#'XSeqExp'{bool = true, os = "kalle"},
158
#'XSeqExp'{bool = true, os = "kalle"}]),
159
?line {ok,[{'XSeqExp',[107,97,108,108,101],true},{'XSeqExp',[107,97,108,108,101],true}]} =
160
asn1_wrapper:decode('SeqOfExternal','XImpExp',lists:flatten(Bytes62)),
163
asn1_wrapper:encode('SeqOfExternal','XExpExp',[#'XSeqExp'{bool = true, os = "kalle"},
164
#'XSeqExp'{bool = true, os = "kalle"}]),
165
?line {ok,[{'XSeqExp',[107,97,108,108,101],true},{'XSeqExp',[107,97,108,108,101],true}]} =
166
asn1_wrapper:decode('SeqOfExternal','XExpExp',lists:flatten(Bytes63)),