aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2017-12-12 14:48:50 +0100
committerBjörn Gustavsson <[email protected]>2017-12-13 12:42:43 +0100
commit47f61b16efe9f4304a522f54a4b630a6ffc08b06 (patch)
tree48a89b3b4171a7b6322d499d60e3815cb9a57a95 /lib/compiler/test
parent183b9456855306d2be2c46bbb1f9cc0e89ddd16c (diff)
downloadotp-47f61b16efe9f4304a522f54a4b630a6ffc08b06.tar.gz
otp-47f61b16efe9f4304a522f54a4b630a6ffc08b06.tar.bz2
otp-47f61b16efe9f4304a522f54a4b630a6ffc08b06.zip
beam_util: Fix bug in is_not_used/3
01835845579e9 fixed some problems, but introduced a bug where is_not_used/3 would report that a register was not used when it in fact was.
Diffstat (limited to 'lib/compiler/test')
-rw-r--r--lib/compiler/test/beam_utils_SUITE.erl18
1 files changed, 16 insertions, 2 deletions
diff --git a/lib/compiler/test/beam_utils_SUITE.erl b/lib/compiler/test/beam_utils_SUITE.erl
index 3a07f3923f..d516b0c3c7 100644
--- a/lib/compiler/test/beam_utils_SUITE.erl
+++ b/lib/compiler/test/beam_utils_SUITE.erl
@@ -25,7 +25,7 @@
is_not_killed/1,is_not_used_at/1,
select/1,y_catch/1,otp_8949_b/1,liveopt/1,coverage/1,
y_registers/1,user_predef/1,scan_f/1,cafu/1,
- receive_label/1]).
+ receive_label/1,read_size_file_version/1]).
-export([id/1]).
suite() -> [{ct_hooks,[ts_install_cth]}].
@@ -50,7 +50,8 @@ groups() ->
y_registers,
user_predef,
scan_f,
- cafu
+ cafu,
+ read_size_file_version
]}].
init_per_suite(Config) ->
@@ -445,5 +446,18 @@ do_receive_label(Rec) ->
do_receive_label(Rec)
end.
+read_size_file_version(_Config) ->
+ ok = do_read_size_file_version({ok,<<42>>}),
+ {ok,7777} = do_read_size_file_version({ok,<<7777:32>>}),
+ ok.
+
+do_read_size_file_version(E) ->
+ case E of
+ {ok,<<Version>>} when Version =:= 42 ->
+ ok;
+ {ok,<<MaxFiles:32>>} ->
+ {ok,MaxFiles}
+ end.
+
%% The identity function.
id(I) -> I.