X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F21-set.t;h=5ed992fe5577145a14b32aa4d788664308b77c4f;hb=da422089a9a5dfbf84e72ec3ba867063471ff41c;hp=b81684fdb7eff8b31ed401d2b52d76b0f1398391;hpb=505fda7126b01811c0ca990552876a1c6d9dc7c3;p=perl%2Fmodules%2FVariable-Magic.git diff --git a/t/21-set.t b/t/21-set.t index b81684f..5ed992f 100644 --- a/t/21-set.t +++ b/t/21-set.t @@ -10,19 +10,19 @@ use Variable::Magic qw/cast/; use lib 't/lib'; use Variable::Magic::TestWatcher; -my $wiz = init 'set', 'set'; +my $wiz = init_watcher 'set', 'set'; my $a = 0; -check { cast $a, $wiz } { }, 'cast'; +watch { cast $a, $wiz } { }, 'cast'; my $n = int rand 1000; -check { $a = $n } { set => 1 }, 'assign'; +watch { $a = $n } { set => 1 }, 'assign'; is $a, $n, 'set: assign correctly'; -check { ++$a } { set => 1 }, 'increment'; +watch { ++$a } { set => 1 }, 'increment'; is $a, $n + 1, 'set: increment correctly'; -check { --$a } { set => 1 }, 'decrement'; +watch { --$a } { set => 1 }, 'decrement'; is $a, $n, 'set: decrement correctly';