From 720ad8d62a908fa52ed2dcd34f30a01a940b2022 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Thu, 25 Feb 2016 06:55:50 +0100 Subject: Eliminate useless helper functions andor_SUITE:check/2 function can be replaced with pattern matching. --- lib/compiler/test/andor_SUITE.erl | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'lib/compiler') 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. -- cgit v1.2.3