diff options
author | Björn Gustavsson <[email protected]> | 2018-03-21 10:06:10 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2018-03-21 10:06:10 +0100 |
commit | 2c5711efcdd48ab8a9b7cd9ae27c97b9c1f8c37e (patch) | |
tree | c57a003fb9902c58008d21f6630efeb80209b04c /lib/compiler/test/bs_construct_SUITE.erl | |
parent | f975e76672a8faabe6e9652df7ad743f148ceeb3 (diff) | |
parent | 2371741165a0f6c39893fe9f586d7586fd7d02a1 (diff) | |
download | otp-2c5711efcdd48ab8a9b7cd9ae27c97b9c1f8c37e.tar.gz otp-2c5711efcdd48ab8a9b7cd9ae27c97b9c1f8c37e.tar.bz2 otp-2c5711efcdd48ab8a9b7cd9ae27c97b9c1f8c37e.zip |
Merge branch 'bjorn/misc-beam-fixes'
* bjorn/misc-beam-fixes:
Correctly handle get_map_elements with a literal map
core_parse: Fix handling of negative sizes in binaries
Diffstat (limited to 'lib/compiler/test/bs_construct_SUITE.erl')
-rw-r--r-- | lib/compiler/test/bs_construct_SUITE.erl | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/compiler/test/bs_construct_SUITE.erl b/lib/compiler/test/bs_construct_SUITE.erl index da99aba346..7c5ad97f7e 100644 --- a/lib/compiler/test/bs_construct_SUITE.erl +++ b/lib/compiler/test/bs_construct_SUITE.erl @@ -303,7 +303,14 @@ fail(Config) when is_list(Config) -> {'EXIT',{badarg,_}} = (catch <<42.0/integer>>), {'EXIT',{badarg,_}} = (catch <<42/binary>>), {'EXIT',{badarg,_}} = (catch <<an_atom/integer>>), - + + %% Bad literal sizes + Bin = i(<<>>), + {'EXIT',{badarg,_}} = (catch <<0:(-1)>>), + {'EXIT',{badarg,_}} = (catch <<Bin/binary,0:(-1)>>), + {'EXIT',{badarg,_}} = (catch <<0:(-(1 bsl 100))>>), + {'EXIT',{badarg,_}} = (catch <<Bin/binary,0:(-(1 bsl 100))>>), + ok. float_bin(Config) when is_list(Config) -> |