author | vranyj1 |
Fri, 13 Apr 2012 10:03:19 +0000 | |
branch | jk_new_structure |
changeset 1477 | cc9bd91382a2 |
parent 1461 | 34a9c99d0295 |
child 1515 | f4ebf5cf3f89 |
permissions | -rw-r--r-- |
1440 | 1 |
" |
2 |
COPYRIGHT (c) 1996-2011 by Claus Gittinger |
|
3 |
||
4 |
New code and modifications done at SWING Research Group [1]: |
|
5 |
||
6 |
COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko |
|
7 |
SWING Research Group, Czech Technical University in Prague |
|
8 |
||
9 |
This software is furnished under a license and may be used |
|
10 |
only in accordance with the terms of that license and with the |
|
11 |
inclusion of the above copyright notice. This software may not |
|
12 |
be provided or otherwise made available to, or used by, any |
|
13 |
other person. No title to or ownership of the software is |
|
14 |
hereby transferred. |
|
15 |
||
16 |
[1] Code written at SWING Research Group contains a signature |
|
17 |
of one of the above copright owners. For exact set of such code, |
|
18 |
see the differences between this version and version stx:libjava |
|
19 |
as of 1.9.2010 |
|
20 |
" |
|
21 |
"{ Package: 'stx:libjava' }" |
|
22 |
||
23 |
TestCase subclass:#JavaExceptionTests |
|
1452
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
24 |
instanceVariableNames:'signal' |
1440 | 25 |
classVariableNames:'' |
26 |
poolDictionaries:'' |
|
27 |
category:'Languages-Java-Tests' |
|
28 |
! |
|
29 |
||
30 |
!JavaExceptionTests class methodsFor:'documentation'! |
|
31 |
||
32 |
copyright |
|
33 |
" |
|
34 |
COPYRIGHT (c) 1996-2011 by Claus Gittinger |
|
35 |
||
36 |
New code and modifications done at SWING Research Group [1]: |
|
37 |
||
38 |
COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko |
|
39 |
SWING Research Group, Czech Technical University in Prague |
|
40 |
||
41 |
This software is furnished under a license and may be used |
|
42 |
only in accordance with the terms of that license and with the |
|
43 |
inclusion of the above copyright notice. This software may not |
|
44 |
be provided or otherwise made available to, or used by, any |
|
45 |
other person. No title to or ownership of the software is |
|
46 |
hereby transferred. |
|
47 |
||
48 |
[1] Code written at SWING Research Group contains a signature |
|
49 |
of one of the above copright owners. For exact set of such code, |
|
50 |
see the differences between this version and version stx:libjava |
|
51 |
as of 1.9.2010 |
|
52 |
||
53 |
" |
|
54 |
! ! |
|
55 |
||
56 |
!JavaExceptionTests class methodsFor:'accessing'! |
|
57 |
||
58 |
resources |
|
59 |
||
60 |
^ Array |
|
61 |
with: JavaInitializedResource |
|
62 |
with: JavaLibrariesResource |
|
63 |
with: JavaTestsResource |
|
64 |
||
65 |
"Created: / 30-03-2012 / 13:38:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
66 |
! ! |
|
67 |
||
1461 | 68 |
|
1452
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
69 |
!JavaExceptionTests methodsFor:'callbacks'! |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
70 |
|
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
71 |
call: trhower with: aBoolean |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
72 |
|
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
73 |
aBoolean ifTrue:[signal raise]. |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
74 |
|
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
75 |
"Created: / 03-04-2012 / 17:33:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
76 |
! |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
77 |
|
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
78 |
throw_me: aBoolean |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
79 |
|
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
80 |
aBoolean ifTrue:[signal raise]. |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
81 |
|
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
82 |
"Created: / 03-04-2012 / 17:31:26 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
83 |
! ! |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
84 |
|
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
85 |
!JavaExceptionTests methodsFor:'error handling (interop)'! |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
86 |
|
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
87 |
doesNotUnderstand:aMessage |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
88 |
|
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
89 |
| method selector class args| |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
90 |
selector := aMessage selector. |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
91 |
args := aMessage arguments. |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
92 |
class := self class. |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
93 |
|
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
94 |
JavaLookup isNil ifTrue:[ |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
95 |
(Smalltalk loadPackage: 'stx:libjava/experiments') ifFalse:[ |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
96 |
self error: 'You should load package stx:libjava/experiments if you want some interop - still experimental' mayProceed: true. |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
97 |
^nil |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
98 |
] |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
99 |
]. |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
100 |
|
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
101 |
method := JavaLookup instance lookupMethodForSelector: selector |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
102 |
directedTo: class |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
103 |
for: self |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
104 |
withArguments: args |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
105 |
from: thisContext sender sender |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
106 |
ilc: nil. |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
107 |
|
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
108 |
method isNil ifTrue:[ |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
109 |
^super doesNotUnderstand:aMessage |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
110 |
] ifFalse:[ |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
111 |
^ method valueWithReceiver: self arguments: args |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
112 |
]. |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
113 |
|
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
114 |
"Created: / 06-09-2011 / 22:16:26 / Jan Kurs <kursjan@fit.cvut.cz>" |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
115 |
"Modified: / 15-12-2011 / 23:42:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
116 |
! ! |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
117 |
|
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
118 |
!JavaExceptionTests methodsFor:'running'! |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
119 |
|
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
120 |
setUp |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
121 |
signal := Signal new. |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
122 |
|
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
123 |
"Created: / 03-04-2012 / 17:30:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
124 |
! ! |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
125 |
|
1440 | 126 |
!JavaExceptionTests methodsFor:'tests'! |
127 |
||
128 |
test_01a |
|
129 |
" |
|
130 |
Scenario (method activation stack, last called at bottom) |
|
131 |
1) ST method, handles IllegalArgumentException |
|
132 |
2) Java method, throws IllegalArgumentException. |
|
133 |
" |
|
134 |
||
135 |
| thrower caught | |
|
136 |
thrower := JAVA stx libjava tests SimpleExceptionThrower new. |
|
137 |
[ |
|
138 |
thrower throw_me: true. |
|
139 |
caught := false. |
|
140 |
||
141 |
] on: JAVA java lang IllegalArgumentException do: [:ex| |
|
142 |
caught := true. |
|
143 |
]. |
|
144 |
||
1477 | 145 |
self assert: caught == true. |
146 |
self assert: (JavaVM enteredMonitorsOfProcess: Processor activeProcess) isEmptyOrNil. |
|
147 |
self assert: (JavaVM acquiredMonitorsOfProcess: Processor activeProcess) isEmptyOrNil. |
|
1440 | 148 |
|
149 |
"Created: / 18-03-2012 / 11:06:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
150 |
! |
|
151 |
||
152 |
test_01b |
|
153 |
" |
|
154 |
Scenario (method activation stack, last called at bottom) |
|
155 |
1) ST method, handles IllegalArgumentException |
|
156 |
2) Java method, does not IllegalArgumentException. |
|
157 |
" |
|
158 |
||
159 |
| thrower caught | |
|
160 |
thrower := JAVA stx libjava tests SimpleExceptionThrower new. |
|
161 |
[ |
|
162 |
thrower throw_me: false. |
|
163 |
caught := false. |
|
164 |
||
165 |
] on: JAVA java lang IllegalArgumentException do: [:ex| |
|
166 |
caught := true. |
|
167 |
]. |
|
168 |
||
1477 | 169 |
self assert: caught == false. |
170 |
self assert: (JavaVM enteredMonitorsOfProcess: Processor activeProcess) isEmptyOrNil. |
|
171 |
self assert: (JavaVM acquiredMonitorsOfProcess: Processor activeProcess) isEmptyOrNil. |
|
1440 | 172 |
|
173 |
"Created: / 18-03-2012 / 21:49:09 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
174 |
! |
|
175 |
||
176 |
test_01c |
|
177 |
" |
|
178 |
Scenario (method activation stack, last called at bottom) |
|
179 |
1) ST method, handles IllegalArgumentException |
|
180 |
2) Java method, does not IllegalArgumentException. |
|
181 |
" |
|
182 |
||
183 |
| thrower caught | |
|
184 |
thrower := JAVA stx libjava tests SimpleExceptionThrower new. |
|
185 |
[ |
|
186 |
thrower throw_me: true. |
|
187 |
caught := false. |
|
188 |
||
189 |
] on: JAVA java lang Throwable do: [:ex| |
|
190 |
caught := true. |
|
191 |
]. |
|
192 |
||
1477 | 193 |
self assert: caught == true. |
194 |
self assert: (JavaVM enteredMonitorsOfProcess: Processor activeProcess) isEmptyOrNil. |
|
195 |
self assert: (JavaVM acquiredMonitorsOfProcess: Processor activeProcess) isEmptyOrNil. |
|
1440 | 196 |
|
197 |
"Created: / 18-03-2012 / 22:11:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
198 |
! |
|
199 |
||
200 |
test_01d |
|
201 |
" |
|
202 |
Scenario (method activation stack, last called at bottom) |
|
203 |
1) ST method, handles IllegalArgumentException |
|
204 |
2) Java method, does not IllegalArgumentException. |
|
205 |
" |
|
206 |
||
207 |
| thrower caught | |
|
208 |
thrower := JAVA stx libjava tests SimpleExceptionThrower new. |
|
209 |
[ |
|
210 |
[ |
|
211 |
thrower throw_me: true. |
|
212 |
caught := false. |
|
213 |
||
214 |
] on: JAVA java lang ArrayIndexOutOfBoundsException do: [:ex| |
|
215 |
caught := true. |
|
216 |
]. |
|
217 |
] on: JavaUnhandledExceptionError do:[ |
|
218 |
caught := 123. |
|
219 |
]. |
|
220 |
||
1477 | 221 |
self assert: caught == 123. |
222 |
self assert: (JavaVM enteredMonitorsOfProcess: Processor activeProcess) isEmptyOrNil. |
|
223 |
self assert: (JavaVM acquiredMonitorsOfProcess: Processor activeProcess) isEmptyOrNil. |
|
1440 | 224 |
|
225 |
"Created: / 18-03-2012 / 22:12:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1450 | 226 |
! |
227 |
||
228 |
test_01e |
|
229 |
" |
|
230 |
Scenario (method activation stack, last called at bottom) |
|
231 |
1) ST method, handles IllegalArgumentException |
|
232 |
2) Java method, throws IllegalArgumentException. |
|
233 |
" |
|
234 |
||
235 |
| thrower caught | |
|
236 |
thrower := JAVA stx libjava tests SimpleExceptionThrower new. |
|
237 |
[ |
|
238 |
thrower call: true. |
|
239 |
caught := false. |
|
240 |
||
241 |
] on: JAVA java lang IllegalArgumentException do: [:ex| |
|
242 |
caught := true. |
|
243 |
]. |
|
244 |
||
1477 | 245 |
self assert: caught == true. |
246 |
self assert: (JavaVM enteredMonitorsOfProcess: Processor activeProcess) isEmptyOrNil. |
|
247 |
self assert: (JavaVM acquiredMonitorsOfProcess: Processor activeProcess) isEmptyOrNil. |
|
1450 | 248 |
|
249 |
"Created: / 03-04-2012 / 14:44:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
250 |
! |
|
251 |
||
252 |
test_03a |
|
253 |
" |
|
254 |
Scenario (method activation stack, last called at bottom) |
|
255 |
1) ST method, handles IllegalArgumentException |
|
256 |
2) Java method with finally |
|
257 |
3) Java method, throws IllegalArgumentException. |
|
258 |
" |
|
259 |
||
260 |
| thrower caught | |
|
261 |
thrower := JAVA stx libjava tests SimpleExceptionThrower new. |
|
262 |
[ |
|
263 |
thrower test_03: true. |
|
264 |
caught := false. |
|
265 |
||
266 |
] on: JAVA java lang IllegalArgumentException do: [:ex| |
|
267 |
caught := true. |
|
268 |
]. |
|
269 |
||
270 |
self assert: caught == true. |
|
1455 | 271 |
self assert: (thrower instVarNamed: #token) == 3. |
1477 | 272 |
self assert: (JavaVM enteredMonitorsOfProcess: Processor activeProcess) isEmptyOrNil. |
273 |
self assert: (JavaVM acquiredMonitorsOfProcess: Processor activeProcess) isEmptyOrNil. |
|
1450 | 274 |
|
275 |
"Created: / 03-04-2012 / 15:39:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1452
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
276 |
! |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
277 |
|
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
278 |
test_04a |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
279 |
" |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
280 |
Scenario (method activation stack, last called at bottom) |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
281 |
1) ST method, handles 'signal' |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
282 |
2) Java method with finally |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
283 |
3) Smalltak method, throws 'signal' |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
284 |
" |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
285 |
|
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
286 |
| thrower caught | |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
287 |
thrower := JAVA stx libjava tests SimpleExceptionThrower new. |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
288 |
[ |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
289 |
thrower test_04: self with: true. |
1455 | 290 |
caught := false. |
1452
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
291 |
] on: signal do: [:ex| |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
292 |
caught := true. |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
293 |
]. |
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
294 |
|
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
295 |
self assert: caught == true. |
1455 | 296 |
self assert: (thrower instVarNamed: #token) == 3. |
1477 | 297 |
self assert: (JavaVM enteredMonitorsOfProcess: Processor activeProcess) isEmptyOrNil. |
298 |
self assert: (JavaVM acquiredMonitorsOfProcess: Processor activeProcess) isEmptyOrNil. |
|
1452
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
299 |
|
69dcb9c33742
Some more support for finally block when a Smalltalk exception is thrown - not yet working correctly
vranyj1
parents:
1450
diff
changeset
|
300 |
"Created: / 03-04-2012 / 17:30:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1440 | 301 |
! ! |
302 |
||
303 |
!JavaExceptionTests class methodsFor:'documentation'! |
|
304 |
||
305 |
version_SVN |
|
306 |
^ '$Id$' |
|
307 |
! ! |