From: Vincent Pit Date: Thu, 9 Jul 2009 07:49:22 +0000 (+0200) Subject: Also test the count of violations X-Git-Tag: v0.03~3 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FPerl-Critic-Policy-Dynamic-NoIndirect.git;a=commitdiff_plain;h=754541e0583f7da9be1ea92f0ea96be44b65cfaa Also test the count of violations --- diff --git a/t/10-basic.t b/t/10-basic.t index abf5a3d..a1b1885 100644 --- a/t/10-basic.t +++ b/t/10-basic.t @@ -3,10 +3,13 @@ use strict; use warnings; -my $subtests; -BEGIN { $subtests = 3 } +my ($tests, $subtests); +BEGIN { + $tests = 8; + $subtests = 3; +} -use Test::More tests => $subtests * 14; +use Test::More tests => $tests + $subtests * 14; use Perl::Critic::TestUtils qw/pcritique_with_violations/; @@ -32,6 +35,8 @@ my $policy = 'Dynamic::NoIndirect'; next; } + is @violations, @expected, "right count of violations $id"; + for my $v (@violations) { my $exp = shift @expected;