[View] [Edit] [Lock] [References] [Attachments] [History] [Home] [Changes] [Search] [Help]
test[s8] deep calls
We want to test here cases of execution w/deep calling chains
"Recursive call to aBlock"
| aBlock |
aBlock := [:i :max|
self print: $> ,i.
i < max ifTrue: [ aBlock value: i + 1 value: max ].
self print: $< ,i.
].
1 to: 100 by: 20 do: [:count|
self print: 'max = ',count.
aBlock value: 1 value: count
].
#done
"Executing a complex block. WARNING: Application can crash if executing on JavascriptCore VM (distributed by Apple)."
| aBlock |
aBlock :=
[self print: 1.
[self print: 2.
[self print: 3.
[self print: 4.
[self print: 5.
[self print: 6.
[self print: 7.
[self print: 8.
[self print: 9.
[self print: 10.
[self print: 11.
[self print: 12.
[self print: 13.
[self print: 14.
[self print: 15.
self print: '---------'.
self print: -15 ] value.
self print: -14 ] value.
self print: -13 ] value.
self print: -12 ] value.
self print: -11 ] value.
self print: -10 ] value.
self print: -9 ] value.
self print: -8 ] value.
self print: -7 ] value.
self print: -6 ] value.
self print: -5 ] value.
self print: -4 ] value.
self print: -3 ] value.
self print: -2 ] value.
self print: -1 ].
self print: '// execution of complex block has taken ' ,aBlock ms ,'ms.'.