Andreas Raab uploaded a new version of CollectionsTests to project The Trunk:
http://source.squeak.org/trunk/CollectionsTests-ar.171.mcz==================== Summary ====================
Name: CollectionsTests-ar.171
Author: ar
Time: 24 August 2010, 8:20:38.67 pm
UUID: cd8f7278-49e6-3b44-a970-fe5987018864
Ancestors: CollectionsTests-nice.170
Tests for #addAll: and #withAll: using collections of associations.
=============== Diff against CollectionsTests-nice.170 ===============
Item was added:
+ ----- Method: DictionaryTest>>testWithAll (in category 'tests') -----
+ testWithAll
+
+ | dict1 dict2 |
+ dict1 := Dictionary withAll: {#a -> 1. #b -> 2}.
+ self assert: (dict1 at: #a) = 1.
+ self assert: (dict1 at: #b) = 2.
+
+ dict2 := Dictionary withAll: dict1.
+ self assert: (dict2 at: #a) = 1.
+ self assert: (dict2 at: #b) = 2.
+ !
Item was changed:
----- Method: DictionaryTest>>testAddAll (in category 'tests') -----
testAddAll
| dict1 dict2 |
dict1 := Dictionary new.
dict1 at: #a put:1 ; at: #b put: 2.
dict2 := Dictionary new.
dict2 at: #a put: 3 ; at: #c put: 4.
dict1 addAll: dict2.
self assert: (dict1 at: #a) = 3.
self assert: (dict1 at: #b) = 2.
+ self assert: (dict1 at: #c) = 4.
+
+ dict1 := Dictionary new.
+ dict1 at: #a put:1 ; at: #b put: 2.
+ dict1 addAll: {#a -> 3. #c -> 4}.
+ self assert: (dict1 at: #a) = 3.
+ self assert: (dict1 at: #b) = 2.
self assert: (dict1 at: #c) = 4.!