-my $wiz = wizard get => sub { ++$c[0] },
- set => sub { ++$c[1] },
- len => sub { ++$c[2]; $_[2] },
- clear => sub { ++$c[3] },
- free => sub { ++$c[4] },
- copy => sub { ++$c[5] },
- dup => sub { ++$c[6] },
- local => sub { ++$c[7] },
- fetch => sub { ++$c[8] },
- store => sub { ++$c[9] },
- 'exists' => sub { ++$c[10] },
- 'delete' => sub { ++$c[11] };
-ok(check(), 'hash : create wizard');
-
-my %n = map { $_ => int rand 1000 } qw/foo bar baz qux/;
-my %a = %n;
-
-cast %a, $wiz;
-ok(check(), 'hash : cast');
-
-my $b = $a{foo};
-++$x[5] if MGf_COPY;
-++$x[8] if VMG_UVAR;
-ok(check(), 'hash : assign element to');
-
-my %b = %a;
-ok(check(), 'hash : assign to');
-
-$b = "X%{a}Y";
-ok(check(), 'hash : interpolate');
-
-$b = \%a;
-ok(check(), 'hash : reference');
-
-my @b = @a{qw/bar qux/};
-$x[5] += 2 if MGf_COPY;
-$x[8] += 2 if VMG_UVAR;
-ok(check(), 'hash : slice');
-
-%a = map { $_ => 1 } qw/a b d/;
-++$x[3];
-$x[5] += 3 if MGf_COPY && $^V && $^V gt 5.9.3;
-$x[9] += 3 if VMG_UVAR;
-ok(check(), 'hash : assign');
-
-$a{d} = 2;
-++$x[5] if MGf_COPY;
-++$x[9] if VMG_UVAR;
-ok(check(), 'hash : assign old element');
-
-$a{c} = 3;
-++$x[5] if MGf_COPY;
-++$x[9] if VMG_UVAR;
-ok(check(), 'hash : assign new element');
-
-$b = %a;
-ok(check(), 'hash : buckets');
-
-@b = keys %a;
-ok(check(), 'hash : keys');
-
-@b = values %a;
-ok(check(), 'hash : values');
-
-while (my ($k, $v) = each %a) { }
-ok(check(), 'hash : each');
-
-{
+my %b;
+watch { %b = %h } { }, 'assign to';
+is_deeply \%b, \%n, 'hash: assign to correctly';
+
+$s = watch { \%h } { }, 'reference';
+
+my @b = watch { @h{qw<bar qux>} }
+ +{ (fetch => 2) x VMG_UVAR }, 'slice';
+is_deeply \@b, [ @n{qw<bar qux>} ], 'hash: slice correctly';
+
+watch { %h = () } { clear => 1 }, 'empty in list context';
+
+watch { %h = (a => 1, d => 3); () }
+ +{ (store => 2, copy => 2) x VMG_UVAR, clear => 1 },
+ 'assign from list in void context';
+
+watch { %h = map { $_ => 1 } qw<a b d>; }
+ +{ (exists => 3, store => 3, copy => 3) x VMG_UVAR, clear => 1 },
+ 'assign from map in list context';
+
+watch { $h{d} = 2; () } +{ (store => 1) x VMG_UVAR },
+ 'assign old element';
+
+watch { $h{c} = 3; () } +{ (store => 1, copy => 1) x VMG_UVAR },
+ 'assign new element';
+
+$s = watch { %h } { }, 'buckets';
+
+@b = watch { keys %h } { }, 'keys';
+is_deeply [ sort @b ], [ qw<a b c d> ], 'hash: keys correctly';
+
+@b = watch { values %h } { }, 'values';
+is_deeply [ sort { $a <=> $b } @b ], [ 1, 1, 2, 3 ], 'hash: values correctly';
+
+watch { while (my ($k, $v) = each %h) { } } { }, 'each';
+
+watch {