6 use Test::More tests => 2 * 5 + 3 + 1;
8 use Variable::Magic qw/cast/;
11 use Variable::Magic::TestWatcher;
13 my $wiz = init 'set', 'set';
17 check { cast $a, $wiz } { }, 'cast';
19 my $n = int rand 1000;
21 check { $a = $n } { set => 1 }, 'assign';
22 is $a, $n, 'set: assign correctly';
24 check { ++$a } { set => 1 }, 'increment';
25 is $a, $n + 1, 'set: increment correctly';
27 check { --$a } { set => 1 }, 'decrement';
28 is $a, $n, 'set: decrement correctly';