Ticket #1999 (new bug) — at Initial Version

Opened 11 years ago

Last modified 11 years ago

Parrot_PMC_get_pmc : Does it work correctly?

Reported by: dukeleto Owned by:
Priority: normal Milestone:
Component: none Version: 3.0.0
Severity: medium Keywords:
Cc: Language:
Patch status: Platform: all

Description

I added the following test here

 https://github.com/parrot/parrot/commit/ac2ad789fc094d33a9db1f984e85ed100047be49

# TODO: Is this test correct?
extend_vtable_output_is(<<'CODE', <<'OUTPUT', "Parrot_PMC_get_pmc");
    Parrot_PMC_set_integer_native(interp, pmc, 42);
    Parrot_PMC_push_pmc(interp, rpa, pmc);
    Parrot_PMC_push_pmc(interp, rpa, pmc);
    Parrot_PMC_push_pmc(interp, rpa, pmc);

    pmc3 = Parrot_PMC_get_iter(interp, rpa);
    pmc2 = Parrot_PMC_get_pmc(interp, pmc3);
    Parrot_printf(interp,"%P\n", pmc2);
CODE
3
Done!
OUTPUT

It currently passed, but is it correct? i.e. If get_pmc is called on a RPA iterator, should it return the number of elements in the RPA?

Note: See TracTickets for help on using tickets.