Permalink
Browse files

[t/spec] Change more Pugs todo flags to fudge commands

git-svn-id: http://svn.pugscode.org/pugs@27146 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
1 parent 1bf96bf commit f25f151eb07918071850066d993bd1fcec8b61fd kyle committed Jun 19, 2009
@@ -112,9 +112,10 @@ is $array9[1][1][1][0], 42, "recursive array access (3)";
# list is in some kind of brackets, of course).
#my $array11;
#eval '$array11 = [ "a","b","c"; "d","e","f" ]';
-#is +$array11, 2, "AoA created using ';' contains correct number of elems", :todo;
-#is +$array11[0], 3, "AoA's subarray created using ';' contains correct number of elems", :todo;
-#is $array11[1][1], "e", "AoA created using ';' contains correct elem", :todo;
+##?pugs 3 todo
+#is +$array11, 2, "AoA created using ';' contains correct number of elems";
+#is +$array11[0], 3, "AoA's subarray created using ';' contains correct number of elems";
+#is $array11[1][1], "e", "AoA created using ';' contains correct elem";
# [] creates new containers (() does not)
{
@@ -14,7 +14,8 @@ plan 16;
my $foo = 42;
try { ($foo, "does_not_matter")[0] = 23 };
- is $foo, 23, "assigning a list element changed the original variable", :todo<bug>;
+ #?pugs todo 'bug'
+ is $foo, 23, "assigning a list element changed the original variable";
}
{
@@ -28,14 +29,16 @@ plan 16;
{
my $foo = 42;
+ #?pugs todo 'unspecced'
ok ($foo, "does_not_matter")[0] =:= $foo,
- "list construction should not create new containers", :todo<unspecced>;
+ "list construction should not create new containers";
}
{
my $foo = 42;
+ #?pugs todo 'unspecced'
ok ($foo, "does_not_matter", 17)[0,1][0] =:= $foo,
- "list construction and list slicing should not create new containers", :todo<unspecced>;
+ "list construction and list slicing should not create new containers";
}
# Lists as lvalues
@@ -31,10 +31,11 @@ L<S06/"Lvalue subroutines">
my $var = 42;
my $notlvalue = sub () { return $var };
+ #?pugs 2 todo 'bug'
dies_ok { $notlvalue() = 23 },
- "assigning to non-rw subrefs should die", :todo<bug>;
+ "assigning to non-rw subrefs should die";
is $var, 42,
- "assigning to non-rw subrefs shouldn't modify the original variable", :todo<bug>;
+ "assigning to non-rw subrefs shouldn't modify the original variable";
}
{
@@ -107,6 +108,7 @@ is proxyvar("PRE"), 'PREfoo', 'proxy lvalue subroutine FETCH works';
# should do.
is (proxyvar("PRE") = "BAR"), 'BAR',
'proxy lvalue subroutine STORE works and returns the correct value';
-is $realvar, 'BAR', 'variable was modified', :todo<feature>;
+#?pugs todo 'feature'
+is $realvar, 'BAR', 'variable was modified';
# vim: ft=perl6
@@ -61,8 +61,9 @@ is (foo3 n => 20, y => 300, 4000), 4000,
{
my sub foo ($n, *%h) { };
## NOTE: *NOT* sub foo ($n, *%h, *@a)
+#?pugs todo 'bug'
dies_ok { foo 1, n => 20, y => 300 },
- 'Testing: `sub foo($n, *%h) { }; foo 1, n => 20, y => 300`', :todo<bug>;
+ 'Testing: `sub foo($n, *%h) { }; foo 1, n => 20, y => 300`';
}
{
@@ -113,7 +114,8 @@ my sub foo(:$n!, *%h, *@a){ };
diag('Testing with named arguments (named param is required) (++ version)');
lives_ok { foo 1, n => 20, y => 300, 4000 },
'Testing: `my sub foo(+:$n, *%h, *@a){ }; foo 1, n => 20, y => 300, 4000 }`';
-dies_ok { foo 1, x => 20, y => 300, 4000 }, :todo<bug>;
+#?pugs todo 'bug'
+dies_ok { foo 1, x => 20, y => 300, 4000 };
}
#### "trait" version
@@ -122,16 +124,17 @@ my sub foo(:$n is required, *%h, *@a) { };
diag('Testing with named arguments (named param is required) (trait version)');
lives_ok { foo 1, n => 20, y => 300, 4000 },
'Testing: `my sub foo(:$n is required, *%h, *@a){ }; foo 1, n => 20, y => 300, 4000 }`';
+#?pugs todo 'bug'
dies_ok { foo 1, x => 20, y => 300, 4000 },
- 'Testing: `my sub foo(:$n is required, *%h, *@a){ }; foo 1, x => 20, y => 300, 4000 }`', :todo<bug>;
+ 'Testing: `my sub foo(:$n is required, *%h, *@a){ }; foo 1, x => 20, y => 300, 4000 }`';
}
##### Now slurpy scalar tests here.
=begin desc
=head1 List parameter test
-These tests are the testing for "List paameters" section of Synopsis 06
+These tests are the testing for "List parameters" section of Synopsis 06
L<S06/List parameters/Slurpy scalar parameters capture what would otherwise be the first elements of the variadic array:>
@@ -20,19 +20,22 @@ plan 9;
try { $a := 42 };
is $a, 42, "binding the variable now works";
- dies_ok { $a := 17 }, "but binding it again does not work", :todo<feature>;
+ #?pugs todo 'feature'
+ dies_ok { $a := 17 }, "but binding it again does not work";
}
{
my $a is readonly;
ok !(try { VAR($a).defined }), ".VAR returns undefined on an uninitialized var declared with 'is readonly'";
$a := 42;
- ok (try { VAR($a).defined }), ".VAR returns defined now", :todo<feature>;
+ #?pugs todo 'feature'
+ ok (try { VAR($a).defined }), ".VAR returns defined now";
}
{
my $a = 3;
- ok (try { VAR($a).defined }), ".VAR on a plain normal initialized variable returns true", :todo<feature>;
+ #?pugs todo 'feature'
+ ok (try { VAR($a).defined }), ".VAR on a plain normal initialized variable returns true";
}
@@ -75,7 +75,8 @@ plan 3;
method update { $var -= $.a; }
};
a.new( a => 10 ).update;
- is $var, 90, "Testing suite 1.", :todo<bug>;
+ #?pugs todo 'bug'
+ is $var, 90, "Testing suite 1.";
}
@@ -108,7 +109,8 @@ plan 3;
##### will cause pugs hang if uncomment it
# b.new( a => 20 );
- is $var, 80, "Testing suite 2.", :todo<bug>;
+ #?pugs todo 'bug'
+ is $var, 80, "Testing suite 2.";
}
@@ -133,6 +135,7 @@ plan 3;
##### cause pugs hang.
# c.new( b => 30 ).update;
- is $var, 70, "Testing suite 3.", :todo<bug>;
+ #?pugs todo 'bug'
+ is $var, 70, "Testing suite 3.";
}

0 comments on commit f25f151

Please sign in to comment.