diff options
author | Björn Gustavsson <[email protected]> | 2019-01-23 10:47:48 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2019-01-23 10:47:48 +0100 |
commit | cacf240d0f722c5c4cb9e4abf3c21a306a48b6c7 (patch) | |
tree | 92e5378363f42c7ba949868824fc141f0571a58f /erts/emulator/test/fun_SUITE.erl | |
parent | 2dc8ec94208e53828a2dd9d084a7b58f224b81fa (diff) | |
parent | 990976907841dd3122c82992ba9965ee313e988c (diff) | |
download | otp-cacf240d0f722c5c4cb9e4abf3c21a306a48b6c7.tar.gz otp-cacf240d0f722c5c4cb9e4abf3c21a306a48b6c7.tar.bz2 otp-cacf240d0f722c5c4cb9e4abf3c21a306a48b6c7.zip |
Merge branch 'bjorn/erts/optimize-is_function2'
* bjorn/erts/optimize-is_function2:
Optimize the is_function/2 guard test
Diffstat (limited to 'erts/emulator/test/fun_SUITE.erl')
-rw-r--r-- | erts/emulator/test/fun_SUITE.erl | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/erts/emulator/test/fun_SUITE.erl b/erts/emulator/test/fun_SUITE.erl index f8a879182e..4042b58ff2 100644 --- a/erts/emulator/test/fun_SUITE.erl +++ b/erts/emulator/test/fun_SUITE.erl @@ -710,6 +710,16 @@ t_is_function2(Config) when is_list(Config) -> bad_arity({}), bad_arity({a,b}), bad_arity(self()), + + %% Bad arity argument in guard test. + Fun = fun erlang:abs/1, + ok = if + is_function(Fun, -1) -> error; + is_function(Fun, 256) -> error; + is_function(Fun, a) -> error; + is_function(Fun, Fun) -> error; + true -> ok + end, ok. bad_arity(A) -> |