Permalink
Browse files

niecza unfudge

moritz++ # many of these from autounfudge
  • Loading branch information...
coke committed Dec 22, 2011
1 parent 4401e31 commit 5f0bdabff323072976ac425060b5636337d15eee
@@ -110,7 +110,7 @@ is((do { my $दूसरा = 2; sub टोटल ($x) { $x + 2 }; टोटल
# L<S02/Unicode Semantics/Perl can count Unicode line and paragraph separators>
#?rakudo: todo 'PS does not work to separate lines'
-#?niecza skip 'PS does not work to separate lines'
+#?niecza todo 'PS does not work to separate lines'
eval_lives_ok "\{ 1 \} \x2029 \{ 1 \}", "Unicode 2029 can terminate lines";
# L<S02/Bracketing Characters/If a character is already used>
View
@@ -84,7 +84,7 @@ plan 18;
}
my $abs = 23;
- #?niecza skip 'strictness'
+ #?niecza todo 'strictness'
dies_ok { bar() },
'vars not declared "is dynamic" are not accessible via $CALLER::';
}
View
@@ -158,11 +158,11 @@ my @array2 = ("test", 1, Mu);
ok(eval('@array11[2,0] = 12'), "push the value to a multidimension array");
}
-#?niecza skip "type constraints"
{
# declare the array with data type
my Int @array;
lives_ok { @array[0] = 23 }, "stuffing Ints in an Int array works";
+ #?niecza todo "type constraints"
dies_ok { @array[1] = $*ERR }, "stuffing IO in an Int array does not work";
}
@@ -243,7 +243,7 @@ my @array2 = ("test", 1, Mu);
eval_dies_ok '@arr[-1]', "readonly accessing [-1] of normal array is compile-time error";
#?rakudo todo '@arr[-1] returns failure, not dies'
- #?niecza skip '@arr[-1] returns undef'
+ #?niecza todo '@arr[-1] returns undef'
dies_ok { @arr[ $minus_one ] }, "indirectly accessing [-1] " ~
"through a variable is run-time error";
dies_ok { @arr[$minus_one] = 42 }, "assigning to [-1] of a normal array is fatal";
View
@@ -247,7 +247,7 @@ lives_ok { Hash.new("a" => "b") }, 'Hash.new($pair) lives';
}
# Zen slices work on hashes too
-#?niecza skip 'Use of uninitialized value in string context'
+#?niecza todo 'Use of uninitialized value in string context'
{
my %h = { a => 1, b => 2, c => 3};
is %h{*}.join('|'), %h.values.join('|'), '{*} zen slice';
@@ -206,7 +206,7 @@ Some deeper tests were already added.
#?rakudo 2 todo 'unknown'
#?niecza todo
is(+@array[1]<two>[0], 2, "two keys at level 4");
- #?niecza skip 'Use of uninitialized value in string context'
+ #?niecza todo 'Use of uninitialized value in string context'
is(@array[1]<two>[0]<f><other>, 5, "more keys at level 4");
}
View
@@ -40,35 +40,30 @@ is_approx( eval((-1.1).perl), -1.1, 'eval -1.1.Num.perl is -1.1' );
{
my $a = 1 / 1;
isa_ok($a, Rat);
- #?niecza todo
is(~$a, "1", '1/1 stringification works');
}
{
my $a = -1.0;
isa_ok($a, Rat);
- #?niecza todo
is($a, "-1", '-1 stringification works');
}
{
my $a = 0.1;
isa_ok($a, Rat);
- #?niecza todo
is($a, "0.1", '0.1 stringification works');
}
{
my $a = -0.1; "$a";
isa_ok($a, Rat);
- #?niecza todo
is($a, "-0.1", '-0.1 stringification works');
}
{
my $a = 10.01; "$a";
isa_ok($a, Rat);
- #?niecza todo
is($a, "10.01", '10.01 stringification works');
}
@@ -154,7 +149,6 @@ isa_ok(1 / 1, Rat);
}
#L<S02/The C<Num> and C<Rat> Types/Perl 6 intrinsically supports big integers>
-#?niecza skip 'System.FormatException: Unknown char: d'
{
my $a = "1.01";
isa_ok($a.Int, Int);
View
@@ -88,7 +88,7 @@ L<"http://groups.google.de/group/perl.perl6.language/msg/bd9eb275d5da2eda">
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)";
- #?niecza 2 skip 'this is parsed as ![=], not good'
+ #?niecza 2 todo 'this is parsed as ![=], not good'
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)";
@@ -98,7 +98,7 @@ L<"http://groups.google.de/group/perl.perl6.language/msg/bd9eb275d5da2eda">
# RT #76110
{
is ~([\+] [\+] 1 xx 5), '1 3 6 10 15', 'two nested [\+]';
- #?niecza skip 'unary [] does not context yet'
+ #?niecza todo 'unary [] does not context yet'
is ([+] [1, 2, 3, 4]), 4, '[+] does not flatten []-arrays';
}
@@ -168,9 +168,9 @@ L<"http://groups.google.de/group/perl.perl6.language/msg/bd9eb275d5da2eda">
}
# Following two tests taken verbatim from former t/operators/reduce.t
-#?niecza 2 skip 'These are hyperop tests!'
lives_ok({my @foo = [1..3] >>+<< [1..3] >>+<< [1..3]},'Sanity Check');
#?rakudo todo 'reduced hyper op'
+#?niecza todo 'These are hyperop tests!'
lives_ok({my @foo = [>>+<<] ([1..3],[1..3],[1..3])},'Parse [>>+<<]');
# Check that user defined infix ops work with [...], too.
@@ -196,7 +196,7 @@ lives_ok({my @foo = [>>+<<] ([1..3],[1..3],[1..3])},'Parse [>>+<<]');
# L<S03/"Reduction operators"/"Among the builtin operators, [+]() returns 0 and [*]() returns 1">
-#?niecza skip '[*] identity'
+#?niecza todo '[*] identity'
is( ([*]()), 1, "[*]() returns 1");
is( ([+]()), 0, "[+]() returns 0");
View
@@ -53,9 +53,7 @@ is 4 Rcmp 5, 5 cmp 4, "4 Rcmp 5";
isa_ok 4 Rcmp 5, (5 cmp 4).WHAT, "4 Rcmp 5 is the same type as 5 cmp 4";
# precedence tests!
-#?niecza todo
is 3 R/ 9 + 5, 8, 'R/ gets precedence of /';
-#?niecza todo
is 4 R- 5 R/ 10, -2, "Rop gets the precedence of op";
is (9 R... 1, 3), (1, 3, 5, 7, 9), "Rop gets list_infix precedence correctly";
@@ -96,13 +96,13 @@ plan 30;
$b($val);
is $a, 42, "bound readonly sub param was bound correctly (1)";
$val++;
- #?niecza skip "difference of interpretation on ro binding"
+ #?niecza todo "difference of interpretation on ro binding"
#?rakudo todo 'nom regression'
is $a, 43, "bound readonly sub param was bound correctly (2)";
dies_ok { $a = 23 },
"bound readonly sub param remains readonly (1)";
- #?niecza skip "difference of interpretation on ro binding"
+ #?niecza todo "difference of interpretation on ro binding"
#?rakudo todo 'nom regression'
is $a, 43,
"bound readonly sub param remains readonly (2)";
@@ -191,9 +191,9 @@ nok 'a' ~~ 'b'..'g', "not 'a' ~~ 'b'..'g'";
nok 'h' ~~ 'b'..'g', "not 'h' ~~ 'b'..'g'";
nok 0 ~~ 'a'..'g', "not 0 ~~ 'a'..'g'";
-#?niecza 4 skip 'alphabetic/* ranges'
ok 'd' ~~ 'c'..*, "'d' ~~ 'c'..*";
nok 'b' ~~ 'c'..*, "not 'b' ~~ 'c'..*";
+#?niecza todo 'alphabetic/* ranges'
ok 'b' ~~ *..'c', "'b' ~~ *..'c'";
nok 'd' ~~ *..'c', "not 'd' ~~ *..'c'";
View
@@ -98,7 +98,6 @@ is (1..6 Z 'a' .. 'c').join, '1a2b3c', 'Ranges and infix:<Z>';
# 16:16 <TimToady> ~(1.9 ^..^ 4.9) should produce 2.9, 3.9
# 16:17 <pmichaud> and ~(1.9 ^..^ 4.5) would produce the same?
# 16:17 <TimToady> yes
- #?niecza 4 todo
is ~(1.1 .. 4) , "1.1 2.1 3.1", "range with float .min";
is ~(1.9 .. 4) , "1.9 2.9 3.9", "range with float .min";
is ~(1.1 ^.. 4), "2.1 3.1" , "bottom exclusive range of float";
@@ -109,13 +108,11 @@ is (1..6 Z 'a' .. 'c').join, '1a2b3c', 'Ranges and infix:<Z>';
is ~(1 ..^ 4.1), "1 2 3 4", "top exclusive range of float";
is ~(1 ..^ 4.9), "1 2 3 4", "top exclusive range of float";
- #?niecza 4 todo
is ~(1.1 .. 4.1), "1.1 2.1 3.1 4.1", "range with float .min/.max";
is ~(1.9 .. 4.1), "1.9 2.9 3.9" , "range with float .min/.max";
is ~(1.1 .. 4.9), "1.1 2.1 3.1 4.1", "range with float .min/.max";
is ~(1.9 .. 4.9), "1.9 2.9 3.9 4.9", "range with float .min/.max";
- #?niecza 4 todo
is ~(1.1 ^..^ 4.1), "2.1 3.1" , "both exclusive float range";
is ~(1.9 ^..^ 4.1), "2.9 3.9" , "both exclusive float range";
is ~(1.1 ^..^ 4.9), "2.1 3.1 4.1", "both exclusive float range";
@@ -25,7 +25,7 @@ plan 64;
is ~(@array[0,1]:p), "0\ta 1\tB",
":p on an array returned a two-elem array consisting of the correct pairs";
- #?niecza skip 'Cannot use value like Pair as a number'
+ #?niecza todo 'Cannot use value like Pair as a number'
is +(@array[42,23]:p), 0, ":p on an array weeded out non-existing entries (1)";
#?niecza todo
is ~(@array[42,23]:p), "", ":p on an array weeded out non-existing entries (2)";
@@ -126,7 +126,7 @@ plan 64;
is ~(%hash<0 1>:p), "0\ta 1\tB",
":p on a hash returned a two-elem array consisting of the correct pairs";
- #?niecza skip 'Cannot use value like Pair as a number'
+ #?niecza todo 'Cannot use value like Pair as a number'
is +(%hash<42 23>:p), 0, ":p on a hash weeded out non-existing entries (1)";
#?niecza todo
is ~(%hash<42 23>:p), "", ":p on a hash weeded out non-existing entries (2)";
View
@@ -18,7 +18,6 @@ is (1, 3 ... 9).join(', '), '1, 3, 5, 7, 9', 'simple additive sequence with two
is (1, 0 ... -3).join(', '), '1, 0, -1, -2, -3', 'simple decreasing additive sequence with two items on the LHS';
is (1, 3, 5 ... 9).join(', '), '1, 3, 5, 7, 9', 'simple additive sequence with three items on the LHS';
is (1, 3, 9 ... 81).join(', '), '1, 3, 9, 27, 81', 'simple multiplicative sequence with three items on the LHS';
-#?niecza todo 'Int-valued Rats written as N/1'
is (81, 27, 9 ... 1).join(', '), '81, 27, 9, 3, 1', 'decreasing multiplicative sequence with three items on the LHS';
is (1, { $_ + 2 } ... 9).join(', '), '1, 3, 5, 7, 9', 'simple sequence with one item and block closure on the LHS';
is (1, *+2 ... 9).join(', '), '1, 3, 5, 7, 9', 'simple sequence with one item and * closure on the LHS';
@@ -43,7 +42,6 @@ is (1, 3 ... 10).[^6].join(', '), '1, 3, 5, 7, 9, 11', 'simple additive sequence
is (1, 0 ... -3.5).[^6].join(', '), '1, 0, -1, -2, -3, -4', 'simple decreasing additive sequence with two items on the LHS';
is (1, 3, 5 ... 10).[^6].join(', '), '1, 3, 5, 7, 9, 11', 'simple additive sequence with three items on the LHS';
is (1, 3, 9 ... 100).[^6].join(', '), '1, 3, 9, 27, 81, 243', 'simple multiplicative sequence with three items on the LHS';
-#?niecza todo 'Int-valued Rats written as N/1'
is (81, 27, 9 ... 8/9).[^6], (81, 27, 9, 3, 1, 1/3), 'decreasing multiplicative sequence with three items on the LHS';
is (1, { $_ + 2 } ... 10).[^6].join(', '), '1, 3, 5, 7, 9, 11', 'simple sequence with one item and block closure on the LHS';
is (1, *+2 ... 10).[^6].join(', '), '1, 3, 5, 7, 9, 11', 'simple sequence with one item and * closure on the LHS';
@@ -65,7 +63,6 @@ is (1, 0 ... *).[^5].join(', '), '1, 0, -1, -2, -3', 'simple decreasing additive
is (1, 3, 5 ... *).[^5].join(', '), '1, 3, 5, 7, 9', 'simple additive sequence with three items on the LHS';
is (8, 7, 6 ... *).[^5].join(', '), '8, 7, 6, 5, 4', 'simple decreasing additive sequence with three items on the LHS';
is (1, 3, 9 ... *).[^5].join(', '), '1, 3, 9, 27, 81', 'simple multiplicative sequence with three items on the LHS';
-#?niecza todo 'Int-valued Rats written as N/1'
is (81, 27, 9 ... *).[^5].join(', '), '81, 27, 9, 3, 1', 'decreasing multiplicative sequence with three items on the LHS';
is (1, { $_ + 2 } ... *).[^5].join(', '), '1, 3, 5, 7, 9', 'simple sequence with one item and block closure on the LHS';
is (1, *+2 ... *).[^5].join(', '), '1, 3, 5, 7, 9', 'simple sequence with one item and * closure on the LHS';
@@ -123,7 +120,6 @@ is (1, 2 ... 0).[^3], (1,2,3), 'No more: limit value is on the wrong side';
is (1 ...^ -3).join(', '), '1, 0, -1, -2', 'exclusive decreasing sequence';
is (1 ...^ 5.5).[^6].join(', '), '1, 2, 3, 4, 5, 6', "exclusive sequence that couldn't hit its limit anyway";
is (1, 3, 9 ...^ 81).join(', '), '1, 3, 9, 27', 'exclusive geometric sequence';
- #?niecza todo 'Int-valued Rats written as N/1'
is (81, 27, 9 ...^ 2).[^5].join(', '), '81, 27, 9, 3, 1', "exclusive decreasing geometric sequence that couldn't hit its limit anyway";
is (2, -4, 8 ...^ 32).join(', '), '2, -4, 8, -16', 'exclusive alternating geometric sequence';
is (2, -4, 8 ...^ -32).[^6].join(', '), '2, -4, 8, -16, 32, -64', 'exclusive alternating geometric sequence (not an exact match)';
@@ -28,7 +28,7 @@ eval_dies_ok 'sub foo {1; }; sub foo($x) {1; };',
eval_dies_ok 'only sub foo {1; }; sub foo($x) {1; };',
'multiple declarations need multi or proto';
-#?niecza skip "MMD"
+#?niecza todo "MMD"
#?rakudo todo 'nom regression'
eval_lives_ok 'proto foo {1; }; sub foo {1; }; sub foo($x) {1; };',
'multiple declarations need multi or proto';
View
@@ -209,7 +209,7 @@ my $z = 42; #OK not used
{
my $a;
#?rakudo todo 'fails'
- #?niecza 2 skip 'still fails?'
+ #?niecza 2 todo 'still fails?'
eval_lives_ok 'do { die "foo";my Int $x;CATCH { default { $a = ?($x ~~ Int) } } }';
#?rakudo todo 'previous test skipped'
ok $a, 'unreached declaration in effect at block start';
@@ -238,7 +238,7 @@ my $z = 42; #OK not used
my $a = 42;
our sub access_lexical_a() { $a }
}
- #?niecza skip 'NYI'
+ #?niecza todo 'NYI'
is OUR::access_lexical_a(), 42,
'can call our-sub that accesses a lexical after the block was run';
@@ -173,7 +173,7 @@ plan 19;
is $str, '1', 'die aborts ENTER queue';
}
-#?niecza skip '@!'
+#?niecza todo '@!'
{
my $str;
try {
View
@@ -86,7 +86,7 @@ my $foo = PRE_Child.new;
lives_ok { $foo.test(5) }, 'PRE in methods compiles and runs';
dies_ok { $foo.test(-42) }, 'PRE in child throws';
-#?niecza skip 'PRE inheritance'
+#?niecza todo 'PRE inheritance'
dies_ok { $foo.test(78) }, 'PRE in parent throws';
@@ -164,7 +164,7 @@ dies_ok { $pt.test(1) }, 'POST receives return value as $_ (failure)';
is $str, '(', 'failing PRE runs nothing else';
}
-#?niecza skip 'I think POST runs LIFO by spec?'
+#?niecza todo 'I think POST runs LIFO by spec?'
{
my $str;
try {
@@ -59,14 +59,14 @@ use Test;
is $a, "<hello>", 'iterating one variable element works';
}
-#?niecza skip "closure for"
+#?niecza todo "closure for"
{
my $a = 0;
{ $a++ } for 1..3;
is $a, 3, 'the closure was called';
}
-#?niecza skip "closure for"
+#?niecza todo "closure for"
{
my $a = 0;
-> $i { $a += $i } for 1..3;
View
@@ -30,9 +30,7 @@ nok($/.from.defined, 'Match pos is undefined');
my regex Aa { A .* a }
#?rakudo 3 skip 'lexical lookup of <Aa>'
ok($str ~~ m/ .*? <Aa> /, 'Subrule match from 3');
-#?niecza skip 'System.InvalidCastException: Cannot cast from source type to destination type.'
ok($/.from == 0, 'Full match pos is 0');
-#?niecza skip 'Unable to resolve method from in class Any'
ok($/<Aa>.from == 3, 'Subrule match pos is 3');
View
@@ -10,7 +10,7 @@ use Test;
sub a_sub { b_sub() }
sub b_sub { try { caller.subname } }
#?pugs todo "feature"
-#?niecza skip "try interferes with caller counting"
+#?niecza todo "try interferes with caller counting"
is ~a_sub(), "a_sub", "caller.sub works";
# caller.file
@@ -20,7 +20,7 @@ ok index(~(try { caller.file }), "caller") >= 0, "caller.file works";
# caller.line (XXX: make sure to edit the expected line number!)
#?pugs 2 todo "feature"
sub call_line { caller.line };
-#?niecza skip "fudge messes up the line numbers"
+#?niecza todo "fudge messes up the line numbers"
is call_line(), 23, "caller.line works";
# pugs: caller exposes a bug in the MMD mechanism where directly using autogenerated
View
@@ -25,12 +25,12 @@ eval_lives_ok 'sub quuuux ($!) { ... }', 'but $! is OK';
}
# RT #71478
-#?niecza skip 'Excess arguments to MAIN_3 foo, used 1 of 2 positionals'
{
my $success = try { eval 'sub foo(%h) { %h }; foo(1, 2); 1' };
my $error = "$!";
nok $success,
"Passing two arguments to a function expecting one hash is an error";
+ #?niecza 3 todo 'error message content'
ok $error ~~ / '%h' /, '... error message mentions parameter';
ok $error ~~ /:i 'type' /, '... error message mentions "type"';
ok $error ~~ / Associative /, '... error message mentions "Associative"';
View
@@ -12,7 +12,7 @@ eval_lives_ok q[ role StubB { ... }; role StubB { method foo { } }; ],
eval_lives_ok q[ module StubC { ... }; module StubC { sub foo { } }; ],
'Can stub a module, and later on declare it';
-#?niecza skip 'broken in nom-derived stub model'
+#?niecza todo 'broken in nom-derived stub model'
#?rakudo todo 'nom regression'
eval_lives_ok q[ package StubD { ... }; class StubD { method foo { } }; ],
'Can stub a package, and later on implement it as a method';
View
@@ -88,13 +88,13 @@ dies_ok({ my Color $c3 = "for the fail" }, 'enum as a type enforces checks');
}
# L<S12/The C<.pick> Method/"define a .pick method">
-#?niecza skip '.pick and .roll'
{
lives_ok { my Color $k = Color.pick }, 'Color.pick assigns to Color var';
isa_ok Color.pick, Color.pick.WHAT, 'Color.pick.isa';
ok ?(Color.pick == any(Color::white, Color::gray, Color::black)),
'.pick on enums';
+ #?niecza todo 'picking multiple elements from an enum'
ok Color.pick(2) == 2, '.pick(2) on enums';
}
@@ -12,7 +12,7 @@ class CoercionTest {
my $o = CoercionTest.new();
-#?niecza skip 'Stringy'
+#?niecza todo 'Stringy'
is ~$o, 'foo', 'method Stringy takes care of correct stringification';
ok +$o == 1.2, 'method Numeric takes care of correct numification';
Oops, something went wrong.

0 comments on commit 5f0bdab

Please sign in to comment.