3 # Check that we can "upgrade" from anything to anything else.
4 # Curiously, before this, lib/Math/Trig.t was the only code anywhere in the
5 # build or testsuite that upgraded an NV to an RV
29 # This is somewhat cheating but I can't think of anything built in that I can
30 # copy that already has type PVIV
31 $types{pviv} = "Perl rules!";
33 # use Devel::Peek; Dump $pvmg;
35 my @keys = keys %types;
36 plan tests => @keys * @keys;
38 foreach my $source_type (@keys) {
39 foreach my $dest_type (@keys) {
40 # Pads re-using variables might contaminate this
42 $vars->{dest} = $types{$dest_type};
43 $vars->{source} = $types{$source_type};
44 # The assignment can potentially trigger assertion failures, so it's
45 # useful to have the diagnostics about what was attempted printed first
46 print "# Assigning $source_type to $dest_type\n";
47 $vars->{dest} = $vars->{source};
48 is ($vars->{dest}, $vars->{source});