summaryrefslogtreecommitdiff
path: root/t/retain.t
diff options
context:
space:
mode:
Diffstat (limited to 't/retain.t')
-rw-r--r--t/retain.t16
1 files changed, 8 insertions, 8 deletions
diff --git a/t/retain.t b/t/retain.t
index 9e74ac5..03f90d1 100644
--- a/t/retain.t
+++ b/t/retain.t
@@ -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');