X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F24-free.t;h=c6daebedacfe59baec1a22bf1c34e79154c98e38;hb=da422089a9a5dfbf84e72ec3ba867063471ff41c;hp=f66e6db0075f1d5b36a779ff47b96510d5f71ef5;hpb=505fda7126b01811c0ca990552876a1c6d9dc7c3;p=perl%2Fmodules%2FVariable-Magic.git diff --git a/t/24-free.t b/t/24-free.t index f66e6db..c6daebe 100644 --- a/t/24-free.t +++ b/t/24-free.t @@ -10,17 +10,17 @@ use Variable::Magic qw/cast/; use lib 't/lib'; use Variable::Magic::TestWatcher; -my $wiz = init 'free', 'free'; +my $wiz = init_watcher 'free', 'free'; my $n = int rand 1000; -check { +watch { my $a = $n; - check { cast $a, $wiz } { }, 'cast'; + watch { cast $a, $wiz } { }, 'cast'; } { free => 1 }, 'deletion at the end of the scope'; my $a = $n; -check { cast $a, $wiz } { }, 'cast 2'; -check { undef $a } { }, 'explicit deletion with undef()'; +watch { cast $a, $wiz } { }, 'cast 2'; +watch { undef $a } { }, 'explicit deletion with undef()'; $Variable::Magic::TestWatcher::mg_end = { free => 1 };