aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test/andor_SUITE.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2014-03-06 10:56:59 +0100
committerBjörn Gustavsson <[email protected]>2014-03-06 10:56:59 +0100
commitff107aa1a9b7a12f72a6b5a3ab00e0088b1c2bd9 (patch)
treefbb38c1cdd0d25b8e121beb049a183200cd2d147 /lib/compiler/test/andor_SUITE.erl
parentcb5942909249958cd70f6247c4493db5aa6b8a5a (diff)
parent6c8c99caba7cf5f77f7f5922a026c058a55138df (diff)
downloadotp-ff107aa1a9b7a12f72a6b5a3ab00e0088b1c2bd9.tar.gz
otp-ff107aa1a9b7a12f72a6b5a3ab00e0088b1c2bd9.tar.bz2
otp-ff107aa1a9b7a12f72a6b5a3ab00e0088b1c2bd9.zip
Merge branch 'nox/compiler/beam_bool-not_boolean_expr'
* nox/compiler/beam_bool-not_boolean_expr: Compile BIF calls and operator expressions to Core the same way Do not try to optimize non-boolean guards
Diffstat (limited to 'lib/compiler/test/andor_SUITE.erl')
-rw-r--r--lib/compiler/test/andor_SUITE.erl15
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/compiler/test/andor_SUITE.erl b/lib/compiler/test/andor_SUITE.erl
index 7bef0aa27c..d79696df38 100644
--- a/lib/compiler/test/andor_SUITE.erl
+++ b/lib/compiler/test/andor_SUITE.erl
@@ -129,6 +129,10 @@ t_case_y(X, Y, Z) ->
Y =:= 100
end.
+-define(GUARD(E), if E -> true;
+ true -> false
+ end).
+
t_and_or(Config) when is_list(Config) ->
?line true = true and true,
?line false = true and false,
@@ -160,11 +164,14 @@ t_and_or(Config) when is_list(Config) ->
?line true = false or id(true),
?line false = false or id(false),
- ok.
+ True = id(true),
--define(GUARD(E), if E -> true;
- true -> false
- end).
+ false = ?GUARD(erlang:'and'(bar, True)),
+ false = ?GUARD(erlang:'or'(bar, True)),
+ false = ?GUARD(erlang:'not'(erlang:'and'(bar, True))),
+ false = ?GUARD(erlang:'not'(erlang:'not'(erlang:'and'(bar, True)))),
+
+ ok.
t_andalso(Config) when is_list(Config) ->
Bs = [true,false],