[squeak-dev] The Trunk: Tests-cwp.289.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Jan 18 15:51:17 UTC 2014


Colin Putney uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-cwp.289.mcz

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

Name: Tests-cwp.289
Author: cwp
Time: 18 January 2014, 10:50:01.498 am
UUID: 28b6ff3d-54c9-472c-9277-244dad8c45f3
Ancestors: Tests-fbs.288

Add undeclared tests for Environment.

=============== Diff against Tests-fbs.288 ===============

Item was added:
+ ----- Method: EnvironmentTest>>testUndeclareAgain (in category 'binding tests') -----
+ testUndeclareAgain
+ 	| one two |
+ 	one := env undeclare: #Griffle.
+ 	two := env undeclare: #Griffle.
+ 	self assert: one == two.!

Item was added:
+ ----- Method: EnvironmentTest>>testUndeclareFromConflict (in category 'binding tests') -----
+ testUndeclareFromConflict
+ 	| one pool three two |
+ 	pool := IdentityDictionary new.
+ 	pool at: #Griffle put: value.
+ 	one := pool bindingOf: #Griffle.
+ 	two := env undeclare: #Griffle.
+ 	three := env undeclare: #Griffle from: pool.
+ 	self assert: three == two description: 'Existing binding is reused'.
+ 	self assert: three == one description: 'Pool binding is forwarded'.
+ 	self assert: Global equals: three class description: 'Type of binding'.
+ 	!

Item was added:
+ ----- Method: EnvironmentTest>>testUndeclareFromEmpty (in category 'binding tests') -----
+ testUndeclareFromEmpty
+ 	| binding |
+ 	binding := env undeclare: #Griffle from: IdentityDictionary new.
+ 	self assert: Global equals: binding class description: 'Type of binding'.
+ 	self assert: nil equals: binding value description: 'Value of binding'.!

Item was added:
+ ----- Method: EnvironmentTest>>testUndeclareFromRemovesOld (in category 'binding tests') -----
+ testUndeclareFromRemovesOld
+ 	| pool |
+ 	pool := IdentityDictionary new.
+ 	pool at: #Griffle put: value.
+ 	env undeclare: #Griffle from: pool.
+ 	self 
+ 		assert: false 
+ 		equals: (pool includesKey: #Griffle) 
+ 		description: 'Existing binding is removed'.
+ 	!



More information about the Squeak-dev mailing list