aboutsummaryrefslogtreecommitdiffstats
path: root/lib/debugger/test/fun_SUITE.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2016-03-02 06:50:54 +0100
committerBjörn Gustavsson <[email protected]>2016-04-18 08:47:32 +0200
commit5f91c7307220d629f76ef1a914a480ba2a3d018e (patch)
treec8e52f02273ac588b12a00ca1542011e9146f4a2 /lib/debugger/test/fun_SUITE.erl
parent37348d31616fa55130eead33f08a50141b355151 (diff)
downloadotp-5f91c7307220d629f76ef1a914a480ba2a3d018e.tar.gz
otp-5f91c7307220d629f76ef1a914a480ba2a3d018e.tar.bz2
otp-5f91c7307220d629f76ef1a914a480ba2a3d018e.zip
Remove ?line macros
While we are it, also re-ident the files.
Diffstat (limited to 'lib/debugger/test/fun_SUITE.erl')
-rw-r--r--lib/debugger/test/fun_SUITE.erl98
1 files changed, 49 insertions, 49 deletions
diff --git a/lib/debugger/test/fun_SUITE.erl b/lib/debugger/test/fun_SUITE.erl
index 94c67dcc3e..7eb53e4ce4 100644
--- a/lib/debugger/test/fun_SUITE.erl
+++ b/lib/debugger/test/fun_SUITE.erl
@@ -61,32 +61,32 @@ end_per_testcase(_Case, _Config) ->
ok.
init_per_suite(Config) when is_list(Config) ->
- ?line test_lib:interpret(?MODULE),
- ?line true = lists:member(?MODULE, int:interpreted()),
+ test_lib:interpret(?MODULE),
+ true = lists:member(?MODULE, int:interpreted()),
Config.
end_per_suite(Config) when is_list(Config) ->
ok.
good_call(Config) when is_list(Config) ->
- ?line F = fun() -> ok end,
- ?line ok = F(),
- ?line FF = fun ?MODULE:nothing/0,
- ?line ok = FF(),
+ F = fun() -> ok end,
+ ok = F(),
+ FF = fun ?MODULE:nothing/0,
+ ok = FF(),
ok.
%% Test that the correct EXIT code is returned for all types of bad funs.
bad_apply(Config) when is_list(Config) ->
- ?line bad_apply_fc(42, [0]),
- ?line bad_apply_fc(xx, [1]),
- ?line bad_apply_fc({}, [2]),
- ?line bad_apply_fc({1}, [3]),
- ?line bad_apply_fc({1,2,3}, [4]),
- ?line bad_apply_fc({1,2,3}, [5]),
- ?line bad_apply_fc({1,2,3,4}, [6]),
- ?line bad_apply_fc({1,2,3,4,5,6}, [7]),
- ?line bad_apply_fc({1,2,3,4,5}, [8]),
- ?line bad_apply_badarg({1,2}, [9]),
+ bad_apply_fc(42, [0]),
+ bad_apply_fc(xx, [1]),
+ bad_apply_fc({}, [2]),
+ bad_apply_fc({1}, [3]),
+ bad_apply_fc({1,2,3}, [4]),
+ bad_apply_fc({1,2,3}, [5]),
+ bad_apply_fc({1,2,3,4}, [6]),
+ bad_apply_fc({1,2,3,4,5,6}, [7]),
+ bad_apply_fc({1,2,3,4,5}, [8]),
+ bad_apply_badarg({1,2}, [9]),
ok.
bad_apply_fc(Fun, Args) ->
@@ -115,16 +115,16 @@ bad_apply_badarg(Fun, Args) ->
%% Try directly calling bad funs.
bad_fun_call(Config) when is_list(Config) ->
- ?line bad_call_fc(42),
- ?line bad_call_fc(xx),
- ?line bad_call_fc({}),
- ?line bad_call_fc({1}),
- ?line bad_call_fc({1,2,3}),
- ?line bad_call_fc({1,2,3}),
- ?line bad_call_fc({1,2,3,4}),
- ?line bad_call_fc({1,2,3,4,5,6}),
- ?line bad_call_fc({1,2,3,4,5}),
- ?line bad_call_fc({1,2}),
+ bad_call_fc(42),
+ bad_call_fc(xx),
+ bad_call_fc({}),
+ bad_call_fc({1}),
+ bad_call_fc({1,2,3}),
+ bad_call_fc({1,2,3}),
+ bad_call_fc({1,2,3,4}),
+ bad_call_fc({1,2,3,4,5,6}),
+ bad_call_fc({1,2,3,4,5}),
+ bad_call_fc({1,2}),
ok.
bad_call_fc(Fun) ->
@@ -141,33 +141,33 @@ bad_call_fc(Fun) ->
%% Call and apply valid external funs with wrong number of arguments.
badarity(Config) when is_list(Config) ->
- ?line Fun = fun() -> ok end,
- ?line Stupid = {stupid,arguments},
- ?line Args = [some,{stupid,arguments},here],
+ Fun = fun() -> ok end,
+ Stupid = {stupid,arguments},
+ Args = [some,{stupid,arguments},here],
%% Simple call.
- ?line Res = (catch Fun(some, Stupid, here)),
+ Res = (catch Fun(some, Stupid, here)),
erlang:garbage_collect(),
erlang:yield(),
case Res of
{'EXIT',{{badarity,{Fun,Args}},[_|_]}} ->
- ?line ok = io:format("~p(~p) -> ~p\n", [Fun,Args,Res]);
+ ok = io:format("~p(~p) -> ~p\n", [Fun,Args,Res]);
_ ->
- ?line ok = io:format("~p(~p) -> ~p\n", [Fun,Args,Res]),
+ ok = io:format("~p(~p) -> ~p\n", [Fun,Args,Res]),
ct:fail({bad_result,Res})
end,
%% Apply.
- ?line Res2 = (catch apply(Fun, Args)),
+ Res2 = (catch apply(Fun, Args)),
erlang:garbage_collect(),
erlang:yield(),
case Res2 of
{'EXIT',{{badarity,{Fun,Args}},[_|_]}} ->
- ?line ok = io:format("apply(~p, ~p) -> ~p\n", [Fun,Args,Res2]);
+ ok = io:format("apply(~p, ~p) -> ~p\n", [Fun,Args,Res2]);
_ ->
- ?line ok = io:format("apply(~p, ~p) -> ~p\n", [Fun,Args,Res2]),
+ ok = io:format("apply(~p, ~p) -> ~p\n", [Fun,Args,Res2]),
ct:fail({bad_result,Res2})
end,
ok.
@@ -175,33 +175,33 @@ badarity(Config) when is_list(Config) ->
%% Call and apply valid external funs with wrong number of arguments.
ext_badarity(Config) when is_list(Config) ->
- ?line Fun = fun ?MODULE:nothing/0,
- ?line Stupid = {stupid,arguments},
- ?line Args = [some,{stupid,arguments},here],
+ Fun = fun ?MODULE:nothing/0,
+ Stupid = {stupid,arguments},
+ Args = [some,{stupid,arguments},here],
%% Simple call.
- ?line Res = (catch Fun(some, Stupid, here)),
+ Res = (catch Fun(some, Stupid, here)),
erlang:garbage_collect(),
erlang:yield(),
case Res of
{'EXIT',{{badarity,{Fun,Args}},_}} ->
- ?line ok = io:format("~p(~p) -> ~p\n", [Fun,Args,Res]);
+ ok = io:format("~p(~p) -> ~p\n", [Fun,Args,Res]);
_ ->
- ?line ok = io:format("~p(~p) -> ~p\n", [Fun,Args,Res]),
+ ok = io:format("~p(~p) -> ~p\n", [Fun,Args,Res]),
ct:fail({bad_result,Res})
end,
%% Apply.
- ?line Res2 = (catch apply(Fun, Args)),
+ Res2 = (catch apply(Fun, Args)),
erlang:garbage_collect(),
erlang:yield(),
case Res2 of
{'EXIT',{{badarity,{Fun,Args}},_}} ->
- ?line ok = io:format("apply(~p, ~p) -> ~p\n", [Fun,Args,Res2]);
+ ok = io:format("apply(~p, ~p) -> ~p\n", [Fun,Args,Res2]);
_ ->
- ?line ok = io:format("apply(~p, ~p) -> ~p\n", [Fun,Args,Res2]),
+ ok = io:format("apply(~p, ~p) -> ~p\n", [Fun,Args,Res2]),
ct:fail({bad_result,Res2})
end,
ok.
@@ -212,14 +212,14 @@ nothing() ->
%% Test handling of fun expression referring to uninterpreted code.
otp_6061(Config) when is_list(Config) ->
- ?line OrigFlag = process_flag(trap_exit, true),
+ OrigFlag = process_flag(trap_exit, true),
- ?line Self = self(),
- ?line Pid = spawn_link(fun() -> test_otp_6061(Self) end),
+ Self = self(),
+ Pid = spawn_link(fun() -> test_otp_6061(Self) end),
receive
working ->
- ?line ok;
+ ok;
not_working ->
ct:fail(not_working);
{'EXIT', Pid, Reason} ->
@@ -229,7 +229,7 @@ otp_6061(Config) when is_list(Config) ->
ct:fail(timeout)
end,
- ?line process_flag(trap_exit, OrigFlag),
+ process_flag(trap_exit, OrigFlag),
ok.