Nicolas Cellier uploaded a new version of CollectionsTests to project The Trunk:
http://source.squeak.org/trunk/CollectionsTests-nice.124.mcz==================== Summary ====================
Name: CollectionsTests-nice.124
Author: nice
Time: 22 December 2009, 4:33:33 am
UUID: e5d2de9b-fa6c-be41-ac47-ab74041cd59d
Ancestors: CollectionsTests-nice.123
Non regression tests from
http://bugs.squeak.org/view.php?id=6456Another fuzzy inclusion test
self deny: ((1.0 to: 3.0 by: 1.0 successor) includes: 3.0).
=============== Diff against CollectionsTests-nice.123 ===============
Item was added:
+ ----- Method: IntervalTest>>testInclusion (in category 'tests') -----
+ testInclusion
+ "Non regression test for another bug of fuzzy inclusion"
+
+ self deny: ((1.0 to: 3.0 by: 1.0 successor) includes: 3.0) description: 'The last element of this Interval is closed to 2'!
Item was added:
+ ----- Method: IntervalTest>>testInfiniteLoopBug6456 (in category 'tests') -----
+ testInfiniteLoopBug6456
+ "This is a non regression test against mantis bug #6456.
+ Some Float interval size was not consistent with do: loop.
+ Some Float Interval used to do: infinite loops"
+
+ | x interval counter size |
+ x := (1.0 timesTwoPower: Float precision). "Note: x+1 = x due to inexact arithmetic"
+ interval := x to: x+4.
+ size := interval size.
+ counter := 0.
+ interval do: [:each | self assert: (counter := counter + 1) <= size].!