4
%% Copyright Ericsson AB 2005-2011. 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
21
common() -> [app_test, appup_test,testTimer_ber,testTimer_ber_bin,
22
testTimer_ber_bin_opt, testTimer_ber_bin_opt_driver, testTimer_per,
23
testTimer_per_bin, testTimer_per_bin_opt, testTimer_uper_bin,
24
testComment,testName2Number].
27
app_test(suite) -> [{asn1_app_test,all}].
28
appup_test(suite) -> [{asn1_appup_test,all}].
30
testTimer_ber(suite) -> [];
31
testTimer_ber(Config) ->
32
?line testTimer:compile(Config,ber,[]),
33
?line testTimer:go(Config,ber).
35
testTimer_ber_bin(suite) -> [];
36
testTimer_ber_bin(Config) ->
37
?line testTimer:compile(Config,ber_bin,[]),
38
?line testTimer:go(Config,ber_bin).
40
testTimer_ber_bin_opt(suite) -> [];
41
testTimer_ber_bin_opt(Config) ->
42
?line testTimer:compile(Config,ber_bin,[optimize]),
43
?line testTimer:go(Config,ber_bin).
45
testTimer_ber_bin_opt_driver(suite) -> [];
46
testTimer_ber_bin_opt_driver(Config) ->
47
?line testTimer:compile(Config,ber_bin,[optimize,driver]),
48
?line testTimer:go(Config,ber_bin).
50
testTimer_per(suite) -> [];
51
testTimer_per(Config) ->
52
?line testTimer:compile(Config,per,[]),
53
?line testTimer:go(Config,per).
55
testTimer_per_bin(suite) -> [];
56
testTimer_per_bin(Config) ->
57
?line testTimer:compile(Config,per_bin,[]),
58
?line testTimer:go(Config,per_bin).
60
testTimer_per_bin_opt(suite) -> [];
61
testTimer_per_bin_opt(Config) ->
62
?line testTimer:compile(Config,per_bin,[optimize]),
63
?line testTimer:go(Config,per_bin).
66
testTimer_uper_bin(suite) -> [];
67
testTimer_uper_bin(Config) ->
68
?line ok=testTimer:compile(Config,uper_bin,[]),
69
?line {comment,_} = testTimer:go(Config,uper_bin).
71
%% Test of multiple-line comment, OTP-8043
72
testComment(suite) -> [];
73
testComment(Config) ->
74
?line DataDir = ?config(data_dir,Config),
75
?line OutDir = ?config(priv_dir,Config),
77
?line ok = asn1ct:compile(DataDir ++ "Comment",[{outdir,OutDir}]),
79
?line {ok,Enc} = asn1_wrapper:encode('Comment','Seq',{'Seq',12,true}),
80
?line {ok,{'Seq',12,true}} = asn1_wrapper:decode('Comment','Seq',Enc),
83
testName2Number(suite) -> [];
84
testName2Number(Config) ->
85
DataDir = ?config(data_dir,Config),
86
OutDir = ?config(priv_dir,Config),
87
N2NOptions = [{n2n,Type}|| Type <-
88
['CauseMisc','CauseProtocol',
91
'CauseTransport','CauseNas']],
92
?line ok = asn1ct:compile(DataDir ++ "S1AP-IEs",[{outdir,OutDir}]++N2NOptions),
93
?line true = code:add_patha(OutDir),
95
?line 0 = 'S1AP-IEs':name2num_CauseMisc('control-processing-overload'),
96
?line 'unknown-PLMN' = 'S1AP-IEs':num2name_CauseMisc(5),