6 use Test::More tests => 13;
8 use Variable::Magic qw/wizard cast dispell/;
14 for (0 .. 4) { return 0 unless $c[$_] == $x[$_]; }
19 my $wiz = wizard get => sub { ++$c[0] },
20 set => sub { ++$c[1] },
21 len => sub { ++$c[2] },
22 clear => sub { ++$c[3] },
23 free => sub { ++$c[4] };
24 ok(check(), 'scalar : create wizard');
26 my $n = int rand 1000;
30 ok(check(), 'scalar : cast');
34 ok(check(), 'scalar : assign to');
38 ok(check(), 'scalar : interpolate');
41 ok(check(), 'scalar : reference');
45 ok(check(), 'scalar : assign');
49 ok(check(), 'scalar : increment');
53 ok(check(), 'scalar : decrement');
57 ok(check(), 'scalar : multiply');
61 ok(check(), 'scalar : divide');
68 ok(check(), 'scalar : scope end');
72 ok(check(), 'scalar : undef');
75 ok(check(), 'scalar : dispell');