Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[t/spec] numerous unfudges for rakudo

git-svn-id: http://svn.pugscode.org/pugs@29996 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
commit e50fd6e0cc5e5b126002f1c07ede81c614b31dbb 1 parent 68c6a43
authored March 08, 2010
4  S02-builtin_data_types/array.t
@@ -264,17 +264,17 @@ my @array2 = ("test", 1, Mu);
264 264
 
265 265
 {
266 266
     my @arr of Int = 1, 2, 3, 4, 5;
267  
-    #?rakudo 3 todo "parametrization issues"
268 267
     is(@arr, <1 2 3 4 5>, 'my @arr of Type works');
  268
+    #?rakudo 2 todo "parametrization issues"
269 269
     dies_ok({push @arr, 's'}, 'type constraints on my @arr of Type works (1)');
270 270
     dies_ok({push @arr, 4.2}, 'type constraints on my @arr of Type works (2)');
271 271
 }
272 272
 
273 273
 {
274 274
     my @arr[5] of Int = <1 2 3 4 5>;
275  
-    #?rakudo 2 todo "parametrization issues"
276 275
     is(@arr, <1 2 3 4 5>, 'my @arr[num] of Type works');
277 276
 
  277
+    #?rakudo todo "parametrization issues"
278 278
     dies_ok({push @arr, 123}, 'boundary constraints on my @arr[num] of Type works');
279 279
     pop @arr; # remove the last item to ensure the next ones are type constraints
280 280
     #?rakudo 2 todo "parametrization issues"
1  S02-builtin_data_types/array_extending.t
@@ -102,7 +102,6 @@ plan 21;
102 102
     my $n = + @a.grep({ $_ eq 'b'});
103 103
     is $n, 1, 'grep on extended array';
104 104
     @a[1] = 'c'; # cmp doesn't handle Mu cmp Mu yet
105  
-    #?rakudo skip 'RT #62948'
106 105
     ok not defined @a.min(), 'min on list with undefined el returns Mu';
107 106
 }
108 107
 
