aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2016-02-25 06:55:50 +0100
committerBjörn Gustavsson <[email protected]>2016-02-25 06:55:50 +0100
commit720ad8d62a908fa52ed2dcd34f30a01a940b2022 (patch)
tree2ffd389142d322c6b172514006e8d06c7a7994ca
parenta398223638120a2b932ed96624b2fe9e3a877985 (diff)
downloadotp-720ad8d62a908fa52ed2dcd34f30a01a940b2022.tar.gz
otp-720ad8d62a908fa52ed2dcd34f30a01a940b2022.tar.bz2
otp-720ad8d62a908fa52ed2dcd34f30a01a940b2022.zip
Eliminate useless helper functions
andor_SUITE:check/2 function can be replaced with pattern matching.
-rw-r--r--lib/compiler/test/andor_SUITE.erl12
1 files changed, 2 insertions, 10 deletions
diff --git a/lib/compiler/test/andor_SUITE.erl b/lib/compiler/test/andor_SUITE.erl
index 264dc38907..3ec420a3ac 100644
--- a/lib/compiler/test/andor_SUITE.erl
+++ b/lib/compiler/test/andor_SUITE.erl
@@ -255,7 +255,7 @@ t_andalso_1({X,Y}) ->
X andalso Y -> true;
true -> false
end,
- check(V1, X and Y).
+ V1 = id(X and Y).
t_orelse_1({X,Y}) ->
io:fwrite("~w orelse ~w: ",[X,Y]),
@@ -264,7 +264,7 @@ t_orelse_1({X,Y}) ->
X orelse Y -> true;
true -> false
end,
- check(V1, X or Y).
+ V1 = id(X or Y).
inside(Config) when is_list(Config) ->
?line true = inside(-8, 1),
@@ -539,14 +539,6 @@ slow_compilation_1(T, _) when element(1, T) == a ->
%% Utilities.
-check(V1, V0) ->
- if V1 /= V0 ->
- io:fwrite("error: ~w.\n", [V1]),
- ?t:fail();
- true ->
- io:fwrite("ok: ~w.\n", [V1])
- end.
-
echo(X) ->
io:fwrite("eval(~w); ",[X]),
X.