Commit Graph

3 Commits

Author SHA1 Message Date
Xavier Morel 01897c8aa6 [FIX] completely broken float formatting when leading 0
Formatting converted the decimal part into an integer, dropping all
leading 0s and failing to reinsert them.

The conversion also lead to compounded errors, casting 0.1100 into
0.10999 (something like that).

Replace this by a straight float formatting via _.sprintf and the
slicing of the decimal part from the resulting string (Math.abs and %1
clamp the value to format to the [0, 1[ range, ensuring we just need
to slice off the first two characters). Also add some tests.

lp bug: https://launchpad.net/bugs/879355 fixed

bzr revid: xmo@openerp.com-20111021120741-813im5bzup7vho1f
2011-10-21 14:07:41 +02:00
Xavier Morel 4da3e5d354 [FIX] tests runner: changed file names
bzr revid: xmo@openerp.com-20111021115018-0qbmhwhcjmckco0w
2011-10-21 13:50:18 +02:00
Antony Lesuisse bedfc48dcf rename base into web part1
bzr revid: al@openerp.com-20110905110309-egx167t1ni1fzho1
2011-09-05 13:03:09 +02:00