tagged release 0.7.1
[parrot.git] / t / oo / names.t
blob05dcd7647221fc0326e7153abc994104da7a8739
1 #!perl
2 # Copyright (C) 2007, The Perl Foundation.
3 # $Id$
5 use strict;
6 use warnings;
7 use lib qw( . lib ../lib ../../lib );
8 use Test::More;
9 use Parrot::Test tests => 1;
11 =head1 NAME
13 t/oo/names.t - Test OO name-related items
15 =head1 SYNOPSIS
17     % prove t/oo/names.t
19 =head1 DESCRIPTION
21 Tests OO features related to names and namespaces.
23 =cut
25 pir_output_is(
26     <<'CODE', <<'OUT', 'Create HLL class same-named as Parrot class', todo => 'RT#43419' );
27     .HLL "perl6", ""
29     .namespace []
31     .sub main :main
32         # works
33         $P0 = new 'Class'
34         $P0.'name'('AnObject')
35         $S0 = $P0
36         say $S0
38         # fails
39         $P0 = new 'Class'
40         $P0.'name'('Object')
41         $S0 = $P0
42         say $S0
43     .end
44 CODE
45 perl6;AnObject
46 perl6;Object
47 OUT
49 # Local Variables:
50 #   mode: cperl
51 #   cperl-indent-level: 4
52 #   fill-column: 100
53 # End:
54 # vim: expandtab shiftwidth=4: