aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/test/test_inline.erl
diff options
context:
space:
mode:
authorAdam Lindberg <[email protected]>2012-01-12 15:42:21 +0100
committerAdam Lindberg <[email protected]>2012-02-28 14:59:32 +0100
commitaa4e27ebac9eb287069fab859fe5dcdab82c75bf (patch)
tree7303d7d5f04c888a7934b783937ac2e3dc7f978a /lib/asn1/test/test_inline.erl
parent93f0641c2122d6c23e2ac5f18579ef879599fc16 (diff)
downloadotp-aa4e27ebac9eb287069fab859fe5dcdab82c75bf.tar.gz
otp-aa4e27ebac9eb287069fab859fe5dcdab82c75bf.tar.bz2
otp-aa4e27ebac9eb287069fab859fe5dcdab82c75bf.zip
[asn1] Make tables and processes unnamed
- Refactor and clean up asn1_db process - Remove unused stop function in asn1ct.erl - Remove infinite loop possibilites in asn1ct_check.erl - test/1,2,3 now run in separate process - Update documentation for new test options
Diffstat (limited to 'lib/asn1/test/test_inline.erl')
-rw-r--r--lib/asn1/test/test_inline.erl17
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/asn1/test/test_inline.erl b/lib/asn1/test/test_inline.erl
index b7ec0d8921..8e25e65838 100644
--- a/lib/asn1/test/test_inline.erl
+++ b/lib/asn1/test/test_inline.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -19,7 +19,7 @@
%%
-module(test_inline).
--export([compile/3,main/1,inline1/3,performance/1,performance2/0]).
+-export([compile/3,main/2,inline1/3,performance/1,performance2/0]).
-export([mvrasn_inlined_encdec/2,mvrasn_encdec/2,
mi_encdec/2,m_encdec/2]).
@@ -34,7 +34,7 @@ compile(Config,_Rules,Opt) ->
?line true = code:add_patha(DataDir),
?line ok=asn1ct:compile(DataDir++"Mvrasn.set.asn",[{inline,mvrasn_inlined},{outdir,OutDir}]++Opt),
- ?line ok=asn1ct:compile(DataDir++"Mvrasn-11-6.asn",[{outdir,OutDir}]++Opt),
+% ?line ok=asn1ct:compile(DataDir++"Mvrasn-11-6.asn",[{outdir,OutDir}]++Opt),
?line ok=asn1ct:compile(DataDir++"Mod.set.asn",[{inline,m},{outdir,OutDir}]++Opt),
?line ok=remove_inlined_files(OutDir,[filename:join([OutDir,X])||X<-["m.erl","m.beam"]]),
@@ -71,8 +71,8 @@ inline1(Config,Rule,Opt) ->
ok
end.
-main(_Erule) ->
- ?line Val = val(),
+main(Config, _Erule) ->
+ Val = val(Config),
?line {ok,Bytes}=asn1_wrapper:encode(mvrasn_inlined,'InsertSubscriberDataArg',Val),
?line {ok,_Val2}=asn1_wrapper:decode(mvrasn_inlined,'InsertSubscriberDataArg',Bytes).
@@ -94,14 +94,15 @@ test_inline2(ber_bin_v2,Mod) ->
test_inline2(_,_) ->
ok.
-val() ->
- ?line {ok,Val} = asn1ct:value('Mvrasn-11-6','InsertSubscriberDataArg'),
+val(Config) ->
+ {ok,Val} = asn1ct:value('Mvrasn','InsertSubscriberDataArg',
+ [{i, ?config(priv_dir, Config)}]),
Val.
performance(Config) ->
?line true = code:add_patha(?config(priv_dir,Config)),
?line true = code:add_patha(?config(data_dir,Config)),
- ?line Val = val(),
+ Val = val(Config),
%% warm up
timer:tc(?MODULE,mvrasn_inlined_encdec,[2,Val]),
%% performance test