3 use Test::More tests => 13;
5 use Variable::Magic qw/wizard cast dispell/;
11 for (0 .. 4) { return 0 unless $c[$_] == $x[$_]; }
16 my $wiz = wizard get => sub { ++$c[0] },
17 set => sub { ++$c[1] },
18 len => sub { ++$c[2] },
19 clear => sub { ++$c[3] },
20 free => sub { ++$c[4] };
21 ok(check(), 'scalar : create wizard');
23 my $n = int rand 1000;
27 ok(check(), 'scalar : cast');
31 ok(check(), 'scalar : assign to');
35 ok(check(), 'scalar : interpolate');
38 ok(check(), 'scalar : reference');
42 ok(check(), 'scalar : assign');
46 ok(check(), 'scalar : increment');
50 ok(check(), 'scalar : decrement');
54 ok(check(), 'scalar : multiply');
58 ok(check(), 'scalar : divide');
65 ok(check(), 'scalar : scope end');
69 ok(check(), 'scalar : undef');
72 ok(check(), 'scalar : dispell');