]> git.vpit.fr Git - perl/modules/Variable-Magic.git/blobdiff - t/40-threads.t
Add support for 5.37.3's PADSV_STORE optimization
[perl/modules/Variable-Magic.git] / t / 40-threads.t
index 151116bab11f44b9aebe5b25a1e6240380d8576a..85d51934635b395a1801f4378fe6d2b54f8eaa68 100644 (file)
@@ -33,12 +33,15 @@ sub try {
     set     => sub {
      my $op = $_[-1];
 
+     my $assign_op    = ("$]" < 5.037_003) ? 'sassign': 'padsv_store';
+     my $assign_op_cl = ("$]" < 5.037_003) ? 'B::BINOP': 'B::UNOP';
+
      if ($op_info eq 'object') {
       is_deeply { class => ref($op),   name => $op->name },
-                { class => 'B::BINOP', name => 'sassign' },
+                { class => $assign_op_cl, name => $assign_op },
                 "op object in thread $tid is correct";
      } else {
-      is $op, 'sassign', "op name in thread $tid is correct";
+      is $op, $assign_op, "op name in thread $tid is correct";
      }
 
      return 0;