Changeset 22919 for t

Show
Ignore:
Timestamp:
11/08/08 08:28:41 (2 months ago)
Author:
particle
Message:

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

Location:
t/spec
Files:
7 modified

Legend:

Unmodified
Added
Removed
  • t/spec/S02-builtin_data_types/catch_type_cast_mismatch.t

    r22409 r22919  
    4141    lives_ok { $x = {a => 1} }, 'Can assign an hashref to a scalar'; 
    4242    my $y = { b => 34 }; 
    43     #?rakudo todo 'RT #59382' 
    4443    lives_ok { $y = 3   },   'Can assign a number to scalar with an hashref'; 
    4544} 
     
    5049    lives_ok { $x = { a => 3 } }, 'can assign hashref to scalar that held an array ref'; 
    5150    my $y = { df => 'dfd', 'ui' => 3 }; 
    52     #?rakudo todo 'RT #59382' 
    5351    lives_ok { $y = [0, 7] }, 'can assign arrayref to scalar that held an hashref'; 
    5452 
  • t/spec/S02-builtin_data_types/mixed_multi_dimensional.t

    r22855 r22919  
    1212These tests don't go any more than two levels deep 
    1313(AoH, AoP) in most cases because I know these won't 
    14 work yet in Pugs. When we have this support, then  
     14work yet in Pugs. When we have this support, then 
    1515this test should be added too more. 
    1616 
     
    2222    my @array; 
    2323    isa_ok(@array, Array); 
    24      
     24 
    2525    my $pair = ('key' => 'value'); 
    2626    isa_ok($pair, Pair); 
    27      
     27 
    2828    @array[0] = $pair; # assign a variable 
    2929    is(+@array, 1, 'the array has one value in it'); 
    30          
     30 
    3131    isa_ok(@array[0], Pair); 
    3232    #?rakudo skip "get_pmc_keyed() not implemented in class 'Perl6Pair'" 
     
    4444    my @array; 
    4545    isa_ok(@array, Array); 
    46      
     46 
    4747    my %hash = ('key', 'value', 'key1', 'value1'); 
    4848    isa_ok(%hash, Hash); 
    4949    is(+%hash.keys, 2, 'our hash has two keys'); 
    50      
     50 
    5151    @array[0] = %hash; 
    5252    is(+@array, 1, 'the array has one value in it'); 
    5353    isa_ok(@array[0], Hash); 
    5454    is(@array[0]{"key"}, 'value', 'got the right value for key'); 
    55     is(@array[0]<key1>, 'value1', 'got the right value1 for key1');     
     55    is(@array[0]<key1>, 'value1', 'got the right value1 for key1'); 
    5656} 
    5757 
     
    5959    my @array = (1, [2, 3], [4, 5], 6); 
    6060    isa_ok(@array, Array); 
    61      
     61 
    6262    is(+@array, 4, 'got 4 elements in the Array of Arrays'); 
    6363    is(@array[0], 1, 'got the right first element'); 
    6464    #?rakudo todo 'too eager list flattening' 
    6565    isa_ok(@array[1], 'Array'); 
    66     is(@array[1][0], 2, 'got the right second/first element');     
    67     is(@array[1][1], 3, 'got the right second/second element');         
    68     isa_ok(@array[2], Array);     
    69     is(@array[2][0], 4, 'got the right third/first element');     
    70     is(@array[2][1], 5, 'got the right third/second element');             
     66    is(@array[1][0], 2, 'got the right second/first element'); 
     67    is(@array[1][1], 3, 'got the right second/second element'); 
     68    isa_ok(@array[2], Array); 
     69    is(@array[2][0], 4, 'got the right third/first element'); 
     70    is(@array[2][1], 5, 'got the right third/second element'); 
    7171    is(@array[3], 6, 'got the right fourth element'); 
    7272} 
     
    7575    my @array; 
    7676    isa_ok(@array, Array); 
    77      
     77 
    7878    @array[0] = sub { 1 }; 
    7979    @array[1] = { 2 }; 
    8080    #?rakudo emit # 
    8181    @array[2] = -> { 3 }; 
    82      
     82 
    8383    #?rakudo todo 'test dependency' 
    8484    is(+@array, 3, 'got three elements in the Array'); 
     
    8787    isa_ok(@array[1], Block); 
    8888    #?rakudo todo 'test dependency' 
    89     isa_ok(@array[2], Block);         
    90      
     89    isa_ok(@array[2], Block); 
     90 
    9191    is(@array[0](), 1, 'the first element (when executed) is 1'); 
    92     is(@array[1](), 2, 'the second element (when executed) is 2');     
     92    is(@array[1](), 2, 'the second element (when executed) is 2'); 
    9393    #?rakudo skip 'test dependency (pointy blocks)' 
    9494    is(@array[2](), 3, 'the third element (when executed) is 3'); 
     
    9898    my %hash; 
    9999    isa_ok(%hash, 'Hash'); 
    100      
     100 
    101101    %hash<key> = [ 1, 2, 3 ]; 
    102102    isa_ok(%hash<key>, Array); 
    103      
    104     is(+%hash<key>, 3, 'it should have 3 values in it');     
     103 
     104    is(+%hash<key>, 3, 'it should have 3 values in it'); 
    105105    is(%hash<key>[0], 1, 'got the right value'); 
    106     is(%hash<key>[1], 2, 'got the right value');     
     106    is(%hash<key>[1], 2, 'got the right value'); 
    107107    is(%hash<key>[2], 3, 'got the right value'); 
    108108 
    109109    { 
    110110        my $array = %hash<key>; 
    111         is(+$array, 3, 'it should have 3 values in it');     
     111        is(+$array, 3, 'it should have 3 values in it'); 
    112112        is($array[0], 1, 'got the right value (when I pull the array out)'); 
    113         is($array[1], 2, 'got the right value (when I pull the array out)');     
    114         is($array[2], 3, 'got the right value (when I pull the array out)');     
     113        is($array[1], 2, 'got the right value (when I pull the array out)'); 
     114        is($array[2], 3, 'got the right value (when I pull the array out)'); 
    115115    } 
    116116 
    117 {     
     117{ 
    118118    %hash<key>.push(4); 
    119119    is(+%hash<key>, 4, 'it should now have 4 values in it'); 
    120     is(%hash<key>[3], 4, 'got the right value (which we just pushed onto the list)');     
     120    is(%hash<key>[3], 4, 'got the right value (which we just pushed onto the list)'); 
    121121} 
    122122 
     
    127127    my %hash; 
    128128    isa_ok(%hash, Hash); 
    129      
     129 
    130130    my @array = ( 1, 2, 3 ); 
    131131    isa_ok(@array, Array); 
    132      
     132 
    133133    %hash<key> = @array; 
    134134    isa_ok(%hash<key>, Array); 
    135      
    136     is(+%hash<key>, 3, 'it should have 3 values in it');        
     135 
     136    is(+%hash<key>, 3, 'it should have 3 values in it'); 
    137137    is(%hash<key>[0], 1, 'got the right value'); 
    138     is(%hash<key>[1], 2, 'got the right value');     
     138    is(%hash<key>[1], 2, 'got the right value'); 
    139139    is(%hash<key>[2], 3, 'got the right value'); 
    140      
     140 
    141141    { 
    142142        #?rakudo emit # 
    143143        my @array = @( %hash<key> ); 
    144144        #?rakudo 4 skip 'test dependency HoA' 
    145         is(+@array, 3, 'it should have 3 values in it');     
     145        is(+@array, 3, 'it should have 3 values in it'); 
    146146        is(@array[0], 1, 'got the right value (when I pull the array out)'); 
    147         is(@array[1], 2, 'got the right value (when I pull the array out)');     
    148         is(@array[2], 3, 'got the right value (when I pull the array out)');     
     147        is(@array[1], 2, 'got the right value (when I pull the array out)'); 
     148        is(@array[2], 3, 'got the right value (when I pull the array out)'); 
    149149    } 
    150150 
    151 #?rakudo skip "Method 'push' not found" 
    152 {     
     151{ 
    153152    %hash<key>.push(4); 
    154      
     153 
    155154    is(+%hash<key>, 4, 'it should now have 4 values in it'); 
    156     is(%hash<key>[3], 4, 'got the right value (which we just pushed onto the array)');     
     155    is(%hash<key>[3], 4, 'got the right value (which we just pushed onto the array)'); 
    157156} 
    158157 
     
    203202    is(+@array[1]<two>[0], 2, "two keys at level 4"); 
    204203    is(@array[1]<two>[0]<f><other>, 5, "more keys at level 4"); 
    205 }    
     204} 
    206205 
    207206# vim: ft=perl6 
  • t/spec/S03-operators/assign-is-not-binding.t

    r20966 r22919  
    3434    is $temp, 23, 'Could retrieve first element to a scalar'; 
    3535    @array[0] = @array[1]; 
    36     #?rakudo todo "BUG: assignment from array element to scalar creates a binding" 
    3736    is $temp, 23, "Assignment to scalar didn't create a binding" 
    3837} 
  • t/spec/S03-operators/chained-declarators.t

    r22326 r22919  
    1313# we take care to use different names to avoid other *kinds* of insanity. 
    1414 
    15 #?rakudo 2 todo 'chained my, our (and scalar autovivification)' 
    1615is((try {  my $a1 = my    $b1 = 42; $b1++; "$a1, $b1" }), '42, 43', "chained my"); 
    1716is((try {  my $a2 = our   $b2 = 42; $b2++; "$a2, $b2" }), '42, 43', "chained my, our"); 
  • t/spec/S03-operators/precedence.t

    r22413 r22919  
    6868 
    6969ok(  ?(   (1 & 2 | 3) !=3), '& binds tighter than |'); 
    70 #?rakudo skip "Negate a junction (???)" 
    7170ok((!(1 & 2 | 3) < 2), "ditto"); 
    7271ok(?((1 & 2 ^ 3) < 3), "and also ^"); 
  • t/spec/S06-traits/misc.t

    r22903 r22919  
    1616 
    1717# note: many of these errors can be detected at compile time, so need 
    18 # eval_dies_ok instead of dies_ok  
     18# eval_dies_ok instead of dies_ok 
    1919# 
    2020# test twice, once with assignment and once with increment, rakudo 
     
    2828    ', 
    2929    'can\'t modify parameter, constant by default'; 
    30      
     30 
    3131eval_dies_ok ' 
    3232    my $tmp = 1; 
     
    3737 
    3838# is readonly 
    39 eval_dies_ok 'sub mods_param_constant ($x is readonly) { $x++; };  
    40               mods_param_constant($foo);' ,  
     39eval_dies_ok 'sub mods_param_constant ($x is readonly) { $x++; }; 
     40              mods_param_constant($foo);' , 
    4141              'can\'t modify constant parameter, constant by default'; 
    4242 
     
    5454sub mods_param_copy ($x is copy) {$x++;} 
    5555lives_ok { mods_param_copy($foo) }, 'is copy'; 
    56 #?rakudo todo 'is copy' 
    5756is($foo, 1, 'pass by value works'); 
    5857 
  • t/spec/S11-modules/import.t

    r22625 r22919  
    22use Test; 
    33 
    4 plan 3; 
     4plan 4; 
    55 
    66# L<S11/"Compile-time Importation"/> 
     
    99    use t::spec::packages::S11-modules::Foo; 
    1010 
     11    ok( &t::spec::packages::S11-modules::Foo::foo, 'Foo::foo is defined' ); 
    1112    ok( &foo, 'Foo::foo is defined' ); 
    1213    is( foo(), 'Foo::foo', 'Foo::foo is the sub we expect' );