X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F15-self.t;fp=t%2F15-self.t;h=cff8429b24ede8a1b1a9a7913b18dec8d2b83b17;hb=a86e3e47a167afadf7de1231d6401a1139330ad0;hp=6f6d9a469b99c9df35389bb1f4965fb5be1eff56;hpb=56d08a38a664736a762edf46817a346482c4004f;p=perl%2Fmodules%2FVariable-Magic.git diff --git a/t/15-self.t b/t/15-self.t index 6f6d9a4..cff8429 100644 --- a/t/15-self.t +++ b/t/15-self.t @@ -17,37 +17,37 @@ my $c = 0; }; ok(!$@, "wizard creation error ($@)"); ok(defined $wiz, 'wizard is defined'); - ok(ref $wiz eq 'SCALAR', 'wizard is a scalar ref'); + is(ref $wiz, 'SCALAR', 'wizard is a scalar ref'); my $res = eval { cast $wiz, $wiz }; - ok(!$@, "cast on self croaks ($@)"); - ok($res, 'cast on self invalid'); + ok(!$@, "cast on self doesn't croak ($@)"); + ok($res, 'cast on self is valid'); my $w = $wiz; - ok($c == 1, 'magic works correctly on self'); + is($c, 1, 'magic works correctly on self'); $res = eval { dispell $wiz, $wiz }; - ok(!$@, "dispell on self croaks ($@)"); - ok($res, 'dispell on self invalid'); + ok(!$@, "dispell on self doesn't croak ($@)"); + ok($res, 'dispell on self is valid'); $w = $wiz; - ok($c == 1, 'magic is no longer invoked on self when dispelled'); + is($c, 1, 'magic is no longer invoked on self when dispelled'); $res = eval { cast $wiz, $wiz, $wiz }; - ok(!$@, "re-cast on self croaks ($@)"); - ok($res, 're-cast on self invalid'); + ok(!$@, "re-cast on self doesn't croak ($@)"); + ok($res, 're-cast on self is valid'); $w = getdata $wiz, $wiz; - ok($c == 1, 'getdata on magical self doesn\'t trigger callbacks'); - # ok(getsig($w) == getsig($wiz), 'getdata returns the correct wizard'); + is($c, 1, 'getdata on magical self doesn\'t trigger callbacks'); + # is(getsig($w), getsig($wiz), 'getdata returns the correct wizard'); $res = eval { dispell $wiz, $wiz }; - ok(!$@, "re-dispell on self croaks ($@)"); - ok($res, 're-dispell on self invalid'); + ok(!$@, "re-dispell on self doesn't croak ($@)"); + ok($res, 're-dispell on self is valid'); $res = eval { cast $wiz, $wiz }; - ok(!$@, "re-re-cast on self croaks ($@)"); - ok($res, 're-re-cast on self invalid'); + ok(!$@, "re-re-cast on self doesn't croak ($@)"); + ok($res, 're-re-cast on self is valid'); } -# ok($c == 0, 'magic destructor is called'); +# is($c, 0, 'magic destructor is called');