[Seaside-dev] Troubles with WANumberPrinter>>printFloat:on:

Lukas Renggli renggli at gmail.com
Thu Jun 4 19:20:09 UTC 2009


> It solves all but two:
>
> WAPrinterTest>>testFloatPrinter fails doing
>   self assert: (convert print: 0.99) = '0.99'
>
> The resulting output is '0.98'

Bummer.

> WAPrinterTest>>testFloatPrinterSeparator fails doing
>   self assert: (converter print: 12345.67890) = '12!345.678!9'
>
> The resulting output is '12!345.679!6'

I see that number is too large for a 32-bit float.

I can test it in two parts, then it probably works.

Name: Seaside-Tests-Platform-lr.78
Author: lr
Time: 4 June 2009, 9:19:48 pm
UUID: ea7d3ecc-c108-4bf0-9e59-6169f9f904fc
Ancestors: Seaside-Tests-Platform-lr.77

- try to use smaller floats in tests, so that they also fit in 32 bits

-- 
Lukas Renggli
http://www.lukas-renggli.ch


More information about the seaside-dev mailing list