aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test/beam_literals_SUITE.erl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2014-10-27 13:46:57 +0100
committerBjörn Gustavsson <[email protected]>2015-04-30 12:14:29 +0200
commitfe070a32f9f685ef4df1a5123e9328bb82e3947a (patch)
tree988d385bccf5a1b77f35a89826738057f61ce434 /erts/emulator/test/beam_literals_SUITE.erl
parent9e997149c96049fea7214b3a16f7758a01b0f691 (diff)
downloadotp-fe070a32f9f685ef4df1a5123e9328bb82e3947a.tar.gz
otp-fe070a32f9f685ef4df1a5123e9328bb82e3947a.tar.bz2
otp-fe070a32f9f685ef4df1a5123e9328bb82e3947a.zip
emulator: Use module erl_anno
Diffstat (limited to 'erts/emulator/test/beam_literals_SUITE.erl')
-rw-r--r--erts/emulator/test/beam_literals_SUITE.erl17
1 files changed, 10 insertions, 7 deletions
diff --git a/erts/emulator/test/beam_literals_SUITE.erl b/erts/emulator/test/beam_literals_SUITE.erl
index 85236e4203..9ceb393034 100644
--- a/erts/emulator/test/beam_literals_SUITE.erl
+++ b/erts/emulator/test/beam_literals_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -226,10 +226,11 @@ literal_type_tests(Config) when is_list(Config) ->
%% Generate an Erlang module with all different type of type tests.
?line Tests = make_test([{T, L} || T <- type_tests(), L <- literals()]),
?line Mod = literal_test,
- ?line Func = {function, 0, test, 0, [{clause,0,[],[],Tests}]},
- ?line Form = [{attribute,0,module,Mod},
- {attribute,0,compile,export_all},
- Func, {eof,0}],
+ Anno = erl_anno:new(0),
+ Func = {function, Anno, test, 0, [{clause,Anno,[],[],Tests}]},
+ Form = [{attribute,Anno,module,Mod},
+ {attribute,Anno,compile,export_all},
+ Func, {eof,Anno}],
%% Print generated code for inspection.
?line lists:foreach(fun (F) -> io:put_chars([erl_pp:form(F),"\n"]) end, Form),
@@ -261,7 +262,8 @@ test(T, L) ->
{ok,Toks,_Line} = erl_scan:string(S),
{ok,E} = erl_parse:parse_exprs(Toks),
{value,Val,_Bs} = erl_eval:exprs(E, []),
- {match,0,{atom,0,Val},hd(E)}.
+ Anno = erl_anno:new(0),
+ {match,Anno,{atom,Anno,Val},hd(E)}.
test(T, A, L) ->
S = lists:flatten(io_lib:format("begin io:format(\"~~p~n\", [{~p,~p,~p}]), if ~w(~w, ~w) -> true; true -> false end end. ",
@@ -269,7 +271,8 @@ test(T, A, L) ->
{ok,Toks,_Line} = erl_scan:string(S),
{ok,E} = erl_parse:parse_exprs(Toks),
{value,Val,_Bs} = erl_eval:exprs(E, []),
- {match,0,{atom,0,Val},hd(E)}.
+ Anno = erl_anno:new(0),
+ {match,Anno,{atom,Anno,Val},hd(E)}.
literals() ->
[42,