X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F20-get.t;h=60826a17737af38ee4ca0686cce2489c80c7ce95;hb=d8122850f4c201c5b849cebb1f9b7f2630ae4c15;hp=215b5df03b6bf44cc4a1baac1111f604a0b4e35b;hpb=77a84f75f33e3ee44e61182dec76699e23025375;p=perl%2Fmodules%2FVariable-Magic.git diff --git a/t/20-get.t b/t/20-get.t index 215b5df..60826a1 100644 --- a/t/20-get.t +++ b/t/20-get.t @@ -1,23 +1,26 @@ #!perl -T +use strict; +use warnings; + use Test::More tests => 6; use Variable::Magic qw/wizard cast/; my $c = 0; my $wiz = wizard get => sub { ++$c }; -ok($c == 0, 'get : create wizard'); +is($c, 0, 'get : create wizard'); my $n = int rand 1000; my $a = $n; cast $a, $wiz; -ok($c == 0, 'get : cast'); +is($c, 0, 'get : cast'); my $b = $a; -ok($c == 1, 'get : assign to'); -ok($b == $n, 'get : assign to correctly'); +is($c, 1, 'get : assign to'); +is($b, $n, 'get : assign to correctly'); $b = "X${a}Y"; -ok($c == 2, 'get : interpolate'); -ok($b eq "X${n}Y", 'get : interpolate correctly'); +is($c, 2, 'get : interpolate'); +is($b, "X${n}Y", 'get : interpolate correctly');