new tests and fixes for Number>>printShowingDecimalPlaces:
submitted to Mantis
Frank Sergeant
frank at pygmy.utoh.org
Fri Dec 15 03:34:41 UTC 2006
In 3.9, I noticed several problems with Number>>printShowingDecimalPlaces:
1. negative numbers greater than -1 fail to show minus sign, e.g.
-0.98 printShowingDecimalPlaces: 2 ==> '0.98'
2. rounding is screwy in some cases, e.g.
2.567 printShowingDecimalPlaces: 2 ==> '2.56'
3. method category is 'converting' but should be 'printing'.
I added tests for the first two above and changed
#printShowingDecimalPlaces: so it passes the new tests in NumberTest
and still passes the previous tests.
See id 0005640 on Mantis
http://bugs.impara.de/view_all_bug_page.php
--
Frank
More information about the Squeak-dev
mailing list
|