author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Wed, 29 Jun 2016 21:40:53 +0100 | |
branch | jv |
changeset 1499 | 26a16a04219b |
parent 1160 | 8dd3ef314aa6 |
child 1500 | d406a10b2965 |
permissions | -rw-r--r-- |
1499
26a16a04219b
Package renamed from exept:regression to stx:goodies/regression. Hooray!
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1160
diff
changeset
|
1 |
"{ Package: 'stx:goodies/regression' }" |
71 | 2 |
|
3 |
"{ NameSpace: RegressionTests }" |
|
4 |
||
99 | 5 |
TestCase subclass:#StackFrameTest |
71 | 6 |
instanceVariableNames:'' |
7 |
classVariableNames:'' |
|
8 |
poolDictionaries:'' |
|
1160 | 9 |
category:'tests-Regression-RuntimeSystem' |
71 | 10 |
! |
11 |
||
12 |
||
99 | 13 |
!StackFrameTest methodsFor:'tests'! |
71 | 14 |
|
145 | 15 |
testUnlimitedStack1 |
16 |
10 timesRepeat:[ |
|
17 |
|a| |
|
18 |
||
19 |
a := Array with:('1' copy) with:('2' copy) with:('3' copy) with:('4' copy) with:('5' copy). |
|
20 |
self unlimitedStackTest1:a. |
|
21 |
true. |
|
22 |
] |
|
23 |
||
24 |
" |
|
25 |
self run:#testUnlimitedStack1 |
|
26 |
" |
|
27 |
! |
|
28 |
||
71 | 29 |
unlimitedStackTest1:anArray |
30 |
" |
|
31 |
[ |
|
32 |
|a| |
|
33 |
||
34 |
a := Array with:'1' copy with:'2' copy with:'3' copy with:'4' copy with:'5' copy. |
|
35 |
self unlimitedStackTest1:a. |
|
36 |
true. |
|
37 |
] whileTrue |
|
38 |
" |
|
39 |
%{ /* UNLIMITEDSTACK */ |
|
40 |
||
41 |
OBJ __returnArray; |
|
42 |
OBJ __symbol; |
|
43 |
OBJ __returnCode; |
|
44 |
||
45 |
if (!__isString(__ArrayInstPtr(anArray)->a_element[0])) { |
|
46 |
printf("OOPS\n"); |
|
47 |
}; |
|
48 |
if (!__isString(__ArrayInstPtr(anArray)->a_element[1])) { |
|
49 |
printf("OOPS\n"); |
|
50 |
}; |
|
51 |
if (!__isString(__ArrayInstPtr(anArray)->a_element[2])) { |
|
52 |
printf("OOPS\n"); |
|
53 |
}; |
|
54 |
if (!__isString(__ArrayInstPtr(anArray)->a_element[3])) { |
|
55 |
printf("OOPS\n"); |
|
56 |
}; |
|
57 |
if (!__isString(__ArrayInstPtr(anArray)->a_element[4])) { |
|
58 |
printf("OOPS\n"); |
|
59 |
}; |
|
60 |
__PROTECT__(anArray); |
|
61 |
__scavenge(); |
|
62 |
__UNPROTECT__(anArray); |
|
63 |
||
64 |
||
65 |
if (!__isString(__ArrayInstPtr(anArray)->a_element[0])) { |
|
66 |
printf("OOPS2\n"); |
|
67 |
}; |
|
68 |
if (!__isString(__ArrayInstPtr(anArray)->a_element[1])) { |
|
69 |
printf("OOPS2\n"); |
|
70 |
}; |
|
71 |
if (!__isString(__ArrayInstPtr(anArray)->a_element[2])) { |
|
72 |
printf("OOPS2\n"); |
|
73 |
}; |
|
74 |
if (!__isString(__ArrayInstPtr(anArray)->a_element[3])) { |
|
75 |
printf("OOPS2\n"); |
|
76 |
}; |
|
77 |
if (!__isString(__ArrayInstPtr(anArray)->a_element[4])) { |
|
78 |
printf("OOPS2\n"); |
|
79 |
}; |
|
80 |
%}. |
|
81 |
! ! |
|
82 |
||
83 |
!StackFrameTest class methodsFor:'documentation'! |
|
84 |
||
85 |
version |
|
86 |
^ '$Header$' |
|
87 |
! ! |
|
1160 | 88 |