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(testChoTypeRefSeq).
25
-include_lib("test_server/include/test_server.hrl").
27
-record('ChoSeq',{seqInt, seqOs}).
28
-record('ChoSeqImp',{seqInt, seqOs}).
29
-record('ChoSeqExp',{seqInt, seqOs}).
32
compile(Config,Rules,Options) ->
34
?line DataDir = ?config(data_dir,Config),
35
?line OutDir = ?config(priv_dir,Config),
36
?line true = code:add_patha(?config(priv_dir,Config)),
37
?line ok = asn1ct:compile(DataDir ++ "ChoTypeRefSeq",[Rules,{outdir,OutDir}]++Options).
44
asn1_wrapper:encode('ChoTypeRefSeq','ChoTRseq',
45
{choSeq,#'ChoSeq'{seqInt = 88,
46
seqOs = "A string"}}),
47
?line {ok,{choSeq,{'ChoSeq',88,"A string"}}} =
48
asn1_wrapper:decode('ChoTypeRefSeq','ChoTRseq',lists:flatten(Bytes1)),
52
asn1_wrapper:encode('ChoTypeRefSeq','ChoTRseq',
53
{choSeqI,#'ChoSeq'{seqInt = 88,
54
seqOs = "A string"}}),
55
?line {ok,{choSeqI,{'ChoSeq',88,"A string"}}} =
56
asn1_wrapper:decode('ChoTypeRefSeq','ChoTRseq',lists:flatten(Bytes2)),
60
asn1_wrapper:encode('ChoTypeRefSeq','ChoTRseq',
61
{choSeqE,#'ChoSeq'{seqInt = 88,
62
seqOs = "A string"}}),
63
?line {ok,{choSeqE,{'ChoSeq',88,"A string"}}} =
64
asn1_wrapper:decode('ChoTypeRefSeq','ChoTRseq',lists:flatten(Bytes3)),
68
asn1_wrapper:encode('ChoTypeRefSeq','ChoTRseq',
69
{'choSeq-I',#'ChoSeqImp'{seqInt = 88,
70
seqOs = "A string"}}),
71
?line {ok,{'choSeq-I',{'ChoSeqImp',88,"A string"}}} =
72
asn1_wrapper:decode('ChoTypeRefSeq','ChoTRseq',lists:flatten(Bytes4)),
76
asn1_wrapper:encode('ChoTypeRefSeq','ChoTRseq',
77
{'choSeqI-I',#'ChoSeqImp'{seqInt = 88,
78
seqOs = "A string"}}),
79
?line {ok,{'choSeqI-I',{'ChoSeqImp',88,"A string"}}} =
80
asn1_wrapper:decode('ChoTypeRefSeq','ChoTRseq',lists:flatten(Bytes5)),
84
asn1_wrapper:encode('ChoTypeRefSeq','ChoTRseq',
85
{'choSeqE-I',#'ChoSeqImp'{seqInt = 88,
86
seqOs = "A string"}}),
87
?line {ok,{'choSeqE-I',{'ChoSeqImp',88,"A string"}}} =
88
asn1_wrapper:decode('ChoTypeRefSeq','ChoTRseq',lists:flatten(Bytes6)),
92
asn1_wrapper:encode('ChoTypeRefSeq','ChoTRseq',
93
{'choSeq-E',#'ChoSeqExp'{seqInt = 88,
94
seqOs = "A string"}}),
95
?line {ok,{'choSeq-E',{'ChoSeqExp',88,"A string"}}} =
96
asn1_wrapper:decode('ChoTypeRefSeq','ChoTRseq',lists:flatten(Bytes7)),
100
asn1_wrapper:encode('ChoTypeRefSeq','ChoTRseq',
101
{'choSeqI-E',#'ChoSeqExp'{seqInt = 88,
102
seqOs = "A string"}}),
103
?line {ok,{'choSeqI-E',{'ChoSeqExp',88,"A string"}}} =
104
asn1_wrapper:decode('ChoTypeRefSeq','ChoTRseq',lists:flatten(Bytes8)),
108
asn1_wrapper:encode('ChoTypeRefSeq','ChoTRseq',
109
{'choSeqE-E',#'ChoSeqExp'{seqInt = 88,
110
seqOs = "A string"}}),
111
?line {ok,{'choSeqE-E',{'ChoSeqExp',88,"A string"}}} =
112
asn1_wrapper:decode('ChoTypeRefSeq','ChoTRseq',lists:flatten(Bytes9)),