diff options
author | Hans Bolinder <[email protected]> | 2015-04-02 16:13:19 +0200 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2015-04-02 16:13:19 +0200 |
commit | 3382224b67fe4f1aa8018a97cd159ad5089ba555 (patch) | |
tree | f327873862e3a58a30bbe0a5ffd265d4764880e8 /lib/dialyzer/test/plt_SUITE.erl | |
parent | 31a445925408bdeea5d1b157d39756b5b7b1b165 (diff) | |
download | otp-3382224b67fe4f1aa8018a97cd159ad5089ba555.tar.gz otp-3382224b67fe4f1aa8018a97cd159ad5089ba555.tar.bz2 otp-3382224b67fe4f1aa8018a97cd159ad5089ba555.zip |
dialyzer: Move a testcase to plt_SUITE
Diffstat (limited to 'lib/dialyzer/test/plt_SUITE.erl')
-rw-r--r-- | lib/dialyzer/test/plt_SUITE.erl | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/lib/dialyzer/test/plt_SUITE.erl b/lib/dialyzer/test/plt_SUITE.erl index 0b8c6dec21..ef4cdc57f0 100644 --- a/lib/dialyzer/test/plt_SUITE.erl +++ b/lib/dialyzer/test/plt_SUITE.erl @@ -6,12 +6,12 @@ -include_lib("common_test/include/ct.hrl"). -include("dialyzer_test_constants.hrl"). --export([suite/0, all/0, build_plt/1, update_plt/1]). +-export([suite/0, all/0, build_plt/1, beam_tests/1, update_plt/1]). suite() -> [{timetrap, ?plt_timeout}]. -all() -> [build_plt, update_plt]. +all() -> [build_plt, beam_tests, update_plt]. build_plt(Config) -> OutDir = ?config(priv_dir, Config), @@ -20,6 +20,32 @@ build_plt(Config) -> fail -> ct:fail(plt_build_fail) end. +beam_tests(Config) when is_list(Config) -> + Prog = <<" + -module(no_auto_import). + + %% Copied from erl_lint_SUITE.erl, clash6 + + -export([size/1]). + + size([]) -> + 0; + size({N,_}) -> + N; + size([_|T]) -> + 1+size(T). + ">>, + Opts = [no_auto_import], + {ok, BeamFile} = compile(Config, Prog, no_auto_import, Opts), + [] = run_dialyzer([BeamFile]), + ok. + +run_dialyzer(Files) -> + dialyzer:run([{analysis_type, plt_build}, + {files, Files}, + {from, byte_code}, + {check_plt, false}]). + %%% [James Fish:] %%% If a function is removed from a module and the module has previously %%% been added to a PLT, the function will not be removed from PLT when |