X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F20-get.t;h=7548e15e20adfef567fac84fa407063e64755b00;hb=da422089a9a5dfbf84e72ec3ba867063471ff41c;hp=02ef39bc62d2902e94bf0b2d67d9715eec5b448f;hpb=505fda7126b01811c0ca990552876a1c6d9dc7c3;p=perl%2Fmodules%2FVariable-Magic.git diff --git a/t/20-get.t b/t/20-get.t index 02ef39b..7548e15 100644 --- a/t/20-get.t +++ b/t/20-get.t @@ -10,17 +10,17 @@ use Variable::Magic qw/cast/; use lib 't/lib'; use Variable::Magic::TestWatcher; -my $wiz = init 'get', 'get'; +my $wiz = init_watcher 'get', 'get'; my $n = int rand 1000; my $a = $n; -check { cast $a, $wiz } { }, 'cast'; +watch { cast $a, $wiz } { }, 'cast'; my $b; # $b has to be set inside the block for the test to pass on 5.8.3 and lower -check { $b = $a } { get => 1 }, 'assign to'; +watch { $b = $a } { get => 1 }, 'assign to'; is $b, $n, 'get: assign to correctly'; -$b = check { "X${a}Y" } { get => 1 }, 'interpolate'; +$b = watch { "X${a}Y" } { get => 1 }, 'interpolate'; is $b, "X${n}Y", 'get: interpolate correctly';