[squeak-dev] The Trunk: CollectionsTests-eem.219.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Jul 16 22:44:39 UTC 2014


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

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

Name: CollectionsTests-eem.219
Author: eem
Time: 16 July 2014, 3:43:48.337 pm
UUID: 308275d9-8274-498f-9556-09f2e0d63367
Ancestors: CollectionsTests-nice.218

Fix DictionaryTest>>testKeyAtValue for hashing (i.e. Spur)

=============== Diff against CollectionsTests-nice.218 ===============

Item was changed:
  ----- Method: DictionaryTest>>testKeyAtValue (in category 'keys and value tests') -----
  testKeyAtValue
  	"self run: #testKeyAtValue"
  	"self debug: #testKeyAtValue"
  	
  	| dict |
  	dict := Dictionary new.
  	dict at: #a put: 1.
  	dict at: #b put: 2.
  	dict at: #c put: 1.
  	
  	self assert: (dict keyAtValue: 2) = #b.
+ 	"which ever is answered depends on hashing, and hashing is improved in Spur."
+ 	self assert: ((dict keyAtValue: 1) = #a or: [(dict keyAtValue: 1) = #c]).
+ 	"ugly may be a bug, why not have a set #a and #c?  cuz that would be keys at value."
- 	self assert: (dict keyAtValue: 1) = #c.
- 	"ugly may be a bug, why not having a set #a and #c"
  	
  	self should: [dict keyAtValue: 0] raise: Error
  	
  	
  !



More information about the Squeak-dev mailing list