The Trunk: CollectionsTests-nice.244.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: CollectionsTests-nice.244.mcz

commits-2
Nicolas Cellier uploaded a new version of CollectionsTests to project The Trunk:
http://source.squeak.org/trunk/CollectionsTests-nice.244.mcz

==================== Summary ====================

Name: CollectionsTests-nice.244
Author: nice
Time: 6 May 2015, 11:09:57.558 pm
UUID: 57fdcf9f-1ab0-45ee-873b-7117f527efbc
Ancestors: CollectionsTests-mt.243

Test Dictionary replace:

=============== Diff against CollectionsTests-mt.243 ===============

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.!