72
|
1 |
"{ Package: 'exept:regression' }"
|
|
2 |
|
95
|
3 |
"{ NameSpace: RegressionTests }"
|
|
4 |
|
207
|
5 |
TestCase subclass:#EnumerationTests
|
72
|
6 |
instanceVariableNames:''
|
|
7 |
classVariableNames:''
|
|
8 |
poolDictionaries:''
|
181
|
9 |
category:'tests-Regression'
|
72
|
10 |
!
|
|
11 |
|
|
12 |
|
|
13 |
!EnumerationTests class methodsFor:'tests'!
|
|
14 |
|
|
15 |
testArrayKeysAndValuesDo
|
|
16 |
"test GC while enumerating an array"
|
|
17 |
|
|
18 |
|a|
|
|
19 |
|
|
20 |
a := (1 to:100) asArray.
|
|
21 |
|
|
22 |
10 timesRepeat:[
|
95
|
23 |
a keysAndValuesDo:[:index :val |
|
|
24 |
ObjectMemory scavenge.
|
|
25 |
index printString.
|
|
26 |
ObjectMemory scavenge.
|
|
27 |
val printString.
|
|
28 |
]
|
72
|
29 |
]
|
|
30 |
|
|
31 |
"
|
|
32 |
self testArrayKeysAndValuesDo
|
|
33 |
"
|
|
34 |
! !
|
|
35 |
|
207
|
36 |
!EnumerationTests methodsFor:'tests'!
|
|
37 |
|
|
38 |
testArrayKeysAndValuesDo
|
|
39 |
"test GC while enumerating an array"
|
|
40 |
|
|
41 |
|a|
|
|
42 |
|
|
43 |
a := (1 to:100) asArray.
|
|
44 |
|
|
45 |
10 timesRepeat:[
|
|
46 |
a keysAndValuesDo:[:index :val |
|
|
47 |
ObjectMemory scavenge.
|
|
48 |
index printString.
|
|
49 |
ObjectMemory scavenge.
|
|
50 |
val printString.
|
|
51 |
]
|
|
52 |
]
|
|
53 |
|
|
54 |
"
|
|
55 |
self testArrayKeysAndValuesDo
|
|
56 |
"
|
|
57 |
! !
|
|
58 |
|
72
|
59 |
!EnumerationTests class methodsFor:'documentation'!
|
|
60 |
|
|
61 |
version
|
|
62 |
^ '$Header$'
|
|
63 |
! !
|