Permalink
Browse files

rakudo (auto) (un)fudge

  • Loading branch information...
1 parent ebb9ec5 commit 1cc6e47c330e02364583406beba3250b3fe8cff4 @coke coke committed Apr 25, 2012
@@ -264,7 +264,7 @@ eval_dies_ok('sub f { 3 } sub g { 3 }', 'semicolon or newline required between b
$n = 1;
#?rakudo skip 'dotty postfix'
is($n.++, 1, 'postfix dot');
- #?rakudo skip 'test dependency'
+ #?rakudo todo 'test dependency'
is($n, 2, 'check $n');
$n = 1;
@@ -274,7 +274,7 @@ eval_dies_ok('sub f { 3 } sub g { 3 }', 'semicolon or newline required between b
$n = 1;
#?rakudo skip 'unspace + dotty postfix'
is($n\ .++, 1, 'postfix unspace');
- #?rakudo skip 'test dependency'
+ #?rakudo todo 'test dependency'
is($n, 2, 'check $n');
# L<S02/"Bracketing Characters"/"U+301D codepoint has two closing alternatives">
View
@@ -70,13 +70,13 @@ eval_dies_ok '<STDIN>', '<STDIN> is disallowed';
dies_ok {$c.push: 'd'}, '... which is immutable';
}
-#?rakudo skip 'magic type of <...> contents'
{
# L<S02/Forcing item context/For any item in the list that appears to be numeric>
my @a = <foo 3 4.5 5.60 1.2e1>;
is ~@a, 'foo 3 4.5 5.60 1.2e1',
'<...> numeric literals stringify correctly';
isa_ok @a[0], Str, '<foo ...> is a Str';
+ #?rakudo 3 todo 'magic type of <...> contents'
isa_ok @a[1], Int, '< ... 3 ...> is an Int';
isa_ok @a[2], Rat, '< ... 4.5 ...> is a Rat';
isa_ok @a[4], Num, '< ... 1.2e1 ...> is a Num';
View
@@ -112,7 +112,7 @@ sub f5 ($a) { WHAT($a) }
isa_ok f5(@array_of_pairs), Array,
'an array of pairs is not treated magically...';
- #?rakudo skip 'prefix:<|>'
+ #?rakudo todo 'prefix:<|>'
#?niecza todo
isa_ok f5(|@array_of_pairs), Array, '...and |@array isn\'t either';
}
@@ -124,7 +124,7 @@ sub f6 ($a) { WHAT($a) }
ok (f6(%hash_of_pairs)).does(Hash), 'a hash is not treated magically...';
#?pugs todo '[,]'
- #?rakudo skip 'reduce meta op'
+ #?rakudo todo 'reduce meta op'
#?niecza todo
isa_ok f6([,] %hash_of_pairs), Str, '...but [,] %hash is';
}
View
@@ -170,7 +170,7 @@ Note that non-ASCII tests are kept in quoting-unicode.t
# quote with \0 as delimiters, forbidden by STD
# but see L<news:20050101220112.GF25432@plum.flirble.org>
-#?rakudo skip 'retriage'
+#?rakudo todo 'retriage'
#?pugs todo
{
eval_dies_ok "(q\0foo bar\0)";
View
@@ -140,7 +140,7 @@ is(:8<200000>, 65536, 'got the correct int value from oct 200000');
# setting the default radix
#?pugs todo 'feature'
-#?rakudo skip "Some question of what this form should actually do"
+#?rakudo todo "Some question of what this form should actually do"
#?niecza todo ":radix() NYI"
{
is(:8('0b1110'), 0o14, ':8(0b1110) converts from decimal');
View
@@ -25,7 +25,7 @@ sub postfix:<!!!> (Int $n) { $n < 2 ?? 1 !! $n * &?ROUTINE($n - 1) }
my $result3 = 3!!!;
is($result3, 6, 'the &?ROUTINE magical works correctly in overloaded operators' );
-#?rakudo skip 'is this spec?'
+#?rakudo todo 'is this spec?'
{
my $baz = try { &?ROUTINE };
ok(defined($baz), '&?ROUTINE is defined for the MAIN routine');
@@ -77,7 +77,7 @@ my @tests = (
my @list = (1, 2);
push @list, eval (3, 4).perl;
- #?rakudo skip "List.perl bug"
+ #?rakudo todo "List.perl bug"
#?niecza todo
is +@list, 3, 'eval(@list.perl) gives a list, not an array ref';
}
View
@@ -169,17 +169,17 @@ plan 140;
is OUR::A41.WHO.<$x>, 42, '$OUR:: can autovivify packages (binding)';
#?rakudo emit #
$::($our)::A42::x = 43;
- #?rakudo skip 'interpolation and auto-viv NYI'
+ #?rakudo todo 'interpolation and auto-viv NYI'
is ::($our)::A42.WHO.<$x>, 43, '::("OUR") can autovivify packages (r)';
#?rakudo emit #
$::($our)::A43::x := 44;
- #?rakudo skip 'binding and interpolation together NYI'
+ #?rakudo todo 'binding and interpolation together NYI'
is ::($our)::A43.WHO.<$x>, 44, '::("OUR") can autovivify packages (b)';
#?rakudo emit #
::($our)::A44 := class { our $x = 41; };
- #?rakudo skip 'binding and interpolation together NYI'
+ #?rakudo todo 'binding and interpolation together NYI'
is $::($our)::A44::x, 41, '::("OUR") can follow aliased packages';
}
@@ -152,12 +152,12 @@ my $outer = 'outside';
# Symbolic dereferentiation syntax should work with $?SPECIAL etc. too.
# Note: I'm not 100% sure this is legal syntax. If it turns out it isn't, we'll
# have to s/ok/dies_ok/.
-#?rakudo skip 'NYI'
{
try { die 'to set $!' };
ok $::("!"), "symbolic dereferentiation works with special chars (1)";
# ok $::!, "symbolic dereferentiation works with special chars (2)";
#?pugs skip 'todo'
+ #?rakudo todo 'NYI'
ok ::("%*ENV"), "symbolic dereferentiation works with special chars (3)";
# ok %::*ENV, "symbolic dereferentiation works with special chars (4)";
}
@@ -38,15 +38,15 @@ plan 10;
nok defined($b), '... to an undefined value';
}
-#?rakudo skip 'prefix:<\\>'
+#?rakudo todo 'prefix:<\\>'
#?niecza todo 'disagree; captures should be context neutral'
{
my %a;
my $b = \%a<b><c>;
is %a.keys.elems, 1, 'capturing autovivifies.';
}
-#?rakudo skip 'get_pmc_keyed() not implemented in class Undef'
+#?rakudo todo 'get_pmc_keyed() not implemented in class Undef'
{
my %a;
foo(%a<b><c>);
@@ -56,7 +56,7 @@ isa_ok($multi1[1], List);
# multi-dimensional array slices
# L<S09/"Subscript and slice notation"/index value to each slice>
-#?rakudo 3 skip 'Null PMC access in find_method()'
+#?rakudo 3 todo 'Null PMC access in find_method()'
#?pugs 3 todo 'multi-dimensional indexing'
is(eval('$multi1[1;0]'), 'foo', 'got the right value at multi1 index 1,0');
is(eval('$multi1[1;1]'), 'bar', 'got the right value at multi1 index 1,1');
@@ -88,7 +88,7 @@ isa_ok($multi2[0], List);
# slice
-#?rakudo 3 skip 'Null PMC access in find_method()'
+#?rakudo 3 todo 'Null PMC access in find_method()'
#?pugs 3 todo ''
is(eval('$multi2[0;0]'), 1, 'got the right value at multi2 index 0,0');
is(eval('$multi2[0;1]'), 2, 'got the right value at multi2 index 0,1');
@@ -110,7 +110,7 @@ isa_ok($multi2[1], List);
# slice
-#?rakudo 3 skip 'Null PMC access in find_method()'
+#?rakudo 3 todo 'Null PMC access in find_method()'
#?pugs 3 todo ''
is(eval('$multi2[1;0]'), 4, 'got the right value at multi2 index 1,0');
is(eval('$multi2[1;1]'), 5, 'got the right value at multi2 index 1,1');
View
@@ -54,7 +54,7 @@ ok (my Str $str93980 = Nil) === Str; #OK
is Nil.gist, 'Nil', 'Nil.gist eq "Nil"';
ok !Nil.new.defined, 'Nil.new is not defined';
-#?rakudo skip 'triage'
+#?rakudo todo 'triage'
{
subset MyInt of Int where True;
my MyInt $x = 5;
@@ -68,18 +68,21 @@ ok !Nil.new.defined, 'Nil.new is not defined';
ok $z ~~ Nil, 'can bind to Nil';
}
-#?rakudo skip 'triage'
{
sub f1($x) { } #OK
+ #?rakudo todo 'triage'
dies_ok { f1(Nil) }, 'param: dies for mandatory';
sub f2(Int $x?) { $x }
my $z;
+ #?rakudo todo 'triage'
lives_ok { $z = f2(Nil) }, 'param: lives for optional';
+ #?rakudo todo 'triage'
ok $z === Int, '... set to type object';
sub f3($x = 123) { $x }
lives_ok { $z = f3(Nil) }, 'param: lives for with-default';
+ #?rakudo todo 'triage'
is $z, 123, '... set to default';
sub f4($x = Nil) { $x }
View
@@ -59,11 +59,12 @@ sub showset($s) { $s.keys.sort.join(' ') }
# RT #77760
#?niecza skip "Unmatched key in Hash.LISTSTORE"
-#?rakudo skip "Odd number of elements found where hash expected"
{
my %h = set <a b o p a p o o>;
ok %h ~~ Hash, 'A hash to which a Set has been assigned remains a hash';
+ #?rakudo todo "got ao"
is %h.keys.sort.join, 'abop', '...with the right keys';
+ #?rakudo todo "got bp"
is %h.values, (True, True, True, True), '...and values all True';
}
@@ -164,7 +165,7 @@ sub showset($s) { $s.keys.sort.join(' ') }
# L<S03/Hyper operators/'unordered type'>
#?niecza skip "Hypers not yet Set compatible"
-#?rakudo skip "Hypers not yet Set compatible"
+#?rakudo todo "Hypers not yet Set compatible"
{
is showset(set(1, 2, 3) »+» 6), '7 8 9', 'Set »+» Int';
is showset("a" «~« set(<pple bbot rmadillo>)), 'abbot apple armadillo', 'Str «~« Set';
@@ -54,7 +54,7 @@ ok eval('Capture').does(Associative), "Capture does Associative";
sub foo {}
ok &foo.does(Callable), 'a Sub does Callable';
-#?rakudo skip 'method outside class - fix test?'
+#?rakudo todo 'method outside class - fix test?'
#?niecza skip 'Methods must be used in some kind of package'
{
method meth {}
@@ -67,19 +67,20 @@ proto pro {}
ok &pro.does(Callable), 'a proto does Callable';
# &token, &rule return a Method?
-#?rakudo skip 'token/rule outside of class and grammar; macro'
#?niecza skip 'Methods must be used in some kind of package'
{
token bar {<?>}
#?pugs todo 'feature'
+ #?rakudo todo 'token/rule outside of class and grammar'
ok &bar.does(Callable), 'a token does Callable';
rule baz {<?>}
#?pugs todo 'feature'
+ #?rakudo todo 'token/rule outside of class and grammar'
ok &baz.does(Callable), 'a rule does Callable';
# &quux returns a Sub ?
macro quux {}
#?pugs todo 'feature'
- ok &quux.does(Callable), 'a rule does Callable';
+ ok &quux.does(Callable), 'a macro does Callable';
}
# RT 69318
View
@@ -110,7 +110,6 @@ dies_ok { my Num $n; $n = 42; }, 'Num does not accept Int';
dies_ok({ returntype4(Bool::False) }, 'bad return value dies (-->)');
}
-#?rakudo skip 'return type checking'
#?pugs skip 'parsefail'
{
# Check with implicit return.
@@ -128,10 +127,12 @@ dies_ok { my Num $n; $n = 42; }, 'Num does not accept Int';
is(returntype3(Bool::True), True, 'good implicit return value works (my Type sub)');
#?niecza todo 'retrun value type checking NYI'
+ #?rakudo todo 'NYI'
dies_ok({ returntype3(Bool::False) }, 'bad implicit return value dies (my Type sub)');
is(returntype4(Bool::True), 'ok', 'good implicit return value works (-->)');
#?niecza todo 'retrun value type checking NYI'
+ #?rakudo todo 'NYI'
dies_ok({ returntype4(Bool::False) }, 'bad implicit return value dies (-->)');
}
View
@@ -135,7 +135,7 @@ plan 19;
}
# stacked feeds
-#?rakudo skip '* feeds'
+#?rakudo todo '* feeds'
{
('a' .. 'd'; 0 .. 3) ==> my @data;
is(@(@data), <a b c d 0 1 2 3>, 'two stacked feeds');
View
@@ -67,7 +67,7 @@ sub jok(Mu $condition, $msg?) { ok ?($condition), $msg };
# test junction to junction
- #?rakudo skip 'nom regression'
+ #?rakudo todo 'nom regression'
jok(('a' | 'b' | 'c') eq ($a & $b & $c), 'junction ("a" | "b" | "c") matches junction ($a & $b & $c)');
jok(('a' & 'b' & 'c') eq ($a | $b | $c), 'junction ("a" & "b" & "c") matches junction ($a | $b | $c)');
View
@@ -707,7 +707,7 @@ my @e;
}
# L<S03/"Hyper operators"/is assumed to be infinitely extensible>
-#?rakudo skip 'nom regression - whatever extension'
+#?rakudo todo 'nom regression - whatever extension'
{
@r = <A B C D E> »~» (1, 2, 3, *);
@e = <A1 B2 C3 D3 E3>;
@@ -736,7 +736,7 @@ my @e;
# RT #77010
-#?rakudo skip 'RT 77010 - use hypers with local scoped user-defined operators'
+#?rakudo todo 'RT 77010 - use hypers with local scoped user-defined operators'
{
# niecza doesn't propagate slangs into &eval yet
eval_lives_ok 'sub infix:<+++>($a, $b) { ($a + $b) div 2 }; 10 >>+++<< 14', 'can use hypers with local scoped user-defined operators';

0 comments on commit 1cc6e47

Please sign in to comment.