Ticket #969 (closed patch: done)

Opened 5 years ago

Last modified 5 years ago

Convert t/pmc/float.t to PIR

Reported by: flh Owned by: dukeleto
Priority: normal Milestone:
Component: testing Version: trunk
Severity: medium Keywords:
Cc: Language:
Patch status: applied Platform:

Description

The attached patch rewrites t/pmc/float.t in PIR.

This version does not use "print" anymore to test for a negative zero: is the todo related to TT#313 still relevant?

Attachments

float.t_to_pir.patch Download (48.9 KB) - added by flh 5 years ago.

Change History

in reply to: ↑ description   Changed 5 years ago by bacek

Replying to flh:

The attached patch rewrites t/pmc/float.t in PIR. This version does not use "print" anymore to test for a negative zero: is the todo related to TT#313 still relevant?

Yes, it's still relevant. You can implement it using "todo" from parrot's Test::More

-- Bacek

Changed 5 years ago by flh

  Changed 5 years ago by flh

Patch updated. I had forgotten to remove a #TODO I had left for myself.

bacek: the test is todoed, I was just wondering whether this todo was still necessary or not.

By the way, the "divide by zero" test in the Perl version looked wrong, because it used something like:

$P1 = new ['Float']
$P1 = "0.0"

This doesn't create a Float PMC with value 0.0, but a String PMC with the string value "0.0" (scalar PMCs automagically morph to the right type when we set their value).

  Changed 5 years ago by dukeleto

  • owner set to dukeleto

  Changed 5 years ago by dukeleto

  • status changed from new to closed
  • resolution set to done
  • patch changed from new to applied

Applied as r41097, thanks flh++ !

Note: See TracTickets for help on using tickets.