aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2017-03-23 15:06:57 +0100
committerBjörn-Egil Dahlberg <[email protected]>2017-03-24 10:53:14 +0100
commit06765d059c9ff04faa5813259116bc0a1eac878c (patch)
treeeb3b8e1ffb603a5023413dec7efb673813bb3568
parent27e3f9b56c0cdfcd5d04aa4d91cbe774eae6854c (diff)
downloadotp-06765d059c9ff04faa5813259116bc0a1eac878c.tar.gz
otp-06765d059c9ff04faa5813259116bc0a1eac878c.tar.bz2
otp-06765d059c9ff04faa5813259116bc0a1eac878c.zip
compiler: Cover beam_record in tests
-rw-r--r--lib/compiler/test/misc_SUITE.erl17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/compiler/test/misc_SUITE.erl b/lib/compiler/test/misc_SUITE.erl
index 621524114f..fa6d5ee957 100644
--- a/lib/compiler/test/misc_SUITE.erl
+++ b/lib/compiler/test/misc_SUITE.erl
@@ -280,6 +280,23 @@ silly_coverage(Config) when is_list(Config) ->
{block,[a|b]}]}],0},
expect_error(fun() -> beam_receive:module(ReceiveInput, []) end),
+ %% beam_record.
+ RecordInput = {?MODULE,[{foo,0}],[],
+ [{function,foo,1,2,
+ [{label,1},
+ {func_info,{atom,?MODULE},{atom,foo},1},
+ {label,2},
+ {test,is_tuple,{f,1},[{x,0}]},
+ {test,test_arity,{f,1},[{x,0},3]},
+ {block,[{set,[{x,1}],[{x,0}],{get_tuple_element,0}}]},
+ {test,is_eq_exact,{f,1},[{x,1},{atom,bar}]},
+ {block,[{set,[{x,2}],[{x,0}],{get_tuple_element,1}}|a]},
+ {test,is_eq_exact,{f,1},[{x,2},{integer,1}]},
+ {block,[{set,[{x,0}],[{atom,ok}],move}]},
+ return]}],0},
+
+ expect_error(fun() -> beam_record:module(RecordInput, []) end),
+
BeamZInput = {?MODULE,[{foo,0}],[],
[{function,foo,0,2,
[{label,1},