Permalink
Browse files

[t/spec] numerous unfudges for rakudo

git-svn-id: http://svn.pugscode.org/pugs@29996 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
1 parent 68c6a43 commit e50fd6e0cc5e5b126002f1c07ede81c614b31dbb moritz committed Mar 8, 2010
View
4 S02-builtin_data_types/array.t
@@ -264,17 +264,17 @@ my @array2 = ("test", 1, Mu);
{
my @arr of Int = 1, 2, 3, 4, 5;
- #?rakudo 3 todo "parametrization issues"
is(@arr, <1 2 3 4 5>, 'my @arr of Type works');
+ #?rakudo 2 todo "parametrization issues"
dies_ok({push @arr, 's'}, 'type constraints on my @arr of Type works (1)');
dies_ok({push @arr, 4.2}, 'type constraints on my @arr of Type works (2)');
}
{
my @arr[5] of Int = <1 2 3 4 5>;
- #?rakudo 2 todo "parametrization issues"
is(@arr, <1 2 3 4 5>, 'my @arr[num] of Type works');
+ #?rakudo todo "parametrization issues"
dies_ok({push @arr, 123}, 'boundary constraints on my @arr[num] of Type works');
pop @arr; # remove the last item to ensure the next ones are type constraints
#?rakudo 2 todo "parametrization issues"
View
1 S02-builtin_data_types/array_extending.t
@@ -102,7 +102,6 @@ plan 21;
my $n = + @a.grep({ $_ eq 'b'});
is $n, 1, 'grep on extended array';
@a[1] = 'c'; # cmp doesn't handle Mu cmp Mu yet
- #?rakudo skip 'RT #62948'
ok not defined @a.min(), 'min on list with undefined el returns Mu';
}
View
51 S02-builtin_data_types/hash.t
@@ -42,35 +42,38 @@ is(%hash4{"key"}, 'value', '(key => value) separated key/value has creation work
my %hash5 = ("one", 1, "two", 2, "three", 3);
ok(%hash5.does(Hash), '%hash5 does Hash');
-my @slice1 = %hash5{"one", "three"};
-is(+@slice1, 2, 'got the right amount of values from the %hash{} slice');
-is(@slice1[0], 1, '%hash{} slice successful');
-is(@slice1[1], 3, '%hash{} slice successful');
-
-my @slice2 = %hash5<three one>;
-is(+@slice2, 2, 'got the right amount of values from the %hash<> slice');
-is(@slice2[0], 3, '%hash<> slice was successful');
-is(@slice2[1], 1, '%hash<> slice was successful');
-
-my @slice3 = %hash5<>.sort;
-is(+@slice3, 3, 'empty slice got all hash values');
-is(@slice3[0], 1, 'empty slice got all hash values');
-is(@slice3[1], 2, 'empty slice got all hash values');
-is(@slice3[2], 3, 'empty slice got all hash values');
+#?rakudo skip 'hash slices'
+{
+ my @slice1 = %hash5{"one", "three"};
+ is(+@slice1, 2, 'got the right amount of values from the %hash{} slice');
+ is(@slice1[0], 1, '%hash{} slice successful');
+ is(@slice1[1], 3, '%hash{} slice successful');
+
+ my @slice2 = %hash5<three one>;
+ is(+@slice2, 2, 'got the right amount of values from the %hash<> slice');
+ is(@slice2[0], 3, '%hash<> slice was successful');
+ is(@slice2[1], 1, '%hash<> slice was successful');
+
+ my @slice3 = %hash5<>.sort;
+ is(+@slice3, 3, 'empty slice got all hash values');
+ is(@slice3[0], 1, 'empty slice got all hash values');
+ is(@slice3[1], 2, 'empty slice got all hash values');
+ is(@slice3[2], 3, 'empty slice got all hash values');
# slice assignment
-%hash5{"one", "three"} = (5, 10);
-is(%hash5<one>, 5, 'value was changed successfully with slice assignment');
-is(%hash5<three>, 10, 'value was changed successfully with slice assignment');
+ %hash5{"one", "three"} = (5, 10);
+ is(%hash5<one>, 5, 'value was changed successfully with slice assignment');
+ is(%hash5<three>, 10, 'value was changed successfully with slice assignment');
-%hash5<one three> = (3, 1);
-is(%hash5<one>, 3, 'value was changed successfully with slice assignment');
-is(%hash5<three>, 1, 'value was changed successfully with slice assignment');
+ %hash5<one three> = (3, 1);
+ is(%hash5<one>, 3, 'value was changed successfully with slice assignment');
+ is(%hash5<three>, 1, 'value was changed successfully with slice assignment');
-%hash5<foo> = [3, 1];
-is(%hash5<foo>[0], 3, 'value assigned successfully with arrayref in list context');
-is(%hash5<foo>[1], 1, 'value assigned successfully with arrayref in list context');
+ %hash5<foo> = [3, 1];
+ is(%hash5<foo>[0], 3, 'value assigned successfully with arrayref in list context');
+ is(%hash5<foo>[1], 1, 'value assigned successfully with arrayref in list context');
+}
# keys
View
3 S06-routine-modifiers/scoped-named-subs.t
@@ -10,8 +10,7 @@ plan 12;
is myNamedStr(), 'string', 'lexical named sub() return Str';
}
-#?rakudo todo 'Broken in ng1'
-is eval('myNamedStr()'), '', 'Correct : lexical named sub myNamedStr() should NOT BE available outside its scope';
+eval_dies_ok 'myNamedStr()', 'Correct : lexical named sub myNamedStr() should NOT BE available outside its scope';
{
my Int sub myNamedInt() { return 55 };
View
2 S12-methods/defer-call.t
@@ -56,7 +56,6 @@ class BarCallWithEmpty is Foo {
multi method doit() {$.tracker ~= 'bar,'; callwith(); $.tracker ~= 'ret1,'}
multi method doit(Int $num) {$.tracker ~= 'barint,'; callwith(); $.tracker ~= 'ret2,'}
}
-#?rakudo skip 'issue with calling MMDs with different argument sets'
{
my $o = BarCallWithEmpty.new;
$o.clear;
@@ -74,7 +73,6 @@ class BarCallWithInt is Foo {
multi method doit() {$.tracker ~= 'bar,'; callwith(42); $.tracker ~= 'ret1,'}
multi method doit(Int $num) {$.tracker ~= 'barint,'; callwith(42); $.tracker ~= 'ret2,'}
}
-#?rakudo skip 'issue with calling MMDs with different argument sets'
{
my $o = BarCallWithInt.new;
$o.clear;
View
2 S12-methods/defer-next.t
@@ -55,7 +55,6 @@ class BarNextWithEmpty is Foo {
multi method doit() {$.tracker ~= 'bar,'; nextwith(); $.tracker ~= 'ret1,'}
multi method doit(Int $num) {$.tracker ~= 'barint,'; nextwith(); $.tracker ~= 'ret2,'}
}
-#?rakudo skip 'defering to MMD candidate with different args'
{
my $o = BarNextWithEmpty.new;
$o.clear;
@@ -71,7 +70,6 @@ class BarNextWithInt is Foo {
multi method doit() {$.tracker ~= 'bar,'; nextwith(42); $.tracker ~= 'ret1,'}
multi method doit(Int $num) {$.tracker ~= 'barint,'; nextwith(42); $.tracker ~= 'ret2,'}
}
-#?rakudo skip 'defering to MMD candidate with different args'
{
my $o = BarNextWithInt.new;
$o.clear;
View
3 S32-list/pick.t
@@ -17,7 +17,6 @@ L<"http://groups.google.com/group/perl.perl6.language/tree/browse_frm/thread/24e
# L<S32::Containers/List/=item pick>
my @array = <a b c d>;
-#?rakudo skip "Junction does not autothread yet"
ok ?(@array.pick eq any <a b c d>), "pick works on arrays";
my %hash = (a => 1);
@@ -38,7 +37,6 @@ is ~(@arr.pick(4, :replace)), 'z z z z', 'method pick(:replace) with $num > +@va
#?pugs 3 todo 'feature'
is ~(pick(2, :replace(False), @arr)), 'z z', 'sub pick with $num < +@values, explicit no-replace';
-#?rakudo 2 skip "Skipping :replace arg doesn't seem to work"
is pick(2, @arr), <z z>, 'sub pick with $num < +@values, implicit no-replace';
is pick(4, @arr), <z z z>, 'sub pick with $num > +@values';
#?rakudo skip "Calling values by name fails hard"
@@ -47,7 +45,6 @@ is ~(pick(4, :replace, @arr)), 'z z z z', 'sub pick(:replace) with $num > +@valu
is (<a b c d>.pick(*).sort).Str, 'a b c d', 'pick(*) returns all the items in the array (but maybe not in order)';
-#?rakudo skip "xx NYI"
{
my @items = <1 2 3 4>;
my @shuffled_items_10;
View
1 S32-num/rat.t
@@ -202,7 +202,6 @@ isa_ok (1/2).Rat, Rat, '... and actually returns a Rat';
#?rakudo todo '=== on Rats'
ok 1/2 === 1/2, 'Rats are value types, so 1/2 === 1/2';
-#?rakudo skip '!==='
ok 1/2 !=== 1/3, '=== with false outcome';
# http://irclog.perlgeek.de/perl6/2010-02-24#i_2027452
View
1 S32-str/p5chop.t
@@ -30,7 +30,6 @@ is(p5chop($test), 'c', 'p5chop on literal string');
# my $undef_var;
# p5chop($undef_var)
-#?rakudo skip "Null PMC in Rakudo-ng"
{
my @empty_array;
my $r = p5chop(@empty_array);
View
1 S32-str/words.t
@@ -16,7 +16,6 @@ is "a bc d".words, <a bc d>, 'words on string with double spaces';
is "a\tbc\td".words, <a bc d>, 'words on string with \t';
is "a\nbc\nd".words, <a bc d>, 'words on string with \n';
-#?rakudo todo "No-break space doesn't seem to be work"
is "a\c[NO-BREAK SPACE]bc d".words, <a bc d>, 'words on string with (U+00A0 NO-BREAK SPACE)';
is "ä bc d".words, <ä bc d>, 'words on string with non-ASCII letter';

0 comments on commit e50fd6e

Please sign in to comment.