[squeak-dev] The Trunk: Tests-ct.465.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Apr 27 14:13:01 UTC 2022


Marcel Taeumel uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-ct.465.mcz

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

Name: Tests-ct.465
Author: ct
Time: 18 September 2021, 3:48:23.531191 pm
UUID: 482a8de2-b171-b341-a16c-cb047f6c42fa
Ancestors: Tests-eem.464

Adds regression test for a bug in Environment >> #removeKey:ifAbsent:.

Make sure that the previous value of the binding is returned regardless of what the binding policies might do with it during removal.

See: http://lists.squeakfoundation.org/pipermail/squeak-dev/2021-August/216287.html

=============== Diff against Tests-eem.464 ===============

Item was changed:
  ----- Method: EnvironmentTest>>testRemoveKey (in category 'tests - compatibility') -----
  testRemoveKey
  	"For compatibility with legacy code, environments 
  	should implement the dictionary protocol."
  
+ 	env importSelf. "undeclaring the binding via a binding policy while removing it must not affect the return value of #removeKey:."
+ 	env at: #Griffle put: self.
+ 	self
+ 		assert: self
+ 		equals: (env removeKey: #Griffle).
+ 	self
+ 		should: [env removeKey: #Griffle]
- 	self 
- 		should: [env removeKey: #Griffle] 
  		raise: KeyNotFound.!



More information about the Squeak-dev mailing list