cvsuser 04/03/11 08:14:53
Modified: t/pmc object-meths.t Log: Patch to test new IMCC method syntax Courtesy of Jens Rieks <[EMAIL PROTECTED]> Revision Changes Path 1.10 +69 -2 parrot/t/pmc/object-meths.t Index: object-meths.t =================================================================== RCS file: /cvs/public/parrot/t/pmc/object-meths.t,v retrieving revision 1.9 retrieving revision 1.10 diff -u -w -r1.9 -r1.10 --- object-meths.t 11 Mar 2004 13:17:21 -0000 1.9 +++ object-meths.t 11 Mar 2004 16:14:52 -0000 1.10 @@ -1,6 +1,6 @@ #! perl -w # Copyright: 2001-2003 The Perl Foundation. All Rights Reserved. -# $Id: object-meths.t,v 1.9 2004/03/11 13:17:21 leo Exp $ +# $Id: object-meths.t,v 1.10 2004/03/11 16:14:52 dan Exp $ =head1 NAME @@ -16,7 +16,7 @@ =cut -use Parrot::Test tests => 7; +use Parrot::Test tests => 8; use Test::More; output_like(<<'CODE', <<'OUTPUT', "callmethod - unknown"); @@ -180,4 +180,71 @@ bar_init in sub done +OUTPUT + +output_is(<<'CODE', <<'OUTPUT', "methods: self"); +##PIR## +.sub _main + .local pmc A + .local pmc B + + newclass A, "A" + newclass B, "B" + + find_type I0, "A" + find_type I1, "B" + + new A, I0 + new B, I1 + + setprop A, "B", B + + A."foo"() + B."foo"() + + end +.end + +.namespace ["A"] + +.sub foo method + .local pmc B + + self = P2 + print "A::foo\n" + getprop B, "B", self + + self."blah"() + B."blah"() + self."blah"() + + .pcc_begin_return + .pcc_end_return +.end + +.sub blah method + print "A::blah\n" + .pcc_begin_return + .pcc_end_return +.end + +.namespace ["B"] + +.sub foo method + print "B::foo\n" + .pcc_begin_return + .pcc_end_return +.end + +.sub blah method + print "B::blah\n" + .pcc_begin_return + .pcc_end_return +.end +CODE +A::foo +A::blah +B::blah +A::blah +B::foo OUTPUT
