Levente Uzonyi uploaded a new version of CollectionsTests to project The Trunk:
http://source.squeak.org/trunk/CollectionsTests-ul.126.mcz==================== Summary ====================
Name: CollectionsTests-ul.126
Author: ul
Time: 23 December 2009, 12:21:47 pm
UUID: 6fa99e01-424a-974f-820f-aa0157e4e0ec
Ancestors: CollectionsTests-nice.125
- test for SortedCollection's #sort and #sort:
=============== Diff against CollectionsTests-nice.125 ===============
Item was added:
+ ----- Method: SortedCollectionTest>>testSort (in category 'tests - sorting') -----
+ testSort
+
+ | s |
+ s := SortedCollection withAll: #(3 2 1).
+ self assert: s asArray = #(1 2 3).
+ s sort: #>=. "This should change the sortBlock too"
+ self assert: s asArray = #(3 2 1).
+ s add: 4.
+ self assert: s asArray = #(4 3 2 1).
+ s := SortedCollection new
+ sortBlock: #>=;
+ addAll: #(1 2 3);
+ yourself.
+ self assert: s asArray = #(3 2 1).
+ s sort.
+ self assert: s asArray = #(1 2 3).
+ s add: 0.
+ self assert: s asArray = #(0 1 2 3)!