The Trunk: Tests-eem.89.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Tests-eem.89.mcz

commits-2
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])]!