diff options
Diffstat (limited to 't/retain.t')
-rw-r--r-- | t/retain.t | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -7,14 +7,14 @@ use Variable::Disposition qw(retain dispose); my $copy; { - my $x = []; - Scalar::Util::weaken($copy = $x); - ok($x, 'have a variable'); - is_refcount($x, 1, 'refcount is now 1'); - Scalar::Util::weaken($copy = $x); - is_refcount($x, 1, 'refcount is still 1'); - retain($x); - is_refcount($x, 2, 'refcount is now 2'); + my $x = []; + Scalar::Util::weaken($copy = $x); + ok($x, 'have a variable'); + is_refcount($x, 1, 'refcount is now 1'); + Scalar::Util::weaken($copy = $x); + is_refcount($x, 1, 'refcount is still 1'); + retain($x); + is_refcount($x, 2, 'refcount is now 2'); } is_refcount($copy, 1, 'refcount is still 1'); ok($copy, 'copy still exists'); |