The Trunk: KernelTests-nice.374.mcz

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

The Trunk: KernelTests-nice.374.mcz

commits-2
Nicolas Cellier uploaded a new version of KernelTests to project The Trunk:
http://source.squeak.org/trunk/KernelTests-nice.374.mcz

==================== Summary ====================

Name: KernelTests-nice.374
Author: nice
Time: 8 March 2020, 11:48:10.076514 am
UUID: 2d31b0b7-c694-4212-bd8f-65e64c84a0f8
Ancestors: KernelTests-nice.373

Raise the requirements for closeTo:

1) we expect a symmetric relation:
if I am close to aNumber, then aNumber is close to me.

2) we expect a respect of basic order relation:
if I am close to the furthest number, I should be close to the nearest too!

=============== Diff against KernelTests-nice.373 ===============

Item was added:
+ ----- Method: FloatTest>>testCloseToFurthestCloseToNeasrest (in category 'tests - compare') -----
+ testCloseToFurthestCloseToNeasrest
+ | x nearest furthest |
+ x := 1.0e-6.
+ nearest := 1.0e-7.
+ furthest := 0.0.
+ self assert: (x - nearest) abs < (x - furthest) abs.
+ self assert: (x closeTo: furthest) ==> (x closeTo: nearest)!

Item was added:
+ ----- Method: FloatTest>>testCloseToIsSymmetric (in category 'tests - compare') -----
+ testCloseToIsSymmetric
+ self assert: ((1<<2000) reciprocal closeTo: 1.0e-6) equals: (1.0e-6 closeTo: (1<<2000) reciprocal)!