Ticket #1343 (closed todo: fixed)
parrot's Test::More's is(PMC,Float), with precision
Reported by: | coke | Owned by: | coke |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | none | Version: | trunk |
Severity: | medium | Keywords: | |
Cc: | Language: | ||
Patch status: | Platform: |
Description
This option needs better docs in the pod. (specifically, what do you pass in?)
It's defined as a pmc type, but is cast to num and used that way - should probably just be declared as a num type. [0]
Also, when passed, the floats are still compared with iseq first; I would suggest that if we're declaring we want it, we should avoid the direct comparison and just check the diff.
[0](This actually seems to be a common theme with many options across several test::more subs- e.g. is :multi(PMC,Float), but the float parameter is declared as a .pmc, and then cast to a .num - also, many uses of _make_diagnostic first cast the passed in args to string, despite the fact that the sub declares the parameters as string itself)