Skip to content
This repository has been archived by the owner on Feb 3, 2021. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Add test for RPA.map
  • Loading branch information
bacek committed Jan 16, 2011
1 parent e657b28 commit 2613f07
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion t/setting/01-resizablepmcarray.t
Expand Up @@ -5,7 +5,7 @@ pir::load_bytecode('nqp-setting.pbc');
my @array := <0 1 2>;
my @reversed := @array.reverse();

plan(11);
plan(13);

ok( @reversed[0] == 2, 'First element correct');
ok( @reversed[1] == 1, 'Second element correct');
Expand All @@ -26,4 +26,9 @@ ok( @test[1] eq 'cherry', '@test[1] was deleted');
ok( +@test == 2, '@test[1] has two items');
ok( !@test.exists(2), '@test[2] no longer exists');

@test := <1 2 3>;
my @res := @test.map(sub($a) { $a~$a; });
ok( +@res == 3, 'Map produced same number of elements');
ok( @res.join() eq '112233', 'Map produced correct elements');

# vim: ft=perl6

0 comments on commit 2613f07

Please sign in to comment.