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
25
-include_lib("test_server/include/test_server.hrl").
27
-record('Set',{bool, boolCon, boolPri, boolApp, boolExpCon, boolExpPri, boolExpApp}).
30
compile(Config,Rules,Options) ->
32
?line DataDir = ?config(data_dir,Config),
33
?line OutDir = ?config(priv_dir,Config),
34
?line true = code:add_patha(?config(priv_dir,Config)),
35
?line ok = asn1ct:compile(DataDir ++ "SetPrim",[Rules,{outdir,OutDir}]++Options).
44
asn1_wrapper:encode('SetPrim','Set',#'Set'{bool = true,
51
?line {ok,{'Set',true,true,true,true,true,true,true}} =
52
asn1_wrapper:decode('SetPrim','Set',lists:flatten(Bytes11)),
58
asn1_wrapper:encode('SetPrim','Set',#'Set'{bool = false,
65
?line {ok,{'Set',false,false,false,false,false,false,false}} =
66
asn1_wrapper:decode('SetPrim','Set',lists:flatten(Bytes12)),
72
asn1_wrapper:encode('SetPrim','Set',#'Set'{bool = false,
79
?line {ok,{'Set',false,true,false,true,false,true,false}} =
80
asn1_wrapper:decode('SetPrim','Set',lists:flatten(Bytes13)),
87
asn1_wrapper:encode('SetPrim','Empty',#'Empty'{}),
88
?line {ok,{'Empty'}} =
89
asn1_wrapper:decode('SetPrim','Empty',lists:flatten(Bytes21)),