equal
deleted
inserted
replaced
1 "{ Package: 'exept:regression' }" |
1 "{ Package: 'exept:regression' }" |
2 |
2 |
3 "{ NameSpace: RegressionTests }" |
3 "{ NameSpace: RegressionTests }" |
4 |
4 |
5 Object subclass:#EnumerationTests |
5 TestCase subclass:#EnumerationTests |
6 instanceVariableNames:'' |
6 instanceVariableNames:'' |
7 classVariableNames:'' |
7 classVariableNames:'' |
8 poolDictionaries:'' |
8 poolDictionaries:'' |
9 category:'tests-Regression' |
9 category:'tests-Regression' |
10 ! |
10 ! |
31 " |
31 " |
32 self testArrayKeysAndValuesDo |
32 self testArrayKeysAndValuesDo |
33 " |
33 " |
34 ! ! |
34 ! ! |
35 |
35 |
|
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 |
36 !EnumerationTests class methodsFor:'documentation'! |
59 !EnumerationTests class methodsFor:'documentation'! |
37 |
60 |
38 version |
61 version |
39 ^ '$Header$' |
62 ^ '$Header$' |
40 ! ! |
63 ! ! |