6 use Test::More tests => 13;
8 use Variable::Magic qw/wizard cast dispell/;
14 for (0 .. 11) { 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 copy => sub { ++$c[5] },
25 dup => sub { ++$c[6] },
26 local => sub { ++$c[7] },
27 fetch => sub { ++$c[8] },
28 store => sub { ++$c[9] },
29 'exists' => sub { ++$c[10] },
30 'delete' => sub { ++$c[11] };
31 ok(check(), 'scalar : create wizard');
33 my $n = int rand 1000;
37 ok(check(), 'scalar : cast');
41 ok(check(), 'scalar : assign to');
45 ok(check(), 'scalar : interpolate');
48 ok(check(), 'scalar : reference');
52 ok(check(), 'scalar : assign');
56 ok(check(), 'scalar : increment');
60 ok(check(), 'scalar : decrement');
64 ok(check(), 'scalar : multiply');
68 ok(check(), 'scalar : divide');
75 ok(check(), 'scalar : scope end');
79 ok(check(), 'scalar : undef');
82 ok(check(), 'scalar : dispell');