[perl #60600] [PATCH] rewrite of ops.t to PIR

Christoph Otto via RT parrotbug-followup at parrotcode.org
Mon Nov 17 20:23:04 UTC 2008


On Sun Nov 16 19:47:36 2008, stockwellb wrote:
> rewrite of t/oo/ops.t to PIR.
> 
>  ops.t |  265
> ++++++++++++++++++++++++++++++++----------------------------------
>  1 file changed, 130 insertions(+), 135 deletions(-)
> 

In op_get_class_p_p, it looks like you switch from "Ape" to "Monkey"
when getting the class from a namespace.  I can't picture this causing
any problems, but it's a good idea to keep the subs as self-contained as
possible.  As changing "Monkey" to "Ape" in that sub doesn't cause any
failures, is there any reason not to do so?

Also, tests should be very explicit about which exception type(s)
they're catching.  This keeps other incidental exceptions from masking
bugs.  The first test in t/pmc/ro.t is a good example of what to do. 
You can find the exception type by acking Parrot for the exception's
message.

Other than that, the patch looks good.  Make those changes and I'll be
glad to apply it.

Christoph


More information about the parrot-dev mailing list