Nicolas Cellier uploaded a new version of CollectionsTests to project The Trunk:
http://source.squeak.org/trunk/CollectionsTests-nice.102.mcz==================== Summary ====================
Name: CollectionsTests-nice.102
Author: nice
Time: 6 October 2009, 2:27:42 am
UUID: 0c9bd0bb-c540-1e4c-93eb-af80996dd95a
Ancestors: CollectionsTests-nice.101
Test for
http://bugs.squeak.org/view.php?id=7258Dictionary asSet does not behave like a Set
=============== Diff against CollectionsTests-nice.101 ===============
Item was added:
+ ----- Method: DictionaryTest>>testAsSet (in category 'tests') -----
+ testAsSet
+ "Non regression test for
http://bugs.squeak.org/view.php?id=7258"
+
+ | aDictionary aSet assoc0 assoc1 |
+
+ "Create a dictionary"
+ aDictionary := Dictionary new.
+
+ "Convert it to a Set"
+ aSet := aDictionary asSet.
+
+ "Add two associations to it"
+ assoc0 := #first -> 0.
+ assoc1 := #first -> 1.
+ aSet add: assoc0 copy; add: assoc1.
+
+ "Check if the two associations were added (that should happen if they are different)"
+ self
+ assert: (assoc0 copy ~= assoc1) ==> (aSet size > 1)
+ description:
+ 'When adding two different elements, the set size should be greater than one'!