Permalink
Browse files

[t/spec] avoid autothreading through ok() in three test files

git-svn-id: http://svn.pugscode.org/pugs@24964 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
1 parent e97f6d5 commit d11fdec0787a34e91756d18e0d69e078d8092a9f moritz committed Jan 19, 2009
Showing with 12 additions and 12 deletions.
  1. +1 −1 S03-junctions/autothreading.t
  2. +10 −10 S03-operators/precedence.t
  3. +1 −1 S03-operators/smartmatch.t
@@ -24,7 +24,7 @@ plan 45;
my $answer = is_it(any(1..2), any(7..9), any(0..6));
is($n, 42, "called lots of times :-)");
- ok( $answer eq "1 + 9 = 10", "found right answer");
+ ok( ?($answer eq "1 + 9 = 10"), "found right answer");
}
{
View
@@ -51,8 +51,8 @@ is(2 - 2 / 2, 1, "/ binds tighter than binary -");
# additive
is(1 ~ 2 * 3, 16, "~ binds looser than *");
-ok((1 ~ 2 & 12) == 12, "but tighter than &");
-ok((2 + 2 | 4 - 1) == 4, "and + binds tighter than |");
+ok(?((1 ~ 2 & 12) == 12), "but tighter than &");
+ok(?((2 + 2 | 4 - 1) == 4), "and + binds tighter than |");
# replication
@@ -62,27 +62,27 @@ is((2 x 2) + 3, 25, "doublecheck");
# concatenation
is(2 x 2 ~ 3, "223", "x binds tighter than binary ~");
-ok((2 ~ 2 | 4 ~ 1) == 41, "and ~ binds tighter than |");
+ok(?((2 ~ 2 | 4 ~ 1) == 41), "and ~ binds tighter than |");
# junctive and
ok( ?( (1 & 2 | 3) !=3), '& binds tighter than |');
ok((!(1 & 2 | 3) < 2), "ditto");
ok(?((1 & 2 ^ 3) < 3), "and also ^");
-ok( !(1 & 2 ^ 4) != 3, "blah blah blah");
+ok(?(!(1 & 2 ^ 4) != 3), "blah blah blah");
# junctive or
{ # test that | and ^ are on the same level
my $a = (1 | 2 ^ 3);
my $b = (1 ^ 2 | 3);
- ok($a == 3, "only one is eq 3");
- ok($a != 3, "either is ne 3");
- ok($a == 1, "either is eq 1");
- ok($b == 2, "either is eq 2, ne 3");
- ok($b == 1, "either is eq 1");
- ok($b == 3, "either is eq 3, of which only one is");
+ ok(?($a == 3), "only one is eq 3");
+ ok(?($a != 3), "either is ne 3");
+ ok(?($a == 1), "either is eq 1");
+ ok(?($b == 2), "either is eq 2, ne 3");
+ ok(?($b == 1), "either is eq 1");
+ ok(?($b == 3), "either is eq 3, of which only one is");
ok(!($b != 3), "1 is ne 3, and (2 | 3) is both ne 3 and eq 3, so it's ne, so 1 ^ 2 | 3");
};
@@ -267,7 +267,7 @@ caught that case.
$parsed = 1;
};
ok $parsed, 'C<all(@x) ~~ { ... }> parses';
- ok $result, 'C<all(@x) ~~ { ... } when true for all';
+ ok ?$result, 'C<all(@x) ~~ { ... } when true for all';
$result = 0;
try {

0 comments on commit d11fdec

Please sign in to comment.