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

commits at source.squeak.org commits at source.squeak.org
Tue Dec 28 19:13:54 UTC 2021


Christoph Thiede uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-ct.469.mcz

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

Name: Tests-ct.469
Author: ct
Time: 28 December 2021, 8:13:34.591042 pm
UUID: ac809cfa-0a36-c544-a095-98df2324cd30
Ancestors: Tests-ct.468, Tests-ct.447, Tests-ct.465

Merges some new and revised tests.

Tests-ct.447:
	Supplements BecomeTest.
	- Added #testBecomeForwardIdentityAndHash to have a test for the classical primitiveArrayBecomeOneWay (primitive 72) again.
	Revision: Removed changes that were already integrated via Tests-nice.458.

Tests-ct.465:
	Adds regression test for a bug in Environment >> #removeKey:ifAbsent:.

=============== Diff against Tests-ct.468 ===============

Item was added:
+ ----- Method: BecomeTest>>testBecomeForwardIdentityAndHash (in category 'tests') -----
+ testBecomeForwardIdentityAndHash
+ 	"Check that
+ 		1. the argument to becomeForward: is NOT modified to have the receiver's identity hash.
+ 		2. the receiver's identity hash is unchanged."
+ 
+  	| a b ha |
+ 	a := 'ab' copy.
+ 	b := 'cd' copy.
+ 	ha := a identityHash.
+ 	
+ 	{a} elementsForwardIdentityAndHashTo: {b}.
+ 	
+ 	self 
+ 		assert: ha equals: a identityHash;
+ 		assert: ha equals: b identityHash.!

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