2 # Copyright (C) 2001-2008, The Perl Foundation.
7 use lib qw( . lib ../lib ../../lib );
10 use Parrot::Test tests => 13;
12 ##############################
15 pir_output_is( <<'CODE', <<'OUT', "different namespace declarations");
28 ##############################
29 # Parrot Calling Conventions
31 pir_output_is( <<'CODE', <<'OUT', "meth call syntax" );
52 pir_output_is( <<'CODE', <<'OUT', "meth call syntax m.o(arg)" );
77 pir_output_is( <<'CODE', <<'OUT', "meth call ret = o.m(arg)" );
105 pir_output_is( <<'CODE', <<'OUT', "meth call syntax, string" );
111 newclass class, "Foo"
134 pir_output_is( <<'CODE', <<'OUT', "initializer" );
137 subclass P2, P1, "Bar"
138 subclass P3, P2, "Baz"
140 get_global P0, "_sub"
147 .sub init :vtable :method
152 .sub init :vtable :method
157 .sub init :vtable :method
161 .namespace # main again
173 pir_output_is( <<'CODE', <<'OUT', "meth call syntax - method, self" );
178 newclass class, "Foo"
200 pir_output_is( <<'CODE', <<'OUT', "explicit meth call syntax" );
205 newclass class, "Foo"
224 pir_output_is( <<'CODE', <<'OUT', "explicit meth call syntax, meth var" );
230 newclass class, "Foo"
233 meth = meth . "th" # test concat to
250 pir_output_is( <<'CODE', <<'OUT', "explicit meth call syntax, args" );
255 newclass class, "Foo"
287 pir_output_is( <<'CODE', <<'OUT', "explicit meth call syntax" );
292 newclass class, "Foo"
311 pir_output_is( <<'CODE', <<'OUT', "meth call syntax - reserved word" );
316 newclass class, "Foo"
332 pir_output_is( <<'CODE', <<'OUT', ":vtable implies self (see RT #47674)" );
342 .sub 'get_string' :vtable
344 .return ("stringy thingy\n")
357 # cperl-indent-level: 4
360 # vim: expandtab shiftwidth=4: