aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test
diff options
context:
space:
mode:
authorHenrik Nord <[email protected]>2015-03-12 12:11:13 +0100
committerHenrik Nord <[email protected]>2015-03-12 12:11:13 +0100
commit408c7dc8922a123aad815a24a27d7ff24971a253 (patch)
tree9f1e874299e433c8e0cb9e344a96e922ac134199 /erts/emulator/test
parent43db415c05c20c1d0793ec994da265f02dc73e21 (diff)
parentfaeb9e9a67096af4257cd00409f06314f3223196 (diff)
downloadotp-408c7dc8922a123aad815a24a27d7ff24971a253.tar.gz
otp-408c7dc8922a123aad815a24a27d7ff24971a253.tar.bz2
otp-408c7dc8922a123aad815a24a27d7ff24971a253.zip
Merge branch 'maint'
Conflicts: erts/emulator/hipe/hipe_bif0.c
Diffstat (limited to 'erts/emulator/test')
-rw-r--r--erts/emulator/test/big_SUITE.erl14
1 files changed, 12 insertions, 2 deletions
diff --git a/erts/emulator/test/big_SUITE.erl b/erts/emulator/test/big_SUITE.erl
index 413bd3bcae..3193d56e2a 100644
--- a/erts/emulator/test/big_SUITE.erl
+++ b/erts/emulator/test/big_SUITE.erl
@@ -23,7 +23,7 @@
init_per_group/2,end_per_group/2]).
-export([t_div/1, eq_28/1, eq_32/1, eq_big/1, eq_math/1, big_literals/1,
borders/1, negative/1, big_float_1/1, big_float_2/1,
- shift_limit_1/1, powmod/1, system_limit/1, otp_6692/1]).
+ shift_limit_1/1, powmod/1, system_limit/1, toobig/1, otp_6692/1]).
%% Internal exports.
-export([eval/1]).
@@ -40,7 +40,7 @@ suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
[t_div, eq_28, eq_32, eq_big, eq_math, big_literals,
borders, negative, {group, big_float}, shift_limit_1,
- powmod, system_limit, otp_6692].
+ powmod, system_limit, toobig, otp_6692].
groups() ->
[{big_float, [], [big_float_1, big_float_2]}].
@@ -370,6 +370,16 @@ maxbig() ->
id(I) -> I.
+toobig(Config) when is_list(Config) ->
+ ?line {'EXIT',{{badmatch,_},_}} = (catch toobig()),
+ ok.
+
+toobig() ->
+ A = erlang:term_to_binary(lists:seq(1000000, 2200000)),
+ ASize = erlang:bit_size(A),
+ <<ANr:ASize>> = A, % should fail
+ ANr band ANr.
+
otp_6692(suite) ->
[];
otp_6692(doc) ->