Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

pugs un/fudge

  • Loading branch information...
commit 93b57c2409dd121cc824abed5a56c9244cb94712 1 parent 301db81
@coke coke authored
View
1  S02-types/nan.t
@@ -22,7 +22,6 @@ is Inf**0 , 1, "Inf**0 is 1, _not_ NaN";
ok NaN ~~ NaN, 'NaN is a NaN';
nok 4 ~~ NaN, '4 is not a NaN';
-#?pugs skip '.Num'
nok 4.Num ~~ NaN, "4.Num is not a NaN";
isa_ok NaN + 1i, Complex, "NaN + 1i is a Complex number";
View
4 S02-types/num.t
@@ -6,7 +6,6 @@ use Test;
plan 64;
-#?pugs 7 skip '.Num'
isa_ok( eval(1.Num.perl), Num, 'eval 1.Num.perl is Num' );
is_approx( eval(1.Num.perl), 1, 'eval 1.Num.perl is 1' );
isa_ok( eval(0.Num.perl), Num, 'eval 0.Num.perl is Num' );
@@ -15,10 +14,8 @@ isa_ok( eval((-1).Num.perl), Num, 'eval -1.Num.perl is Num' );
is_approx( eval((-1).Num.perl), -1, 'eval -1.Num.perl is -1' );
isa_ok( eval(1.1.Num.perl), Num, 'eval 1.1.Num.perl is Num' );
is_approx( eval(1.1.perl), 1.1, 'eval 1.1.Num.perl is 1.1' );
-#?pugs skip '.Num'
isa_ok( eval((-1.1).Num.perl), Num, 'eval -1.1.Num.perl is Num' );
is_approx( eval((-1.1).perl), -1.1, 'eval -1.1.Num.perl is -1.1' );
-#?pugs 2 skip '.Num'
isa_ok( eval(1e100.Num.perl), Num, 'eval 1e100.Num.perl is Num' );
is_approx( eval(1e100.Num.perl), 1e100, 'eval 1e100.Num.perl is 1' );
@@ -147,7 +144,6 @@ isa_ok(1 / 1, Rat);
}
#L<S02/The C<Num> and C<Rat> Types/Perl 6 intrinsically supports big integers>
-#?pugs skip '.Int'
{
my $a = "1.01";
isa_ok($a.Int, Int);
View
5 S03-operators/eqv.t
@@ -111,7 +111,6 @@ plan 52;
#?rakudo skip 'captures'
#?niecza skip 'Cannot use value like Capture as a number'
#?pugs skip "Mu"
-#?DOES 3
{
ok !(\3 eqv \4), "eqv on anonymous scalar references (1)";
# XXX the following seems bogus nowadays
@@ -144,12 +143,12 @@ plan 52;
is(0 eqv 1, Bool::False, 'eqv returns Bool::False when false');
}
-#?pugs skip "Mu"
-#?DOES 1
{
+ #?pugs skip "Mu"
is Any eqv Any, Bool::True, 'Any eqv Any';
}
+#?pugs skip "autothreaded?"
{
ok 'a' eqv any <a b c>, "eqv autothreads correctly";
}
View
1  S03-operators/repeat.t
@@ -92,6 +92,7 @@ is($twin, 'LintillaLintilla', 'operator x= for string repeats correct');
# RT #101446
# xxx now thunks the LHS
+#?pugs skip 'xx thunks the LHS'
{
my @a = ['a'] xx 3;
@a[0][0] = 'b';
View
1  S04-phasers/ascending-order.t
@@ -51,6 +51,7 @@ END {
}
#?niecza todo 'niecza has "enter", also'
+#?pugs todo
is $hist, 'begin check init enter start ', 'BEGIN {} runs only once';
nok $var_at_begin.defined, 'BEGIN {...} ran at compile time';
nok $var_at_check.defined, 'CHECK {...} ran at compile time';
View
3  S04-phasers/check.t
@@ -6,7 +6,6 @@ plan 5;
# L<S04/"Phasers"/CHECK "at compile time" ALAP>
# CHECK {...} block in "void" context
-#?pugs todo
{
my $str;
BEGIN { $str ~= "begin1 "; }
@@ -16,7 +15,6 @@ plan 5;
is $str, "begin1 begin2 check ", "check blocks run after begin blocks";
}
-#?pugs todo
{
my $str;
CHECK { $str ~= "check1 "; }
@@ -33,7 +31,6 @@ plan 5;
is $handle(), 'C', 'our CHECK {...} block returned the correct var (1)';
is $handle(), 'C', 'our CHECK {...} block returned the correct var (2)';
- #?pugs todo
is $str, 'C', 'our rvalue CHECK {...} block was executed exactly once';
}
View
1  S04-phasers/descending-order.t
@@ -45,6 +45,7 @@ BEGIN {
}
#?niecza todo 'niecza has "enter", also'
+#?pugs todo
is $hist, 'begin check init enter ', 'BEGIN {} runs only once';
nok $var_at_begin.defined, 'BEGIN {...} ran at compile time';
nok $var_at_check.defined, 'CHECK {...} ran at compile time';
View
2  S04-statements/terminator.t
@@ -42,7 +42,6 @@ eval_dies_ok('my $x = ', 'incomplete expression');
+ 2 ];
';
- #?pugs todo 'parsing'
#?niecza todo
is($z[0], 3, 'auto-curly doesn\'t apply unless we\'re at top level');
}
@@ -58,6 +57,7 @@ eval_dies_ok '(1) { $foo = 2 }', 'parens do not eat spaces after them';
# RT #79964
#?rakudo todo 'RT #79964'
#?niecza todo
+#?pugs todo
eval_lives_ok "my &f;\nsub g() { }\n&f;", 'implicit terminator before & sigil';
# vim: ft=perl6
View
3  S06-macros/macros-d1.t
@@ -74,6 +74,7 @@ plan 11;
is $result, "chickpeas", "can shadow an existing operator";
}
+#?pugs skip 'undeclared variable'
{
macro cupid {
my $a = "I'm cupid!";
@@ -96,6 +97,7 @@ plan 11;
is donner, 2, "...twice";
}
+#?pugs skip 'undeclared variable'
{
macro blitzen($param) {
quasi { $param }
@@ -105,6 +107,7 @@ plan 11;
"lexical lookup from quasi to macro params works";
}
+#?pugs skip 'No such subroutine: "&x"'
{
macro id($param) { $param };
is id('x'), 'x', 'macro can return its param';
View
5 S06-signature/errors.t
@@ -13,11 +13,13 @@ These are misc. sub argument errors.
sub bar (*@x) { 1 } #OK not used
lives_ok { bar(reverse(1,2)) }, 'slurpy args are not bounded (2)';
+#?pugs todo
eval_dies_ok 'sub quuux ($?VERSION) { ... }',
'parser rejects magicals as args (1)';
eval_lives_ok 'sub quuuux ($!) { ... }', 'but $! is OK';
# RT #64344
+#?pugs todo
{
sub empty_sig() { return };
dies_ok { eval('empty_sig("RT #64344")') },
@@ -30,8 +32,11 @@ eval_lives_ok 'sub quuuux ($!) { ... }', 'but $! is OK';
my $error = "$!";
nok $success,
"Passing two arguments to a function expecting one hash is an error";
+ #?pugs todo
ok $error ~~ / '%h' /, '... error message mentions parameter';
+ #?pugs todo
ok $error ~~ /:i 'type' /, '... error message mentions "type"';
+ #?pugs todo
ok $error ~~ / Associative | \% /, '... error message mentions "Associative" or the % sigil';
}
View
1  S11-modules/require.t
@@ -13,6 +13,7 @@ is Fancy::Utilities::lolgreet('me'),
lives_ok { my $name = 'A'; require $name }, 'can require with variable name';
+#?pugs skip 'Must only use named arguments to new() constructor'
{
require 'Fancy::Utilities';
is ::('Fancy::Utilities')::('&lolgreet')('tester'), "O HAI TESTER",
View
1  S12-class/inheritance.t
@@ -156,6 +156,7 @@ eval_dies_ok 'class RT64642 is ::Nowhere {}', 'dies: class D is ::C {}';
}
# RT #82814
+#?pugs skip 'callsame'
{
my class A {
method new { self.bless(*) }
View
2  S12-methods/default-trait.t
@@ -26,7 +26,7 @@ multi sub slurpy() is default { return 'a' };
multi sub slurpy(*@args) { return 'b' }; #OK not used
is slurpy(2), 'b', 'basic sanity with arity based dispatch and slurpies';
-#?pugs todo
+#?pugs skip 'make todo? passes. untodo? fails.'
is slurpy(), 'a', '"is default" trait wins against empty slurpy param';
# vim: ft=perl6
View
1  S32-list/map.t
@@ -218,7 +218,6 @@ is( ~((1..3).map: { dbl( $_ ) }),'2 4 6','extern method in map');
# .thing inside map blocks should still default to $_
# used to be a pugs regression
-#?pugs skip '.Int'
#?DOES 6
{
is ~((1,2,3).map: { $_.Int }), "1 2 3", "dependency for following test (1)";
View
15 S32-num/int.t
@@ -24,14 +24,12 @@ is( eval(0.perl), 0, 'eval 0.perl is 0' );
isa_ok( eval((-0).perl), Int, 'eval -0.perl is Int' );
is( eval((-0).perl), -0, 'eval -0.perl is 0' );
-#?pugs 5 skip '.Int'
is((-1).Int, -1, "(-1).Int is -1");
is(0.Int, 0, "0.Int is 0");
is(1.Int, 1, "1.Int is 1");
is(3.14159265.Int, 3, "3.14159265.Int is 3");
is((-3.14159265).Int, -3, "(-3.14159265).Int is -3");
-#?pugs 6 skip '.Int'
is(0.999.Int, 0, "0.999.Int is 0");
is(0.51.Int, 0, "0.51.Int is 0");
is(0.5.Int, 0, "0.5.Int is 0");
@@ -39,7 +37,6 @@ is(0.49.Int, 0, "0.49.Int is 0");
is(0.1.Int, 0, "0.1.Int is 0");
isa_ok(0.1.Int, Int, '0.1.Int returns an Int');
-#?pugs 6 skip '.Int'
is((-0.999).Int, 0, "(-0.999).Int is 0");
is((-0.51).Int, 0, "(-0.51).Int is 0");
is((-0.5).Int, 0, "(-0.5).Int is 0");
@@ -47,21 +44,18 @@ is((-0.49).Int, 0, "(-0.49).Int is 0");
is((-0.1).Int, 0, "(-0.1).Int is 0");
isa_ok((-0.1).Int, Int, 'int(-0.1) returns an Int');
-#?pugs 5 skip '.Int'
is(1.999.Int, 1, "int(1.999) is 1");
is(1.51.Int, 1, "int(1.51) is 1");
is(1.5.Int, 1, "int(1.5) is 1");
is(1.49.Int, 1, "int(1.49) is 1");
is(1.1.Int, 1, "int(1.1) is 1");
-#?pugs 5 skip '.Int'
is((-1.999).Int, -1, "int(-1.999) is -1");
is((-1.51).Int, -1, "int(-1.51) is -1");
is((-1.5).Int, -1, "int(-1.5) is -1");
is((-1.49).Int, -1, "int(-1.49) is -1");
is((-1.1).Int, -1, "int(-1.1) is -1");
-#?pugs 4 skip '.Int, .Num'
is(1.999.Num.Int, 1, "int(1.999.Num) is 1");
is(1.1.Num.Int, 1, "int(1.1.Num) is 1");
@@ -83,7 +77,6 @@ isa_ok 1.Bool, Bool, "1.Bool is Bool";
ok 42.Bool, "42.Bool is true";
isa_ok 42.Bool, Bool, "42.Bool is Bool";
-#?pugs 5 skip '.Int'
is('-1.999'.Int, -1, "int('-1.999') is -1");
#?niecza 3 skip "0x, 0d, and 0o NYI"
is('0x123'.Int, 0x123, "int('0x123') is 0x123");
@@ -93,7 +86,6 @@ is('0o678'.Int, 0o67, "int('0o678') is 0o67");
#?niecza skip "trailing d produces a failure"
is('3e4d5'.Int, 3e4, "int('3e4d5') is 3e4");
-#?pugs skip '.Int, .Num'
#?DOES 24
{
sub __int( $s ) {
@@ -106,6 +98,7 @@ is('3e4d5'.Int, 3e4, "int('3e4d5') is 3e4");
for 0, 0.0, 1, 50, 60.0, 99.99, 0.4, 0.6, -1, -50, -60.0, -99.99 {
my $int = __int($_.Num);
+ #?pugs skip ".Int"
is(.Int, $int, "integral value for $_ is $int");
isa_ok(.Int, Int);
}
@@ -113,11 +106,9 @@ is('3e4d5'.Int, 3e4, "int('3e4d5') is 3e4");
#?DOES 1
# Special values
-#?pugs skip '.Int'
is((1.9e3).Int, 1900, "int 1.9e3 is 1900");
-#?pugs 3 todo 'bug'
-#?rakudo 3 todo 'Inf and NaN NYI for Int'
-#?pugs 3 skip '.Int'
+#?rakudo 3 todo 'Inf and NaN NYI for Int'
+#?pugs 3 todo 'Inf and NaN NYI for Int'
is((Inf).Int, Inf, "int Inf is Inf");
is((-Inf).Int, -Inf, "int -Inf is -Inf");
is((NaN).Int, NaN, "int NaN is NaN");
View
33 S32-num/rat.t
@@ -10,7 +10,6 @@ plan 817;
#?pugs skip 'Must only use named arguments to new() constructor'
isa_ok(Rat.new(1,4), Rat, "Rat.new makes a Rat");
isa_ok(1 / 4, Rat, "/ makes a Rat");
-#?pugs 2 skip '.Coercion'
isa_ok( 1.Int.Rat, Rat, "cast of Int makes a Rat");
isa_ok( 1.Num.Rat, Rat, "cast of Num makes a Rat");
@@ -111,8 +110,6 @@ is((2 / (2 / 3)).nude, (3, 1), "2 / 2/3 = 3 is simplified internally");
# Give the arithmetical operators a workout
-#?pugs skip '.Coercion'
-#?DOES 678
{
for 1/2, 2/3, -1/4, 4/5, 2/7, 65/8 -> $a {
for -7, -1, 0, 1, 2, 5, 7, 42 -> $b {
@@ -158,21 +155,20 @@ is_approx sin(5.0e0), sin(10/2), 'sin(Rat) works';
#?rakudo skip "NaN.Rat == NaN"
#?niecza todo
-#?pugs skip '.Coercion'
+#?pugs todo 'NaN.Rat'
is NaN.Rat, NaN, "NaN.Rat == NaN";
{
#?rakudo todo "Inf.Rat"
- #?pugs skip '.Coercion'
+ #?pugs todo 'Inf.Rat'
is Inf.Rat, Inf, "Inf.Rat == Inf";
#?rakudo todo "Inf.Rat"
- #?pugs skip '.Coercion'
+ #?pugs todo 'Inf.Rat'
is (-Inf).Rat, -Inf, "(-Inf).Rat == -Inf";
# RT #74648
#?rakudo skip 'RT 74648'
#?niecza todo
- #?pugs skip '.Coercion'
isa_ok Inf.Int / 1, Rat, "Inf.Int / 1 is a Rat";
}
@@ -203,17 +199,12 @@ is( exp(1).Rat(1e-4), Rat.new(193, 71), "Num to Rat with epsilon 1e-4");
is( exp(1).Rat(Rat.new(1,1e4.Int)), Rat.new(193, 71),
"Num to Rat with epsilon of Rat");
-#?pugs skip '.Coercion'
is (5/4).Int, 1, 'Rat.Int';
is <a b c>.[4/3], 'b', 'Indexing an array with a Rat (RT 69738)';
-#?pugs skip '.Coercion'
is_approx 424/61731 + 832/61731, 424.Num / 61731.Num + 832.Num / 61731.Num, "424/61731 + 832/61731 works";
-#?pugs skip '.Coercion'
is_approx 424/61731 - 832/61731, 424.Num / 61731.Num - 832.Num / 61731.Num, "424/61731 - 832/61731 works";
-#?pugs skip '.Coercion'
is_approx 424/61731 + 833/123462, 424.Num / 61731.Num + 833.Num / 123462.Num, "424/61731 + 833/123462 works";
-#?pugs skip '.Coercion'
is_approx 424/61731 - 833/123462, 424.Num / 61731.Num - 833.Num / 123462.Num, "424/61731 - 833/123462 works";
isa_ok 424/61731 + 832/61731, Rat, "424/61731 + 832/61731 is a Rat";
@@ -221,41 +212,27 @@ isa_ok 424/61731 - 832/61731, Rat, "424/61731 - 832/61731 is a Rat";
isa_ok 424/61731 + 833/123462, Rat, "424/61731 + 833/123462 is a Rat";
isa_ok 424/61731 - 833/123462, Rat, "424/61731 - 833/123462 is a Rat";
-#?pugs skip '195'
is_approx 61731 + 832/61731, 61731.Num + 832.Num / 61731.Num, "61731 + 832/61731 works";
-#?pugs skip '196'
is_approx 832/61731 + 61731, 61731.Num + 832.Num / 61731.Num, "832/61731 + 61731 works";
-#?pugs skip '197'
is_approx 61731 - 832/61731, 61731.Num - 832.Num / 61731.Num, "61731 - 832/61731 works";
-#?pugs skip '198'
is_approx 832/61731 - 61731, 832.Num / 61731.Num - 61731.Num, "832/61731 - 61731 works";
-#?pugs skip '200'
is_approx 424/61731 + 832/61733, 424.Num / 61731.Num + 832.Num / 61733.Num, "424/61731 + 832/61733 works";
-#?pugs skip '201'
is_approx 424/61731 - 832/61733, 424.Num / 61731.Num - 832.Num / 61733.Num, "424/61731 - 832/61733 works";
-#?pugs skip '203'
is_approx (424/61731) * (832/61731), (424.Num / 61731.Num) * (832.Num / 61731.Num), "424/61731 * 832/61731 works";
-#?pugs skip '204'
is_approx (424/61731) / (61731/832), (424.Num / 61731.Num) / (61731.Num / 832.Num), "424/61731 / 61731/832 works";
-#?pugs skip '206'
is_approx 61731 * (61731/832), 61731.Num * (61731.Num / 832.Num), "61731 * 61731/832 works";
-#?pugs skip '207'
is_approx (61731/832) * 61731, 61731.Num * (61731.Num / 832.Num), "61731/832 * 61731 works";
-#?pugs skip '208'
is_approx (832/61731) / 61731, (832.Num / 61731.Num) / 61731.Num, "832/61731 / 61731 works";
-#?pugs skip '209'
is_approx 61731 / (832/61731), 61731.Num / (832.Num / 61731.Num), "61731 / 832/61731 works";
-#?pugs 3 skip '.Coercion'
is_approx (424/61731) * (61731/61733), (424.Num / 61731.Num) * (61731.Num / 61733.Num), "424/61731 * 61731/61733 works";
isa_ok (424/61731) * (61731/61733), Rat, "424/61731 * 61731/61733 is a Rat";
is_approx (424/61731) / (61733/61731), (424.Num / 61731.Num) / (61733.Num / 61731.Num), "424/61731 / 61733/61731 works";
isa_ok (424/61731) / (61733/61731), Rat, "424/61731 / 61733/61731 is a Rat";
-#?pugs 2 skip '.Coercion'
ok (1/2) == (1/2).Rat, 'Rat.Rat works';
isa_ok (1/2).Rat, Rat, '... and actually returns a Rat';
@@ -263,7 +240,7 @@ ok 1/2 === 1/2, 'Rats are value types, so 1/2 === 1/2';
ok 1/2 !=== 1/3, '=== with false outcome';
# http://irclog.perlgeek.de/perl6/2010-02-24#i_2027452
-#?pugs 2 skip '.Coercion'
+#?pugs 2 skip 'Illegal division by zero'
is (3/0).Num, Inf, "(3/0).Num = +Inf";
is (-42/0).Num, -Inf, "(-42/0).Num = -Inf";
@@ -294,8 +271,6 @@ is (2/3) ** 3, 8/27, "Rat raised to a positive Int power gets correct answer";
# the spec says that Rat denominators can't grow larger than a uint64,
# and arithmetic operations need to spill over to Num
-#?pugs skip '.Coercion'
-#?DOES 13
{
# taken from http://www.perlmonks.org/?node_id=952765
my $s = 0;
Please sign in to comment.
Something went wrong with that request. Please try again.