From aa4e27ebac9eb287069fab859fe5dcdab82c75bf Mon Sep 17 00:00:00 2001 From: Adam Lindberg Date: Thu, 12 Jan 2012 15:42:21 +0100 Subject: [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 --- lib/asn1/test/test_inline.erl | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'lib/asn1/test/test_inline.erl') 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 -- cgit v1.2.3