diff options
author | Björn Gustavsson <bjorn@erlang.org> | 2010-05-08 10:36:28 +0200 |
---|---|---|
committer | Raimo Niskanen <raimo@erlang.org> | 2010-05-20 12:20:51 +0200 |
commit | 90c06110650990280174ff50ab3d504e645d61e4 (patch) | |
tree | 2621c67a57f660a6ac49aafd5f2a8c328d380bb6 /lib/compiler/test | |
parent | 3bac5820d497547c7f307ed227aca5665a10e321 (diff) | |
download | otp-90c06110650990280174ff50ab3d504e645d61e4.tar.gz otp-90c06110650990280174ff50ab3d504e645d61e4.tar.bz2 otp-90c06110650990280174ff50ab3d504e645d61e4.zip |
v3_core tests: Cover make_bool_switch_guard/5
Diffstat (limited to 'lib/compiler/test')
-rw-r--r-- | lib/compiler/test/andor_SUITE.erl | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/compiler/test/andor_SUITE.erl b/lib/compiler/test/andor_SUITE.erl index a460d54239..e8b4b9cc63 100644 --- a/lib/compiler/test/andor_SUITE.erl +++ b/lib/compiler/test/andor_SUITE.erl @@ -141,6 +141,10 @@ t_and_or(Config) when is_list(Config) -> ok. +-define(GUARD(E), if E -> true; + true -> false + end). + t_andalso(Config) when is_list(Config) -> Bs = [true,false], Ps = [{X,Y} || X <- Bs, Y <- Bs], @@ -151,6 +155,11 @@ t_andalso(Config) when is_list(Config) -> ?line false = false andalso true, ?line false = false andalso false, + ?line true = ?GUARD(true andalso true), + ?line false = ?GUARD(true andalso false), + ?line false = ?GUARD(false andalso true), + ?line false = ?GUARD(false andalso false), + ?line false = false andalso glurf, ?line false = false andalso exit(exit_now), @@ -176,6 +185,11 @@ t_orelse(Config) when is_list(Config) -> ?line true = false orelse true, ?line false = false orelse false, + ?line true = ?GUARD(true orelse true), + ?line true = ?GUARD(true orelse false), + ?line true = ?GUARD(false orelse true), + ?line false = ?GUARD(false orelse false), + ?line true = true orelse glurf, ?line true = true orelse exit(exit_now), |