Subject: | Fails test comparing floating point numbers |
This report from one of my smokers indicates a typical mistake that gets exposed when the target system has a different floating point setting:
http://www.cpantesters.org/cpan/report/87123642
Here is what caught my attention:
not ok 2 - update (id in url) with json postdata
# Failed test 'update (id in url) with json postdata'
# at t/view/postdata.t line 78.
# Structures begin differing at:
# $got->[0]{float_dummy} = '42.7000000000000028'
# $expected->[0]{float_dummy} = '42.7'
Floating point numbers really always ought to be compared with an epsilon difference being allowed.
As can be seen further down on that report, the target system has uselongdouble=define.
I haven't tried, but the fix should be trivial if the code used Test::Number::Delta.
HTH&&Thanks,