[ENH] testing for almost equal numerical results

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

[ENH] testing for almost equal numerical results

espin
Hi all,
I added a SUnit method to be able to compare numerical values up to
a certain precision in unit tests.
This exist in PyUnit [1], so given I needed it, I added it in Squeak

Core developers, should you find it useful for the community, please include it in Trunk.
Thanks in advance
Bye
Enrico

[1] TestCase.assertAlmostEqual(firstsecond[places[msg]])
--
Enrico Spinielli
"Do Androids dream of electric sheep?"— Philip K. Dick
"Hear and forget; see and remember;do and understand."—Mitchel Resnick



TestCase-assertalmostEqualsupto.st (606 bytes) Download Attachment