[m-rev.] write_float_special.exp4

Paul Bone paul at bone.id.au
Thu Aug 21 11:41:15 AEST 2014

On Thu, Aug 21, 2014 at 12:53:56AM +1000, Julien Fischer wrote:
> Hi Zoltan,
> On Wed, 20 Aug 2014, Zoltan Somogyi wrote:
>> On my laptop, the output of the hardcoded/write_float_special test has long been:
>> Inf: inf
>> -Inf: -inf
>> NaN: -nan
>> The expected output does not have the - sign in front of the nan.
>> I don't particularly care about the exact details of how we format non-number
>> numbers, but having a test case always failing is annoying.
>> I think either the MR_is_nan test should be moved earlier in MR_sprintf_float,
>> to before the - is printed, or the output above should be added as tests/
>> hardcoded/write_float_special.exp4, with corresponding .exp[56] for infinity/
>> Infinity. What do others think?
> The former: the profileration of expected outputs for the above (and
> related) test case(s) is already annoying.

I second this.

It also has the potential to reduce problems when reading in Mercury terms
with io.read, parsers won't need to understand -nan.  (Unless there's some
other reason why they should.) 

Paul Bone

More information about the reviews mailing list