aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test/beam_disasm_SUITE.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2016-02-26 13:10:05 +0100
committerBjörn Gustavsson <[email protected]>2016-02-26 13:10:05 +0100
commit63fb22fbca8fc9b3ab118b2dc2d8d2514d926903 (patch)
treed29a0e0fe4d750f19c48a19568d3f99252ffe09e /lib/compiler/test/beam_disasm_SUITE.erl
parentad847aa2f332230ea33d6a65953c9be1f22af551 (diff)
parentfc3c64711400be9eae653350213630cb8cb257f9 (diff)
downloadotp-63fb22fbca8fc9b3ab118b2dc2d8d2514d926903.tar.gz
otp-63fb22fbca8fc9b3ab118b2dc2d8d2514d926903.tar.bz2
otp-63fb22fbca8fc9b3ab118b2dc2d8d2514d926903.zip
Merge branch 'bjorn/compiler/modernize-tests'
* bjorn/compiler/modernize-tests: Remove ?line macros Replace use of lists:keysearch/3 with lists:keyfind/3 Eliminate use of doc and suite clauses Replace ?t with test_server Replace use of test_server:format/2 with io:format/2 Eliminate use of test_server:fail/0,1 Eliminate use of ?config() macro Modernize use of timetraps Eliminate useless helper functions
Diffstat (limited to 'lib/compiler/test/beam_disasm_SUITE.erl')
-rw-r--r--lib/compiler/test/beam_disasm_SUITE.erl23
1 files changed, 11 insertions, 12 deletions
diff --git a/lib/compiler/test/beam_disasm_SUITE.erl b/lib/compiler/test/beam_disasm_SUITE.erl
index 4268729e75..90598d9639 100644
--- a/lib/compiler/test/beam_disasm_SUITE.erl
+++ b/lib/compiler/test/beam_disasm_SUITE.erl
@@ -46,21 +46,20 @@ init_per_group(_GroupName, Config) ->
end_per_group(_GroupName, Config) ->
Config.
-stripped(doc) ->
- ["Check that stripped beam files can be disassembled"];
+%% Check that stripped beam files can be disassembled.
stripped(Config) when is_list(Config) ->
- ?line PrivDir = ?config(priv_dir, Config),
- ?line SrcName = filename:join(PrivDir, "tmp.erl"),
- ?line BeamName = filename:join(PrivDir, "tmp.beam"),
+ PrivDir = proplists:get_value(priv_dir, Config),
+ SrcName = filename:join(PrivDir, "tmp.erl"),
+ BeamName = filename:join(PrivDir, "tmp.beam"),
Prog = <<"-module(tmp).\n-export([tmp/0]).\ntmp()->ok.\n">>,
- ?line ok = file:write_file(SrcName, Prog),
- ?line {ok, tmp} =
+ ok = file:write_file(SrcName, Prog),
+ {ok, tmp} =
compile:file(SrcName, [{outdir, PrivDir}]),
- ?line {beam_file, tmp, _, Attr, CompileInfo, [_|_]} =
+ {beam_file, tmp, _, Attr, CompileInfo, [_|_]} =
beam_disasm:file(BeamName),
- ?line true = is_list(Attr),
- ?line true = is_list(CompileInfo),
- ?line {ok, {tmp, _}} = beam_lib:strip(BeamName),
- ?line {beam_file, tmp, _, [], [], [_|_]} =
+ true = is_list(Attr),
+ true = is_list(CompileInfo),
+ {ok, {tmp, _}} = beam_lib:strip(BeamName),
+ {beam_file, tmp, _, [], [], [_|_]} =
beam_disasm:file(BeamName),
ok.