diff options
author | Björn Gustavsson <[email protected]> | 2019-03-22 07:23:08 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2019-03-25 09:58:58 +0100 |
commit | 683ee3a7778f0c912ceffa660554909cdd9b88e5 (patch) | |
tree | 9e219f82e8bccdb3e9aa4f03ebae20b4aec71b2c /lib | |
parent | 07f8099865b5a5d38e56684186e52345f955af48 (diff) | |
download | otp-683ee3a7778f0c912ceffa660554909cdd9b88e5.tar.gz otp-683ee3a7778f0c912ceffa660554909cdd9b88e5.tar.bz2 otp-683ee3a7778f0c912ceffa660554909cdd9b88e5.zip |
Cover return type determination of lists functions
Diffstat (limited to 'lib')
-rw-r--r-- | lib/compiler/test/beam_type_SUITE.erl | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/lib/compiler/test/beam_type_SUITE.erl b/lib/compiler/test/beam_type_SUITE.erl index a7ffc3f60a..882e281a44 100644 --- a/lib/compiler/test/beam_type_SUITE.erl +++ b/lib/compiler/test/beam_type_SUITE.erl @@ -24,7 +24,7 @@ integers/1,numbers/1,coverage/1,booleans/1,setelement/1, cons/1,tuple/1,record_float/1,binary_float/1,float_compare/1, arity_checks/1,elixir_binaries/1,find_best/1, - test_size/1]). + test_size/1,cover_lists_functions/1]). suite() -> [{ct_hooks,[ts_install_cth]}]. @@ -46,7 +46,8 @@ groups() -> arity_checks, elixir_binaries, find_best, - test_size + test_size, + cover_lists_functions ]}]. init_per_suite(Config) -> @@ -473,5 +474,18 @@ do_test_size(Term) when is_tuple(Term) -> do_test_size(Term) when is_binary(Term) -> size(Term). +cover_lists_functions(Config) -> + case lists:suffix([no|Config], Config) of + true -> + ct:fail(should_be_false); + false -> + ok + end, + Zipped = lists:zipwith(fun(A, B) -> {A,B} end, + lists:duplicate(length(Config), zip), + Config), + true = is_list(Zipped), + ok. + id(I) -> I. |