aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2018-03-07 12:34:20 +0100
committerGitHub <[email protected]>2018-03-07 12:34:20 +0100
commit249549e8102d68ab086c418fa93494906c4445d0 (patch)
treea51708747e176244e700dafa10ad6e3b9621d57b /lib/compiler/test
parenteec60603d76f0e3a12d1f7238ac5e829a17e9696 (diff)
parent8f057e62df58eac610d9b958118c4a536ca675da (diff)
downloadotp-249549e8102d68ab086c418fa93494906c4445d0.tar.gz
otp-249549e8102d68ab086c418fa93494906c4445d0.tar.bz2
otp-249549e8102d68ab086c418fa93494906c4445d0.zip
Merge pull request #1732 from bjorng/bjorn/compiler/beam_type
Refactor and fix minor bugs in beam_type
Diffstat (limited to 'lib/compiler/test')
-rw-r--r--lib/compiler/test/beam_type_SUITE.erl25
1 files changed, 24 insertions, 1 deletions
diff --git a/lib/compiler/test/beam_type_SUITE.erl b/lib/compiler/test/beam_type_SUITE.erl
index e33df809ff..541075af2a 100644
--- a/lib/compiler/test/beam_type_SUITE.erl
+++ b/lib/compiler/test/beam_type_SUITE.erl
@@ -122,7 +122,7 @@ do_integers_5(X0, Y0) ->
3 -> three
end.
-coverage(_Config) ->
+coverage(Config) ->
{'EXIT',{badarith,_}} = (catch id(1) bsl 0.5),
{'EXIT',{badarith,_}} = (catch id(2.0) bsl 2),
{'EXIT',{badarith,_}} = (catch a + 0.5),
@@ -133,6 +133,29 @@ coverage(_Config) ->
id(id(42) band 387439739874298734983787934283479243879),
id(-1 band id(13)),
+ error = if
+ is_map(Config), is_integer(Config) -> ok;
+ true -> error
+ end,
+ error = if
+ is_map(Config), is_atom(Config) -> ok;
+ true -> error
+ end,
+ error = if
+ is_map(Config), is_tuple(Config) -> ok;
+ true -> error
+ end,
+ error = if
+ is_integer(Config), is_bitstring(Config) -> ok;
+ true -> error
+ end,
+
+ ok = case Config of
+ <<_>> when is_binary(Config) ->
+ impossible;
+ [_|_] ->
+ ok
+ end,
ok.
booleans(_Config) ->