Permalink
Browse files

added test for foreach

  • Loading branch information...
1 parent 1fca1cc commit de990db80730fc4b3cc7f99e57e0c19640356788 @brunoV brunoV committed Mar 6, 2010
Showing with 12 additions and 0 deletions.
  1. +12 −0 t/foreach.t
View
@@ -0,0 +1,12 @@
+use Test::More qw(no_plan);
+use strict;
+use warnings;
+
+use autobox::Core;
+
+my @array = qw(1 2 3);
+
+my @added;
+@array->foreach( sub { push @added, $_[0] + 1 } );
+
+is_deeply [ sort @added ], [ qw(2 3 4) ];

0 comments on commit de990db

Please sign in to comment.