Eliot Miranda uploaded a new version of KernelTests to project The Trunk:
http://source.squeak.org/trunk/KernelTests-eem.217.mcz==================== Summary ====================
Name: KernelTests-eem.217
Author: eem
Time: 28 March 2012, 6:33:27.001 pm
UUID: dc631b68-a4ab-4964-b691-f4092a64aab2
Ancestors: KernelTests-cmm.216
A test for BlockClosure>#once
=============== Diff against KernelTests-cmm.216 ===============
Item was added:
+ ----- Method: BlockClosureTest class>>onceMethod (in category 'support methods') -----
+ onceMethod
+ ^[Object new] once!
Item was added:
+ ----- Method: BlockClosureTest>>testOnce (in category 'tests - evaluating') -----
+ testOnce
+ | objs result |
+ objs := (1 to: 10) collect: [:ign| [Object new] once].
+ self assert: (objs allSatisfy: [:obj| obj == objs first]).
+ result := self class onceMethod.
+ 1 to: 10 do:
+ [:ign|
+ self assert: result == self class onceMethod]!