Browse files

add test plans

  • Loading branch information...
1 parent 0b38e64 commit dbfec8ae5939fbaf340a34376c96737e3312f29b @chocolateboy chocolateboy committed Oct 18, 2010
Showing with 9 additions and 27 deletions.
  1. +1 −3 t/array-slice.t
  2. +1 −3 t/center.t
  3. +1 −3 t/first_index.t
  4. +1 −3 t/flip.t
  5. +1 −3 t/head.t
  6. +1 −3 t/last_index.t
  7. +1 −3 t/number.t
  8. +1 −3 t/range.t
  9. +1 −3 t/tail.t
View
4 t/array-slice.t
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More;
+use Test::More tests => 5;
use autobox::Core;
my @array = qw(foo bar baz);
@@ -17,5 +17,3 @@ is scalar @slice, 2, "Returns an array in list context";
my $slice = @array->slice(0,1);
is ref $slice, 'ARRAY', "Returns an arrayref in scalar context";
-
-done_testing();
View
4 t/center.t
@@ -2,7 +2,7 @@
use autobox::Core;
-use Test::More;
+use Test::More tests => 25;
my $hello = 'hello';
@@ -36,5 +36,3 @@ is( "even"->center(0, "-"), 'even',
for my $size ($hello->length..20) {
is( $hello->center($size)->length, $size, "center($size) returns that size" );
}
-
-done_testing();
View
4 t/first_index.t
@@ -1,13 +1,11 @@
#!/usr/bin/env perl
use autobox::Core;
-use Test::More;
+use Test::More tests => 3;
my @numbers = ( 1 .. 10 );
is( @numbers->first_index, 0 );
is( @numbers->first_index( sub { $_[0] > 9 } ), 9 );
is( @numbers->first_index( qr/^2/ ), 1 );
-
-done_testing();
View
4 t/flip.t
@@ -1,5 +1,5 @@
#!/usr/bin/env perl
-use Test::More;
+use Test::More tests => 2;
use autobox::Core;
my %hash = ( 1 => 'foo', 2 => 'bar', 3 => 'bar' );
@@ -12,5 +12,3 @@ my %f = %hash->flip;
is_deeply( \%f, { foo => 1, bar => 3 }, "Returns hash in list context" );
my %nested = ( 1 => { foo => 'bar' }, 2 => 'bar' );
-
-done_testing;
View
4 t/head.t
@@ -1,12 +1,10 @@
#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More;
+use Test::More tests => 2;
use autobox::Core;
my @array = qw(foo bar baz);
ok @array->head;
is @array->head, 'foo';
-
-done_testing();
View
4 t/last_index.t
@@ -1,13 +1,11 @@
#!/usr/bin/env perl
use autobox::Core;
-use Test::More;
+use Test::More tests => 3;
my @numbers = ( 1 .. 10 );
is( @numbers->last_index, 9 );
is( @numbers->last_index( sub { $_[0] > 2 } ), 9 );
is( @numbers->last_index( qr/^1/ ), 9 );
-
-done_testing();
View
4 t/number.t
@@ -1,6 +1,6 @@
#!perl
-use Test::More;
+use Test::More tests => 49;
use autobox::Core;
#is( 12.34->ceil, 13);
@@ -66,5 +66,3 @@ TODO: {
}
}
}
-
-done_testing();
View
4 t/range.t
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More;
+use Test::More tests => 4;
use autobox::Core;
my @array = qw(foo bar baz gorch);
@@ -16,5 +16,3 @@ is scalar @slice, 3, "Returns an array in list context";
my $slice = @array->range(0,2);
is ref $slice, 'ARRAY', "Returns an arrayref in scalar context";
-
-done_testing();
View
4 t/tail.t
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More;
+use Test::More tests => 7;
use autobox::Core;
my @array = qw(foo bar baz);
@@ -18,5 +18,3 @@ is scalar @tail, 2, "Returns a list in list context";
my $tail = @array->tail;
is ref $tail, 'ARRAY', "Returns an arrayref in scalar context";
-
-done_testing();

0 comments on commit dbfec8a

Please sign in to comment.