diff options
author | Björn Gustavsson <[email protected]> | 2014-03-14 11:53:26 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2014-03-14 11:53:26 +0100 |
commit | dde1023b527eecaddb0c398eeed11df4e834f994 (patch) | |
tree | bdb9f7b906ddc456d39b775c6e72cff7f8cfc804 /lib/compiler/test/warnings_SUITE.erl | |
parent | 264e1eed4c3c67b3772f9b616b144e117d351044 (diff) | |
parent | 4777f33ece33aaaa5066730b950f185cbd5ae816 (diff) | |
download | otp-dde1023b527eecaddb0c398eeed11df4e834f994.tar.gz otp-dde1023b527eecaddb0c398eeed11df4e834f994.tar.bz2 otp-dde1023b527eecaddb0c398eeed11df4e834f994.zip |
Merge branch 'nox/compiler/sys_core_fold-redundant-clauses'
* nox/compiler/sys_core_fold-redundant-clauses:
Properly handle redundant boolean clauses in sys_core_fold
Diffstat (limited to 'lib/compiler/test/warnings_SUITE.erl')
-rw-r--r-- | lib/compiler/test/warnings_SUITE.erl | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/lib/compiler/test/warnings_SUITE.erl b/lib/compiler/test/warnings_SUITE.erl index f63299ea35..de56a59e12 100644 --- a/lib/compiler/test/warnings_SUITE.erl +++ b/lib/compiler/test/warnings_SUITE.erl @@ -38,7 +38,7 @@ -export([pattern/1,pattern2/1,pattern3/1,pattern4/1, guard/1,bad_arith/1,bool_cases/1,bad_apply/1, files/1,effect/1,bin_opt_info/1,bin_construction/1, comprehensions/1, - maps/1]). + maps/1,redundant_boolean_clauses/1]). % Default timetrap timeout (set in init_per_testcase). -define(default_timeout, ?t:minutes(2)). @@ -62,7 +62,8 @@ groups() -> [{p,test_lib:parallel(), [pattern,pattern2,pattern3,pattern4,guard, bad_arith,bool_cases,bad_apply,files,effect, - bin_opt_info,bin_construction,comprehensions,maps]}]. + bin_opt_info,bin_construction,comprehensions,maps, + redundant_boolean_clauses]}]. init_per_suite(Config) -> Config. @@ -201,6 +202,8 @@ pattern4(Config) when is_list(Config) -> [nowarn_unused_vars], {warnings, [{9,sys_core_fold,no_clause_match}, + {11,sys_core_fold,nomatch_shadow}, + {15,sys_core_fold,nomatch_shadow}, {18,sys_core_fold,no_clause_match}, {23,sys_core_fold,no_clause_match}, {33,sys_core_fold,no_clause_match} @@ -573,6 +576,21 @@ maps(Config) when is_list(Config) -> run(Config, Ts), ok. +redundant_boolean_clauses(Config) when is_list(Config) -> + Ts = [{redundant_boolean_clauses, + <<" + t(X) -> + case X == 0 of + false -> no; + false -> no; + true -> yes + end. + ">>, + [], + {warnings,[{5,sys_core_fold,nomatch_shadow}]}}], + run(Config, Ts), + ok. + %%% %%% End of test cases. %%% |