author | Claus Gittinger <cg@exept.de> |
Mon, 30 Dec 2019 19:40:02 +0100 | |
branch | cvs_MAIN |
changeset 3993 | 7d6d72ea6cf1 |
parent 3412 | df11bb428463 |
child 3603 | 3716020187fc |
permissions | -rw-r--r-- |
749 | 1 |
" |
3324
a58245c0e83a
Updated copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3119
diff
changeset
|
2 |
COPYRIGHT (c) 1996-2015 by Claus Gittinger |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2152
diff
changeset
|
3 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2152
diff
changeset
|
4 |
New code and modifications done at SWING Research Group [1]: |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2152
diff
changeset
|
5 |
|
3324
a58245c0e83a
Updated copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3119
diff
changeset
|
6 |
COPYRIGHT (c) 2010-2015 by Jan Vrany, Jan Kurs and Marcel Hlopko |
749 | 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 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2152
diff
changeset
|
16 |
[1] Code written at SWING Research Group contains a signature |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2152
diff
changeset
|
17 |
of one of the above copright owners. For exact set of such code, |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2152
diff
changeset
|
18 |
see the differences between this version and version stx:libjava |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2152
diff
changeset
|
19 |
as of 1.9.2010 |
749 | 20 |
" |
21 |
"{ Package: 'stx:libjava' }" |
|
22 |
||
3330
b14c58b2876c
Oops, moved stray reloading-related methods from stx:libjava/experiments to stx:libjava.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
23 |
"{ NameSpace: Smalltalk }" |
b14c58b2876c
Oops, moved stray reloading-related methods from stx:libjava/experiments to stx:libjava.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
24 |
|
749 | 25 |
TestCase subclass:#JavaTestCaseProxy |
26 |
instanceVariableNames:'' |
|
27 |
classVariableNames:'TestCases' |
|
28 |
poolDictionaries:'' |
|
29 |
category:'Languages-Java-Tests-Proxies' |
|
30 |
! |
|
31 |
||
32 |
JavaTestCaseProxy class instanceVariableNames:'javaClassName shouldFork' |
|
33 |
||
34 |
" |
|
35 |
The following class instance variables are inherited by this class: |
|
36 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2152
diff
changeset
|
37 |
TestCase - lastOutcomes |
749 | 38 |
TestAsserter - |
39 |
Object - |
|
40 |
" |
|
41 |
! |
|
42 |
||
43 |
!JavaTestCaseProxy class methodsFor:'documentation'! |
|
44 |
||
45 |
copyright |
|
46 |
" |
|
3324
a58245c0e83a
Updated copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3119
diff
changeset
|
47 |
COPYRIGHT (c) 1996-2015 by Claus Gittinger |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2152
diff
changeset
|
48 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2152
diff
changeset
|
49 |
New code and modifications done at SWING Research Group [1]: |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2152
diff
changeset
|
50 |
|
3324
a58245c0e83a
Updated copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3119
diff
changeset
|
51 |
COPYRIGHT (c) 2010-2015 by Jan Vrany, Jan Kurs and Marcel Hlopko |
749 | 52 |
SWING Research Group, Czech Technical University in Prague |
53 |
||
54 |
This software is furnished under a license and may be used |
|
55 |
only in accordance with the terms of that license and with the |
|
56 |
inclusion of the above copyright notice. This software may not |
|
57 |
be provided or otherwise made available to, or used by, any |
|
58 |
other person. No title to or ownership of the software is |
|
59 |
hereby transferred. |
|
60 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2152
diff
changeset
|
61 |
[1] Code written at SWING Research Group contains a signature |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2152
diff
changeset
|
62 |
of one of the above copright owners. For exact set of such code, |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2152
diff
changeset
|
63 |
see the differences between this version and version stx:libjava |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2152
diff
changeset
|
64 |
as of 1.9.2010 |
749 | 65 |
|
66 |
" |
|
67 |
! ! |
|
68 |
||
69 |
!JavaTestCaseProxy class methodsFor:'initialization'! |
|
70 |
||
71 |
initialize |
|
72 |
||
73 |
TestCases := Dictionary new. |
|
74 |
||
75 |
"Created: / 01-03-2011 / 10:43:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
76 |
! |
|
77 |
||
78 |
setJavaClassName: aSymbol |
|
79 |
||
80 |
javaClassName ifNotNil: |
|
81 |
[self error: 'Attempting to set java class name twice']. |
|
82 |
javaClassName := aSymbol. |
|
83 |
||
84 |
"Created: / 01-03-2011 / 10:43:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
85 |
! ! |
|
86 |
||
87 |
!JavaTestCaseProxy class methodsFor:'accessing'! |
|
88 |
||
89 |
javaClass |
|
90 |
||
91 |
^Java classForName: javaClassName |
|
92 |
||
93 |
"Created: / 01-03-2011 / 11:30:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
94 |
"Modified: / 21-06-2011 / 17:09:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
95 |
! |
|
96 |
||
97 |
javaClassName |
|
98 |
||
99 |
^javaClassName |
|
100 |
||
101 |
"Created: / 01-03-2011 / 11:30:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
102 |
! |
|
103 |
||
104 |
shouldFork |
|
105 |
^ shouldFork ? false |
|
106 |
||
107 |
"Modified: / 13-06-2011 / 16:34:35 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
108 |
! |
|
109 |
||
110 |
shouldFork:aBoolean |
|
111 |
shouldFork := aBoolean. |
|
112 |
! |
|
113 |
||
114 |
sunitName |
|
115 |
||
116 |
^javaClassName |
|
117 |
||
118 |
"Created: / 10-08-2011 / 21:21:51 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
119 |
! ! |
|
120 |
||
121 |
!JavaTestCaseProxy class methodsFor:'private'! |
|
122 |
||
123 |
testSelectors |
|
124 |
"raise an error: must be redefined in concrete subclass(es)" |
|
125 |
||
126 |
^ self subclassResponsibility |
|
127 |
! ! |
|
128 |
||
129 |
!JavaTestCaseProxy class methodsFor:'queries'! |
|
130 |
||
131 |
isAbstract |
|
132 |
||
133 |
^self == JavaTestCaseProxy or:[self superclass == JavaTestCaseProxy] |
|
134 |
||
135 |
"Created: / 21-06-2011 / 16:56:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
136 |
! |
|
137 |
||
138 |
isTestlet |
|
139 |
||
140 |
^false |
|
141 |
||
142 |
"Created: / 21-06-2011 / 16:57:44 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
143 |
! ! |
|
144 |
||
145 |
!JavaTestCaseProxy class methodsFor:'subclass creation'! |
|
146 |
||
147 |
for: javaClass |
|
148 |
||
149 |
self subclassResponsibility |
|
150 |
||
151 |
"Modified: / 21-06-2011 / 17:08:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
152 |
! |
|
153 |
||
154 |
forClassNamed: name |
|
155 |
"Answers a new (anonymous) testcase proxy for |
|
156 |
given javaClass" |
|
157 |
||
158 |
| meta cls | |
|
159 |
TestCases at: name ifPresent: [:c | ^ c ]. |
|
160 |
meta := Metaclass new. |
|
161 |
meta setSuperclass: self class. |
|
162 |
meta instSize: self class instSize. |
|
163 |
cls := meta new. |
|
164 |
cls setSuperclass: self. |
|
165 |
cls flags: self flags. |
|
166 |
cls instSize: self instSize. |
|
167 |
cls setJavaClassName: name. |
|
168 |
cls |
|
169 |
setName: (self name , ' for: (Java classForName: ' , name storeString |
|
170 |
, ')') asSymbol. |
|
171 |
cls setCategory: #'(java test case proxies)'. |
|
172 |
TestCases at: name put: cls. |
|
173 |
^ cls |
|
174 |
||
175 |
"Modified: / 03-03-2011 / 00:20:49 / Marcel Hlopko <hlopik@gmail.com>" |
|
176 |
"Modified: / 29-04-2011 / 10:21:39 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
177 |
"Created: / 21-06-2011 / 17:07:28 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
178 |
! ! |
|
179 |
||
180 |
!JavaTestCaseProxy methodsFor:'accessing'! |
|
181 |
||
182 |
javaClass |
|
183 |
||
184 |
| javaClass | |
|
185 |
||
186 |
self |
|
187 |
assert: (javaClass := self class javaClass) isJavaClass |
|
188 |
description: 'java class does not exists'. |
|
189 |
^javaClass |
|
190 |
||
191 |
"Created: / 01-03-2011 / 14:48:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
192 |
||
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2396
diff
changeset
|
193 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2396
diff
changeset
|
194 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2396
diff
changeset
|
195 |
timeout |
3119
b4fa505f93c5
Increated timeout for JUnit/Testlet tests.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
196 |
^120"sec" |
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2396
diff
changeset
|
197 |
|
3119
b4fa505f93c5
Increated timeout for JUnit/Testlet tests.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
198 |
"Modified: / 04-06-2014 / 09:49:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
749 | 199 |
! ! |
200 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2152
diff
changeset
|
201 |
!JavaTestCaseProxy methodsFor:'queries'! |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2152
diff
changeset
|
202 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2152
diff
changeset
|
203 |
shouldSkip |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2152
diff
changeset
|
204 |
^false |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2152
diff
changeset
|
205 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2152
diff
changeset
|
206 |
"Created: / 29-11-2012 / 12:03:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2152
diff
changeset
|
207 |
! ! |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2152
diff
changeset
|
208 |
|
749 | 209 |
!JavaTestCaseProxy class methodsFor:'documentation'! |
210 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2152
diff
changeset
|
211 |
version_CVS |
3412
df11bb428463
Merged with mercurial revision 4f3cc813be4 (8 changesets total)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3360
diff
changeset
|
212 |
^ '$Header: /cvs/stx/stx/libjava/JavaTestCaseProxy.st,v 1.6 2015-03-20 12:08:00 vrany Exp $' |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2152
diff
changeset
|
213 |
! |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2152
diff
changeset
|
214 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2152
diff
changeset
|
215 |
version_HG |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2152
diff
changeset
|
216 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2152
diff
changeset
|
217 |
^ '$Changeset: <not expanded> $' |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2152
diff
changeset
|
218 |
! |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2152
diff
changeset
|
219 |
|
749 | 220 |
version_SVN |
2731
13f5be2bf83b
Merged d87e89dd5276 and fe83a843a7bf (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
221 |
^ 'Id' |
749 | 222 |
! ! |
223 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2152
diff
changeset
|
224 |
|
2152 | 225 |
JavaTestCaseProxy initialize! |