]> git.vpit.fr Git - perl/modules/Variable-Magic.git/blobdiff - t/14-callbacks.t
Test destruction of magic callbacks
[perl/modules/Variable-Magic.git] / t / 14-callbacks.t
index 7a7948cba51ba38bdd06b7bbbec3f2bf7f992c0d..eb72559acbf75e4afe8e9688b01aa1662a2c7d00 100644 (file)
@@ -41,25 +41,27 @@ cast $b, $wiz;
 
 my $u = $b;
 is_deeply(\@callers, [
- [ 'main', $0, 42 ],
+ [ 'main', $0, __LINE__-2 ],
 ], 'caller into callback returns the right thing');
 
 @callers = ();
 $u = $b;
 is_deeply(\@callers, [
- [ 'main', $0, 48 ],
+ [ 'main', $0, __LINE__-2 ],
 ], 'caller into callback returns the right thing (second time)');
 
 {
- my $u = $b;
  @callers = ();
- is_deeply(\@callers, [ ], 'caller into callback into block returns the right thing');
+ my $u = $b;
+ is_deeply(\@callers, [
+  [ 'main', $0, __LINE__-2 ],
+ ], 'caller into callback into block returns the right thing');
 }
 
 @callers = ();
 eval { my $u = $b };
 is($@, '', 'caller into callback doesn\'t croak');
 is_deeply(\@callers, [
- [ 'main', $0, 60 ],
- [ 'main', $0, 60 ],
+ ([ 'main', $0, __LINE__-3 ]) x 2,
 ], 'caller into callback into eval returns the right thing');
+