Permalink
Browse files

[t/spec] rename true to so

git-svn-id: http://svn.pugscode.org/pugs@29368 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
1 parent 07bfdb7 commit a238d44bfc3d98f4a800976cce582a2fa153308b lwall committed Dec 18, 2009
Showing with 27 additions and 27 deletions.
  1. +22 −0 S03-operators/so.t
  2. +0 −22 S03-operators/true.t
  3. +2 −2 S04-exceptions/pending.t
  4. +3 −3 S04-statements/given.t
View
@@ -0,0 +1,22 @@
+use v6;
+use Test;
+plan 11;
+
+# L<S03/Loose unary precedence>
+
+ok(so 1, "so 1 is true");
+ok(so -1, "so -1 is true");
+ok(not so 0, "not so 0 is true");
+ok(so sub{}, 'so sub{} is true');
+ok(so "x", 'so "x" is true');
+
+my $a = 1; ok(so $a, 'so $true_var is true');
+my $b = 0; ok(!(so $b), 'so $false_var is not true');
+
+ok( so(so 42), "so(so 42) is true");
+ok(not so(so 0), "so(so 0) is false");
+
+ok(so Bool::True, "'Bool::True' is true");
+ok(so True, "'True' is true");
+
+# vim: ft=perl6
View
@@ -1,22 +0,0 @@
-use v6;
-use Test;
-plan 11;
-
-# L<S03/Loose unary precedence>
-
-ok(true 1, "true 1 is true");
-ok(true -1, "true -1 is true");
-ok(!(true 0), "!true 0 is true");
-ok(true sub{}, 'true sub{} is true');
-ok(true "x", 'true "x" is true');
-
-my $a = 1; ok(true $a, 'true $true_var is true');
-my $b = 0; ok(!(true $b), 'true $false_var is not true');
-
-ok( true(true 42), "true(true 42) is true");
-ok(!true(true 0), "true(true 0) is false");
-
-ok(true Bool::True, "'Bool::True' is true");
-ok(true True, "'True' is true");
-
-# vim: ft=perl6
View
@@ -20,7 +20,7 @@ plan *;
sub fail_it { fail $^a }
-# L<S04/Exceptions/"test a Failure for .defined or .true">
+# L<S04/Exceptions/"test a Failure for .defined or as boolean">
{
my @fails = ( fail_it(1), fail_it(2), fail_it(3), fail_it(4) );
@@ -32,7 +32,7 @@ sub fail_it { fail $^a }
'$!.pending has three unhandled exceptions';
ok ! @fails[0].handled, 'fail 0 is not handled';
- ok ! @fails[0].true, 'fail 0 is not true';
+ ok @fails[0].not, 'fail 0 is not true';
ok @fails[0].handled, 'fail 0 is now handled';
ok ! @fails[1].handled, 'fail 1 is not handled';
View
@@ -233,13 +233,13 @@ my @got;
for @input -> $x {
given $x {
- when .true { push @got, "true" }
+ when .so { push @got, "true" }
default { push @got, "false" }
}
}
-#?rakudo 1 todo '.true in given does not work'
-is(@got.join(","), "false,true", 'given { when .true { } }');
+#?rakudo 1 todo '.so in given does not work'
+is(@got.join(","), "false,true", 'given { when .so { } }');
# given + hash deref
{

0 comments on commit a238d44

Please sign in to comment.