https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8028

Sidney Markowitz <sid...@sidney.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #9 from Sidney Markowitz <sid...@sidney.com> ---
I verified that with DBD::SQLite in perl with uselongdouble if you write the
value -2.4 to a field that is declared either float or double (SQLIte
internally uses single float for both of those) when you fetch the value back
into a perl variable it is -2.39999999999999991. This is not strictly speaking
a bug, it is a loss of precision going between double and single float, and it
is not off by enough to make any difference when running SpamAssassin.

All that is broken is the test itself, which is looking for the exact result
"-2.4" in a line of dbg output, not even in expected normal SpamAssassin
output.

I've fixed it by making the dbg line use %.1f instead of %s so the output is in
a known rounded format, and having the test look for that format in all its
test cases.

trunk % svn ci -m "bug 8028 - Fix tests that failed when run in perl built with
uselongdouble that was not a SpamAssassin bug"
lib/Mail/SpamAssassin/SQLBasedAddrList.pm t/sql_based_w*.t 
Sending        lib/Mail/SpamAssassin/SQLBasedAddrList.pm
Sending        t/sql_based_welcomelist.t
Sending        t/sql_based_whitelist.t
Transmitting file data ...done
Committing transaction...
Committed revision 1903510.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to