author | Claus Gittinger <cg@exept.de> |
Tue, 03 Sep 2013 14:35:15 +0200 | |
changeset 13484 | 8f0ced9a4ed5 |
parent 13338 | da80957ff486 |
child 13356 | 51a964477563 |
child 13847 | 02f0e7912483 |
permissions | -rw-r--r-- |
9954 | 1 |
" |
10092 | 2 |
Copyright (c) 2007-2010 Jan Vrany, SWING Research Group, Czech Technical University in Prague |
3 |
Copyright (c) 2009-2010 eXept Software AG |
|
9954 | 4 |
|
10092 | 5 |
Permission is hereby granted, free of charge, to any person |
6 |
obtaining a copy of this software and associated documentation |
|
7 |
files (the 'Software'), to deal in the Software without |
|
8 |
restriction, including without limitation the rights to use, |
|
9 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
10 |
copies of the Software, and to permit persons to whom the |
|
11 |
Software is furnished to do so, subject to the following |
|
12 |
conditions: |
|
13 |
||
14 |
The above copyright notice and this permission notice shall be |
|
15 |
included in all copies or substantial portions of the Software. |
|
16 |
||
17 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
18 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
19 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
20 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
21 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
22 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
23 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
24 |
OTHER DEALINGS IN THE SOFTWARE. |
|
9954 | 25 |
" |
26 |
"{ Package: 'stx:libtool' }" |
|
27 |
||
28 |
"{ NameSpace: Tools }" |
|
29 |
||
30 |
AbstractTestRunner subclass:#TestRunnerEmbedded |
|
11552 | 31 |
instanceVariableNames:'runnerPanel selectedClassesHolder selectedProtocolsHolder |
32 |
selectedMethodsHolder methodGeneratorHolder resultHolder |
|
33 |
resultInfoHolder resultBackgroundColorHolder runningHolder |
|
11553 | 34 |
progressHolder progressIndicatorShownHolder infoHolder |
12864
2d6b4213f793
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12762
diff
changeset
|
35 |
testProcess allTestCases progressIndicator' |
10647
1e9912f9a0d8
Embedded test runner no longer reuse old testcase instances
vrany
parents:
10608
diff
changeset
|
36 |
classVariableNames:'' |
1e9912f9a0d8
Embedded test runner no longer reuse old testcase instances
vrany
parents:
10608
diff
changeset
|
37 |
poolDictionaries:'' |
1e9912f9a0d8
Embedded test runner no longer reuse old testcase instances
vrany
parents:
10608
diff
changeset
|
38 |
category:'SUnit-UI' |
9954 | 39 |
! |
40 |
||
41 |
Object subclass:#SuiteAndResult |
|
10647
1e9912f9a0d8
Embedded test runner no longer reuse old testcase instances
vrany
parents:
10608
diff
changeset
|
42 |
instanceVariableNames:'suite result' |
1e9912f9a0d8
Embedded test runner no longer reuse old testcase instances
vrany
parents:
10608
diff
changeset
|
43 |
classVariableNames:'' |
1e9912f9a0d8
Embedded test runner no longer reuse old testcase instances
vrany
parents:
10608
diff
changeset
|
44 |
poolDictionaries:'' |
1e9912f9a0d8
Embedded test runner no longer reuse old testcase instances
vrany
parents:
10608
diff
changeset
|
45 |
privateIn:TestRunnerEmbedded |
9954 | 46 |
! |
47 |
||
48 |
!TestRunnerEmbedded class methodsFor:'documentation'! |
|
49 |
||
50 |
copyright |
|
51 |
" |
|
10092 | 52 |
Copyright (c) 2007-2010 Jan Vrany, SWING Research Group, Czech Technical University in Prague |
53 |
Copyright (c) 2009-2010 eXept Software AG |
|
54 |
||
55 |
Permission is hereby granted, free of charge, to any person |
|
56 |
obtaining a copy of this software and associated documentation |
|
57 |
files (the 'Software'), to deal in the Software without |
|
58 |
restriction, including without limitation the rights to use, |
|
59 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
60 |
copies of the Software, and to permit persons to whom the |
|
61 |
Software is furnished to do so, subject to the following |
|
62 |
conditions: |
|
9954 | 63 |
|
10092 | 64 |
The above copyright notice and this permission notice shall be |
65 |
included in all copies or substantial portions of the Software. |
|
66 |
||
67 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
68 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
69 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
70 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
71 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
72 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
73 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
74 |
OTHER DEALINGS IN THE SOFTWARE. |
|
9954 | 75 |
" |
10175 | 76 |
! |
77 |
||
78 |
documentation |
|
79 |
" |
|
80 |
a tiny runner to be embedded in a system browser |
|
81 |
" |
|
9954 | 82 |
! ! |
83 |
||
11553 | 84 |
!TestRunnerEmbedded class methodsFor:'help specs'! |
85 |
||
86 |
flyByHelpSpec |
|
87 |
"This resource specification was automatically generated |
|
88 |
by the UIHelpTool of ST/X." |
|
89 |
||
90 |
"Do not manually edit this!! If it is corrupted, |
|
91 |
the UIHelpTool may not be able to read the specification." |
|
92 |
||
93 |
" |
|
94 |
UIHelpTool openOnClass:Tools::TestRunnerEmbedded |
|
95 |
" |
|
96 |
||
97 |
<resource: #help> |
|
98 |
||
99 |
^ super flyByHelpSpec addPairsFrom:#( |
|
100 |
||
101 |
#debugSelected |
|
102 |
'Run the selected test(s) with debugging enabled' |
|
103 |
||
104 |
#runAll |
|
105 |
'Run all tests' |
|
106 |
||
107 |
#runFailed |
|
108 |
'Only rerun failed tests' |
|
109 |
||
110 |
#runSelected |
|
111 |
'Run the selected test(s)' |
|
112 |
||
113 |
#stopRun |
|
114 |
'Stop the test-run' |
|
115 |
||
116 |
) |
|
117 |
||
118 |
"Created: / 04-06-2012 / 19:27:47 / cg" |
|
119 |
! ! |
|
120 |
||
9954 | 121 |
!TestRunnerEmbedded class methodsFor:'interface specs'! |
122 |
||
123 |
windowSpec |
|
124 |
"This resource specification was automatically generated |
|
125 |
by the UIPainter of ST/X." |
|
126 |
||
127 |
"Do not manually edit this!! If it is corrupted, |
|
128 |
the UIPainter may not be able to read the specification." |
|
129 |
||
130 |
" |
|
131 |
UIPainter new openOnClass:Tools::TestRunnerEmbedded andSelector:#windowSpec |
|
132 |
Tools::TestRunnerEmbedded new openInterface:#windowSpec |
|
133 |
Tools::TestRunnerEmbedded open |
|
134 |
" |
|
135 |
||
136 |
<resource: #canvas> |
|
137 |
||
138 |
^ |
|
139 |
#(FullSpec |
|
140 |
name: windowSpec |
|
141 |
window: |
|
142 |
(WindowSpec |
|
143 |
label: 'Test Runner Embedded' |
|
144 |
name: 'Test Runner Embedded' |
|
145 |
min: (Point 10 10) |
|
11552 | 146 |
bounds: (Rectangle 0 0 595 50) |
9954 | 147 |
) |
148 |
component: |
|
149 |
(SpecCollection |
|
150 |
collection: ( |
|
11553 | 151 |
(ViewSpec |
152 |
name: 'Runner' |
|
9954 | 153 |
layout: (LayoutFrame 5 0 0 0 -5 1 0 1) |
11553 | 154 |
backgroundChannel: resultBackgroundColorAspect |
9954 | 155 |
component: |
156 |
(SpecCollection |
|
157 |
collection: ( |
|
11553 | 158 |
(HorizontalPanelViewSpec |
159 |
name: 'RunnerInnerBox' |
|
160 |
layout: (LayoutFrame 5 0 0 0 -5 1 0 1) |
|
9954 | 161 |
backgroundChannel: resultBackgroundColorAspect |
11553 | 162 |
horizontalLayout: rightSpaceFit |
163 |
verticalLayout: center |
|
164 |
horizontalSpace: 0 |
|
165 |
elementsChangeSize: true |
|
9954 | 166 |
component: |
167 |
(SpecCollection |
|
168 |
collection: ( |
|
11553 | 169 |
(ViewSpec |
170 |
name: 'RunnerInfoBox' |
|
171 |
backgroundChannel: resultBackgroundColorAspect |
|
9954 | 172 |
component: |
173 |
(SpecCollection |
|
174 |
collection: ( |
|
11553 | 175 |
(LabelSpec |
176 |
label: 'Run tests first!!' |
|
177 |
name: 'ResultName' |
|
178 |
layout: (LayoutFrame 0 0 0 0 0 1 -10 1) |
|
179 |
backgroundChannel: resultBackgroundColorAspect |
|
180 |
foregroundColor: (Color 100.0 100.0 100.0) |
|
181 |
translateLabel: true |
|
182 |
labelChannel: resultNameAspect |
|
183 |
adjust: left |
|
184 |
) |
|
185 |
(LabelSpec |
|
186 |
name: 'ResultInfo' |
|
187 |
layout: (LayoutFrame 0 0 -10 1 0 1 0 1) |
|
188 |
style: (FontDescription helvetica medium roman 8 #'iso10646-1') |
|
189 |
backgroundChannel: resultBackgroundColorAspect |
|
190 |
foregroundColor: (Color 100.0 100.0 100.0) |
|
191 |
translateLabel: true |
|
192 |
labelChannel: resultInfoAspect |
|
193 |
adjust: left |
|
194 |
) |
|
9954 | 195 |
(ViewSpec |
11553 | 196 |
name: 'ProgressPanel' |
197 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
|
198 |
visibilityChannel: progressIndicatorShownHolder |
|
9954 | 199 |
backgroundChannel: resultBackgroundColorAspect |
200 |
component: |
|
201 |
(SpecCollection |
|
202 |
collection: ( |
|
11553 | 203 |
(ProgressIndicatorSpec |
204 |
name: 'RunningProgress' |
|
205 |
layout: (LayoutFrame 5 0 -10 0.5 -5 1 10 0.5) |
|
206 |
model: progressHolder |
|
12864
2d6b4213f793
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12762
diff
changeset
|
207 |
postBuildCallback: postBuildProgressIndicator: |
9954 | 208 |
) |
209 |
) |
|
210 |
||
211 |
) |
|
212 |
) |
|
213 |
) |
|
214 |
||
215 |
) |
|
11553 | 216 |
extent: (Point 276 30) |
217 |
) |
|
218 |
(ActionButtonSpec |
|
11568 | 219 |
label: 'Debug' |
220 |
name: 'DebugButton' |
|
221 |
activeHelpKey: debugSelected |
|
222 |
translateLabel: true |
|
223 |
model: debug |
|
224 |
enableChannel: runEnabledHolder |
|
225 |
extent: (Point 60 25) |
|
226 |
) |
|
227 |
(ActionButtonSpec |
|
11553 | 228 |
label: 'Stop' |
229 |
name: 'Button2' |
|
230 |
activeHelpKey: stopRun |
|
231 |
visibilityChannel: runningHolder |
|
232 |
translateLabel: true |
|
233 |
model: stop |
|
234 |
extent: (Point 60 25) |
|
235 |
) |
|
236 |
(ActionButtonSpec |
|
237 |
label: 'Run' |
|
238 |
name: 'Run' |
|
239 |
activeHelpKey: runSelected |
|
240 |
visibilityChannel: notRunningHolder |
|
241 |
translateLabel: true |
|
242 |
model: run |
|
243 |
enableChannel: runEnabledHolder |
|
244 |
extent: (Point 60 25) |
|
245 |
) |
|
246 |
(ActionButtonSpec |
|
12762
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
247 |
label: ' Failed' |
11553 | 248 |
name: 'Button1' |
249 |
activeHelpKey: runFailed |
|
250 |
translateLabel: true |
|
251 |
model: runFailed |
|
252 |
enableChannel: runFailedEnabledHolder |
|
253 |
extent: (Point 60 25) |
|
254 |
) |
|
255 |
(ActionButtonSpec |
|
256 |
label: 'Run all' |
|
257 |
name: 'RunAll' |
|
258 |
activeHelpKey: runAll |
|
259 |
translateLabel: true |
|
260 |
model: runAll |
|
261 |
enableChannel: runAllEnabledHolder |
|
262 |
extent: (Point 60 25) |
|
9954 | 263 |
) |
264 |
) |
|
265 |
||
266 |
) |
|
11553 | 267 |
postBuildCallback: postBuildRunnerPanel: |
9954 | 268 |
) |
269 |
) |
|
270 |
||
271 |
) |
|
272 |
) |
|
273 |
) |
|
274 |
||
275 |
) |
|
276 |
) |
|
277 |
||
278 |
! ! |
|
279 |
||
280 |
!TestRunnerEmbedded class methodsFor:'plugIn spec'! |
|
281 |
||
282 |
aspectSelectors |
|
283 |
"This resource specification was automatically generated |
|
284 |
by the UIPainter of ST/X." |
|
285 |
||
286 |
"Do not manually edit this. If it is corrupted, |
|
287 |
the UIPainter may not be able to read the specification." |
|
288 |
||
289 |
"Return a description of exported aspects; |
|
290 |
these can be connected to aspects of an embedding application |
|
291 |
(if this app is embedded in a subCanvas)." |
|
292 |
||
293 |
^ #( |
|
294 |
#methodGeneratorHolder |
|
295 |
#selectedClassesHolder |
|
296 |
#selectedMethodsHolder |
|
297 |
#selectedProtocolsHolder |
|
298 |
). |
|
299 |
||
300 |
! ! |
|
301 |
||
302 |
!TestRunnerEmbedded methodsFor:'accessing'! |
|
303 |
||
11966
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
304 |
allTestCases |
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
305 |
allTestCases isNil ifTrue:[ |
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
306 |
self updateTestCases |
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
307 |
]. |
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
308 |
^ allTestCases |
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
309 |
! |
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
310 |
|
10175 | 311 |
infoHolder:something |
312 |
"to show something in the browsers info area (near the bottom" |
|
313 |
||
314 |
infoHolder := something. |
|
315 |
||
316 |
"Created: / 05-07-2011 / 16:22:24 / cg" |
|
317 |
! |
|
318 |
||
11966
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
319 |
invalidateAllTestCases |
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
320 |
allTestCases := nil |
9954 | 321 |
! |
322 |
||
11966
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
323 |
selectedTestMethodsFromProtocols:protocols inClass:aTestClass |
10374 | 324 |
|
11966
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
325 |
|methods generator| |
9954 | 326 |
|
327 |
methods := Set new. |
|
328 |
generator := self methodGeneratorHolder value. |
|
10374 | 329 |
|
11552 | 330 |
generator notNil ifTrue:[ |
331 |
generator do: [:cls :cat :sel :mthd | |
|
332 |
(mthd notNil |
|
11966
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
333 |
and:[ (self isTestCaseLike:(aTestClass ? cls)) |
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
334 |
and:[ (aTestClass ? cls) isTestSelector:sel ] ]) |
11552 | 335 |
ifTrue:[ methods add:mthd ] |
336 |
] |
|
337 |
] ifFalse:[ |
|
11966
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
338 |
self allTestCases do: [:cls | |
11552 | 339 |
cls methodsDo: [:mthd | |
340 |
((protocols includes:mthd category) and:[ cls isTestSelector:mthd selector ]) |
|
341 |
ifTrue:[ |
|
342 |
methods add:mthd |
|
343 |
] |
|
344 |
] |
|
345 |
] |
|
346 |
]. |
|
9954 | 347 |
^ methods |
348 |
||
349 |
"Created: / 15-03-2010 / 19:50:15 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10374 | 350 |
"Modified: / 22-07-2011 / 15:53:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
11552 | 351 |
"Modified (format): / 04-06-2012 / 19:05:32 / cg" |
10374 | 352 |
! |
353 |
||
11966
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
354 |
selectedTestMethodsInClass:testClass |
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
355 |
^ (self selectedMethodsHolder value ? #()) select: |
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
356 |
[:mthd | | cls | |
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
357 |
(cls := testClass) isNil ifTrue:[cls := mthd mclass]. |
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
358 |
(self isTestCaseLike:testClass) |
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
359 |
and:[ testClass isTestSelector:mthd selector ] ] |
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
360 |
|
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
361 |
"Created: / 15-03-2010 / 13:21:25 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
362 |
"Modified: / 22-07-2011 / 15:46:44 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
363 |
"Modified: / 02-08-2011 / 17:46:38 / cg" |
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
364 |
! |
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
365 |
|
10374 | 366 |
theSingleTestCase |
367 |
||
11966
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
368 |
self allTestCases isEmptyOrNil ifTrue:[^nil]. |
11552 | 369 |
allTestCases size > 1 ifTrue:[^nil]. |
10374 | 370 |
|
11552 | 371 |
^allTestCases anyOne. |
10374 | 372 |
|
373 |
"Created: / 22-07-2011 / 15:44:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
9954 | 374 |
! ! |
375 |
||
376 |
!TestRunnerEmbedded methodsFor:'actions'! |
|
377 |
||
378 |
debug |
|
12055 | 379 |
| suiteAndResult suite result | |
9954 | 380 |
|
381 |
suiteAndResult := self resultHolder value. |
|
10647
1e9912f9a0d8
Embedded test runner no longer reuse old testcase instances
vrany
parents:
10608
diff
changeset
|
382 |
suite := suiteAndResult suiteForRun. |
11553 | 383 |
"/ suite tests size ~= 1 ifTrue:[^self breakPoint: #jv]. |
384 |
"/ test := suiteAndResult suite tests anyOne. |
|
12762
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
385 |
result := TestResult defaultResultClass new. |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
386 |
suiteAndResult := SuiteAndResult suite: suite result: result. |
11553 | 387 |
|
388 |
self stop. |
|
389 |
||
12055 | 390 |
"/ debug run is synchronous |
391 |
[ |
|
392 |
self runningHolder value:true. |
|
11553 | 393 |
|
12055 | 394 |
suite tests do:[:test | |
12762
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
395 |
[ |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
396 |
test debug. |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
397 |
] ifCurtailed:[ |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
398 |
result failureOutcomes add: test. |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
399 |
self resultHolder value:suiteAndResult; changed. |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
400 |
]. |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
401 |
|
12055 | 402 |
(test class testSelectorPassed:test selector) ifTrue:[ |
12762
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
403 |
"/ result := TestResult defaultResultClass new. |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
404 |
"/ result passed add: test. |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
405 |
"/ suiteAndResult := SuiteAndResult suite: suite result: result. |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
406 |
result passedOutcomes add: test. |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
407 |
self resultHolder value:suiteAndResult; changed. |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
408 |
] ifFalse:[ |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
409 |
(test class testSelectorFailed:test selector) ifTrue:[ |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
410 |
"/ result := TestResult defaultResultClass new. |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
411 |
"/ result failures add: test. |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
412 |
"/ suiteAndResult := SuiteAndResult suite: suite result: result. |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
413 |
result failureOutcomes add: test. |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
414 |
self resultHolder value:suiteAndResult; changed. |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
415 |
] |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
416 |
] |
12055 | 417 |
]. |
418 |
] ensure:[ |
|
419 |
self runningHolder value:false. |
|
420 |
]. |
|
9954 | 421 |
|
422 |
"Created: / 15-03-2010 / 15:43:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10243
f8b2067424ed
changed: #debug: bug fix: if the test pass when debugging, update the UI
vrany
parents:
10201
diff
changeset
|
423 |
"Modified: / 07-07-2011 / 11:33:48 / Jan Vrany <jan.vrant@fit.cvut,cz>" |
10647
1e9912f9a0d8
Embedded test runner no longer reuse old testcase instances
vrany
parents:
10608
diff
changeset
|
424 |
"Modified: / 22-08-2011 / 09:59:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
11553 | 425 |
"Modified: / 04-06-2012 / 19:46:38 / cg" |
9954 | 426 |
! |
427 |
||
428 |
run |
|
10789 | 429 |
|suite| |
9954 | 430 |
|
10789 | 431 |
resultHolder value isNil ifTrue:[ |
432 |
suite := self suiteForRun |
|
433 |
] ifFalse:[ |
|
434 |
suite := resultHolder value suiteForRun |
|
435 |
]. |
|
436 |
self run:suite |
|
9954 | 437 |
|
438 |
"Created: / 10-03-2010 / 19:42:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10647
1e9912f9a0d8
Embedded test runner no longer reuse old testcase instances
vrany
parents:
10608
diff
changeset
|
439 |
"Modified: / 22-08-2011 / 09:58:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10789 | 440 |
"Modified: / 09-10-2011 / 10:56:39 / cg" |
9954 | 441 |
! |
442 |
||
10175 | 443 |
run:suite |
11552 | 444 |
|suiteAndResult numTests| |
9954 | 445 |
|
10201 | 446 |
numTests := suite tests size. |
447 |
numTests == 0 ifTrue:[ |
|
10175 | 448 |
^ self |
449 |
]. |
|
9954 | 450 |
|
11552 | 451 |
self stop. |
452 |
||
453 |
testProcess := [ |
|
12864
2d6b4213f793
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12762
diff
changeset
|
454 |
|result incr run anyFail anyError| |
9954 | 455 |
|
12864
2d6b4213f793
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12762
diff
changeset
|
456 |
anyFail := anyError := false. |
10175 | 457 |
[ |
12864
2d6b4213f793
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12762
diff
changeset
|
458 |
|
11552 | 459 |
self runningHolder value:true. |
11570 | 460 |
self progressIndicatorShownHolder value:(numTests > 1). |
10175 | 461 |
self progressHolder value:0. |
10201 | 462 |
incr := 100 / numTests. |
10175 | 463 |
run := 0. |
464 |
result := suite |
|
465 |
runBeforeEachDo:[:test :result | |
|
466 |
infoHolder notNil ifTrue:[ |
|
467 |
infoHolder value:('Running "%1-%2"...' |
|
468 |
bindWith:test name |
|
469 |
with:test getTestName allBold) |
|
470 |
] |
|
471 |
] |
|
472 |
afterEachDo:[:test :result | |
|
473 |
run := run + 1. |
|
10184 | 474 |
self progressHolder value:(incr * run) truncated "rounded". |
10175 | 475 |
infoHolder notNil ifTrue:[ |
476 |
infoHolder value:('Done.') |
|
12864
2d6b4213f793
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12762
diff
changeset
|
477 |
]. |
2d6b4213f793
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12762
diff
changeset
|
478 |
result hasPassed ifFalse:[ |
2d6b4213f793
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12762
diff
changeset
|
479 |
progressIndicator foregroundColor:(Color red) |
2d6b4213f793
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12762
diff
changeset
|
480 |
]. |
10175 | 481 |
]. |
482 |
suiteAndResult := SuiteAndResult suite:suite result:result. |
|
483 |
] ensure:[ |
|
12864
2d6b4213f793
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12762
diff
changeset
|
484 |
progressIndicator initStyle. |
11553 | 485 |
self progressIndicatorShownHolder value:false. |
12762
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
486 |
self resultHolder setValue:nil; value:suiteAndResult; changed. |
10175 | 487 |
self runningHolder value:false. |
488 |
] |
|
489 |
] newProcess. |
|
11552 | 490 |
|
491 |
testProcess priority:(Processor userBackgroundPriority). |
|
492 |
testProcess resume. |
|
9954 | 493 |
|
494 |
"Created: / 11-03-2010 / 10:22:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
495 |
"Modified: / 06-09-2010 / 21:48:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
11570 | 496 |
"Modified: / 09-06-2012 / 20:23:58 / cg" |
9954 | 497 |
! |
498 |
||
499 |
runAll |
|
500 |
||
11552 | 501 |
self run: (self suiteForRunAll). |
9954 | 502 |
|
503 |
"Created: / 10-03-2010 / 19:42:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
504 |
"Modified: / 15-03-2010 / 13:12:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
11552 | 505 |
"Modified: / 04-06-2012 / 19:00:14 / cg" |
506 |
! |
|
507 |
||
508 |
runFailed |
|
509 |
self run: self suiteForRunFailed. |
|
510 |
||
511 |
"Created: / 04-06-2012 / 18:32:19 / cg" |
|
10178 | 512 |
! |
513 |
||
514 |
runWithDebug |
|
515 |
"/ cg: I really do not want to run them twice to get a debugger |
|
516 |
"/ - I want to run them either with a debugger coming right away, or not. |
|
517 |
||
10606 | 518 |
| suiteAndResult suite| |
10178 | 519 |
|
520 |
suiteAndResult := self resultHolder value. |
|
10789 | 521 |
suiteAndResult isNil ifTrue:[ |
522 |
suite := self suiteForRun. |
|
523 |
] ifFalse:[ |
|
524 |
suite := suiteAndResult suiteForRun. |
|
525 |
]. |
|
10608 | 526 |
|
527 |
suite run: TestResultForRunWithDebug new |
|
10178 | 528 |
|
529 |
||
530 |
||
531 |
"/ suiteAndResult suite tests size ~= 1 ifTrue:[^self breakPoint: #jv]. |
|
532 |
"/ [suiteAndResult suite tests anyOne debug] fork |
|
533 |
||
534 |
"Created: / 05-07-2011 / 18:45:43 / cg" |
|
10647
1e9912f9a0d8
Embedded test runner no longer reuse old testcase instances
vrany
parents:
10608
diff
changeset
|
535 |
"Modified: / 22-08-2011 / 09:59:46 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10789 | 536 |
"Modified: / 09-10-2011 / 10:55:46 / cg" |
11552 | 537 |
! |
538 |
||
539 |
stop |
|
540 |
|p| |
|
541 |
||
542 |
(p := testProcess) notNil ifTrue:[ |
|
543 |
testProcess := nil. |
|
544 |
p terminate |
|
545 |
]. |
|
546 |
||
547 |
"Created: / 04-06-2012 / 18:34:07 / cg" |
|
9954 | 548 |
! ! |
549 |
||
550 |
!TestRunnerEmbedded methodsFor:'aspects'! |
|
551 |
||
552 |
debugVisibleAspect |
|
10432 | 553 |
^ BlockValue |
554 |
with:[:model | |
|
555 |
model notNil |
|
556 |
and:[ model testCount == 1 |
|
557 |
and:[ model hasFailuresOrErrors ]] |
|
558 |
] |
|
559 |
argument:self resultHolder |
|
9954 | 560 |
|
561 |
"Created: / 15-03-2010 / 15:40:54 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10432 | 562 |
"Modified: / 02-08-2011 / 18:19:14 / cg" |
9954 | 563 |
! |
564 |
||
565 |
methodGeneratorHolder |
|
566 |
"return/create the 'methodGeneratorHolder' value holder (automatically generated)" |
|
567 |
||
568 |
methodGeneratorHolder isNil ifTrue:[ |
|
569 |
methodGeneratorHolder := ValueHolder new. |
|
570 |
methodGeneratorHolder addDependent:self. |
|
571 |
]. |
|
572 |
^ methodGeneratorHolder |
|
573 |
! |
|
574 |
||
575 |
methodGeneratorHolder:something |
|
576 |
"set the 'methodGeneratorHolder' value holder (automatically generated)" |
|
577 |
||
578 |
|oldValue newValue| |
|
579 |
||
580 |
methodGeneratorHolder notNil ifTrue:[ |
|
581 |
oldValue := methodGeneratorHolder value. |
|
582 |
methodGeneratorHolder removeDependent:self. |
|
583 |
]. |
|
584 |
methodGeneratorHolder := something. |
|
585 |
methodGeneratorHolder notNil ifTrue:[ |
|
586 |
methodGeneratorHolder addDependent:self. |
|
587 |
]. |
|
588 |
newValue := methodGeneratorHolder value. |
|
589 |
oldValue ~~ newValue ifTrue:[ |
|
590 |
self update:#value with:newValue from:methodGeneratorHolder. |
|
591 |
]. |
|
592 |
! |
|
593 |
||
11552 | 594 |
notRunningHolder |
595 |
^ BlockValue forLogicalNot:(self runningHolder) |
|
596 |
||
597 |
"Created: / 04-06-2012 / 18:38:48 / cg" |
|
598 |
! |
|
599 |
||
9954 | 600 |
progressHolder |
601 |
"return/create the 'progressHolder' value holder (automatically generated)" |
|
602 |
||
603 |
progressHolder isNil ifTrue:[ |
|
604 |
progressHolder := ValueHolder new. |
|
605 |
]. |
|
606 |
^ progressHolder |
|
607 |
! |
|
608 |
||
11553 | 609 |
progressIndicatorShownHolder |
610 |
progressIndicatorShownHolder isNil ifTrue:[ |
|
611 |
progressIndicatorShownHolder := ValueHolder with: false. |
|
612 |
]. |
|
613 |
^ progressIndicatorShownHolder |
|
614 |
||
615 |
"Modified: / 15-03-2010 / 20:29:28 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
616 |
"Modified (comment): / 04-06-2012 / 18:38:52 / cg" |
|
617 |
"Created: / 04-06-2012 / 19:42:59 / cg" |
|
618 |
! |
|
619 |
||
9954 | 620 |
resultBackgroundColorAspect |
621 |
<resource: #uiAspect> |
|
622 |
resultBackgroundColorHolder isNil ifTrue:[ |
|
10165
fd4de5081321
changed: #resultBackgroundColorAspect
Claus Gittinger <cg@exept.de>
parents:
10092
diff
changeset
|
623 |
resultBackgroundColorHolder := BlockValue |
fd4de5081321
changed: #resultBackgroundColorAspect
Claus Gittinger <cg@exept.de>
parents:
10092
diff
changeset
|
624 |
with:[:result :running | |
fd4de5081321
changed: #resultBackgroundColorAspect
Claus Gittinger <cg@exept.de>
parents:
10092
diff
changeset
|
625 |
running ifTrue:[ |
fd4de5081321
changed: #resultBackgroundColorAspect
Claus Gittinger <cg@exept.de>
parents:
10092
diff
changeset
|
626 |
self class currentlyRunningColor "/ View defaultBackgroundColor |
fd4de5081321
changed: #resultBackgroundColorAspect
Claus Gittinger <cg@exept.de>
parents:
10092
diff
changeset
|
627 |
] ifFalse:[ |
fd4de5081321
changed: #resultBackgroundColorAspect
Claus Gittinger <cg@exept.de>
parents:
10092
diff
changeset
|
628 |
result ifNil:[ self class notRunColor ] ifNotNil:[ result color ] |
11553 | 629 |
]. |
10165
fd4de5081321
changed: #resultBackgroundColorAspect
Claus Gittinger <cg@exept.de>
parents:
10092
diff
changeset
|
630 |
] |
fd4de5081321
changed: #resultBackgroundColorAspect
Claus Gittinger <cg@exept.de>
parents:
10092
diff
changeset
|
631 |
argument:self resultHolder |
fd4de5081321
changed: #resultBackgroundColorAspect
Claus Gittinger <cg@exept.de>
parents:
10092
diff
changeset
|
632 |
argument:self runningHolder. |
fd4de5081321
changed: #resultBackgroundColorAspect
Claus Gittinger <cg@exept.de>
parents:
10092
diff
changeset
|
633 |
resultBackgroundColorHolder |
fd4de5081321
changed: #resultBackgroundColorAspect
Claus Gittinger <cg@exept.de>
parents:
10092
diff
changeset
|
634 |
onChangeEvaluate:[ |
fd4de5081321
changed: #resultBackgroundColorAspect
Claus Gittinger <cg@exept.de>
parents:
10092
diff
changeset
|
635 |
runnerPanel |
fd4de5081321
changed: #resultBackgroundColorAspect
Claus Gittinger <cg@exept.de>
parents:
10092
diff
changeset
|
636 |
ifNotNil:[ runnerPanel backgroundColor:resultBackgroundColorHolder value ] |
fd4de5081321
changed: #resultBackgroundColorAspect
Claus Gittinger <cg@exept.de>
parents:
10092
diff
changeset
|
637 |
]. |
9954 | 638 |
]. |
639 |
^ resultBackgroundColorHolder. |
|
640 |
||
641 |
"Created: / 15-03-2010 / 15:22:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
642 |
"Modified: / 15-03-2010 / 21:02:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
11553 | 643 |
"Modified: / 04-06-2012 / 19:40:11 / cg" |
9954 | 644 |
! |
645 |
||
646 |
resultHolder |
|
647 |
"return/create the 'resultHolder' value holder (automatically generated)" |
|
648 |
||
649 |
resultHolder isNil ifTrue:[ |
|
650 |
resultHolder := ValueHolder new. |
|
651 |
]. |
|
652 |
^ resultHolder |
|
653 |
! |
|
654 |
||
655 |
resultInfoAspect |
|
10432 | 656 |
^ BlockValue |
657 |
with:[:model | model isNil ifTrue:[ '' ] ifFalse:[ model info ] ] |
|
658 |
argument:self resultHolder |
|
9954 | 659 |
|
660 |
"Created: / 15-03-2010 / 20:22:44 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10432 | 661 |
"Modified: / 02-08-2011 / 18:20:26 / cg" |
9954 | 662 |
! |
663 |
||
664 |
resultNameAspect |
|
10432 | 665 |
^ BlockValue |
666 |
with:[:model | model isNil ifTrue:[ 'Run the tests!!' ] ifFalse:[ model name ] ] |
|
667 |
argument:self resultHolder |
|
9954 | 668 |
|
669 |
"Created: / 15-03-2010 / 14:57:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
670 |
"Modified: / 15-03-2010 / 20:17:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10432 | 671 |
"Modified: / 02-08-2011 / 18:20:38 / cg" |
9954 | 672 |
! |
673 |
||
674 |
runAllEnabledHolder |
|
675 |
||
11552 | 676 |
^ self notRunningHolder |
9954 | 677 |
|
678 |
"Created: / 07-09-2010 / 09:15:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
11552 | 679 |
"Modified: / 04-06-2012 / 18:40:46 / cg" |
9954 | 680 |
! |
681 |
||
682 |
runEnabledHolder |
|
683 |
^BlockValue |
|
684 |
with: |
|
11552 | 685 |
[:result :running | |
686 |
||
687 |
running not |
|
688 |
and:[ result notNil |
|
689 |
and:[ result testCount > 0 ]] |
|
690 |
] |
|
9954 | 691 |
argument: self resultHolder |
11552 | 692 |
argument: self runningHolder |
9954 | 693 |
|
694 |
"Created: / 07-09-2010 / 09:15:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
11552 | 695 |
"Modified: / 04-06-2012 / 18:52:41 / cg" |
696 |
! |
|
697 |
||
698 |
runFailedEnabledHolder |
|
699 |
^BlockValue |
|
700 |
with: |
|
701 |
[:running | |
|
702 |
||
703 |
|result| |
|
704 |
||
11584 | 705 |
running not |
11600
53100c5a7473
changed: #runFailedEnabledHolder (fix for environments without SUnit loaded)
vrany
parents:
11584
diff
changeset
|
706 |
and:[ TestResult notNil |
11584 | 707 |
and:[ TestResult isLoaded |
708 |
and:[ result := self resultForSuite:self suiteForRunAll. result notNil |
|
11600
53100c5a7473
changed: #runFailedEnabledHolder (fix for environments without SUnit loaded)
vrany
parents:
11584
diff
changeset
|
709 |
and:[ result hasFailuresOrErrors ]]]] |
11552 | 710 |
] |
711 |
"/ argument: self resultHolder |
|
712 |
argument: self runningHolder |
|
713 |
||
714 |
"Created: / 07-09-2010 / 09:15:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
715 |
"Created: / 04-06-2012 / 18:28:12 / cg" |
|
11600
53100c5a7473
changed: #runFailedEnabledHolder (fix for environments without SUnit loaded)
vrany
parents:
11584
diff
changeset
|
716 |
"Modified: / 18-07-2012 / 09:55:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
9954 | 717 |
! |
718 |
||
719 |
runningHolder |
|
720 |
runningHolder isNil ifTrue:[ |
|
721 |
runningHolder := ValueHolder with: false. |
|
722 |
]. |
|
723 |
^ runningHolder |
|
724 |
||
725 |
"Modified: / 15-03-2010 / 20:29:28 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
11552 | 726 |
"Modified (comment): / 04-06-2012 / 18:38:52 / cg" |
9954 | 727 |
! |
728 |
||
729 |
selectedClassesHolder |
|
730 |
"return/create the 'selectedClassesHolder' value holder (automatically generated)" |
|
731 |
||
732 |
selectedClassesHolder isNil ifTrue:[ |
|
733 |
selectedClassesHolder := ValueHolder new. |
|
734 |
selectedClassesHolder addDependent:self. |
|
735 |
]. |
|
736 |
^ selectedClassesHolder |
|
737 |
! |
|
738 |
||
739 |
selectedClassesHolder:something |
|
740 |
"set the 'selectedClassesHolder' value holder (automatically generated)" |
|
741 |
||
742 |
|oldValue newValue| |
|
743 |
||
744 |
selectedClassesHolder notNil ifTrue:[ |
|
745 |
oldValue := selectedClassesHolder value. |
|
746 |
selectedClassesHolder removeDependent:self. |
|
747 |
]. |
|
748 |
selectedClassesHolder := something. |
|
749 |
selectedClassesHolder notNil ifTrue:[ |
|
750 |
selectedClassesHolder addDependent:self. |
|
751 |
]. |
|
752 |
newValue := selectedClassesHolder value. |
|
753 |
oldValue ~~ newValue ifTrue:[ |
|
754 |
self update:#value with:newValue from:selectedClassesHolder. |
|
755 |
]. |
|
756 |
! |
|
757 |
||
758 |
selectedMethodsHolder |
|
759 |
"return/create the 'selectedMethodsHolder' value holder (automatically generated)" |
|
760 |
||
761 |
selectedMethodsHolder isNil ifTrue:[ |
|
762 |
selectedMethodsHolder := ValueHolder new. |
|
763 |
selectedMethodsHolder addDependent:self. |
|
764 |
]. |
|
765 |
^ selectedMethodsHolder |
|
766 |
! |
|
767 |
||
768 |
selectedMethodsHolder:something |
|
769 |
"set the 'selectedMethodsHolder' value holder (automatically generated)" |
|
770 |
||
771 |
|oldValue newValue| |
|
772 |
||
773 |
selectedMethodsHolder notNil ifTrue:[ |
|
774 |
oldValue := selectedMethodsHolder value. |
|
775 |
selectedMethodsHolder removeDependent:self. |
|
776 |
]. |
|
777 |
selectedMethodsHolder := something. |
|
778 |
selectedMethodsHolder notNil ifTrue:[ |
|
779 |
selectedMethodsHolder addDependent:self. |
|
780 |
]. |
|
781 |
newValue := selectedMethodsHolder value. |
|
782 |
oldValue ~~ newValue ifTrue:[ |
|
783 |
self update:#value with:newValue from:selectedMethodsHolder. |
|
784 |
]. |
|
785 |
! |
|
786 |
||
787 |
selectedProtocolsHolder |
|
788 |
"return/create the 'selectedProtocolsHolder' value holder (automatically generated)" |
|
789 |
||
790 |
selectedProtocolsHolder isNil ifTrue:[ |
|
791 |
selectedProtocolsHolder := ValueHolder new. |
|
792 |
selectedProtocolsHolder addDependent:self. |
|
793 |
]. |
|
794 |
^ selectedProtocolsHolder |
|
795 |
! |
|
796 |
||
797 |
selectedProtocolsHolder:something |
|
798 |
"set the 'selectedProtocolsHolder' value holder (automatically generated)" |
|
799 |
||
800 |
|oldValue newValue| |
|
801 |
||
802 |
selectedProtocolsHolder notNil ifTrue:[ |
|
803 |
oldValue := selectedProtocolsHolder value. |
|
804 |
selectedProtocolsHolder removeDependent:self. |
|
805 |
]. |
|
806 |
selectedProtocolsHolder := something. |
|
807 |
selectedProtocolsHolder notNil ifTrue:[ |
|
808 |
selectedProtocolsHolder addDependent:self. |
|
809 |
]. |
|
810 |
newValue := selectedProtocolsHolder value. |
|
811 |
oldValue ~~ newValue ifTrue:[ |
|
812 |
self update:#value with:newValue from:selectedProtocolsHolder. |
|
813 |
]. |
|
11552 | 814 |
! |
815 |
||
816 |
stopEnabledHolder |
|
817 |
^ self runningHolder |
|
818 |
||
819 |
"Created: / 04-06-2012 / 18:29:01 / cg" |
|
9954 | 820 |
! ! |
821 |
||
822 |
!TestRunnerEmbedded methodsFor:'change & update'! |
|
823 |
||
11966
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
824 |
invalidateSuiteAndResult |
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
825 |
self resultHolder value:nil. |
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
826 |
! |
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
827 |
|
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
828 |
invalidateTestCases |
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
829 |
allTestCases := nil. |
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
830 |
! |
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
831 |
|
9954 | 832 |
update:aspect with:param from: sender |
833 |
"Invoked when an object that I depend upon sends a change notification." |
|
834 |
||
835 |
sender == selectedClassesHolder ifTrue:[ |
|
836 |
self |
|
11966
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
837 |
invalidateTestCases; "/ updateTestSuite; |
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
838 |
invalidateSuiteAndResult; "/ updateTestSuiteAndResult; |
9954 | 839 |
updateVisibility. |
12762
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
840 |
self hasTestCaseSelected ifTrue:[ |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
841 |
self enqueueDelayedAction:[ self updateTestCases; updateSuiteAndResult ]. |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
842 |
]. |
9954 | 843 |
^ self. |
844 |
]. |
|
12762
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
845 |
self hasTestCaseSelected ifTrue:[ |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
846 |
sender == selectedProtocolsHolder ifTrue:[ |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
847 |
self invalidateSuiteAndResult. |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
848 |
self enqueueDelayedAction:[ self updateSuiteAndResult ]. |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
849 |
^self |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
850 |
]. |
9954 | 851 |
|
12762
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
852 |
sender == selectedMethodsHolder ifTrue:[ |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
853 |
self invalidateSuiteAndResult. |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
854 |
self enqueueDelayedAction:[ self updateSuiteAndResult ]. |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
855 |
^self |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
856 |
]. |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
857 |
sender == methodGeneratorHolder ifTrue:[ |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
858 |
self invalidateSuiteAndResult. |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
859 |
self enqueueDelayedAction:[ self updateSuiteAndResult ]. |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
860 |
^self |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
861 |
]. |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
862 |
|
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
863 |
sender == Smalltalk ifTrue:[ |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
864 |
aspect == #lastTestRunResult ifTrue:[ |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
865 |
allTestCases notNil ifTrue:[ |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
866 |
(allTestCases includesIdentical: param first) ifTrue:[ |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
867 |
self invalidateSuiteAndResult. "/ updateTestSuiteAndResult. |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
868 |
self enqueueDelayedAction:[ self updateSuiteAndResult ]. |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
869 |
^self |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
870 |
] |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
871 |
]. |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
872 |
] |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
873 |
]. |
9954 | 874 |
]. |
875 |
||
876 |
super update:aspect with:param from: sender |
|
877 |
||
10886
8619db59aff4
bug fix in: #update:with:from: (selectedTestCases ivar might be nil)
vrany
parents:
10862
diff
changeset
|
878 |
"Modified: / 20-11-2011 / 12:40:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
11552 | 879 |
"Modified: / 04-06-2012 / 19:03:34 / cg" |
9954 | 880 |
! |
881 |
||
11966
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
882 |
updateSuiteAndResult |
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
883 |
| suite suiteAndResult | |
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
884 |
|
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
885 |
self runningHolder value ifTrue:[^self]. |
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
886 |
self allTestCases isEmptyOrNil ifTrue:[^self]. |
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
887 |
|
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
888 |
suiteAndResult := SuiteAndResult |
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
889 |
suite: (suite := self suiteForRun) |
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
890 |
result: (self resultForSuite: suite). |
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
891 |
self resultHolder value: suiteAndResult. |
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
892 |
|
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
893 |
"Created: / 15-03-2010 / 19:41:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
894 |
"Modified: / 15-03-2010 / 20:55:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
895 |
"Modified: / 04-06-2012 / 19:03:15 / cg" |
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
896 |
! |
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
897 |
|
9954 | 898 |
updateTestCases |
12604
8d8912ec9551
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12055
diff
changeset
|
899 |
allTestCases := Set new. |
8d8912ec9551
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12055
diff
changeset
|
900 |
(self selectedClassesHolder value ? #()) do:[:eachSelected | |
8d8912ec9551
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12055
diff
changeset
|
901 |
(self isTestCaseLike:eachSelected) ifTrue:[ |
8d8912ec9551
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12055
diff
changeset
|
902 |
allTestCases add:eachSelected. |
8d8912ec9551
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12055
diff
changeset
|
903 |
"/ eachSelected allSuperclassesDo:[:eachClass | |
8d8912ec9551
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12055
diff
changeset
|
904 |
"/ (eachClass isTestCaseLike) ifTrue:[ |
8d8912ec9551
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12055
diff
changeset
|
905 |
"/ allTestCases add:eachClass |
8d8912ec9551
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12055
diff
changeset
|
906 |
"/ ] |
8d8912ec9551
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12055
diff
changeset
|
907 |
"/ ] |
8d8912ec9551
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12055
diff
changeset
|
908 |
] |
8d8912ec9551
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12055
diff
changeset
|
909 |
]. |
11552 | 910 |
allTestCases := allTestCases asArray |
9954 | 911 |
|
912 |
"Created: / 11-03-2010 / 10:31:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
11197 | 913 |
"Modified: / 24-01-2012 / 22:09:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
11552 | 914 |
"Modified: / 04-06-2012 / 19:02:52 / cg" |
9954 | 915 |
! |
916 |
||
917 |
updateVisibility |
|
918 |
||
919 |
self hasTestCaseSelected |
|
920 |
ifTrue:[self show] |
|
12604
8d8912ec9551
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12055
diff
changeset
|
921 |
ifFalse:[self hide]. |
8d8912ec9551
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12055
diff
changeset
|
922 |
|
8d8912ec9551
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12055
diff
changeset
|
923 |
(testProcess isNil or:[ testProcess isDead]) ifTrue:[ |
8d8912ec9551
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12055
diff
changeset
|
924 |
"/ fix my ideo of being running, in case the testProcess died without |
8d8912ec9551
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12055
diff
changeset
|
925 |
"/ me being informed (hardTerminate) |
8d8912ec9551
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12055
diff
changeset
|
926 |
self runningHolder value:false. |
8d8912ec9551
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12055
diff
changeset
|
927 |
self progressIndicatorShownHolder value:false. |
8d8912ec9551
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12055
diff
changeset
|
928 |
] |
9954 | 929 |
|
930 |
"Created: / 11-03-2010 / 09:02:40 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
931 |
! ! |
|
932 |
||
933 |
!TestRunnerEmbedded methodsFor:'hooks'! |
|
934 |
||
10862 | 935 |
commonPostOpen |
936 |
||
937 |
Smalltalk addDependent: self. |
|
938 |
||
939 |
"Created: / 17-11-2011 / 20:59:47 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
940 |
! |
|
941 |
||
9954 | 942 |
postBuildRunnerPanel: aView |
943 |
||
944 |
runnerPanel := aView. |
|
945 |
runnerPanel backgroundColor: self resultBackgroundColorAspect value |
|
946 |
||
947 |
"Created: / 15-03-2010 / 14:26:15 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10862 | 948 |
! |
949 |
||
950 |
releaseAsSubCanvas |
|
951 |
||
952 |
Smalltalk removeDependent: self. |
|
953 |
||
954 |
"Created: / 17-11-2011 / 21:03:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
9954 | 955 |
! ! |
956 |
||
957 |
!TestRunnerEmbedded methodsFor:'private'! |
|
958 |
||
959 |
hide |
|
960 |
||
961 |
self visibility: false height: 0 |
|
962 |
||
963 |
"Created: / 11-03-2010 / 09:07:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
964 |
! |
|
965 |
||
966 |
isTestCaseLike:cls |
|
967 |
||
968 |
^(super isTestCaseLike: cls) and: |
|
969 |
[(cls askFor: #isAbstract) not] |
|
970 |
||
971 |
"Modified: / 04-03-2011 / 06:54:13 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
972 |
! |
|
973 |
||
12864
2d6b4213f793
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12762
diff
changeset
|
974 |
postBuildProgressIndicator:aWidget |
2d6b4213f793
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12762
diff
changeset
|
975 |
progressIndicator := aWidget |
2d6b4213f793
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12762
diff
changeset
|
976 |
! |
2d6b4213f793
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12762
diff
changeset
|
977 |
|
9954 | 978 |
show |
979 |
||
980 |
self visibility: true height: 50 |
|
981 |
||
982 |
"Created: / 11-03-2010 / 09:07:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
983 |
! |
|
984 |
||
10564
4e109c7b8ee8
comment/format in: #visibility:height:
Claus Gittinger <cg@exept.de>
parents:
10563
diff
changeset
|
985 |
visibility:visibility height:height |
4e109c7b8ee8
comment/format in: #visibility:height:
Claus Gittinger <cg@exept.de>
parents:
10563
diff
changeset
|
986 |
|container list h| |
9954 | 987 |
|
10564
4e109c7b8ee8
comment/format in: #visibility:height:
Claus Gittinger <cg@exept.de>
parents:
10563
diff
changeset
|
988 |
(container := self window container) ifNil:[ ^ self ]. |
4e109c7b8ee8
comment/format in: #visibility:height:
Claus Gittinger <cg@exept.de>
parents:
10563
diff
changeset
|
989 |
h := visibility ifFalse:[0] ifTrue:[ height ]. |
4e109c7b8ee8
comment/format in: #visibility:height:
Claus Gittinger <cg@exept.de>
parents:
10563
diff
changeset
|
990 |
container isVisible == visibility ifFalse:[ |
4e109c7b8ee8
comment/format in: #visibility:height:
Claus Gittinger <cg@exept.de>
parents:
10563
diff
changeset
|
991 |
container isVisible:visibility |
4e109c7b8ee8
comment/format in: #visibility:height:
Claus Gittinger <cg@exept.de>
parents:
10563
diff
changeset
|
992 |
]. |
9954 | 993 |
list := container container subViews first. |
10564
4e109c7b8ee8
comment/format in: #visibility:height:
Claus Gittinger <cg@exept.de>
parents:
10563
diff
changeset
|
994 |
(list layout bottomOffset ~= height negated) ifTrue:[ |
4e109c7b8ee8
comment/format in: #visibility:height:
Claus Gittinger <cg@exept.de>
parents:
10563
diff
changeset
|
995 |
list layout:((list layout) |
4e109c7b8ee8
comment/format in: #visibility:height:
Claus Gittinger <cg@exept.de>
parents:
10563
diff
changeset
|
996 |
bottomOffset:height negated; |
4e109c7b8ee8
comment/format in: #visibility:height:
Claus Gittinger <cg@exept.de>
parents:
10563
diff
changeset
|
997 |
yourself) |
4e109c7b8ee8
comment/format in: #visibility:height:
Claus Gittinger <cg@exept.de>
parents:
10563
diff
changeset
|
998 |
]. |
9954 | 999 |
|
1000 |
"Created: / 11-03-2010 / 09:51:26 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1001 |
! ! |
|
1002 |
||
1003 |
!TestRunnerEmbedded methodsFor:'queries'! |
|
1004 |
||
1005 |
hasTestCaseSelected |
|
1006 |
||
11966
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
1007 |
^self allTestCases notEmptyOrNil |
9954 | 1008 |
|
1009 |
"Created: / 11-03-2010 / 09:06:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1010 |
"Modified: / 15-03-2010 / 20:54:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10454 | 1011 |
"Modified: / 04-08-2011 / 20:42:10 / cg" |
9954 | 1012 |
! ! |
1013 |
||
1014 |
!TestRunnerEmbedded methodsFor:'utilities'! |
|
1015 |
||
10432 | 1016 |
resultForSuite:suite |
1017 |
|result| |
|
9954 | 1018 |
|
11925
7e2860fce495
use TestResultForSTX in SUnit runner
Claus Gittinger <cg@exept.de>
parents:
11600
diff
changeset
|
1019 |
result := TestResult defaultResultClass new. |
10432 | 1020 |
suite tests do:[:test | |
10606 | 1021 |
| sel cls | |
10432 | 1022 |
|
1023 |
sel := test selector. |
|
10606 | 1024 |
cls := test class. |
1025 |
(cls testSelectorPassed:sel) ifTrue:[ |
|
1026 |
result passedOutcomes add: (cls rememberedOutcomeFor: sel) |
|
10432 | 1027 |
] ifFalse:[ |
10606 | 1028 |
(cls testSelectorError:sel) ifTrue:[ |
1029 |
result errorOutcomes add:(cls rememberedOutcomeFor: sel) |
|
10432 | 1030 |
] ifFalse:[ |
10606 | 1031 |
(cls testSelectorFailed:sel) ifTrue:[ |
1032 |
result failureOutcomes add:(cls rememberedOutcomeFor: sel) |
|
10432 | 1033 |
] |
1034 |
] |
|
1035 |
] |
|
1036 |
]. |
|
1037 |
^ result |
|
9954 | 1038 |
|
1039 |
"Created: / 15-03-2010 / 19:46:26 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10432 | 1040 |
"Modified: / 02-08-2011 / 18:20:00 / cg" |
10606 | 1041 |
"Modified: / 20-08-2011 / 14:30:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
9954 | 1042 |
! |
1043 |
||
1044 |
suiteForRun |
|
12762
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
1045 |
"if methods are selected, a suite for those methods is built and returned. |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
1046 |
If protocoly are selected, a suite for all methods in those protocols |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
1047 |
is built and returned. |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
1048 |
Otherwise, a suite for all methods in the class is built and returned" |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
1049 |
|
10374 | 1050 |
| methods protocols suite selectedClass | |
1051 |
||
1052 |
selectedClass := self theSingleTestCase. |
|
11966
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
1053 |
|
10563
f77d63752e6a
comment/format in: #suiteForRunAll
Claus Gittinger <cg@exept.de>
parents:
10454
diff
changeset
|
1054 |
(methods := selectedMethodsHolder value) notEmptyOrNil ifTrue:[ |
f77d63752e6a
comment/format in: #suiteForRunAll
Claus Gittinger <cg@exept.de>
parents:
10454
diff
changeset
|
1055 |
suite := TestSuite named: (self suiteNameFromMethods: methods). |
11966
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
1056 |
(self selectedTestMethodsInClass:selectedClass) do:[:mthd| |
10563
f77d63752e6a
comment/format in: #suiteForRunAll
Claus Gittinger <cg@exept.de>
parents:
10454
diff
changeset
|
1057 |
| class selector | |
10374 | 1058 |
class := selectedClass ifNil:[mthd mclass]. |
10563
f77d63752e6a
comment/format in: #suiteForRunAll
Claus Gittinger <cg@exept.de>
parents:
10454
diff
changeset
|
1059 |
suite addTest: (class asTestCase selector: mthd selector) |
f77d63752e6a
comment/format in: #suiteForRunAll
Claus Gittinger <cg@exept.de>
parents:
10454
diff
changeset
|
1060 |
]. |
f77d63752e6a
comment/format in: #suiteForRunAll
Claus Gittinger <cg@exept.de>
parents:
10454
diff
changeset
|
1061 |
^suite |
f77d63752e6a
comment/format in: #suiteForRunAll
Claus Gittinger <cg@exept.de>
parents:
10454
diff
changeset
|
1062 |
]. |
9954 | 1063 |
|
12762
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
1064 |
(protocols := selectedProtocolsHolder value) notEmptyOrNil ifTrue:[ |
10563
f77d63752e6a
comment/format in: #suiteForRunAll
Claus Gittinger <cg@exept.de>
parents:
10454
diff
changeset
|
1065 |
suite := TestSuite named: (self suiteNameFromProtocols: protocols). |
11966
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
1066 |
(self selectedTestMethodsFromProtocols: protocols inClass:selectedClass) do:[:mthd| |
10563
f77d63752e6a
comment/format in: #suiteForRunAll
Claus Gittinger <cg@exept.de>
parents:
10454
diff
changeset
|
1067 |
| class selector | |
13338
da80957ff486
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12864
diff
changeset
|
1068 |
class := selectedClass ifNil:[mthd mclass]. |
da80957ff486
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12864
diff
changeset
|
1069 |
|
da80957ff486
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12864
diff
changeset
|
1070 |
suite addTest: (class "mthd mclass" asTestCase selector: mthd selector) |
10563
f77d63752e6a
comment/format in: #suiteForRunAll
Claus Gittinger <cg@exept.de>
parents:
10454
diff
changeset
|
1071 |
]. |
f77d63752e6a
comment/format in: #suiteForRunAll
Claus Gittinger <cg@exept.de>
parents:
10454
diff
changeset
|
1072 |
^suite |
f77d63752e6a
comment/format in: #suiteForRunAll
Claus Gittinger <cg@exept.de>
parents:
10454
diff
changeset
|
1073 |
]. |
10374 | 1074 |
|
9954 | 1075 |
^self suiteForRunAll |
1076 |
||
1077 |
"Created: / 15-03-2010 / 13:13:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10374 | 1078 |
"Modified: / 22-07-2011 / 15:48:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10454 | 1079 |
"Modified: / 04-08-2011 / 19:06:42 / cg" |
9954 | 1080 |
! |
1081 |
||
1082 |
suiteForRunAll |
|
1083 |
|suite| |
|
11966
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
1084 |
|
11552 | 1085 |
allTestCases isNil ifTrue:[ |
1086 |
self updateTestCases. |
|
1087 |
]. |
|
11966
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
1088 |
suite := TestSuite named:(self suiteNameFromClasses: self allTestCases). |
11552 | 1089 |
|
1090 |
allTestCases do:[:testCase | |
|
10563
f77d63752e6a
comment/format in: #suiteForRunAll
Claus Gittinger <cg@exept.de>
parents:
10454
diff
changeset
|
1091 |
suite addTests:(self buildSuiteFromClass:testCase) tests |
f77d63752e6a
comment/format in: #suiteForRunAll
Claus Gittinger <cg@exept.de>
parents:
10454
diff
changeset
|
1092 |
]. |
9954 | 1093 |
^suite |
1094 |
||
1095 |
"Modified: / 04-03-2011 / 06:57:09 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
11552 | 1096 |
"Modified: / 04-06-2012 / 19:01:48 / cg" |
1097 |
! |
|
1098 |
||
1099 |
suiteForRunFailed |
|
12762
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
1100 |
|suite numTests| |
11552 | 1101 |
|
11966
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
1102 |
suite := TestSuite named:(self suiteNameFromClasses: self allTestCases). |
12762
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
1103 |
numTests := 0. |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
1104 |
|
11966
6040753eab24
asynchronous update of testSuite and suiteAndResult
Claus Gittinger <cg@exept.de>
parents:
11925
diff
changeset
|
1105 |
self allTestCases do:[:testCase | |
11552 | 1106 |
(self buildSuiteFromClass:testCase) tests do:[:eachTest | |
1107 |
| sel cls | |
|
1108 |
||
1109 |
sel := eachTest selector. |
|
1110 |
cls := eachTest class. |
|
1111 |
(cls testSelectorPassed:sel) ifFalse:[ |
|
12762
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
1112 |
suite addTest:eachTest. |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
1113 |
numTests := numTests + 1. |
11552 | 1114 |
] |
1115 |
] |
|
1116 |
]. |
|
12762
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
1117 |
numTests == 1 ifTrue:[ |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
1118 |
suite name:(suite tests first selector) |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
1119 |
] ifFalse:[ |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
1120 |
suite name:(suite tests size printString,' tests') |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
1121 |
]. |
11552 | 1122 |
^suite |
1123 |
||
1124 |
"Modified: / 04-03-2011 / 06:57:09 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1125 |
"Created: / 04-06-2012 / 18:32:40 / cg" |
|
9954 | 1126 |
! ! |
1127 |
||
1128 |
!TestRunnerEmbedded::SuiteAndResult class methodsFor:'instance creation'! |
|
1129 |
||
1130 |
suite: suite result: result |
|
1131 |
||
1132 |
^self new |
|
1133 |
suite: suite; |
|
1134 |
result: result. |
|
1135 |
||
1136 |
"Modified: / 15-03-2010 / 15:27:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1137 |
! ! |
|
1138 |
||
1139 |
!TestRunnerEmbedded::SuiteAndResult methodsFor:'accessing'! |
|
1140 |
||
1141 |
color |
|
12762
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
1142 |
|numTests numRun| |
9954 | 1143 |
|
12762
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
1144 |
self testCount > 0 ifTrue:[ |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
1145 |
result notNil ifTrue:[ |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
1146 |
self hasErrors ifTrue:[^TestRunnerEmbedded errorColor]. |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
1147 |
self hasFailures ifTrue:[^TestRunnerEmbedded failedColor]. |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
1148 |
self hasPassed ifTrue:[ |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
1149 |
numTests := suite tests size. |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
1150 |
numRun := result passedCount + result failureCount + result errorCount. |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
1151 |
numRun = numTests ifTrue:[ |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
1152 |
^TestRunnerEmbedded passedColor |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
1153 |
] |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
1154 |
]. |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
1155 |
] |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
1156 |
]. |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
1157 |
^ TestRunnerEmbedded notRunColor |
9954 | 1158 |
|
1159 |
"Created: / 15-03-2010 / 15:24:35 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1160 |
"Modified: / 07-09-2010 / 08:25:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1161 |
! |
|
1162 |
||
1163 |
info |
|
12762
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
1164 |
|numTests numRun| |
9954 | 1165 |
|
1166 |
result ifNil:[^'']. |
|
12762
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
1167 |
|
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
1168 |
numTests := suite tests size. |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
1169 |
numRun := result passedCount + result failureCount + result errorCount. |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
1170 |
"/ (result passedCount + result failureCount + result errorCount) = 1 ifTrue:[^'']. |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
1171 |
numRun == 0 ifTrue:[ |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
1172 |
numTests == 1 ifTrue:[ |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
1173 |
^'not run' |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
1174 |
]. |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
1175 |
^'%1 tests, 0 run' bindWith: numTests |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
1176 |
]. |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
1177 |
numRun < numTests ifTrue:[ |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
1178 |
^'%1 tests, %2 run, %3 passed, %4 fail or error' |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
1179 |
bindWith: numTests |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
1180 |
with: numRun |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
1181 |
with: result passedCount |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
1182 |
with: (result failureCount+result errorCount) |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
1183 |
]. |
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
1184 |
|
9954 | 1185 |
^'%1 tests, %2 passed, %3 failed, %4 errors' |
12762
eeb5359c60d3
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12604
diff
changeset
|
1186 |
bindWith: numTests |
9954 | 1187 |
with: result passedCount |
1188 |
with: result failureCount |
|
1189 |
with: result errorCount |
|
1190 |
||
1191 |
"Created: / 15-03-2010 / 20:23:34 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1192 |
! |
|
1193 |
||
1194 |
name |
|
1195 |
||
1196 |
^suite name |
|
1197 |
||
1198 |
"Created: / 15-03-2010 / 15:12:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1199 |
! |
|
1200 |
||
1201 |
result |
|
1202 |
^ result |
|
1203 |
! |
|
1204 |
||
1205 |
result:aTestResult |
|
1206 |
result := aTestResult. |
|
1207 |
! |
|
1208 |
||
1209 |
suite |
|
1210 |
^ suite |
|
1211 |
! |
|
1212 |
||
1213 |
suite:aTestSuite |
|
1214 |
suite := aTestSuite. |
|
1215 |
! |
|
1216 |
||
10647
1e9912f9a0d8
Embedded test runner no longer reuse old testcase instances
vrany
parents:
10608
diff
changeset
|
1217 |
suiteForRun |
1e9912f9a0d8
Embedded test runner no longer reuse old testcase instances
vrany
parents:
10608
diff
changeset
|
1218 |
|
1e9912f9a0d8
Embedded test runner no longer reuse old testcase instances
vrany
parents:
10608
diff
changeset
|
1219 |
| suiteForRun | |
1e9912f9a0d8
Embedded test runner no longer reuse old testcase instances
vrany
parents:
10608
diff
changeset
|
1220 |
suiteForRun := suite class named: suite name. |
1e9912f9a0d8
Embedded test runner no longer reuse old testcase instances
vrany
parents:
10608
diff
changeset
|
1221 |
suiteForRun addTests: |
1e9912f9a0d8
Embedded test runner no longer reuse old testcase instances
vrany
parents:
10608
diff
changeset
|
1222 |
(suite tests collect:[:testCase|testCase class selector: testCase selector]). |
1e9912f9a0d8
Embedded test runner no longer reuse old testcase instances
vrany
parents:
10608
diff
changeset
|
1223 |
^suiteForRun |
1e9912f9a0d8
Embedded test runner no longer reuse old testcase instances
vrany
parents:
10608
diff
changeset
|
1224 |
|
1e9912f9a0d8
Embedded test runner no longer reuse old testcase instances
vrany
parents:
10608
diff
changeset
|
1225 |
"Created: / 22-08-2011 / 09:56:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1e9912f9a0d8
Embedded test runner no longer reuse old testcase instances
vrany
parents:
10608
diff
changeset
|
1226 |
! |
1e9912f9a0d8
Embedded test runner no longer reuse old testcase instances
vrany
parents:
10608
diff
changeset
|
1227 |
|
9954 | 1228 |
testCount |
1229 |
||
1230 |
^suite tests size |
|
1231 |
||
1232 |
"Created: / 15-03-2010 / 15:44:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1233 |
! ! |
|
1234 |
||
1235 |
!TestRunnerEmbedded::SuiteAndResult methodsFor:'queries'! |
|
1236 |
||
1237 |
hasErrors |
|
1238 |
||
1239 |
^result errorCount > 0 |
|
1240 |
||
1241 |
"Created: / 15-03-2010 / 15:21:12 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1242 |
! |
|
1243 |
||
1244 |
hasFailures |
|
1245 |
||
1246 |
^result failureCount > 0 |
|
1247 |
||
1248 |
"Created: / 15-03-2010 / 15:21:25 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1249 |
! |
|
1250 |
||
1251 |
hasFailuresOrErrors |
|
1252 |
||
1253 |
^self hasErrors or:[self hasFailures] |
|
1254 |
||
1255 |
"Created: / 15-03-2010 / 15:45:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1256 |
! |
|
1257 |
||
1258 |
hasPassed |
|
1259 |
||
1260 |
^result passedCount > 0 |
|
1261 |
||
1262 |
"Created: / 15-03-2010 / 22:06:26 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1263 |
! ! |
|
1264 |
||
1265 |
!TestRunnerEmbedded class methodsFor:'documentation'! |
|
1266 |
||
10432 | 1267 |
version |
13338
da80957ff486
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12864
diff
changeset
|
1268 |
^ '$Header: /cvs/stx/stx/libtool/Tools__TestRunnerEmbedded.st,v 1.36 2013-08-21 00:25:21 cg Exp $' |
10432 | 1269 |
! |
1270 |
||
9954 | 1271 |
version_CVS |
13338
da80957ff486
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12864
diff
changeset
|
1272 |
^ '$Header: /cvs/stx/stx/libtool/Tools__TestRunnerEmbedded.st,v 1.36 2013-08-21 00:25:21 cg Exp $' |
9954 | 1273 |
! |
1274 |
||
1275 |
version_SVN |
|
13338
da80957ff486
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12864
diff
changeset
|
1276 |
^ '$Id: Tools__TestRunnerEmbedded.st,v 1.36 2013-08-21 00:25:21 cg Exp $' |
9954 | 1277 |
! ! |
12604
8d8912ec9551
class: Tools::TestRunnerEmbedded
Claus Gittinger <cg@exept.de>
parents:
12055
diff
changeset
|
1278 |