2 # Copyright (C) 2001-2005, The Perl Foundation.
7 use lib qw( . lib ../lib ../../lib );
9 use Parrot::Test tests => 16;
13 t/pmc/ref.t - Reference PMC
21 Tests that vtable method delegation works on a C<Ref> PMC.
25 pasm_output_is( <<'CODE', <<'OUTPUT', "new ref" );
34 pasm_output_is( <<'CODE', <<'OUTPUT', "inc ref" );
46 pasm_output_is( <<'CODE', <<'OUTPUT', "dec ref" );
59 pasm_output_is( <<'CODE', <<'OUTPUT', "deref" );
77 pasm_output_is( <<'CODE', <<'OUTPUT', "setref ref" );
102 local $TODO = 'pending new Ref semantic';
103 pasm_output_is( <<'CODE', <<'OUTPUT', "assign ref" );
128 pasm_output_is( <<'CODE', <<'OUTPUT', "typeof SharedRef" );
130 new P1, .SharedRef, P2
152 pasm_output_like( <<'CODE', <<'OUTPUT', "deref SharedRef" );
154 new P1, .SharedRef, P2
164 pir_output_is( << 'CODE', << 'OUTPUT', "check whether interface is done" );
172 pmc3 = new SharedRef, pmc1
174 does bool1, pmc2, "scalar"
177 does bool1, pmc2, "array"
180 does bool1, pmc2, "no_interface"
183 does bool1, pmc3, "scalar"
186 does bool1, pmc3, "array"
189 does bool1, pmc3, "no_interface"
203 pasm_output_is( <<'CODE', <<'OUTPUT', "set/get int" );
218 pasm_output_is( <<'CODE', <<'OUTPUT', "set/get float" );
237 pasm_output_is( <<'CODE', <<'OUTPUT', "push/pop" );
238 new P2, .ResizableIntegerArray
266 pasm_output_is( <<'CODE', <<'OUTPUT', "add ref, ref, ref" );
278 pasm_output_is( <<'CODE', <<'OUTPUT', "add ref, ref, int" );
292 pasm_output_is( <<'CODE', <<'OUTPUT', "add ref, int, ref" );
306 pasm_output_is( <<'CODE', <<'OUTPUT', "add ref, int, int" );
322 # cperl-indent-level: 4
325 # vim: expandtab shiftwidth=4: