X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F22-len.t;h=0a6dd59650611bbfc276beca4691c26d93bd54b8;hb=a86e3e47a167afadf7de1231d6401a1139330ad0;hp=282fd37519314e63cb655eba4bf3f466564cd07f;hpb=77a84f75f33e3ee44e61182dec76699e23025375;p=perl%2Fmodules%2FVariable-Magic.git diff --git a/t/22-len.t b/t/22-len.t index 282fd37..0a6dd59 100644 --- a/t/22-len.t +++ b/t/22-len.t @@ -1,5 +1,8 @@ #!perl -T +use strict; +use warnings; + use Test::More tests => 6; use Variable::Magic qw/wizard cast/; @@ -7,18 +10,18 @@ use Variable::Magic qw/wizard cast/; my $c = 0; my $n = int rand 1000; my $wiz = wizard len => sub { ++$c; return $n }; -ok($c == 0, 'len : create wizard'); +is($c, 0, 'len : create wizard'); my @a = qw/a b c/; cast @a, $wiz; -ok($c == 0, 'len : cast'); +is($c, 0, 'len : cast'); my $b = scalar @a; -ok($c == 1, 'len : get length'); -ok($b == $n, 'len : get length correctly'); +is($c, 1, 'len : get length'); +is($b, $n, 'len : get length correctly'); $n = 0; $b = scalar @a; -ok($c == 2, 'len : get length 0'); -ok($b == 0, 'len : get length 0 correctly'); +is($c, 2, 'len : get length 0'); +is($b, 0, 'len : get length 0 correctly');