diff -r f196858c983e -r 0fc33e54b1c6 t/10-usage.t --- a/t/10-usage.t Tue Jul 29 21:27:29 2014 +0200 +++ b/t/10-usage.t Tue Jul 29 21:35:01 2014 +0200 @@ -5,13 +5,13 @@ use Test::More; use Test::Exception; -use_ok 'Scalar::RefType' or BAIL_OUT q{Can't load the module}; +use_ok 'Scalar::LockRefType' or BAIL_OUT q{Can't load the module}; subtest 'NAMES' => sub { - isa_ok tie(my $h => 'Scalar::RefType', ref {}) => 'Scalar::RefType'; - isa_ok tie(my $a => 'Scalar::RefType', ref []) => 'Scalar::RefType'; - isa_ok tie(my $s => 'Scalar::RefType', ref \(undef)) => 'Scalar::RefType'; - isa_ok tie(my $p => 'Scalar::RefType', '') => 'Scalar::RefType'; + isa_ok tie(my $h => 'Scalar::LockRefType', ref {}) => 'Scalar::LockRefType'; + isa_ok tie(my $a => 'Scalar::LockRefType', ref []) => 'Scalar::LockRefType'; + isa_ok tie(my $s => 'Scalar::LockRefType', ref \(undef)) => 'Scalar::LockRefType'; + isa_ok tie(my $p => 'Scalar::LockRefType', '') => 'Scalar::LockRefType'; is tied($h)->{type}, 'HASH' => 'is a hash ref'; is tied($a)->{type}, 'ARRAY' => 'is a array ref'; @@ -21,16 +21,16 @@ }; subtest 'AUTO' => sub { - isa_ok tie(my $x => 'Scalar::RefType') => 'Scalar::RefType'; + isa_ok tie(my $x => 'Scalar::LockRefType') => 'Scalar::LockRefType'; ok $x = {} => 'hash: assignment'; is tied($x)->{type}, 'HASH' => 'hash: type'; throws_ok { $x = [] } qr/invalid/ => 'invalid type assignment'; }; -isa_ok tie(my $h => 'Scalar::RefType', {}) => 'Scalar::RefType'; -isa_ok tie(my $a => 'Scalar::RefType', []) => 'Scalar::RefType'; -isa_ok tie(my $s => 'Scalar::RefType', \(undef)) => 'Scalar::RefType'; -isa_ok tie(my $p => 'Scalar::RefType', undef) => 'Scalar::RefType'; +isa_ok tie(my $h => 'Scalar::LockRefType', {}) => 'Scalar::LockRefType'; +isa_ok tie(my $a => 'Scalar::LockRefType', []) => 'Scalar::LockRefType'; +isa_ok tie(my $s => 'Scalar::LockRefType', \(undef)) => 'Scalar::LockRefType'; +isa_ok tie(my $p => 'Scalar::LockRefType', undef) => 'Scalar::LockRefType'; is tied($h)->{type}, 'HASH' => 'is a hash ref'; is tied($a)->{type}, 'ARRAY' => 'is a array ref';