From: Peter Rabbitson Date: Sun, 9 Jun 2013 11:36:46 +0000 (+0200) Subject: Kill the plan X-Git-Tag: v1.75~23 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=10e6c94609fc94467ef8f281ffe192d8038ffc9e;p=dbsrgits%2FSQL-Abstract.git Kill the plan --- diff --git a/t/00new.t b/t/00new.t index b6927da..29646e0 100644 --- a/t/00new.t +++ b/t/00new.t @@ -102,8 +102,6 @@ my @handle_tests = ( ); -plan tests => (1 + scalar(@handle_tests)); - use_ok('SQL::Abstract'); for (@handle_tests) { @@ -119,4 +117,4 @@ for (@handle_tests) { is_same_sql_bind($stmt, [@bind ? 1 : 0], $_->{stmt}, [1]); } - +done_testing; diff --git a/t/01generate.t b/t/01generate.t index 90e94f8..60dea0d 100644 --- a/t/01generate.t +++ b/t/01generate.t @@ -540,10 +540,6 @@ my @tests = ( }, ); - -plan tests => scalar(grep { !$_->{warning_like} } @tests) * 2 - + scalar(grep { $_->{warning_like} } @tests) * 4; - for my $t (@tests) { local $"=', '; @@ -590,3 +586,5 @@ for my $t (@tests) { } } } + +done_testing; diff --git a/t/02where.t b/t/02where.t index 1b97d7c..e6e1edd 100644 --- a/t/02where.t +++ b/t/02where.t @@ -402,8 +402,6 @@ my @handle_tests = ( }, ); -plan tests => ( @handle_tests * 2 ) + 1; - for my $case (@handle_tests) { local $Data::Dumper::Terse = 1; my $sql = SQL::Abstract->new; @@ -419,3 +417,5 @@ dies_ok { my $sql = SQL::Abstract->new; $sql->where({ foo => { '>=' => [] }},); }; + +done_testing; diff --git a/t/03values.t b/t/03values.t index c0ec9cc..b3ab252 100644 --- a/t/03values.t +++ b/t/03values.t @@ -55,9 +55,6 @@ my @data = ( }, ); - -plan tests => (@data * 5 + 2); - # test insert() and values() for reentrancy my($insert_hash, $insert_array, $numfields); my $a_sql = SQL::Abstract->new; @@ -119,3 +116,5 @@ for my $record (@data) { 'values() output matches that of initial bind' ) || diag "Corresponding SQL statement: $stmt"; } + +done_testing; diff --git a/t/05in_between.t b/t/05in_between.t index 2ae90cf..12a5658 100644 --- a/t/05in_between.t +++ b/t/05in_between.t @@ -186,8 +186,6 @@ my @in_between_tests = ( }, ); -plan tests => @in_between_tests*4; - for my $case (@in_between_tests) { TODO: { local $TODO = $case->{todo} if $case->{todo}; @@ -215,3 +213,5 @@ for my $case (@in_between_tests) { }, "$case->{test} doesn't die"); } } + +done_testing; diff --git a/t/06order_by.t b/t/06order_by.t index 3a29b3d..bf478df 100644 --- a/t/06order_by.t +++ b/t/06order_by.t @@ -8,7 +8,7 @@ use Test::Exception; use SQL::Abstract; use SQL::Abstract::Test import => ['is_same_sql_bind']; -my @cases = +my @cases = ( { given => \'colA DESC', @@ -106,9 +106,6 @@ my @cases = }, ); - -plan tests => (scalar(@cases) * 2) + 2; - my $sql = SQL::Abstract->new; my $sqlq = SQL::Abstract->new({quote_char => '`'}); @@ -143,3 +140,5 @@ throws_ok ( qr/hash passed .+ must have exactly one key/, 'Undeterministic order exception', ); + +done_testing; diff --git a/t/07subqueries.t b/t/07subqueries.t index df90bdf..28bac85 100644 --- a/t/07subqueries.t +++ b/t/07subqueries.t @@ -99,16 +99,10 @@ push @tests, { bind => [100, "foo%", 1234], }; - -plan tests => scalar(@tests); - for (@tests) { my($stmt, @bind) = $sql->where($_->{where}, $_->{order}); is_same_sql_bind($stmt, \@bind, $_->{stmt}, $_->{bind}); } - - - - +done_testing; diff --git a/t/08special_ops.t b/t/08special_ops.t index 5348e0e..7632be4 100644 --- a/t/08special_ops.t +++ b/t/08special_ops.t @@ -54,16 +54,10 @@ my @tests = ( ); - -plan tests => scalar(@tests); - for (@tests) { my($stmt, @bind) = $sqlmaker->where($_->{where}, $_->{order}); is_same_sql_bind($stmt, \@bind, $_->{stmt}, $_->{bind}); } - - - - +done_testing; diff --git a/t/09refkind.t b/t/09refkind.t index 1044231..6ab9da8 100644 --- a/t/09refkind.t +++ b/t/09refkind.t @@ -5,8 +5,6 @@ use warnings; use Test::More; use SQL::Abstract; -plan tests => 13; - my $obj = bless {}, "Foo::Bar"; is(SQL::Abstract->_refkind(undef), 'UNDEF', 'UNDEF'); @@ -29,3 +27,4 @@ is(SQL::Abstract->_refkind($obj), 'SCALAR', 'SCALAR'); is(SQL::Abstract->_refkind(\$obj), 'SCALARREF', 'SCALARREF'); is(SQL::Abstract->_refkind(\\$obj), 'SCALARREFREF', 'SCALARREFREF'); +done_testing; diff --git a/t/10test.t b/t/10test.t index 68de857..2132740 100644 --- a/t/10test.t +++ b/t/10test.t @@ -960,19 +960,6 @@ my @bind_tests = ( }, ); -plan tests => 1 + - sum( - map { $_ * ($_ - 1) / 2 } - map { scalar @{$_->{statements}} } - @sql_tests - ) + - sum( - map { $_ * ($_ - 1) / 2 } - map { scalar @{$_->{bindvals}} } - @bind_tests - ) + - 9; - use_ok('SQL::Abstract::Test', import => [qw( eq_sql_bind eq_sql eq_bind is_same_sql_bind )]); @@ -1098,3 +1085,4 @@ like( 'expected debug of missing branch', ); +done_testing; diff --git a/t/91podcoverage.t b/t/91podcoverage.t index 7a80911..020fc47 100644 --- a/t/91podcoverage.t +++ b/t/91podcoverage.t @@ -9,7 +9,6 @@ plan skip_all => 'set TEST_POD to enable this test' unless ( $ENV{TEST_POD} || -e 'MANIFEST.SKIP' ); my @modules = sort { $a cmp $b } ( Test::Pod::Coverage::all_modules() ); -plan tests => scalar(@modules); # Since this is about checking documentation, a little documentation # of what this is doing might be in order... @@ -48,3 +47,5 @@ foreach my $module (@modules) { pod_coverage_ok( $module, $parms, "$module POD coverage" ); } } + +done_testing;