Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[t/spec] unmark some passing rakudo tests due to container/value refa…

…ctor

git-svn-id: http://svn.pugscode.org/pugs@22919 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
commit db93e8946c865a3e125c745270d715d9a786a44f 1 parent ce4097f
particle authored
View
2  S02-builtin_data_types/catch_type_cast_mismatch.t
@@ -40,7 +40,6 @@ lives_ok( { $ref[0] }, 'Accessing a hash as a list of pairs is fine');
my $x = 2;
lives_ok { $x = {a => 1} }, 'Can assign an hashref to a scalar';
my $y = { b => 34 };
- #?rakudo todo 'RT #59382'
lives_ok { $y = 3 }, 'Can assign a number to scalar with an hashref';
}
@@ -49,7 +48,6 @@ lives_ok( { $ref[0] }, 'Accessing a hash as a list of pairs is fine');
my $x = [0, 1];
lives_ok { $x = { a => 3 } }, 'can assign hashref to scalar that held an array ref';
my $y = { df => 'dfd', 'ui' => 3 };
- #?rakudo todo 'RT #59382'
lives_ok { $y = [0, 7] }, 'can assign arrayref to scalar that held an hashref';
}
View
81 S02-builtin_data_types/mixed_multi_dimensional.t
@@ -11,7 +11,7 @@ This tests some mixed multi-dimensional structures.
NOTE:
These tests don't go any more than two levels deep
(AoH, AoP) in most cases because I know these won't
-work yet in Pugs. When we have this support, then
+work yet in Pugs. When we have this support, then
this test should be added too more.
Some deeper tests were already added.
@@ -21,13 +21,13 @@ Some deeper tests were already added.
{ # Array of Pairs
my @array;
isa_ok(@array, Array);
-
+
my $pair = ('key' => 'value');
isa_ok($pair, Pair);
-
+
@array[0] = $pair; # assign a variable
is(+@array, 1, 'the array has one value in it');
-
+
isa_ok(@array[0], Pair);
#?rakudo skip "get_pmc_keyed() not implemented in class 'Perl6Pair'"
is(@array[0]<key>, 'value', 'got the right pair value');
@@ -43,53 +43,53 @@ Some deeper tests were already added.
{ # Array of Hashes
my @array;
isa_ok(@array, Array);
-
+
my %hash = ('key', 'value', 'key1', 'value1');
isa_ok(%hash, Hash);
is(+%hash.keys, 2, 'our hash has two keys');
-
+
@array[0] = %hash;
is(+@array, 1, 'the array has one value in it');
isa_ok(@array[0], Hash);
is(@array[0]{"key"}, 'value', 'got the right value for key');
- is(@array[0]<key1>, 'value1', 'got the right value1 for key1');
+ is(@array[0]<key1>, 'value1', 'got the right value1 for key1');
}
{ # Array of Arrays
my @array = (1, [2, 3], [4, 5], 6);
isa_ok(@array, Array);
-
+
is(+@array, 4, 'got 4 elements in the Array of Arrays');
is(@array[0], 1, 'got the right first element');
#?rakudo todo 'too eager list flattening'
isa_ok(@array[1], 'Array');
- is(@array[1][0], 2, 'got the right second/first element');
- is(@array[1][1], 3, 'got the right second/second element');
- isa_ok(@array[2], Array);
- is(@array[2][0], 4, 'got the right third/first element');
- is(@array[2][1], 5, 'got the right third/second element');
+ is(@array[1][0], 2, 'got the right second/first element');
+ is(@array[1][1], 3, 'got the right second/second element');
+ isa_ok(@array[2], Array);
+ is(@array[2][0], 4, 'got the right third/first element');
+ is(@array[2][1], 5, 'got the right third/second element');
is(@array[3], 6, 'got the right fourth element');
}
{ # Array of Subs
my @array;
isa_ok(@array, Array);
-
+
@array[0] = sub { 1 };
@array[1] = { 2 };
#?rakudo emit #
@array[2] = -> { 3 };
-
+
#?rakudo todo 'test dependency'
is(+@array, 3, 'got three elements in the Array');
#?rakudo todo 'type Sub'
isa_ok(@array[0], Sub);
isa_ok(@array[1], Block);
#?rakudo todo 'test dependency'
- isa_ok(@array[2], Block);
-
+ isa_ok(@array[2], Block);
+
is(@array[0](), 1, 'the first element (when executed) is 1');
- is(@array[1](), 2, 'the second element (when executed) is 2');
+ is(@array[1](), 2, 'the second element (when executed) is 2');
#?rakudo skip 'test dependency (pointy blocks)'
is(@array[2](), 3, 'the third element (when executed) is 3');
}
@@ -97,27 +97,27 @@ Some deeper tests were already added.
{ # Hash of Arrays
my %hash;
isa_ok(%hash, 'Hash');
-
+
%hash<key> = [ 1, 2, 3 ];
isa_ok(%hash<key>, Array);
-
- is(+%hash<key>, 3, 'it should have 3 values in it');
+
+ is(+%hash<key>, 3, 'it should have 3 values in it');
is(%hash<key>[0], 1, 'got the right value');
- is(%hash<key>[1], 2, 'got the right value');
+ is(%hash<key>[1], 2, 'got the right value');
is(%hash<key>[2], 3, 'got the right value');
{
my $array = %hash<key>;
- is(+$array, 3, 'it should have 3 values in it');
+ is(+$array, 3, 'it should have 3 values in it');
is($array[0], 1, 'got the right value (when I pull the array out)');
- is($array[1], 2, 'got the right value (when I pull the array out)');
- is($array[2], 3, 'got the right value (when I pull the array out)');
+ is($array[1], 2, 'got the right value (when I pull the array out)');
+ is($array[2], 3, 'got the right value (when I pull the array out)');
}
-{
+{
%hash<key>.push(4);
is(+%hash<key>, 4, 'it should now have 4 values in it');
- is(%hash<key>[3], 4, 'got the right value (which we just pushed onto the list)');
+ is(%hash<key>[3], 4, 'got the right value (which we just pushed onto the list)');
}
}
@@ -126,34 +126,33 @@ Some deeper tests were already added.
{ # Hash of Array-refs
my %hash;
isa_ok(%hash, Hash);
-
+
my @array = ( 1, 2, 3 );
isa_ok(@array, Array);
-
+
%hash<key> = @array;
isa_ok(%hash<key>, Array);
-
- is(+%hash<key>, 3, 'it should have 3 values in it');
+
+ is(+%hash<key>, 3, 'it should have 3 values in it');
is(%hash<key>[0], 1, 'got the right value');
- is(%hash<key>[1], 2, 'got the right value');
+ is(%hash<key>[1], 2, 'got the right value');
is(%hash<key>[2], 3, 'got the right value');
-
+
{
#?rakudo emit #
my @array = @( %hash<key> );
#?rakudo 4 skip 'test dependency HoA'
- is(+@array, 3, 'it should have 3 values in it');
+ is(+@array, 3, 'it should have 3 values in it');
is(@array[0], 1, 'got the right value (when I pull the array out)');
- is(@array[1], 2, 'got the right value (when I pull the array out)');
- is(@array[2], 3, 'got the right value (when I pull the array out)');
+ is(@array[1], 2, 'got the right value (when I pull the array out)');
+ is(@array[2], 3, 'got the right value (when I pull the array out)');
}
-#?rakudo skip "Method 'push' not found"
-{
+{
%hash<key>.push(4);
-
+
is(+%hash<key>, 4, 'it should now have 4 values in it');
- is(%hash<key>[3], 4, 'got the right value (which we just pushed onto the array)');
+ is(%hash<key>[3], 4, 'got the right value (which we just pushed onto the array)');
}
}
@@ -202,6 +201,6 @@ Some deeper tests were already added.
isa_ok(@array[1]<two>[0]<f>, Hash);
is(+@array[1]<two>[0], 2, "two keys at level 4");
is(@array[1]<two>[0]<f><other>, 5, "more keys at level 4");
-}
+}
# vim: ft=perl6
View
1  S03-operators/assign-is-not-binding.t
@@ -33,6 +33,5 @@ plan 8;
my $temp = @array[0];
is $temp, 23, 'Could retrieve first element to a scalar';
@array[0] = @array[1];
- #?rakudo todo "BUG: assignment from array element to scalar creates a binding"
is $temp, 23, "Assignment to scalar didn't create a binding"
}
View
1  S03-operators/chained-declarators.t
@@ -12,7 +12,6 @@ plan 6;
# sanity: declarations and very simple use (scoping tests come later)
# we take care to use different names to avoid other *kinds* of insanity.
-#?rakudo 2 todo 'chained my, our (and scalar autovivification)'
is((try { my $a1 = my $b1 = 42; $b1++; "$a1, $b1" }), '42, 43', "chained my");
is((try { my $a2 = our $b2 = 42; $b2++; "$a2, $b2" }), '42, 43', "chained my, our");
#?rakudo skip 'constant'
View
1  S03-operators/precedence.t
@@ -67,7 +67,6 @@ ok((2 ~ 2 | 4 ~ 1) == 41, "and ~ binds tighter than |");
# junctive and
ok( ?( (1 & 2 | 3) !=3), '& binds tighter than |');
-#?rakudo skip "Negate a junction (???)"
ok((!(1 & 2 | 3) < 2), "ditto");
ok(?((1 & 2 ^ 3) < 3), "and also ^");
#?rakudo skip "Negate a junction (???)"
View
9 S06-traits/misc.t
@@ -15,7 +15,7 @@ L<S06/"Parameter traits">
my $foo=1;
# note: many of these errors can be detected at compile time, so need
-# eval_dies_ok instead of dies_ok
+# eval_dies_ok instead of dies_ok
#
# test twice, once with assignment and once with increment, rakudo
# used to catch the first but not the latter.
@@ -27,7 +27,7 @@ eval_dies_ok '
mods_param($tmp)
',
'can\'t modify parameter, constant by default';
-
+
eval_dies_ok '
my $tmp = 1;
sub mods_param ($x) { $x = 1; }
@@ -36,8 +36,8 @@ eval_dies_ok '
'can\'t modify parameter, constant by default';
# is readonly
-eval_dies_ok 'sub mods_param_constant ($x is readonly) { $x++; };
- mods_param_constant($foo);' ,
+eval_dies_ok 'sub mods_param_constant ($x is readonly) { $x++; };
+ mods_param_constant($foo);' ,
'can\'t modify constant parameter, constant by default';
sub mods_param_rw ($x is rw) { $x++; }
@@ -53,7 +53,6 @@ is($foo, 2, 'pass by reference works');
$foo=1;
sub mods_param_copy ($x is copy) {$x++;}
lives_ok { mods_param_copy($foo) }, 'is copy';
-#?rakudo todo 'is copy'
is($foo, 1, 'pass by value works');
# same test with default value
View
3  S11-modules/import.t
@@ -1,13 +1,14 @@
use v6;
use Test;
-plan 3;
+plan 4;
# L<S11/"Compile-time Importation"/>
{
use t::spec::packages::S11-modules::Foo;
+ ok( &t::spec::packages::S11-modules::Foo::foo, 'Foo::foo is defined' );
ok( &foo, 'Foo::foo is defined' );
is( foo(), 'Foo::foo', 'Foo::foo is the sub we expect' );
Please sign in to comment.
Something went wrong with that request. Please try again.