[squeak-dev] The Trunk: Tests-eem.89.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Aug 15 03:18:10 UTC 2010


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

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

Name: Tests-eem.89
Author: eem
Time: 14 August 2010, 8:17:53.526 pm
UUID: ef8ac6e8-4fc4-4b18-ae61-9b91f310328f
Ancestors: Tests-ar.88

Tests to check that whether a block is optimized or not a
block-local temp should be nil at the start of each
evaluation of the block.

=============== Diff against Tests-ar.88 ===============

Item was added:
+ ----- Method: ClosureCompilerTest>>testOptimizedBlockLocalNilling1 (in category 'tests') -----
+ testOptimizedBlockLocalNilling1
+ 	"Whether a block is optimized or not a block-local temp
+ 	 should be nil at the start of each evaluation of the block."
+ 
+ 	1 to: 3 do: [:i| | j |
+ 		self assert: j isNil.
+ 		j := i + 1.
+ 		self assert: j isNil not]!

Item was added:
+ ----- Method: ClosureCompilerTest>>testOptimizedBlockLocalNilling2 (in category 'tests') -----
+ testOptimizedBlockLocalNilling2
+ 	"Whether a block is optimized or not a block-local temp
+ 	 should be nil at the start of each evaluation of the block."
+ 
+ 	1 to: 6 do: [:i| | j k |
+ 		self assert: j isNil.
+ 		self assert: k isNil.
+ 		i even
+ 			ifTrue: [j := i + 2]
+ 			ifFalse: [k := i + 1].
+ 		self assert: (j isNil or: [k isNil]).
+ 		self assert: (j isNil not or: [k isNil not])]!




More information about the Squeak-dev mailing list