51  S02-builtin_data_types/hash.t
@@ -42,35 +42,38 @@ is(%hash4{"key"}, 'value', '(key => value) separated key/value has creation work
42 42
 my %hash5 = ("one", 1, "two", 2, "three", 3);
43 43
 ok(%hash5.does(Hash), '%hash5 does Hash');
44 44
 
45  
-my @slice1 = %hash5{"one", "three"};
46  
-is(+@slice1, 2, 'got the right amount of values from the %hash{} slice');
47  
-is(@slice1[0], 1, '%hash{} slice successful');
48  
-is(@slice1[1], 3, '%hash{} slice successful');
49  
-
50  
-my @slice2 = %hash5<three one>;
51  
-is(+@slice2, 2, 'got the right amount of values from the %hash<> slice');
52  
-is(@slice2[0], 3, '%hash<> slice was successful');
53  
-is(@slice2[1], 1, '%hash<> slice was successful');
54  
-
55  
-my @slice3 = %hash5<>.sort;
56  
-is(+@slice3, 3, 'empty slice got all hash values');
57  
-is(@slice3[0], 1, 'empty slice got all hash values');
58  
-is(@slice3[1], 2, 'empty slice got all hash values');
59  
-is(@slice3[2], 3, 'empty slice got all hash values');
  45
+#?rakudo skip 'hash slices'
  46
+{
  47
+    my @slice1 = %hash5{"one", "three"};
  48
+    is(+@slice1, 2, 'got the right amount of values from the %hash{} slice');
  49
+    is(@slice1[0], 1, '%hash{} slice successful');
  50
+    is(@slice1[1], 3, '%hash{} slice successful');
  51
+
  52
+    my @slice2 = %hash5<three one>;
  53
+    is(+@slice2, 2, 'got the right amount of values from the %hash<> slice');
  54
+    is(@slice2[0], 3, '%hash<> slice was successful');
  55
+    is(@slice2[1], 1, '%hash<> slice was successful');
  56
+
  57
+    my @slice3 = %hash5<>.sort;
  58
+    is(+@slice3, 3, 'empty slice got all hash values');
  59
+    is(@slice3[0], 1, 'empty slice got all hash values');
  60
+    is(@slice3[1], 2, 'empty slice got all hash values');
  61
+    is(@slice3[2], 3, 'empty slice got all hash values');
60 62
 
61 63
 # slice assignment
62 64
 
63  
-%hash5{"one", "three"} = (5, 10);
64  
-is(%hash5<one>, 5, 'value was changed successfully with slice assignment');
65  
-is(%hash5<three>, 10, 'value was changed successfully with slice assignment');
  65
+    %hash5{"one", "three"} = (5, 10);
  66
+    is(%hash5<one>, 5, 'value was changed successfully with slice assignment');
  67
+    is(%hash5<three>, 10, 'value was changed successfully with slice assignment');
66 68
 
67  
-%hash5<one three> = (3, 1);
68  
-is(%hash5<one>, 3, 'value was changed successfully with slice assignment');
69  
-is(%hash5<three>, 1, 'value was changed successfully with slice assignment');
  69
+    %hash5<one three> = (3, 1);
  70
+    is(%hash5<one>, 3, 'value was changed successfully with slice assignment');
  71
+    is(%hash5<three>, 1, 'value was changed successfully with slice assignment');
70 72
 
71  
-%hash5<foo> = [3, 1];
72  
-is(%hash5<foo>[0], 3, 'value assigned successfully with arrayref in list context');
73  
-is(%hash5<foo>[1], 1, 'value assigned successfully with arrayref in list context');
  73
+    %hash5<foo> = [3, 1];
  74
+    is(%hash5<foo>[0], 3, 'value assigned successfully with arrayref in list context');
  75
+    is(%hash5<foo>[1], 1, 'value assigned successfully with arrayref in list context');
  76
+}
74 77
 
75 78
 # keys
76 79
 
3  S06-routine-modifiers/scoped-named-subs.t
@@ -10,8 +10,7 @@ plan 12;
10 10
     is myNamedStr(), 'string', 'lexical named sub() return Str';
11 11
 }
12 12
 
13  
-#?rakudo todo 'Broken in ng1'
14  
-is eval('myNamedStr()'), '', 'Correct : lexical named sub myNamedStr() should NOT BE available outside its scope';
  13
+eval_dies_ok 'myNamedStr()', 'Correct : lexical named sub myNamedStr() should NOT BE available outside its scope';
15 14
 
