Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update boolean smartmatch tests for RT #77080.
  • Loading branch information
pmichaud committed Jun 25, 2012
1 parent ea70649 commit b61ccd1
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions S03-smartmatch/any-bool.t
@@ -1,19 +1,8 @@
use v6;
use Test;
plan 12;
plan 8;

#L<S03/Smart matching/Any Bool simple truth>
#?rakudo skip 'RT 77080'
{
ok (0 ~~ True), '$something ~~ True (1)'; #OK always matches
ok (0 ~~ Bool::True), '$something ~~ Bool::True (1)'; #OK always matches
ok ('a' ~~ True), '$something ~~ True (2)'; #OK always matches
ok ('a' ~~ Bool::True), '$something ~~ Bool::True (2)'; #OK always matches
nok (0 ~~ False), '$something ~~ False (1)'; #OK always fails
nok (0 ~~ Bool::False), '$something ~~ Bool::False (1)'; #OK always fails
nok ('a' ~~ False), '$something ~~ False (2)'; #OK always fails
nok ('a' ~~ Bool::False),'$something ~~ Bool::False (2)'; #OK always fails
}

{
sub is-true() { True };
Expand All @@ -25,6 +14,13 @@ plan 12;

}

{
nok 0 ~~ .so, 'boolean truth';
ok 'a' ~~ .so, 'boolean truth';
ok 0 ~~ .not, 'boolean truth';
nok 'a' ~~ .not, 'boolean truth';
}

done;

# vim: ft=perl6

0 comments on commit b61ccd1

Please sign in to comment.