# New Ticket Created by Klaas-Jan Stol # Please include the string: [perl #41604] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=41604 >
hi, I was trying to add a test that runs some PIR code as PBC. (so, the specified PIR code should be compiled to PBC, *THEN* it should be run to compare output). It seems the .pbc file is *not* created. I'm no Perl god, so reading the Parrot::Test script is kinda hard for me. I couldn't find any other tests that run pbc_output_is() (but admittedly, I didnt' look for too long), so it might be this function is never used. Parrot::Test does mention it, though. Attached a patch that adds the tests, but SKIPPING it currently. As soon as the bug is resolved, it can be run. regards, klaas-jan
Index: t/pmc/parrotobject.t =================================================================== --- t/pmc/parrotobject.t (revision 17163) +++ t/pmc/parrotobject.t (working copy) @@ -6,7 +6,7 @@ use warnings; use lib qw( . lib ../lib ../../lib ); use Test::More; -use Parrot::Test tests => 8; +use Parrot::Test tests => 9; =head1 NAME @@ -166,7 +166,39 @@ Bar::get_string OUT +SKIP: { + skip('pbc_output_is() doesn\'t work', 1); + pbc_output_is( <<'CODE', <<'OUTPUT', ":vtable fails for subclasses of core classes - (#40626)" ); + .sub main :main + $P0 = subclass 'Hash', 'Foo' + $P0 = subclass 'Hash', 'Bar' + + $P1 = new 'Foo' + $S1 = $P1 + say $S1 + + $P1 = new 'Bar' + $S1 = $P1 + say $S1 + .end + .namespace [ 'Foo' ] + .sub '__get_string' :method + .return('Hello world') + .end + + .namespace [ 'Bar' ] + + .sub 'get_string' :method :vtable + .return('Hello world') + .end + +CODE +Hello world +Hello world +OUTPUT +} + # assign opcode in inherited classes pir_output_is( <<'CODE', <<'OUT', 'assign opcode in inherited classes', 'todo' => 'assign opcode inheritance' ); .sub main :main