cvsuser 04/03/04 09:03:31
Modified: t/pmc objects.t Log: Add a test to make sure objects return their class when asked for their type. (Currently broken) Courtesy of Jens Rieks <[EMAIL PROTECTED]> Revision Changes Path 1.31 +36 -2 parrot/t/pmc/objects.t Index: objects.t =================================================================== RCS file: /cvs/public/parrot/t/pmc/objects.t,v retrieving revision 1.30 retrieving revision 1.31 diff -u -w -r1.30 -r1.31 --- objects.t 3 Mar 2004 09:31:27 -0000 1.30 +++ objects.t 4 Mar 2004 17:03:30 -0000 1.31 @@ -1,6 +1,6 @@ #! perl -w # Copyright: 2001-2003 The Perl Foundation. All Rights Reserved. -# $Id: objects.t,v 1.30 2004/03/03 09:31:27 leo Exp $ +# $Id: objects.t,v 1.31 2004/03/04 17:03:30 dan Exp $ =head1 NAME @@ -16,7 +16,7 @@ =cut -use Parrot::Test tests => 26; +use Parrot::Test tests => 28; use Test::More; output_is(<<'CODE', <<'OUTPUT', "findclass (base class)"); @@ -881,4 +881,38 @@ in add in get_string 42 +OUTPUT + +output_is(<<'CODE', <<'OUTPUT', "typeof classes"); + newclass P0, "A" + newclass P1, "B" + + typeof S0, P0 + typeof S1, P1 + print S0 + print "\n" + print S1 +CODE +A +B +OUTPUT + +output_is(<<'CODE', <<'OUTPUT', "typeof objects"); + newclass P0, "A" + newclass P1, "B" + + find_type I0, "A" + find_type I1, "B" + new P0, I0 + new P1, I1 + + typeof S0, P0 + typeof S1, P1 + print S0 + print "\n" + print S1 + end +CODE +A +B OUTPUT
