diff options
author | Björn Gustavsson <[email protected]> | 2013-09-10 09:07:00 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2013-09-18 11:45:00 +0200 |
commit | 84836ff4cee2b1f05d796bb327d0c5138553f6ec (patch) | |
tree | cdbf9466ccafea03a393c94aec424d3fd21f3cf3 /lib/asn1/test/test_special_decode_performance.erl | |
parent | 85354c27e11e109efb94bd4f867831a295c1a1cf (diff) | |
download | otp-84836ff4cee2b1f05d796bb327d0c5138553f6ec.tar.gz otp-84836ff4cee2b1f05d796bb327d0c5138553f6ec.tar.bz2 otp-84836ff4cee2b1f05d796bb327d0c5138553f6ec.zip |
Don't allow unused exported functions in test case helpers
To keep the test case clean, add an xref test case to ensure that
there are no unused functions in the any of the test case helper
modules. Eliminate 4 functions that were exported just so that
timer:tc/3 could be used (use timer:tc/1 with a fun instead).
Diffstat (limited to 'lib/asn1/test/test_special_decode_performance.erl')
-rw-r--r-- | lib/asn1/test/test_special_decode_performance.erl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/asn1/test/test_special_decode_performance.erl b/lib/asn1/test/test_special_decode_performance.erl index 7dfab1f25a..0f52ae4cd2 100644 --- a/lib/asn1/test/test_special_decode_performance.erl +++ b/lib/asn1/test/test_special_decode_performance.erl @@ -19,7 +19,7 @@ %% -module(test_special_decode_performance). --export([go/1,loop2/4,loop1/5]). +-export([go/1]). -include_lib("test_server/include/test_server.hrl"). @@ -49,7 +49,7 @@ go1(_,_,[],_,_,AccTime) -> %% go1 for common decode go1(common,Mod,_,Bin,N,_) -> ?line TT=get_top_type(Mod), - ?line {Time,Result}=timer:tc(?MODULE,loop1,[Mod,decode,TT,Bin,N]), + {Time,Result} = timer:tc(fun() -> loop1(Mod, decode, TT, Bin, N) end), case Result of {ok,_R1} -> io:format("common Decode ~p:decode, ~p times on time ~p~n", @@ -59,7 +59,7 @@ go1(common,Mod,_,Bin,N,_) -> end, Time; go1(Dec,Mod,[F|Fs],Bin,N,AccTime) -> - ?line {Time,Result}=timer:tc(?MODULE,loop2,[Mod,F,Bin,N]), + {Time,Result}=timer:tc(fun() -> loop2(Mod, F, Bin, N) end), case Result of {ok,_R1} -> io:format("~p Decode ~p:~p, ~p times on time ~p~n",[Dec,Mod,F,N,Time]); |