diff options
author | Björn-Egil Dahlberg <[email protected]> | 2015-01-09 16:39:20 +0100 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2015-01-09 16:39:20 +0100 |
commit | 4d169378726394b76bf059ed84cc1b1528ef3ea0 (patch) | |
tree | 0271b1829a50f422c27484868b4cf3a933daf83e /lib/compiler | |
parent | 821d84c5860a9a26185efa19be407796422e3090 (diff) | |
download | otp-4d169378726394b76bf059ed84cc1b1528ef3ea0.tar.gz otp-4d169378726394b76bf059ed84cc1b1528ef3ea0.tar.bz2 otp-4d169378726394b76bf059ed84cc1b1528ef3ea0.zip |
compiler: Increase Maps code coverage
This commit covers 'split_block_label_used' in the beam_bool pass for Maps.
Diffstat (limited to 'lib/compiler')
-rw-r--r-- | lib/compiler/test/guard_SUITE.erl | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/compiler/test/guard_SUITE.erl b/lib/compiler/test/guard_SUITE.erl index eb205d09a7..f40003ad39 100644 --- a/lib/compiler/test/guard_SUITE.erl +++ b/lib/compiler/test/guard_SUITE.erl @@ -330,7 +330,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; @@ -442,6 +450,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. |