aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2018-01-30 08:28:29 +0100
committerBjörn Gustavsson <[email protected]>2018-03-02 13:04:17 +0100
commitcebf6f0c68d231af8dcdb6bdf149ae9d870e9e6d (patch)
treeb3b7fa6c4875cf51104c114f3fdabe84a673ffaf /lib/compiler/test
parenteee8655788d29a88d0db37637d1973e9f0f9940c (diff)
downloadotp-cebf6f0c68d231af8dcdb6bdf149ae9d870e9e6d.tar.gz
otp-cebf6f0c68d231af8dcdb6bdf149ae9d870e9e6d.tar.bz2
otp-cebf6f0c68d231af8dcdb6bdf149ae9d870e9e6d.zip
beam_type: Refactor simplifications of instructions
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) ->