Nicolas Cellier uploaded a new version of CollectionsTests to project The Trunk:
http://source.squeak.org/trunk/CollectionsTests-nice.354.mcz==================== Summary ====================
Name: CollectionsTests-nice.354
Author: nice
Time: 3 March 2021, 3:26:41.90262 pm
UUID: 497e2be2-d971-624c-8e34-6ef22558b53e
Ancestors: CollectionsTests-nice.353, CollectionsTests-nice.244
Merge CollectionsTests-nice.244 (test Dictionary replace:)
=============== Diff against CollectionsTests-nice.353 ===============
Item was added:
+ ----- Method: DictionaryTest>>testReplace (in category 'testing') -----
+ testReplace
+ | dict expected |
+ {Dictionary. IdentityDictionary} do: [:class |
+ dict := class newFromPairs:{
+ #first. 1.
+ #second. 2.
+ #third. 3.
+ #fourth. 4.
+ #fifth. 5.
+ }.
+ dict replace: [:each | each asWords].
+ expected := class newFromPairs:{
+ #first. 'one'.
+ #second. 'two'.
+ #third. 'three'.
+ #fourth. 'four'.
+ #fifth. 'five'.
+ }.
+ self assert: dict = expected].!
Item was added:
+ ----- Method: OrderedDictionaryTest>>testReplace (in category 'tests') -----
+ testReplace
+ | dict expected k |
+ dict := OrderedDictionary newFromPairs:{
+ #first. 13.
+ #second. 12.
+ #third. 11.
+ #fourth. 15.
+ #fifth. 14.
+ }.
+ k := 0.
+ dict replace: [:each | k := k + 1].
+ expected := OrderedDictionary newFromPairs:{
+ #first. 1.
+ #second. 2.
+ #third. 3.
+ #fourth. 4.
+ #fifth. 5.
+ }.
+ self assert: dict = expected.!