Changeset 2960

Show
Ignore:
Timestamp:
05/11/05 11:38:52 (4 years ago)
Author:
juerd
svk:copy_cache_prev:
4536
Message:

more flattening tests

Files:
2 modified

Legend:

Unmodified
Added
Removed
  • READTHEM

    r2804 r2960  
    2727  <http://conal.net/pan/haskell-primer.htm>   
    2828 
     29= Perl 6 books (always outdated :)) 
     30 
     31Perl 6 and Parrot Essenti     - Allison Randal, Dan Sugalski, Leopold Tőtsch 
     32Perl 6 Now: The core ideas illustrated with Perl 5           - Scott Walters 
     33Perl 6 Bible (Perl6::Bible)                                             - VA 
     34 
    2935= Non-Haskell books 
    3036 
     
    3844The Demolished Man                                           - Alfred Bester 
    3945Flow My Tears the Policeman Said                           - Phillip K. Dick 
    40  
  • t/pugsbugs/flattening.t

    r2681 r2960  
    44use Test; 
    55 
    6 plan 27; 
     6plan 34; 
    77 
    88{ 
     
    5757    is(%hash<22>,    undef, 'nothing at key "22"'); 
    5858} 
     59 
     60{ 
     61    my @a; 
     62    push @a, 1; 
     63    is(@a.elems, 1, 'Simple push works'); 
     64    push @a, []; 
     65    is(@a.elems, 2, 'Arrayref literal not flattened'); 
     66    push @a, {}; 
     67    is(@a.elems, 3, 'Hashref literal not flattened'); 
     68    my @foo; 
     69    push @a, \@foo; 
     70    is(@a.elems, 4, 'Arrayref not flattened'); 
     71    my %foo; 
     72    push @a, \%foo; 
     73    is(@a.elems, 5, 'Hashref not flattened'); 
     74    push @a, @foo; 
     75    is(@a.elems, 5, 'Array flattened'); 
     76    push @a, %foo; 
     77    is(@a.elems, 5, 'Hash flattened'); 
     78} 
     79