aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2014-02-24 14:28:22 +0100
committerBjörn-Egil Dahlberg <[email protected]>2014-02-24 14:28:22 +0100
commit4acee7b02b53d785c444e886c39ed82ab76b52fe (patch)
tree2d5110c59ad0022d43f97e76681b13e5dec58ea7 /lib/compiler/test
parentce614726e9fb19b462ed41a2f020b68ef98cd532 (diff)
parent771fa6d1f96684b61ed5f6033db51f5b0a55ec19 (diff)
downloadotp-4acee7b02b53d785c444e886c39ed82ab76b52fe.tar.gz
otp-4acee7b02b53d785c444e886c39ed82ab76b52fe.tar.bz2
otp-4acee7b02b53d785c444e886c39ed82ab76b52fe.zip
Merge branch 'egil/maps/fix-cerl-inlining'
* egil/maps/fix-cerl-inlining: compiler: Update map_SUITE to handle inlining erts: Maps src instructions can't be literals compiler: Fix map inlining compiler: Add variable coverage of map in cerl
Diffstat (limited to 'lib/compiler/test')
-rw-r--r--lib/compiler/test/Makefile1
-rw-r--r--lib/compiler/test/map_SUITE.erl24
2 files changed, 19 insertions, 6 deletions
diff --git a/lib/compiler/test/Makefile b/lib/compiler/test/Makefile
index 39c9fea5d9..0b56a49cd6 100644
--- a/lib/compiler/test/Makefile
+++ b/lib/compiler/test/Makefile
@@ -69,6 +69,7 @@ INLINE= \
fun \
guard \
lc \
+ map \
match \
misc \
num_bif \
diff --git a/lib/compiler/test/map_SUITE.erl b/lib/compiler/test/map_SUITE.erl
index 7d35ffc8d5..b4baef461b 100644
--- a/lib/compiler/test/map_SUITE.erl
+++ b/lib/compiler/test/map_SUITE.erl
@@ -418,8 +418,12 @@ t_guard_fun(Config) when is_list(Config) ->
{l,V} = F2(#{s=>l,v=>[V,V]}),
%% error case
- {'EXIT', {function_clause,[{?MODULE,_,[#{s:=none,v:=none}],_}|_]}} = (catch F1(#{s=>none,v=>none})),
- ok.
+ case (catch F1(#{s=>none,v=>none})) of
+ {'EXIT', {function_clause,[{?MODULE,_,[#{s:=none,v:=none}],_}|_]}} -> ok;
+ {'EXIT', {{case_clause,_},_}} -> {comment,inlined};
+ Other ->
+ test_server:fail({no_match, Other})
+ end.
t_map_sort_literals(Config) when is_list(Config) ->
@@ -500,8 +504,12 @@ t_build_and_match_empty_val(Config) when is_list(Config) ->
ok = F(id(#{"hi"=>ok,{1,2}=>ok,1337=>ok})),
%% error case
- {'EXIT',{function_clause,_}} = (catch (F(id(#{"hi"=>ok})))),
- ok.
+ case (catch (F(id(#{"hi"=>ok})))) of
+ {'EXIT',{function_clause,_}} -> ok;
+ {'EXIT', {{case_clause,_},_}} -> {comment,inlined};
+ Other ->
+ test_server:fail({no_match, Other})
+ end.
t_build_and_match_val(Config) when is_list(Config) ->
F = fun
@@ -514,8 +522,12 @@ t_build_and_match_val(Config) when is_list(Config) ->
{2,"second"} = F(id(#{"hi"=>second,v=>"second"})),
%% error case
- {'EXIT',{function_clause,_}} = (catch (F(id(#{"hi"=>ok})))),
- ok.
+ case (catch (F(id(#{"hi"=>ok})))) of
+ {'EXIT',{function_clause,_}} -> ok;
+ {'EXIT', {{case_clause,_},_}} -> {comment,inlined};
+ Other ->
+ test_server:fail({no_match, Other})
+ end.
%% Use this function to avoid compile-time evaluation of an expression.