[squeak-dev] The Trunk: CollectionsTests-mt.239.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Apr 19 11:01:18 UTC 2015


Marcel Taeumel uploaded a new version of CollectionsTests to project The Trunk:
http://source.squeak.org/trunk/CollectionsTests-mt.239.mcz

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

Name: CollectionsTests-mt.239
Author: mt
Time: 19 April 2015, 1:01:10.58 pm
UUID: c39da1b2-463a-c246-bc59-e477d70a8db6
Ancestors: CollectionsTests-tfel.238

Tests added for #with:do: and #with:collect:.

=============== Diff against CollectionsTests-tfel.238 ===============

Item was added:
+ ----- Method: SequenceableCollectionTest>>testWithCollect (in category 'tests - enumerating') -----
+ testWithCollect
+ 
+ 	| c1 c2 |
+ 	c1 := #(1 2 3).
+ 	c2 := #(4 5 6).
+ 
+ 	self assert: #(4 10 18) equals: (c1 with: c2 collect: [:a :b | a * b]).!

Item was added:
+ ----- Method: SequenceableCollectionTest>>testWithDo (in category 'tests - enumerating') -----
+ testWithDo
+ 
+ 	| c1 c2 i |
+ 	c1 := #(1 2 3).
+ 	c2 := #(a b).
+ 
+ 	self
+ 		should: [c1 with: c2 do: [:ea1 :ea2 | ] ]
+ 		raise: Error.
+ 
+ 	c2 := #(a b c).
+ 	i := 0.
+ 	c1 with: c2 do: [:number :letter |
+ 		i := i + 1.
+ 		self assert: (c1 at: i) equals: number.
+ 		self assert: (c2 at: i) equals: letter].!



More information about the Squeak-dev mailing list