new tests and fixes for Number>>printShowingDecimalPlaces: submitted to Mantis

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

new tests and fixes for Number>>printShowingDecimalPlaces: submitted to Mantis

Frank Sergeant-2
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