Excellent! Thanks! Cheers, Alexandre On 26 Jul 2010, at 10:29, Marcus Denker wrote:
On Jul 26, 2010, at 10:24 AM, Alexandre Bergel wrote:
Hi!
In one of my test, I want to check the equality of an array of floats. The following goes yellow: self assert: (service outgoingLinks collect: #bandwidth) asArray = #(0.876846926482685 14.7478812578828).
But this one goes green: self assert: (service outgoingLinks collect: #bandwidth) asArray printString = '#(0.876846926482685 14.7478812578828)' .
Any idea how I can avoid a conversion to strings?
there is a method #closeTo: on Float that compares in a way that should be ok for tests like this.
Marcus
-- Marcus Denker -- http://www.marcusdenker.de INRIA Lille -- Nord Europe. Team RMoD.
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.