Permalink
Browse files

fix tests for Bool stringification

  • Loading branch information...
1 parent 672abda commit 29b04a9899223e741077fd98dbcc1789018b2735 @moritz moritz committed Sep 23, 2010
Showing with 12 additions and 11 deletions.
  1. +8 −8 S03-metaops/reduce.t
  2. +2 −2 S03-operators/precedence.t
  3. +1 −0 S03-operators/so.t
  4. +1 −1 S06-signature/introspection.t
View
16 S03-metaops/reduce.t
@@ -82,14 +82,14 @@ L<"http://groups.google.de/group/perl.perl6.language/msg/bd9eb275d5da2eda">
}
{
- is (~ [\<] 1, 2, 3, 4), "1 1 1 1", "[\\<] works (1)";
- is (~ [\<] 1, 3, 2, 4), "1 1 0 0", "[\\<] works (2)";
- is (~ [\>] 4, 3, 2, 1), "1 1 1 1", "[\\>] works (1)";
- is (~ [\>] 4, 2, 3, 1), "1 1 0 0", "[\\>] works (2)";
- is (~ [\==] 4, 4, 4), "1 1 1", "[\\==] works (1)";
- is (~ [\==] 4, 5, 4), "1 0 0", "[\\==] works (2)";
- is (~ [\!=] 4, 5, 6), "1 1 1", "[\\!=] works (1)";
- is (~ [\!=] 4, 5, 5), "1 1 0", "[\\!=] works (2)";
+ is ~ ([\<] 1, 2, 3, 4).map({+$_}), "1 1 1 1", "[\\<] works (1)";
+ is ~ ([\<] 1, 3, 2, 4).map({+$_}), "1 1 0 0", "[\\<] works (2)";
+ is ~ ([\>] 4, 3, 2, 1).map({+$_}), "1 1 1 1", "[\\>] works (1)";
+ is ~ ([\>] 4, 2, 3, 1).map({+$_}), "1 1 0 0", "[\\>] works (2)";
+ is ~ ([\==] 4, 4, 4).map({+$_}), "1 1 1", "[\\==] works (1)";
+ is ~ ([\==] 4, 5, 4).map({+$_}), "1 0 0", "[\\==] works (2)";
+ is ~ ([\!=] 4, 5, 6).map({+$_}), "1 1 1", "[\\!=] works (1)";
+ is ~ ([\!=] 4, 5, 5).map({+$_}), "1 1 0", "[\\!=] works (2)";
is (~ [\**] 1, 2, 3), "3 8 1", "[\\**] (right assoc) works (1)";
is (~ [\**] 3, 2, 0), "0 1 3", "[\\**] (right assoc) works (2)";
}
View
4 S03-operators/precedence.t
@@ -193,8 +193,8 @@ is(@c, [1,2,3], "@ = binds looser than ,");
# uc($a eq $A), not uc($a) eq $A.
# http://irclog.perlgeek.de/perl6/2009-07-14#i_1316200
#
-# so uc(False) stringifies False to '0', and uc('0') is false. Phew.
-ok !(uc "a" eq "A"), "uc has the correct precedence in comparision to eq";
+# so uc(False) stringifies False to 'FALSE', and uc('0') is false. Phew.
+is (uc "a" eq "A"), uc(False.Str), "uc has the correct precedence in comparision to eq";
# L<S03/Named unary precedence/my $i = int $x; # ILLEGAL>
View
1 S03-operators/so.t
@@ -19,6 +19,7 @@ ok(not so(so 0), "so(so 0) is false");
ok(so Bool::True, "'Bool::True' is true");
ok(so True, "'True' is true");
+#?rakudo todo 'check test and rakudo'
is (so($b) + 1), ((so $b) + 1), 'so($b) is (so $b)';
ok (so my $x = 5), 'so + declaration';
View
2 S06-signature/introspection.t
@@ -5,7 +5,7 @@ plan 48;
# L<S06/Signature Introspection>
sub j(*@i) {
- @i.map({ ?$_}).join(' ');
+ @i.map({ $_ ?? '1' !! '0' }).join(' ');
}
{

0 comments on commit 29b04a9

Please sign in to comment.