Skip to content

Commit

Permalink
[t] Parrot_PMC_get_iter
Browse files Browse the repository at this point in the history
  • Loading branch information
leto committed Feb 20, 2011
1 parent 190b188 commit 659a75f
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions t/src/extend_vtable.t
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use File::Spec::Functions;

plan skip_all => 'src/parrot_config.o does not exist' unless -e catfile(qw/src parrot_config.o/);

plan tests => 62;
plan tests => 63;

=head1 NAME
Expand Down Expand Up @@ -145,9 +145,10 @@ extend_vtable_output_is(<<'CODE', <<'OUTPUT', "Parrot_PMC_(freeze|thaw)");
Parrot_printf(interp,"%P\n", pmc);
Parrot_printf(interp,"%P\n", pmc2);
/* freeze pmc, thaw tp pmc 2 */
/* freeze pmc, thaw to pmc 2 */
Parrot_PMC_freeze(interp, pmc, rpa);
Parrot_PMC_thaw(interp, pmc2, rpa);
/* Modify pmc to ensure they are not pointing to the same location */
Parrot_PMC_set_integer_native(interp, pmc, 1000);
Parrot_printf(interp,"%P\n", pmc);
Expand All @@ -160,6 +161,20 @@ CODE
Done!
OUTPUT

extend_vtable_output_is(<<'CODE', <<'OUTPUT', "Parrot_PMC_get_iter");
Parrot_PMC_set_integer_native(interp, pmc, 42);
Parrot_PMC_set_integer_native(interp, pmc2, 99);
Parrot_PMC_push_pmc(interp, rpa, pmc);
Parrot_PMC_push_pmc(interp, rpa, pmc2);
pmc3 = Parrot_PMC_get_iter(interp, rpa);
Parrot_printf(interp,"Great Scott!\n", pmc2);
/* TODO: Improve this test */
CODE
Great Scott!
Done!
OUTPUT

extend_vtable_output_is(<<'CODE', <<'OUTPUT', "Parrot_PMC_clone");
Parrot_PMC_set_integer_native(interp, pmc, 42);
pmc2 = Parrot_PMC_clone(interp, pmc);
Expand Down

0 comments on commit 659a75f

Please sign in to comment.