~statik/ubuntu/maverick/erlang/erlang-merge-testing

« back to all changes in this revision

Viewing changes to lib/asn1/test/testSeqTypeRefSeq.erl

  • Committer: Elliot Murphy
  • Date: 2010-06-08 03:55:44 UTC
  • mfrom: (3.5.6 squeeze)
  • Revision ID: elliot@elliotmurphy.com-20100608035544-dd8zh2swk7jr5rz2
* Merge with Debian unstable; remaining Ubuntu changes:
  - Drop libwxgtk2.8-dev build dependency. Wx isn't in main, and not
    supposed to. (LP #438365)
  - Drop erlang-wx binary.
  - Drop erlang-wx dependency from -megaco, -common-test, and -reltool, they
    do not really need wx. Also drop it from -debugger; the GUI needs wx,
    but it apparently has CLI bits as well, and is also needed by -megaco,
    so let's keep the package for now.
* Added missing symlinks to /usr/include for a few new header files.
* Fixed generation of ${erlang-base:Depends} and ${erlang-x11:Depends}
  substitution variables.
* Added a fix for a re:compile/2 crash on a long regular expression.
* Changed urgency to medium as the change fixes a security bug.
* Manpages in section 1 are needed even if only arch-dependent packages are
  built. So, re-enabled them.
* Fixed HiPE architecture recognition for powerpc Debian architecture.
* Moved xsltproc and fop to build-depends-indep and do not build
  documentation if only architecture-specific packages are built.
* Refreshed all patches.
* Made Emacs look in man5 and man7 for Erlang manpages and added code
  skeleton files to erlang-mode package.
* New upstream release.
* Moved manpages from incorrect sections 4 and 6 to correct 5 and 7
  (closes: #498492).
* Made manpages regexp in Emacs mode match only 3erl pages in section 3.
* Removed docb_gen script which is no longer needed to build manpages.
* Added erlang-doc package which contains documentation in HTML and PDF
  formats. This package replaces erlang-doc-html package and it's easier
  to synchronize it with the main Erlang packages as it's built from
  a single source package (closes: #558451).
* Removed RPATH from ssl and crypto application binaries as required by
  Debian policy.
* Added libwxgtk2.4-dev and libwxgtk2.6-dev to build conflicts.
* Added a few dpendencies for erlang-dialyzer, erlang-et, erlang-observer
  and erlang-examples packages which now call functions from more modules
  than in 1:13.b.3.
* Added a workaround which disables vfork() for hppa architecture
  (closes: #562218).
* Strictened check for JDK 1.5 adding a call to String(int[], int, int)
  because GCJ 4.4 doesn't implement it and OpenJDK isn't available for all
  architectures.
* Fixed erlang-manpages package section.
* Made erlang-depends add only substvars which are requested in
  debian/control file. This minimizes number of warnings from dh_gencontrol.
  Also, improved descriptions of the functions in erlang-depends escript.
* Added erlang-erl-docgen package to erlang-nox dependencies.
* Made dummy packages erlang-nox and erlang-x11 architecture all.
* Cleaned up working with custom substitution variables in debian/rules.
* Reorganized debian/rules to ensure that manpages arent built twice, and
  aren't built at all if only architecture-dependent packages are requested.
* Fixed project links in README.Debian.
* Added a new package erlang-jinterface which provides tools for
  communication of Java programs with Erlang processes. This adds build
  depandency on default-jdk and as a result enables Java module for IDL
  compiler.
* Bumped standards version to 3.8.4.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
%%
 
2
%% %CopyrightBegin%
 
3
%% 
 
4
%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
 
5
%% 
 
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/.
 
11
%% 
 
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
 
15
%% under the License.
 
16
%% 
 
17
%% %CopyrightEnd%
 
18
%%
 
19
%%
 
20
-module(testSeqTypeRefSeq).
 
21
 
 
22
-export([compile/3]).
 
23
-export([main/1]).
 
24
 
 
25
-include("test_server.hrl").
 
26
 
 
27
-record('Seq1',{bool1, int1, seq1}).
 
28
-record('Seq2',{seq2, bool2, int2}).
 
29
-record('Seq3',{bool3, seq3, int3}).
 
30
-record('Seq4',{seq41, seq42, seq43}).
 
31
-record('SeqIn',{boolIn, intIn}).
 
32
-record('SeqS1',{boolS1, intS1, seqS1}).
 
33
-record('SeqS1_seqS1',{boolIn, intIn}).
 
34
-record('SeqS2',{seqS2, boolS2, intS2}).
 
35
-record('SeqS2_seqS2',{boolIn, intIn}).
 
36
-record('SeqS3',{boolS3, seqS3, intS3}).
 
37
-record('SeqS3_seqS3',{boolIn, intIn}).
 
38
-record('SeqSTag',{seqS1, seqS2, seqS3}).
 
39
-record('SeqSTag_seqS1',{b1, i1}).
 
40
-record('SeqSTag_seqS2',{b2, i2}).
 
41
-record('SeqSTag_seqS3',{b3, i3}).
 
42
-record('SeqTRseq',{seqSeq, seqSeqI, seqSeqE, 'seqSeq-I', 'seqSeqI-I', 'seqSeqE-I', 'seqSeq-E', 'seqSeqI-E', 'seqSeqE-E'}).
 
43
-record('SeqSeq',{seqInt, seqOs}).
 
44
-record('SeqSeqImp',{seqInt, seqOs}).
 
45
-record('SeqSeqExp',{seqInt, seqOs}).
 
46
 
 
47
 
 
48
 
 
49
compile(Config,Rules,Options) ->
 
50
 
 
51
    ?line DataDir = ?config(data_dir,Config),
 
52
    ?line OutDir = ?config(priv_dir,Config),
 
53
    ?line true = code:add_patha(?config(priv_dir,Config)),
 
54
    ?line ok = asn1ct:compile(DataDir ++ "SeqTypeRefSeq",[Rules,{outdir,OutDir}]++Options).
 
55
 
 
56
 
 
57
 
 
58
main(_Rules) ->
 
59
    
 
60
    
 
61
    ?line {ok,Bytes11} = 
 
62
        asn1_wrapper:encode('SeqTypeRefSeq','Seq1',#'Seq1'{bool1 = true,
 
63
                                                     int1 = 15,
 
64
                                                     seq1 = #'SeqIn'{boolIn = true,
 
65
                                                                     intIn = 66}}), 
 
66
    ?line {ok,{'Seq1',true,15,{'SeqIn',true,66}}} = 
 
67
        asn1_wrapper:decode('SeqTypeRefSeq','Seq1',lists:flatten(Bytes11)),
 
68
    
 
69
    
 
70
    
 
71
    ?line {ok,Bytes12} = 
 
72
        asn1_wrapper:encode('SeqTypeRefSeq','Seq2',#'Seq2'{seq2 = #'SeqIn'{boolIn = true,
 
73
                                                                     intIn = 66},
 
74
                                                     bool2 = true,
 
75
                                                     int2 = 15}),    
 
76
    ?line {ok,{'Seq2',{'SeqIn',true,66},true,15}} = 
 
77
        asn1_wrapper:decode('SeqTypeRefSeq','Seq2',lists:flatten(Bytes12)),
 
78
    
 
79
    
 
80
    ?line {ok,Bytes13} = 
 
81
        asn1_wrapper:encode('SeqTypeRefSeq','Seq3',#'Seq3'{bool3 = true,
 
82
                                                     seq3 = #'SeqIn'{boolIn = true,
 
83
                                                                     intIn = 66},
 
84
                                                     int3 = 15}),    
 
85
    ?line {ok,{'Seq3',true,{'SeqIn',true,66},15}} = 
 
86
        asn1_wrapper:decode('SeqTypeRefSeq','Seq3',lists:flatten(Bytes13)),
 
87
    
 
88
    
 
89
    
 
90
    ?line {ok,Bytes14} = 
 
91
        asn1_wrapper:encode('SeqTypeRefSeq','Seq4',#'Seq4'{seq41 = #'SeqIn'{boolIn = true,
 
92
                                                                      intIn = 66},
 
93
                                                     seq42 = #'SeqIn'{boolIn = true,
 
94
                                                                      intIn = 66},
 
95
                                                     seq43 = #'SeqIn'{boolIn = true,
 
96
                                                                      intIn = 66}}),    
 
97
    ?line {ok,{'Seq4',{'SeqIn',true,66},{'SeqIn',true,66},{'SeqIn',true,66}}} = 
 
98
        asn1_wrapper:decode('SeqTypeRefSeq','Seq4',lists:flatten(Bytes14)),
 
99
    
 
100
    
 
101
    
 
102
    
 
103
    
 
104
    
 
105
    
 
106
    
 
107
    ?line {ok,Bytes21} = 
 
108
        asn1_wrapper:encode('SeqTypeRefSeq','SeqS1',#'SeqS1'{boolS1 = true,
 
109
                                                       intS1 = 15,
 
110
                                                       seqS1 = #'SeqS1_seqS1'{boolIn = true,
 
111
                                                                              intIn = 66}}), 
 
112
    ?line {ok,{'SeqS1',true,15,{'SeqS1_seqS1',true,66}}} = 
 
113
        asn1_wrapper:decode('SeqTypeRefSeq','SeqS1',lists:flatten(Bytes21)),
 
114
    
 
115
    
 
116
    ?line {ok,Bytes22} = 
 
117
        asn1_wrapper:encode('SeqTypeRefSeq','SeqS2',#'SeqS2'{seqS2 = #'SeqS2_seqS2'{boolIn = true,
 
118
                                                                              intIn = 66},
 
119
                                                       boolS2 = true,
 
120
                                                       intS2 = 15}),    
 
121
    ?line {ok,{'SeqS2',{'SeqS2_seqS2',true,66},true,15}} = 
 
122
        asn1_wrapper:decode('SeqTypeRefSeq','SeqS2',lists:flatten(Bytes22)),
 
123
    
 
124
    
 
125
    
 
126
    ?line {ok,Bytes23} = 
 
127
        asn1_wrapper:encode('SeqTypeRefSeq','SeqS3',#'SeqS3'{boolS3 = true,
 
128
                                                       seqS3 = #'SeqS3_seqS3'{boolIn = true,
 
129
                                                                              intIn = 66},
 
130
                                                       intS3 = 15}),    
 
131
    ?line {ok,{'SeqS3',true,{'SeqS3_seqS3',true,66},15}} = 
 
132
        asn1_wrapper:decode('SeqTypeRefSeq','SeqS3',lists:flatten(Bytes23)),
 
133
    
 
134
    
 
135
    
 
136
    
 
137
    
 
138
    
 
139
    ?line {ok,Bytes31} = 
 
140
        asn1_wrapper:encode('SeqTypeRefSeq','SeqSTag',#'SeqSTag'{seqS1 = #'SeqSTag_seqS1'{b1 = true,
 
141
                                                                                    i1 = 11},
 
142
                                                           seqS2 = #'SeqSTag_seqS2'{b2 = true,
 
143
                                                                                    i2 = 22},
 
144
                                                           seqS3 = #'SeqSTag_seqS3'{b3 = true,
 
145
                                                                                    i3 = 33}}),    
 
146
    ?line {ok,{'SeqSTag',{'SeqSTag_seqS1',true,11},
 
147
               {'SeqSTag_seqS2',true,22},
 
148
               {'SeqSTag_seqS3',true,33}}} = 
 
149
        asn1_wrapper:decode('SeqTypeRefSeq','SeqSTag',lists:flatten(Bytes31)),
 
150
    
 
151
    
 
152
    
 
153
    
 
154
    
 
155
    ?line {ok,Bytes41} = 
 
156
        asn1_wrapper:encode('SeqTypeRefSeq','SeqTRseq',
 
157
                      #'SeqTRseq'{'seqSeq' = #'SeqSeq'{seqOs = "A1",
 
158
                                                       seqInt = 2},
 
159
                                  'seqSeqI' = #'SeqSeq'{seqOs = "A2",
 
160
                                                        seqInt = 2},
 
161
                                  'seqSeqE' = #'SeqSeq'{seqOs = "A3",
 
162
                                                        seqInt = 2},
 
163
                                  'seqSeq-I' = #'SeqSeqImp'{seqOs = "A4",
 
164
                                                            seqInt = 2},
 
165
                                  'seqSeqI-I' = #'SeqSeqImp'{seqOs = "A5",
 
166
                                                             seqInt = 2},
 
167
                                  'seqSeqE-I' = #'SeqSeqImp'{seqOs = "A6",
 
168
                                                             seqInt = 2},
 
169
                                  'seqSeq-E' = #'SeqSeqExp'{seqOs = "A7",
 
170
                                                            seqInt = 2},
 
171
                                  'seqSeqI-E' = #'SeqSeqExp'{seqOs = "A8",
 
172
                                                             seqInt = 2},
 
173
                                  'seqSeqE-E' = #'SeqSeqExp'{seqOs = "A9",
 
174
                                                             seqInt = 2}}),
 
175
    ?line {ok,{'SeqTRseq',{'SeqSeq',2,"A1"},
 
176
      {'SeqSeq',2,"A2"},
 
177
      {'SeqSeq',2,"A3"},
 
178
      {'SeqSeqImp',2,"A4"},
 
179
      {'SeqSeqImp',2,"A5"},
 
180
      {'SeqSeqImp',2,"A6"},
 
181
      {'SeqSeqExp',2,"A7"},
 
182
      {'SeqSeqExp',2,"A8"},
 
183
      {'SeqSeqExp',2,"A9"}}} = 
 
184
        asn1_wrapper:decode('SeqTypeRefSeq','SeqTRseq',lists:flatten(Bytes41)),
 
185
    
 
186
    ok.