aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2015-01-23 15:31:45 +0100
committerBjörn-Egil Dahlberg <[email protected]>2015-01-23 15:31:45 +0100
commit251b52eee5a36dcefc30a83c9b37ca62eedc2e71 (patch)
tree50c29463e2ac9388be188c9987dba3710ef79b9e /lib/compiler/test
parent75204f98d1464c05a5b5e756a43663ad5b8b640b (diff)
parent13696ffaaf6440c3f1e28f740679d096ddd87c17 (diff)
downloadotp-251b52eee5a36dcefc30a83c9b37ca62eedc2e71.tar.gz
otp-251b52eee5a36dcefc30a83c9b37ca62eedc2e71.tar.bz2
otp-251b52eee5a36dcefc30a83c9b37ca62eedc2e71.zip
Merge branch 'egil/fix-maps-compiler-coverage/OTP-12425'
* egil/fix-maps-compiler-coverage/OTP-12425: compiler: Rename util function to adhere to name policy compiler: Remove get_map_elements label check in blocks compiler: Remove unnecassary guard for get_map_elements compiler: Remove dead code in beam_flatten compiler: Increase Maps code coverage
Diffstat (limited to 'lib/compiler/test')
-rw-r--r--lib/compiler/test/guard_SUITE.erl13
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/compiler/test/guard_SUITE.erl b/lib/compiler/test/guard_SUITE.erl
index 48badb439e..882e2c3f8b 100644
--- a/lib/compiler/test/guard_SUITE.erl
+++ b/lib/compiler/test/guard_SUITE.erl
@@ -331,7 +331,15 @@ complex_semicolon(Config) when is_list(Config) ->
?line ok = csemi6({a,b}, 0),
?line ok = csemi6({}, 3),
?line ok = csemi6({a,b,c}, 3),
-
+
+ %% 7
+ error = csemi7(#{a=>1}, 1, 0),
+ error = csemi7(<<>>, 1, 0),
+ ok = csemi7(#{a=>1}, 3, 0),
+ ok = csemi7(#{a=>1}, 0, 3),
+ ok = csemi7(#{a=>1}, 3, 3),
+ ok = csemi7(#{a=>1, b=>3}, 0, 0),
+
ok.
csemi1(Type, Val) when is_list(Val), Type == float;
@@ -443,6 +451,9 @@ csemi5(_, _) -> error.
csemi6(A, B) when hd([tuple_size(A)]) > 1; abs(B) > 2 -> ok;
csemi6(_, _) -> error.
+csemi7(A, B, C) when A#{a:=B} > #{a=>1}; abs(C) > 2 -> ok;
+csemi7(_, _, _) -> error.
+
comma(Config) when is_list(Config) ->
%% ',' combinations of literal true/false.