Skip to content

Commit e4816ad

Browse files
committed
adjust tests for "0" being true
1 parent e35d2cf commit e4816ad

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

S03-metaops/reduce.t

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use v6;
22
use Test;
3-
plan 366;
3+
plan 347;
44

55
=begin pod
66
@@ -246,7 +246,7 @@ is( ([min] Any, Any, 2), 2, '[min] Any, Any, 2 returns 2');
246246
# test False / undefined things
247247
my $msg1 = 'reduce [^^] false variable test';
248248
my $msg2 = 'infix ^^ false variable test';
249-
for (0, '0', '', Bool::False, Any, Mu, Nil) -> $undef {
249+
for (0, '', Bool::False, Any, Mu, Nil) -> $undef {
250250
ok ( [^^] $undef, $undef, $undef, 5 ), "|{$undef.perl}| $msg1 \#1";
251251
nok ( [^^] 1, 2, $undef, 3, $undef ), "|{$undef.perl}| $msg1 \#2";
252252
nok ( [^^] $undef, $undef, 1, 5 ), "|{$undef.perl}| $msg1 \#3";

S04-statement-modifiers/values_in_bool_context.t

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ plan 24;
2828
ok $c, 'literal in bool context - string true value';
2929
ok !$d, 'literal in bool context - string false value';
3030
ok $e, 'literal in bool context - stringified true value';
31-
ok !$f, 'literal in bool context - stringified false value';
31+
ok $f, 'literal in bool context - stringified true value';
3232
ok !$g, 'literal in bool context - undefined value';
3333
ok $h, 'literal in bool context - scalar variable';
3434
}
@@ -54,7 +54,7 @@ plan 24;
5454
ok $c, 'array in bool context - string true value';
5555
ok !$d, 'array in bool context - string false value';
5656
ok $e, 'array in bool context - stringified true value';
57-
ok !$f, 'array in bool context - stringified false value';
57+
ok $f, 'array in bool context - stringified true value';
5858
ok !$g, 'array in bool context - undefined value';
5959
ok $h, 'array in bool context array as a whole';
6060
}
@@ -83,7 +83,7 @@ plan 24;
8383
ok $c, 'hash in bool context - string true value';
8484
ok !$d, 'hash in bool context - string false value';
8585
ok $e, 'hash in bool context - stringified true value';
86-
ok !$f, 'hash in bool context - stringified false value';
86+
ok $f, 'hash in bool context - stringified true value';
8787
ok !$g, 'hash in bool context - undefined value';
8888
ok $h, 'hash in bool context - hash as a whole';
8989
}

0 commit comments

Comments
 (0)