[Pkg] The Trunk: CollectionsTests-eem.251.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Sep 25 18:35:43 UTC 2015


Eliot Miranda uploaded a new version of CollectionsTests to project The Trunk:
http://source.squeak.org/trunk/CollectionsTests-eem.251.mcz

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

Name: CollectionsTests-eem.251
Author: eem
Time: 25 September 2015, 11:35:30.23 am
UUID: 28351c02-3f12-449e-8d40-bcae2557b843
Ancestors: CollectionsTests-ul.250

Add a test for at:ifAbsent:ifPresentPut:

=============== Diff against CollectionsTests-ul.250 ===============

Item was added:
+ ----- Method: DictionaryTest>>testAtIfPresentIfAbsentPut (in category 'basic tests') -----
+ testAtIfPresentIfAbsentPut
+ 	"Test at:ifPresent:ifAbsentPut:"
+ 	| dict present absent |
+ 	dict := Dictionary new.
+ 	present := absent := false.
+ 	self assert: (dict at: #foo ifPresent:[:v| present := true. v] ifAbsentPut:[absent := true. #present])
+ 		equals: #present.
+ 	self deny: present.
+ 	self assert: absent.
+ 
+ 	present := absent := false.
+ 	self assert: (dict at: #foo ifPresent:[:v| present := true. v] ifAbsentPut:[absent := true. #absent])
+ 		equals: #present.
+ 	self assert: present.
+ 	self deny: absent.!



More information about the Packages mailing list