16 15
 {
17 16
     my Int sub myNamedInt() { return 55 };
2  S12-methods/defer-call.t
@@ -56,7 +56,6 @@ class BarCallWithEmpty is Foo {
56 56
     multi method doit() {$.tracker ~= 'bar,'; callwith(); $.tracker ~= 'ret1,'}
57 57
     multi method doit(Int $num) {$.tracker ~= 'barint,'; callwith(); $.tracker ~= 'ret2,'}
58 58
 }
59  
-#?rakudo skip 'issue with calling MMDs with different argument sets'
60 59
 {
61 60
     my $o = BarCallWithEmpty.new;
62 61
     $o.clear;
@@ -74,7 +73,6 @@ class BarCallWithInt is Foo {
74 73
     multi method doit() {$.tracker ~= 'bar,'; callwith(42); $.tracker ~= 'ret1,'}
75 74
     multi method doit(Int $num) {$.tracker ~= 'barint,'; callwith(42); $.tracker ~= 'ret2,'}
76 75
 }
77  
-#?rakudo skip 'issue with calling MMDs with different argument sets'
78 76
 {
79 77
     my $o = BarCallWithInt.new;
80 78
     $o.clear;
2  S12-methods/defer-next.t
@@ -55,7 +55,6 @@ class BarNextWithEmpty is Foo {
55 55
     multi method doit() {$.tracker ~= 'bar,'; nextwith(); $.tracker ~= 'ret1,'}
56 56
     multi method doit(Int $num) {$.tracker ~= 'barint,'; nextwith(); $.tracker ~= 'ret2,'}
57 57
 }
58  
-#?rakudo skip 'defering to MMD candidate with different args'
59 58
 {
60 59
     my $o = BarNextWithEmpty.new;
61 60
     $o.clear;
@@ -71,7 +70,6 @@ class BarNextWithInt is Foo {
71 70
     multi method doit() {$.tracker ~= 'bar,'; nextwith(42); $.tracker ~= 'ret1,'}
72 71
     multi method doit(Int $num) {$.tracker ~= 'barint,'; nextwith(42); $.tracker ~= 'ret2,'}
73 72
 }
74  
-#?rakudo skip 'defering to MMD candidate with different args'
75 73
 {
76 74
     my $o = BarNextWithInt.new;
77 75
     $o.clear;
3  S32-list/pick.t
@@ -17,7 +17,6 @@ L<"http://groups.google.com/group/perl.perl6.language/tree/browse_frm/thread/24e
17 17
 # L<S32::Containers/List/=item pick>
18 18
 
19 19
 my @array = <a b c d>;
20  
-#?rakudo skip "Junction does not autothread yet"
21 20
 ok ?(@array.pick eq any <a b c d>), "pick works on arrays";
22 21
 
23 22
 my %hash = (a => 1);
@@ -38,7 +37,6 @@ is ~(@arr.pick(4, :replace)), 'z z z z', 'method pick(:replace) with $num > +@va
38 37
 
39 38
 #?pugs 3 todo 'feature'
40 39
 is ~(pick(2, :replace(False), @arr)), 'z z', 'sub pick with $num < +@values, explicit no-replace';
41  
-#?rakudo 2 skip "Skipping :replace arg doesn't seem to work"
42 40
 is pick(2, @arr), <z z>, 'sub pick with $num < +@values, implicit no-replace';
43 41
 is pick(4, @arr), <z z z>, 'sub pick with $num > +@values';
44 42
 #?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
47 45
 
48 46
 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)';
49 47
 
50  
-#?rakudo skip "xx NYI"
51 48
 {
52 49
   my @items = <1 2 3 4>;
53 50
   my @shuffled_items_10;
1  S32-num/rat.t
@@ -202,7 +202,6 @@ isa_ok (1/2).Rat, Rat, '... and actually returns a Rat';
202 202
 
203 203
 #?rakudo todo '=== on Rats'
204 204
 ok 1/2 === 1/2, 'Rats are value types, so 1/2 === 1/2';
205  
-#?rakudo skip '!==='
206 205
 ok 1/2 !=== 1/3, '=== with false outcome';
207 206
 
208 207
 # http://irclog.perlgeek.de/perl6/2010-02-24#i_2027452
1  S32-str/p5chop.t
@@ -30,7 +30,6 @@ is(p5chop($test), 'c', 'p5chop on literal string');
30 30
 # my $undef_var;
31 31
 # p5chop($undef_var)
32 32
 
33  
-#?rakudo skip "Null PMC in Rakudo-ng"
34 33
 {
35 34
 	my @empty_array;
36 35
 	my $r = p5chop(@empty_array);
1  S32-str/words.t
@@ -16,7 +16,6 @@ is "a  bc  d".words, <a bc d>, 'words on string with double spaces';
16 16
 is "a\tbc\td".words, <a bc d>, 'words on string with \t';
17 17
 is "a\nbc\nd".words, <a bc d>, 'words on string with \n';
18 18
 
19  
-#?rakudo todo "No-break space doesn't seem to be work"
20 19
 is "a\c[NO-BREAK SPACE]bc d".words, <a bc d>, 'words on string with (U+00A0 NO-BREAK SPACE)';
21 20
 is "ä bc d".words, <ä bc d>, 'words on string with non-ASCII letter';
22 21
 

0 notes on commit e50fd6e

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