Skip to content
Browse files

niecza fudging

  • Loading branch information...
1 parent 000e1e4 commit 3a7da948836f84ea2c2f2070f3bd47082f219b75 @coke coke committed Oct 16, 2011
View
3 S03-smartmatch/hash-hash.t
@@ -13,11 +13,14 @@ my %hash5 = ( "foo" => 1, "bar" => 1, "gorch" => Mu, "baz" => Mu );
{
#?rakudo todo 'nom regression'
+ #?niecza todo
ok (%hash1 ~~ %hash2), 'Hash ~~ Hash (same keys, +)';
ok !(%hash1 ~~ %hash3), 'Hash ~~ Hash (same keys, -)';
#?pugs todo
#?rakudo todo 'nom regression'
+ #?niecza todo
ok eval_elsewhere('(%hash1 ~~ %hash2)'), "hash keys identical";
+ #?niecza skip 'System.IndexOutOfRangeException: Array index is out of range.'
ok eval_elsewhere('!(%hash1 ~~ %hash4)'), "hash keys differ";
}
View
4 S05-match/arrayhash.t
@@ -13,18 +13,22 @@ plan 8;
my @a = ('a', 'b' );
ok(@a ~~ / 'b' /);
#?rakudo todo 'nom regression'
+#?niecza todo
ok(@a ~~ / ^ 'b' /);
ok(@a ~~ / ^ 'a' /);
#?rakudo todo 'nom regression'
+#?niecza todo
ok(@a ~~ / ^ 'a' $ /);
# Matching against a hash should be true if any of the keys match.
my %a = ('a' => 1, 'b' => 2);
ok(%a ~~ / 'b' /);
#?rakudo todo 'nom regression'
+#?niecza todo
ok(%a ~~ / ^ 'b' /);
ok(%a ~~ / ^ 'a' /);
#?rakudo todo 'nom regression'
+#?niecza todo
ok(%a ~~ / ^ 'a' $ /);
# vim: ft=perl6
View
5 S09-autovivification/autovivification.t
@@ -34,6 +34,7 @@ plan 42;
# XXX I understand that @array[0].push(...) should autovivify an Array
# in @array[0], but is that also true for a normal scalar?
#?rakudo skip 'autoviv with push/unshift'
+#?niecza skip 'Unable to resolve method push in class Any'
{
my $arrayref;
@@ -43,6 +44,7 @@ plan 42;
}
#?rakudo skip 'autoviv with push/unshift'
+#?niecza skip 'Unable to resolve method unshift in class Any'
{
my $arrayref;
@@ -53,6 +55,7 @@ plan 42;
# Autovification by push, unshift, etc. of an array/hash element
# L<S09/Autovivification/"push, unshift, .[]">
#?rakudo skip 'autoviv with push/unshift'
+#?niecza skip 'Unable to resolve method push in class Any'
{
my @array;
@@ -61,6 +64,7 @@ plan 42;
}
#?rakudo skip 'autoviv with push/unshift'
+#?niecza skip 'Unable to resolve method push in class Any'
{
my %hash;
@@ -78,6 +82,7 @@ plan 42;
$hashref<key> = 23;
is $hashref<key>, 23, "hash element assignment worked";
+ #?niecza skip 'No value for parameter \$other in CORE Any.isa'
ok $hashref.isa !~~ Hash, "uninitialized variable was autovivified to a hash (1)";
}
View
8 S12-attributes/augment-and-initialization.t
@@ -16,10 +16,12 @@ diag('Test for class attribute initialization');
{
class T1 { }
class T2 { }
+ #?niecza todo
eval_lives_ok 'use MONKEY_TYPING; augment class T1 { has $.t = 1 }; 1',
"Try to initialize public attribute";
- eval_lives_ok q'
+ #?niecza todo
+ eval_lives_ok q'
use MONKEY_TYPING;
augment class T2 {
has $!t = 2;
@@ -33,19 +35,23 @@ diag('Test for class attribute initialization');
$o1 = T1.new();
$o2 = T2.new();
+ #?niecza skip 'Unable to resolve method t in class T1'
is $o1.t, 1,
"Testing value for initialized public attribute.";
dies_ok { $o2.t },
"Try to access the initialized private attribute.";
+ #?niecza todo
is try { $o2.get }, 2,
"Testing value for initialized private attribue.";
$o1 = T1.new( t => 3 );
$o2 = T2.new( t => 4 );
+ #?niecza skip 'Unable to resolve method t in class T1'
is $o1.t, 3,
"Testing value for attributes which is initialized by constructor.";
dies_ok { $o2.t },
"Try to access the private attribute which is initialized by constructor.";
+ #?niecza todo
is try { $o2.get }, 4,
"Testing value for private attribue which is initialized by constructor.";
}
View
2 S12-class/anonymous.t
@@ -12,6 +12,7 @@ my $t1 = $c1.new();
ok(defined($t1), 'instantiated the class');
ok($t1 ~~ $c1, 'isa check works');
#?rakudo todo 'Anonymous class stringification (?)'
+#?niecza todo
is($c1.WHAT().gist, '()', '.WHAT.gist stringifies to ()');
# Anonymous classes with methods.
@@ -63,6 +64,7 @@ is($t3.x, 42, 'anonymous classes can have attributes');
lives_ok { $i1 = rt64888() }, 'can get anonymous class instance once';
lives_ok { $i2 = rt64888() }, 'can get anonymous class instance twice';
+ #?niecza todo
is ~$i1, 'RT #64888', 'anonymous class stringified works';
is +$i1, 64888, 'anonymous class numified works';
}
View
16 S12-class/basic.t
@@ -23,9 +23,11 @@ ok($foo ~~ Foo, '... smartmatch our $foo to the Foo class');
# override the behaviour without playing with the metamodel via traits
ok($foo.isa(Foo), '.isa(Foo)');
ok($foo.isa(::Foo), '.isa(::Foo)');
+#?niecza todo
ok($foo.isa("Foo"), '.isa("Foo")');
ok(!$foo.isa("Bar"), '!.isa("Bar")');
+#?niecza skip 'Unable to resolve method clone in class Foo'
{
my $foo_clone = $foo.clone();
ok($foo_clone ~~ Foo, '... smartmatch our $foo_clone to the Foo class');
@@ -57,6 +59,7 @@ ok($bar.isa(Bar), "... .isa(Bar)");
ok($bar ~~ Foo, '... smartmatch our $bar to the Foo class');
ok($bar.isa(Foo), "new Bar .isa(Foo)");
+#?niecza skip 'Unable to resolve method clone in class Bar'
{
my $bar_clone = $bar.clone();
ok($bar_clone ~~ Bar, '... smartmatch our $bar_clone to the Bar class');
@@ -67,6 +70,7 @@ ok($bar.isa(Foo), "new Bar .isa(Foo)");
# Same, but with the "is Foo" declaration inlined
#?rakudo skip 'not parsing is inside class yet'
+#?niecza skip 'No value for parameter \$expected in Test is'
{
class Baz { is Foo }
ok(Baz ~~ Foo, '... smartmatch our Baz to the Foo class');
@@ -99,15 +103,19 @@ ok(One::Two.new, 'created One::Two after One::Two::Three');
eval_dies_ok 'class One::Two { }', 'cannot redeclare an existing class';
eval_lives_ok q[BEGIN {class Level1::Level2::Level3 {};}; class Level1::Level2 {};], 'RT 62898';
-class A61354_1 {
- eval('method x { "OH HAI" }')
-};
-dies_ok { A61354_1.x }, "can't just use eval to add method to class";
+#?niecza skip 'Methods must be used in some kind of package'
+{
+ class A61354_1 {
+ eval('method x { "OH HAI" }')
+ };
+ dies_ok { A61354_1.x }, "can't just use eval to add method to class";
+}
# RT #67784
{
class class {}
#?rakudo skip 'RT #67784'
+ #?niecza todo
isa_ok( class.new, 'class' );
}
View
1 S12-class/type-object.t
@@ -10,6 +10,7 @@ is Any.gist, 'Any()', 'Any.gist has those parens';
# maybe a bit too retrictive?
is Any.perl, 'Any', 'Any.perl does not have parens';
+#?niecza skip 'Unable to resolve method name in class ClassHOW'
is Any.^name, 'Any', '.^name';
isa_ok (class A { }).new, A, 'can instantiate return value of class declaration';
View
1 S12-construction/autopairs.t
@@ -13,6 +13,7 @@ plan 4;
eval_lives_ok('my $a; class Tb { has $.a }; my Tb $Tb .= new(:$a )',
'class instantiation with autopair, spaces');
#?rakudo 2 todo 'nom regression'
+ #?niecza 2 todo
eval_lives_ok('my $a; role Tc { has $.a }; my Tc $c .= new(:$a)',
'role instantiation with autopair, no spaces');
eval_lives_ok('my $a; role Td { has $.a }; my Td $c .= new(:$a )',
View
1 S12-enums/misc.t
@@ -42,6 +42,7 @@ use Test;
sub OK { 'sub OK' };
is OK, 'OK', 'enum key wins in case of conflict';
is +OK, 0, 'enum key wins in case of conflict (numeric)';
+ #?niecza skip 'No value for parameter $key in CORE CommonEnum.postcircumfix:<( )>'
is OK(), 'sub OK', 'but () is still a function call';
is FAIL, 'FAIL', 'non-conflicting enum key';
is +FAIL, 1, 'non-conflicting enum key (numeric)';
View
2 S12-methods/lvalue.t
@@ -40,7 +40,9 @@ is $a, 8, 'but the temp assignment had worked';
lives_ok { temp $o.l2 = 9; $b = $o.b },
'can use lvalue method in temp() statement (explicit return)';
is $o.l2, 4, '... and the value was reset';
+#?niecza todo
is $o.b, 3, '... also on the attribute';
+#?niecza todo
is $a, 9, 'but the temp assignment had worked';
# vim: ft=perl6
View
1 S28-named-variables/inc.t
@@ -9,6 +9,7 @@ plan 5;
#
# L<S28/Perl5 to Perl6 special variable translation/"@*INC">
+#?niecza todo
ok(+@*INC > 0, 'we have something in our @INC');
my $number_in_inc = +@*INC;
View
4 S29-context/eval.t
@@ -36,6 +36,7 @@ dies_ok {eval 'use Poison; 1'}, "eval dies on fatal use";
dies_ok({eval {; 42} }, 'block eval is gone');
# RT #63978, eval didn't work in methods
+#?niecza skip 'System.IndexOutOfRangeException: Array index is out of range'
{
class EvalTester1 {
method e($s) { eval $s };
@@ -44,6 +45,7 @@ dies_ok({eval {; 42} }, 'block eval is gone');
is EvalTester1.new.e('5'), 5, 'eval works inside instance methods';
}
+#?niecza skip 'System.IndexOutOfRangeException: Array index is out of range'
{
my $x = 5;
class EvalTester2 {
@@ -56,8 +58,10 @@ dies_ok({eval {; 42} }, 'block eval is gone');
}
#?rakudo skip 'eval(Buf)'
+#?niecza skip 'Unable to resolve method encode in class Str'
is eval("'møp'".encode('UTF-8')), 'møp', 'eval(Buf)';
+#?niecza skip 'Excess arguments to CORE eval, used 1 of 3 positionals'
{
#?rakudo skip 'eval coerce to string'
is eval 88, 88, 'eval of non-string works';
View
3 S32-hash/delete.t
@@ -19,6 +19,7 @@ sub gen_hash {
is %h1.delete('b'), $b, "Test for delete single key.";
}
+#?niecza todo
{
my %h1 = gen_hash;
my @cde = %h1<c d e>;
@@ -32,6 +33,8 @@ is +%hash, 4, "basic sanity (2)";
is ~(%hash.delete('a')), "1",
"deletion of a hash element returned the right value";
is +%hash, 3, "deletion of a hash element";
+
+#?niecza skip 'Excess arguments to CORE Hash.delete, used 2 of 3 positionals'
{
is ~(%hash.delete("c", "d")), "3 4",
"deletion of hash elements returned the right values";
View
3 S32-hash/invert.t
@@ -7,7 +7,9 @@ plan 5;
{
my %h = a => 'b', c => 'd';
+ #?niecza todo
isa_ok %h.invert, List, 'Hash.invert returns a List';
+ #?niecza skip 'Cannot use value like Pair as a number'
is_deeply %h.invert.sort, (b => 'a', d => 'c'), 'simple Hash.invert works';
is_deeply %h, { a => 'b', c => 'd' }, 'original remains unchanged';
}
@@ -16,6 +18,7 @@ plan 5;
# with lists
my %h = a => <b c>, d => 'e';
#?rakudo todo 'nom regression'
+ #?niecza skip 'Cannot use value like Pair as a number'
is_deeply %h.invert.sort, (b => 'a', c => 'a', e => 'd'),
'Hash.invert flattens list values';
is_deeply %h, {a => <b c>, d => 'e'}, 'original remains unchanged';
View
4 S32-hash/keys_values.t
@@ -24,11 +24,15 @@ is(+%hash.values, +%hash, 'we have the same number of keys as elements in the ha
# keys and values on Pairs
my $pair = (a => 42);
+#?niecza todo
is(~$pair.keys, "a", '$pair.keys works');
+#?niecza todo
is(~keys($pair), "a", 'keys($pair) works');
is($pair.keys.elems, 1, 'we have one key');
+#?niecza todo
is(~$pair.values, 42, '$pair.values works');
+#?niecza todo
is(~values($pair), 42, 'values($pair) works');
is($pair.values.elems, 1, 'we have one value');
View
2 S32-hash/pairs.t
@@ -16,6 +16,7 @@ Basic C<pairs> tests, see S32::Containers.
my %hash = (a => 1, b => 2, c => 3);
my @pairs;
ok((@pairs = %hash.pairs), "pairs on hashes");
+ #?niecza skip 'Cannot use value like Pair as a number'
ok((@pairs = @pairs.sort), 'Can sort list of pairs');
is +@pairs, 3, "pairs on hashes returned the correct number of elems";
if +@pairs != 3 {
@@ -45,6 +46,7 @@ Basic C<pairs> tests, see S32::Containers.
}
# This next group added by Darren Duncan following discovery while debugging ext/Locale-KeyedText:
+#?niecza skip 'Cannot use value like Pair as a number'
{
my $hash_of_2_pairs = {'a'=>'b','c'=>'d'};
my $hash_of_1_pair = {'a'=>'b'};
View
7 S32-hash/slice.t
@@ -30,6 +30,7 @@ plan 29;
is(%hash{@slice[0,1]}, (4,6), "slice from array slice, part 2");
}
+#?niecza skip 'Excess arguments to CORE List.new, used 1 of 3 positionals'
{ my %hash;
%hash{(1,2)} = "one", "two";
@@ -47,6 +48,7 @@ plan 29;
#?pugs todo 'feature'
#?rakudo skip 'binding on hash elements unimplemented'
+#?niecza skip 'Writing to readonly scalar'
{
my %hash = :a(1), :b(2), :c(3), :d(4);
my @slice := %hash<b c>;
@@ -77,6 +79,7 @@ Quoting Larry:
try { %hash<a b> := <FOO BAR> };
#?pugs 2 todo 'bug'
+ #?niecza 2 todo
is %hash<a>, "FOO", "binding hash slices works (1-1)";
is %hash<b>, "BAR", "binding hash slices works (1-2)";
}
@@ -86,6 +89,7 @@ Quoting Larry:
try { %hash<a b> := <FOO> };
#?pugs 2 todo 'bug'
+ #?niecza 2 todo
is %hash<a>, "FOO", "binding hash slices works (2-1)";
ok !defined(%hash<b>), "binding hash slices works (2-2)";
}
@@ -97,11 +101,13 @@ Quoting Larry:
try { %hash<a b> := ($foo, $bar) };
#?pugs 2 todo 'bug'
+ #?niecza 2 todo
is %hash<a>, "FOO", "binding hash slices works (3-1)";
is %hash<b>, "BAR", "binding hash slices works (3-2)";
$foo = "BB";
$bar = "CC";
+ #?niecza 2 todo
#?pugs 2 todo 'bug'
is %hash<a>, "BB", "binding hash slices works (3-3)";
is %hash<b>, "CC", "binding hash slices works (3-4)";
@@ -111,6 +117,7 @@ Quoting Larry:
is %hash<a>, "BBB", "binding hash slices works (3-5)";
is %hash<b>, "CCC", "binding hash slices works (3-6)";
#?pugs 2 todo 'bug'
+ #?niecza 2 todo
is $foo, "BBB", "binding hash slices works (3-7)";
is $bar, "CCC", "binding hash slices works (3-8)";
}
View
1 S32-list/first.t
@@ -27,6 +27,7 @@ my @list = (1 ... 10);
}
#?rakudo skip "adverbial block"
+#?niecza skip 'No value for parameter Mu $filter in CORE Any.first'
{
my $result = @list.first():{ ($^a == 4) };
ok($result ~~ Int, "first():<block> returns an Int");
View
15 S32-num/rat.t
@@ -12,17 +12,23 @@ isa_ok(1 / 4, Rat, "/ makes a Rat");
isa_ok( 1.Int.Rat, Rat, "cast of Int makes a Rat");
isa_ok( 1.Num.Rat, Rat, "cast of Num makes a Rat");
+#?niecza skip 'No value for parameter $n in CORE Rat.new'
isa_ok( Rat.new, Rat, 'Rat.new is Rat' );
+#?niecza skip 'No value for parameter $n in CORE Rat.new'
isa_ok( eval(Rat.new.perl), Rat, 'eval Rat.new.perl is Rat' );
isa_ok( eval(Rat.new(1, 3).perl), Rat, 'eval Rat.new(1, 3).perl is Rat' );
is( (eval Rat.new(1, 3).perl).nude, (1, 3), 'eval Rat.new(1, 3).perl is 1/3' );
isa_ok( eval((1/3).perl), Rat, 'eval (1/3).perl is Rat' );
is( (eval (1/3).perl).nude, (1, 3), 'eval (1/3).perl is 1/3' );
# Test ~
+#?niecza todo
is(~(Rat.new(1,4)), ~(0.25e0), "Rats stringify properly");
+#?niecza todo
is(~(Rat.new(-1,2)), ~(-0.5e0), "Rats stringify properly");
+#?niecza todo
is(~(Rat.new(7,4)), ~(1.75e0), "Rats stringify properly");
+#?niecza todo
is(~(Rat.new(7,-1)), ~(-7), "Rats stringify properly");
# Test new
@@ -32,8 +38,11 @@ is(Rat.new(2, 4).nude, (1, 2), "Reduce to simplest form in constructor");
is(Rat.new(39, 33).nude, (13, 11), "Reduce to simplest form in constructor");
is(Rat.new(0, 33).nude, (0, 1), "Reduce to simplest form in constructor");
is(Rat.new(1451234131, 60).nude, (1451234131, 60), "Reduce huge number to simplest form in constructor");
+#?niecza skip 'Unable to resolve method nude in class Num'
is(Rat.new(1141234123, 0).nude, (1, 0), "Huge over zero becomes one over zero");
+#?niecza skip 'Unable to resolve method nude in class Num'
is(Rat.new(-7, 0).nude, (-1, 0), "Negative over zero becomes negative one over zero");
+#?niecza todo
dies_ok( { Rat.new(0, 0) }, "Zero over zero is not a legal Rat");
# Test basic math
@@ -69,6 +78,7 @@ isa_ok((2 / 3) / (5 / 4), Rat, "2/3 / 5/4 is a Rat");
is((2 / 3) / 2, 1/3, "2/3 / 2 = 1/3");
is(((2 / 3) / 2).nude, (1, 3), "2/3 / 2 = 1/3 is simplified internally");
isa_ok((2 / 3) / 2, Rat, "2/3 / 2 is a Rat");
+#?niecza todo
is(2 / (1 / 3), 6, "2 / 1/3 = 6");
isa_ok(2 / (1 / 3), Rat, "2 / 1/3 is a Rat");
is((2 / (2 / 3)).nude, (3, 1), "2 / 2/3 = 3 is simplified internally");
@@ -133,10 +143,13 @@ is_approx sin(5.0e0), sin(10/2), 'sin(Rat) works';
# so I'm holding off on writing tests for it.
#?rakudo todo "NaN.Rat == NaN"
+#?niecza todo
is NaN.Rat, NaN, "NaN.Rat == NaN";
{
+#?niecza todo
is Inf.Rat, Inf, "Inf.Rat == Inf";
+#?niecza todo
is (-Inf).Rat, -Inf, "(-Inf).Rat == -Inf";
# RT #74648
@@ -207,13 +220,15 @@ ok (1/2) == (1/2).Rat, 'Rat.Rat works';
isa_ok (1/2).Rat, Rat, '... and actually returns a Rat';
#?rakudo todo '=== on Rats'
+#?niecza todo
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
is (3/0).Num, Inf, "(3/0).Num = +Inf";
is (-42/0).Num, -Inf, "(-42/0).Num = -Inf";
+#?niecza skip 'No value for parameter $n in CORE Rat.new'
ok Rat.new() == 0, 'Rat.new() is 0';
{
View
3 S32-num/sign.t
@@ -47,10 +47,13 @@ is(sign(-Inf), -1, 'got correct sign for -Inf');
isa_ok(sign(Inf), Int, 'got correct type for +Inf');
isa_ok(sign(-Inf), Int, 'got correct type for -Inf');
#?rakudo todo "Nom does not yet have a NaN framework in place"
+#?niecza todo
is(sign(NaN),NaN, 'sign of NaN is NaN');
+#?niecza todo
nok sign(Int).defined, 'sign(Int) is undefined';
#?rakudo skip "Test is kind of doubtful IMO -- colomon"
+#?niecza todo
nok sign(3+4i).defined, 'sign(Complex) fails';
done;
View
3 S32-num/sqrt.t
@@ -22,9 +22,12 @@ is_approx(42.sqrt * sqrt(42), 42, 'got the square root of 42');
is_approx(1/42.sqrt * sqrt(1/42), 1/42, 'got the square root of 1/42');
is_approx(1e2.sqrt, 10, 'got square root of 1e2');
+#?niecza todo
is(sqrt(-1), NaN, 'sqrt(-1) is NaN');
+#?niecza todo
is(sqrt(NaN), NaN, 'sqrt(NaN) is NaN');
is(sqrt(Inf), Inf, 'sqrt(Inf) is Inf');
+#?niecza todo
is(sqrt(-Inf), NaN, 'sqrt(-Inf) is NaN');
is(sqrt(-0.0e0), -0.0e0, 'sqrt preserves sign of Num zero');
View
5 integration/99problems-01-to-10.t
@@ -51,7 +51,7 @@ plan 22;
sub element_at (@xs, $pos) {
return @xs[$pos];
}
-
+
is element_at(<a b c d e>, 3), 'd',
'We should be able to index into lists by func';
is element_at(@array, 3), 'd', '... and arrays by func';
@@ -66,6 +66,7 @@ plan 22;
is @array.elems, 5, '... and arrays';
}
+#?niecza skip 'Unable to resolve method reverse in class Parcel'
{
# P05 (*) Reverse a list.
@@ -132,6 +133,7 @@ plan 22;
return $x ne $previous ?? ($previous = $x) !! ();
}
my @compressed = map $compress, <a a a a b c c a a d e e e e>;
+ #?niecza todo
is @compressed, <a b c a d e>, 'We should be able to compress lists';
}
@@ -189,6 +191,7 @@ plan 22;
'... even using gather/take';
}
#?rakudo skip 'groupless gather/take'
+#?niecza skip 'Unable to resolve method reverse in class Parcel'
{
sub group2 (*@array is copy) {
gather while @array {
View
1 integration/advent2009-day04.t
@@ -9,6 +9,7 @@ sub fac(Int $n) {
use Test;
plan 6;
+#?niecza todo
is fac(0), 1, 'fac(0) works';
is fac(1), 1, 'fac(1) works';
is fac(2), 2, 'fac(2) works';
View
1 integration/advent2009-day06.t
@@ -27,6 +27,7 @@ for @pi Z @pi-sin -> $elem, $elem-sin {
is ((-1, 0, 3, 42)>>.Str), ["-1", "0", "3", "42"], 'Hyperoperator used to call .Str on each list element';
#?rakudo skip "Cannot assign to readonly value"
+#?niecza todo
{
is (@a-copy = @a; @a-copy >>/=>> 2; @a-copy), [2, 3, 4, 5], 'in-place operators work';
}
View
1 integration/advent2009-day07.t
@@ -26,6 +26,7 @@ is $a, 'abcd', '$_ is default topic, variable list';
# XXX These need to be converted to something testable.
# @array.map: *.say;
#?rakudo skip "No candidates found to invoke"
+#?niecza skip 'Excess arguments to CORE Any.map, used 2 of 4 positionals'
{
is @array.map: *.Int , (1, 2, 3, 4) , 'Testing map form';
}
View
3 integration/advent2009-day14.t
@@ -9,6 +9,7 @@ is (3/7).WHAT.gist, "Rat()";
is_approx (3/7), 0.4285714;
is_approx (3/7).Num + (2/7).Num + (2/7).Num - 1, -1.1102230e-16;
+#?niecza todo
is 3/7 + 2/7 + 2/7 - 1, 0;
is (3/7).perl, "3/7";
@@ -24,9 +25,11 @@ is $a.perl, "1/30000";
$a = 1/60000 + 1/60001;
#?rakudo todo 'nom regression'
+#?niecza todo
is $a.WHAT.gist, "Num()";
is_approx $a, 3.333305e-05;
#?rakudo todo 'nom regression'
+#?niecza todo
ok $a.perl ~~ / '3.3333' /;
View
16 integration/advent2009-day16.t
@@ -61,13 +61,17 @@ is (.[0] + .[1] + .[2] given @list), 6, 'Statement ending given';
is ('Boo!' when /phantom/ given $castle), 'Boo!', 'Nesting when inside given';
}
-#Test DNA one liner at the end
-my $result;
-for ^20 {my ($a,$b)=<AT CG>.pick.comb.pick(*); my ($c,$d)=sort map({6+4*sin($_/2)},($_,$_+4)); $result ~= sprintf "%{$c}s%{$d-$c}s\n",$a,$b}
-is $result.chars , 169 , 'We got a bunch of DNA';
-is $result.split("\n").Int , 21 , 'On 20 line';
-is $result.subst(/\s/ , '' , :g).chars , 40 , 'Containing 20 pairs';
+#?niecza skip 'Cannot use value like Whatever as a number'
+{
+ #Test DNA one liner at the end
+ my $result;
+ for ^20 {my ($a,$b)=<AT CG>.pick.comb.pick(*); my ($c,$d)=sort map({6+4*sin($_/2)},($_,$_+4)); $result ~= sprintf "%{$c}s%{$d-$c}s\n",$a,$b}
+ is $result.chars , 169 , 'We got a bunch of DNA';
+ is $result.split("\n").Int , 21 , 'On 20 line';
+ is $result.subst(/\s/ , '' , :g).chars , 40 , 'Containing 20 pairs';
+}
+#?niecza todo
eval_lives_ok 'for ^20 {my ($a,$b)=<AT CG>.pick.comb.pick(*); my ($c,$d)=sort map {6+4*sin($_/2)},$_,$_+4; sprintf "%{$c}s%{$d-$c}s\n",$a,$b}' , 'Can handle "map {...} ,$x,$y"';
done;
View
1 integration/advent2009-day23.t
@@ -58,6 +58,7 @@ my @all-nodes = gather traverse-tree-inorder($tree);
is @all-nodes, ["c", "b", "d", "a", "e"], 'In order tree traversal with gather/take';
#?rakudo skip "lists aren't properly lazy in Rakudo yet"
+#?niecza skip 'hangs'
{
my @natural-numbers = 0 .. Inf;
my @even-numbers = 0, 2 ... *; # arithmetic seq
View
1 integration/advent2010-day04.t
@@ -18,6 +18,7 @@ plan 11;
is @Fibonacci[^10].join(" "), "0 1 1 2 3 5 8 13 21 34", "First ten Fibonacci numbers are correct";
}
+#?niecza todo
{
is (1, 1.1 ... 2).join(" "), "1 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2", "1, 1.1 ... 2 is correct";
is (1, 1.1 ... 2.01)[^14].join(" "), "1 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2 2.1 2.2 2.3",

0 comments on commit 3a7da94

Please sign in to comment.
Something went wrong with that request. Please try again.