Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
adjust tests for "0" being true
  • Loading branch information
FROGGS committed Apr 10, 2015
1 parent e35d2cf commit e4816ad
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions S03-metaops/reduce.t
@@ -1,6 +1,6 @@
use v6;
use Test;
plan 366;
plan 347;

=begin pod
Expand Down Expand Up @@ -246,7 +246,7 @@ is( ([min] Any, Any, 2), 2, '[min] Any, Any, 2 returns 2');
# test False / undefined things
my $msg1 = 'reduce [^^] false variable test';
my $msg2 = 'infix ^^ false variable test';
for (0, '0', '', Bool::False, Any, Mu, Nil) -> $undef {
for (0, '', Bool::False, Any, Mu, Nil) -> $undef {
ok ( [^^] $undef, $undef, $undef, 5 ), "|{$undef.perl}| $msg1 \#1";
nok ( [^^] 1, 2, $undef, 3, $undef ), "|{$undef.perl}| $msg1 \#2";
nok ( [^^] $undef, $undef, 1, 5 ), "|{$undef.perl}| $msg1 \#3";
Expand Down
6 changes: 3 additions & 3 deletions S04-statement-modifiers/values_in_bool_context.t
Expand Up @@ -28,7 +28,7 @@ plan 24;
ok $c, 'literal in bool context - string true value';
ok !$d, 'literal in bool context - string false value';
ok $e, 'literal in bool context - stringified true value';
ok !$f, 'literal in bool context - stringified false value';
ok $f, 'literal in bool context - stringified true value';
ok !$g, 'literal in bool context - undefined value';
ok $h, 'literal in bool context - scalar variable';
}
Expand All @@ -54,7 +54,7 @@ plan 24;
ok $c, 'array in bool context - string true value';
ok !$d, 'array in bool context - string false value';
ok $e, 'array in bool context - stringified true value';
ok !$f, 'array in bool context - stringified false value';
ok $f, 'array in bool context - stringified true value';
ok !$g, 'array in bool context - undefined value';
ok $h, 'array in bool context array as a whole';
}
Expand Down Expand Up @@ -83,7 +83,7 @@ plan 24;
ok $c, 'hash in bool context - string true value';
ok !$d, 'hash in bool context - string false value';
ok $e, 'hash in bool context - stringified true value';
ok !$f, 'hash in bool context - stringified false value';
ok $f, 'hash in bool context - stringified true value';
ok !$g, 'hash in bool context - undefined value';
ok $h, 'hash in bool context - hash as a whole';
}
Expand Down

0 comments on commit e4816ad

Please sign in to comment.