X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F14-callbacks.t;h=1f2c2de6c62a64b65ce3a2842f573000cc9a7158;hb=20cd6add9786108c0b4c6967b6ea02ae9d5cef4d;hp=eae92fd0ac60c4d27bb899d18242ae56a7d17ca2;hpb=a809ca0a164c0534e02c8b07998331ffd73d0951;p=perl%2Fmodules%2FVariable-Magic.git diff --git a/t/14-callbacks.t b/t/14-callbacks.t index eae92fd..1f2c2de 100644 --- a/t/14-callbacks.t +++ b/t/14-callbacks.t @@ -65,7 +65,8 @@ is_deeply(\@callers, [ ([ 'main', $0, __LINE__-3 ]) x 2, ], 'caller into callback into eval returns the right thing'); -for ([ 'get', '$c', 'sassign' ], [ 'len', '@c', 'padav' ]) { +for ([ 'get', '$c', [ 'sassign', 'B::BINOP' ] ], + [ 'len', '@c', [ 'padav', 'B::OP' ] ]) { my ($key, $var, $exp) = @$_; for my $op_info (VMG_OP_INFO_NAME, VMG_OP_INFO_OBJECT, 3) { @@ -79,10 +80,10 @@ for ([ 'get', '$c', 'sassign' ], [ 'len', '@c', 'padav' ]) { my $op = $_[-1]; my $desc = "$key magic with op_info == $op_info"; if ($op_info == 1) { - is $op, $exp, "$desc gets the right op info"; + is $op, $exp->[0], "$desc gets the right op info"; } elsif ($op_info == 2) { - isa_ok $op, 'B::OP', $desc; - is $op->name, $exp, "$desc gets the right op info"; + isa_ok $op, $exp->[1], $desc; + is $op->name, $exp->[0], "$desc gets the right op info"; } else { is $op, undef, "$desc gets the right op info"; }