author | Claus Gittinger <cg@exept.de> |
Wed, 24 Oct 2012 17:32:52 +0200 | |
changeset 462 | 4014869e047c |
parent 447 | 7cc5530a8842 |
child 478 | a8ca323da616 |
permissions | -rw-r--r-- |
0 | 1 |
"{ Package: 'stx:goodies/sunit' }" |
2 |
||
3 |
Object subclass:#TestResult |
|
347 | 4 |
instanceVariableNames:'name timestamp failures errors passed outcome' |
5 |
classVariableNames:'DefaultClass' |
|
104 | 6 |
poolDictionaries:'' |
7 |
category:'SUnit-Base' |
|
8 |
! |
|
9 |
||
222 | 10 |
TestResult comment:'' |
0 | 11 |
! |
12 |
||
336 | 13 |
!TestResult class methodsFor:'documentation'! |
14 |
||
15 |
documentation |
|
16 |
" |
|
17 |
runInfoPerTest: |
|
18 |
will keep additional info for a testCase run: |
|
19 |
startTime, endTime, backtrace (if fail or error) and collectedStdout |
|
20 |
" |
|
21 |
! ! |
|
14 | 22 |
|
222 | 23 |
!TestResult class methodsFor:'instance creation'! |
24 |
||
25 |
new |
|
462 | 26 |
self sunitName == #TestResult ifTrue:[ |
405 | 27 |
^ self defaultResultClass basicNew initialize. |
28 |
] ifFalse:[ |
|
29 |
^ self basicNew initialize |
|
30 |
]. |
|
347 | 31 |
|
405 | 32 |
" |
33 |
TestResult new. |
|
34 |
TestResultForRunWithDebug new. |
|
35 |
" |
|
36 |
||
37 |
"Modified (comment): / 20-08-2011 / 17:34:35 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
347 | 38 |
! ! |
39 |
||
40 |
!TestResult class methodsFor:'accessing'! |
|
41 |
||
42 |
defaultResultClass |
|
43 |
DefaultClass notNil ifTrue:[^DefaultClass]. |
|
44 |
||
45 |
((Smalltalk respondsTo: #isSmalltalkX) and:[Smalltalk isSmalltalkX]) ifTrue:[ |
|
46 |
DefaultClass := TestResultStX. |
|
47 |
^DefaultClass |
|
48 |
]. |
|
49 |
"Add more dialects here, if you want..." |
|
50 |
||
51 |
"Default" |
|
52 |
DefaultClass := self. |
|
53 |
||
54 |
"Created: / 16-08-2011 / 15:02:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
222 | 55 |
! ! |
56 |
||
68 | 57 |
!TestResult class methodsFor:'exceptions'! |
0 | 58 |
|
59 |
error |
|
104 | 60 |
^self exError |
0 | 61 |
! |
62 |
||
63 |
exError |
|
104 | 64 |
^SUnitNameResolver errorObject |
0 | 65 |
! |
66 |
||
67 |
failure |
|
104 | 68 |
^TestFailure |
69 |
! |
|
0 | 70 |
|
104 | 71 |
resumableFailure |
72 |
^ResumableTestFailure |
|
0 | 73 |
! |
74 |
||
222 | 75 |
signalErrorWith: aString |
76 |
self error sunitSignalWith: aString |
|
77 |
! |
|
0 | 78 |
|
222 | 79 |
signalFailureWith: aString |
80 |
self failure sunitSignalWith: aString |
|
0 | 81 |
! ! |
82 |
||
68 | 83 |
!TestResult methodsFor:'accessing'! |
0 | 84 |
|
85 |
defects |
|
104 | 86 |
^OrderedCollection new |
87 |
addAll: self errors; |
|
88 |
addAll: self failures; yourself |
|
0 | 89 |
! |
90 |
||
91 |
errorCount |
|
104 | 92 |
|
347 | 93 |
^self errorOutcomes size |
94 |
||
95 |
"Modified: / 16-08-2011 / 15:58:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
96 |
! |
|
97 |
||
98 |
errorOutcomes |
|
99 |
||
100 |
errors isNil ifTrue: [errors := OrderedCollection new]. |
|
101 |
^errors |
|
102 |
||
103 |
"Created: / 16-08-2011 / 15:55:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
0
diff
changeset
|
104 |
! |
0 | 105 |
|
106 |
errors |
|
347 | 107 |
|
447 | 108 |
errors isNil ifTrue: [^OrderedCollection new]. |
109 |
^errors collect:[:each|each testCase] |
|
347 | 110 |
|
447 | 111 |
"Modified (format): / 02-08-2012 / 15:40:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
0
diff
changeset
|
112 |
! |
0 | 113 |
|
300
570aed392231
TestResult refactoring - now it allow for more fine-grained customization
vrany
parents:
297
diff
changeset
|
114 |
exceptions |
570aed392231
TestResult refactoring - now it allow for more fine-grained customization
vrany
parents:
297
diff
changeset
|
115 |
|
570aed392231
TestResult refactoring - now it allow for more fine-grained customization
vrany
parents:
297
diff
changeset
|
116 |
"Returns a set of exceptions to be handled. Bu default, |
570aed392231
TestResult refactoring - now it allow for more fine-grained customization
vrany
parents:
297
diff
changeset
|
117 |
failure and generic error is handled. This method may |
570aed392231
TestResult refactoring - now it allow for more fine-grained customization
vrany
parents:
297
diff
changeset
|
118 |
be overriden by custom TestResult subclasses to add more. |
570aed392231
TestResult refactoring - now it allow for more fine-grained customization
vrany
parents:
297
diff
changeset
|
119 |
For example, a 'self halt' is not handled by default |
570aed392231
TestResult refactoring - now it allow for more fine-grained customization
vrany
parents:
297
diff
changeset
|
120 |
exceptions set" |
570aed392231
TestResult refactoring - now it allow for more fine-grained customization
vrany
parents:
297
diff
changeset
|
121 |
|
570aed392231
TestResult refactoring - now it allow for more fine-grained customization
vrany
parents:
297
diff
changeset
|
122 |
^self class failure , self class error |
570aed392231
TestResult refactoring - now it allow for more fine-grained customization
vrany
parents:
297
diff
changeset
|
123 |
|
570aed392231
TestResult refactoring - now it allow for more fine-grained customization
vrany
parents:
297
diff
changeset
|
124 |
"Created: / 03-08-2011 / 14:11:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
570aed392231
TestResult refactoring - now it allow for more fine-grained customization
vrany
parents:
297
diff
changeset
|
125 |
! |
570aed392231
TestResult refactoring - now it allow for more fine-grained customization
vrany
parents:
297
diff
changeset
|
126 |
|
0 | 127 |
failureCount |
128 |
||
347 | 129 |
^self failureOutcomes size |
130 |
||
131 |
"Modified: / 16-08-2011 / 15:58:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
132 |
! |
|
133 |
||
134 |
failureOutcomes |
|
135 |
||
136 |
failures isNil ifTrue: [failures := Set new]. |
|
137 |
^failures |
|
138 |
||
139 |
"Created: / 16-08-2011 / 15:56:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
0 | 140 |
! |
141 |
||
142 |
failures |
|
347 | 143 |
"We use a Set, not an OrderedCollection as #errors and #passed do, because a resumable test failure in a loop can raise many failures against the same test. In current Sunit UIs, this could result in bizarre test count reporting (-27 tests run, and suchlike). This will be reviewed." |
222 | 144 |
|
447 | 145 |
failures isNil ifTrue: [^OrderedCollection new]. |
146 |
^failures collect:[:each|each testCase] |
|
347 | 147 |
|
447 | 148 |
"Modified (format): / 02-08-2012 / 14:55:51 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
222 | 149 |
! |
150 |
||
151 |
name |
|
152 |
^ name |
|
153 |
! |
|
154 |
||
155 |
name:aString |
|
156 |
name := aString. |
|
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
0
diff
changeset
|
157 |
! |
0 | 158 |
|
418 | 159 |
outcomes |
160 |
||
161 |
^OrderedCollection new |
|
162 |
addAll: failures; |
|
163 |
addAll: errors; |
|
164 |
addAll: passed; |
|
165 |
yourself |
|
166 |
||
167 |
"Created: / 20-08-2011 / 14:00:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
168 |
! |
|
169 |
||
170 |
outcomesDo: aBlock |
|
171 |
||
172 |
failures notNil ifTrue:[failures do: aBlock]. |
|
173 |
errors notNil ifTrue:[errors do: aBlock]. |
|
174 |
passed notNil ifTrue:[passed do: aBlock]. |
|
175 |
||
176 |
"Created: / 20-08-2011 / 14:01:15 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
177 |
! |
|
178 |
||
53 | 179 |
passed |
434 | 180 |
passed isNil ifTrue: [ |
181 |
"/ cg: exposed and added to (see TestRunnerEmbedded>>debug) |
|
182 |
passed := OrderedCollection new. |
|
183 |
^ passed. |
|
184 |
]. |
|
447 | 185 |
^passed collect:[:each|each testCase] |
347 | 186 |
|
187 |
"Modified: / 16-08-2011 / 15:54:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
434 | 188 |
"Modified: / 07-11-2011 / 11:19:57 / cg" |
447 | 189 |
"Modified (format): / 02-08-2012 / 14:55:57 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
53 | 190 |
! |
191 |
||
192 |
passedCount |
|
193 |
||
347 | 194 |
^self passedOutcomes size |
195 |
||
196 |
"Modified: / 16-08-2011 / 15:58:13 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
197 |
! |
|
198 |
||
199 |
passedOutcomes |
|
200 |
||
201 |
passed isNil ifTrue: [passed := OrderedCollection new]. |
|
202 |
^passed |
|
203 |
||
204 |
"Created: / 16-08-2011 / 15:56:19 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
53 | 205 |
! |
206 |
||
0 | 207 |
runCount |
53 | 208 |
|
104 | 209 |
^self passedCount + self failureCount + self errorCount |
53 | 210 |
! |
211 |
||
347 | 212 |
testOutcomes |
213 |
||
214 |
^(OrderedCollection new: self runCount) |
|
215 |
addAll: self passedOutcomes; |
|
216 |
addAll: self errorOutcomes; |
|
217 |
addAll: self failureOutcomes; |
|
218 |
yourself |
|
219 |
||
220 |
"Created: / 16-08-2011 / 16:42:12 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
221 |
! |
|
222 |
||
53 | 223 |
tests |
104 | 224 |
|
225 |
^(OrderedCollection new: self runCount) |
|
226 |
addAll: self passed; |
|
227 |
addAll: self errors; |
|
228 |
addAll: self failures; |
|
229 |
yourself |
|
222 | 230 |
! |
231 |
||
232 |
timestamp |
|
233 |
^ timestamp |
|
270 | 234 |
! |
235 |
||
236 |
timestamp:something |
|
237 |
timestamp := something. |
|
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
0
diff
changeset
|
238 |
! ! |
0 | 239 |
|
438 | 240 |
!TestResult methodsFor:'adding / removing'! |
222 | 241 |
|
347 | 242 |
addError:testcase detail:detail |
243 |
"Called when a test outcome is error. testCase |
|
244 |
is the errorneous testcase, detail is platform |
|
245 |
specific object describing the error. Actually, |
|
246 |
on all platforms exept GemStone, detail is an instance |
|
247 |
of an exception that caused the error" |
|
248 |
"JV2011-08-03: TODO: Validate the comment above with GS, |
|
249 |
possibly change name to 'exception'" |
|
300
570aed392231
TestResult refactoring - now it allow for more fine-grained customization
vrany
parents:
297
diff
changeset
|
250 |
|
418 | 251 |
|
347 | 252 |
outcome result: #error. |
418 | 253 |
outcome remember. |
347 | 254 |
^ self errorOutcomes add:outcome. |
300
570aed392231
TestResult refactoring - now it allow for more fine-grained customization
vrany
parents:
297
diff
changeset
|
255 |
|
570aed392231
TestResult refactoring - now it allow for more fine-grained customization
vrany
parents:
297
diff
changeset
|
256 |
"Created: / 03-08-2011 / 13:50:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
318
96ce5904bba6
added: #rememberException:detail:
Claus Gittinger <cg@exept.de>
parents:
316
diff
changeset
|
257 |
"Modified: / 06-08-2011 / 09:46:41 / cg" |
418 | 258 |
"Modified: / 20-08-2011 / 12:46:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
222 | 259 |
! |
260 |
||
347 | 261 |
addFailure:testcase detail:detail |
262 |
"Called when a test fails. testCase is the failed |
|
263 |
testcase, detail is platform specific object describing |
|
264 |
the failure. Actually, on all platforms exept GemStone, |
|
265 |
detail is an instance of an exception that caused the failure" |
|
266 |
"JV2011-08-03: TODO: Validate the comment above with GS, |
|
267 |
possibly change name to 'exception'" |
|
418 | 268 |
|
347 | 269 |
"Special handling here, because failures can be resumable" |
270 |
self failureOutcomes do:[:outcome | |
|
271 |
outcome testCase = testcase ifTrue:[ |
|
272 |
^ self |
|
273 |
]. |
|
274 |
]. |
|
275 |
outcome result: #fail. |
|
418 | 276 |
outcome remember. |
347 | 277 |
^ self failureOutcomes add: outcome |
300
570aed392231
TestResult refactoring - now it allow for more fine-grained customization
vrany
parents:
297
diff
changeset
|
278 |
|
570aed392231
TestResult refactoring - now it allow for more fine-grained customization
vrany
parents:
297
diff
changeset
|
279 |
"Created: / 03-08-2011 / 13:53:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
318
96ce5904bba6
added: #rememberException:detail:
Claus Gittinger <cg@exept.de>
parents:
316
diff
changeset
|
280 |
"Modified: / 06-08-2011 / 09:55:17 / cg" |
418 | 281 |
"Modified: / 20-08-2011 / 12:46:15 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
318
96ce5904bba6
added: #rememberException:detail:
Claus Gittinger <cg@exept.de>
parents:
316
diff
changeset
|
282 |
! |
96ce5904bba6
added: #rememberException:detail:
Claus Gittinger <cg@exept.de>
parents:
316
diff
changeset
|
283 |
|
418 | 284 |
addPass:testCase |
285 |
||
347 | 286 |
outcome result: #pass. |
418 | 287 |
outcome remember. |
347 | 288 |
^ self passedOutcomes add: outcome |
325
76240d956e7d
changed: #rememberExceptionIn:detail:
Claus Gittinger <cg@exept.de>
parents:
323
diff
changeset
|
289 |
|
418 | 290 |
"Modified: / 20-08-2011 / 12:44:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
438 | 291 |
! |
292 |
||
293 |
remove: aTestCase |
|
294 |
"Removes an outcome for given testcase, if any. |
|
295 |
Use with care." |
|
296 |
||
297 |
| remover | |
|
298 |
||
299 |
remover := [:outcomes| |
|
300 |
| o | |
|
301 |
||
302 |
outcomes notNil ifTrue:[ |
|
303 |
o := outcomes detect:[:each|each testCase == aTestCase] ifNone: [nil]. |
|
304 |
o notNil ifTrue:[outcomes remove: o. ^self]. |
|
305 |
]. |
|
306 |
]. |
|
307 |
||
308 |
remover value: errors. |
|
309 |
remover value: failures. |
|
310 |
remover value: passed. |
|
311 |
||
312 |
"Created: / 16-01-2012 / 20:36:51 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
222 | 313 |
! ! |
314 |
||
315 |
!TestResult methodsFor:'deprecated'! |
|
316 |
||
317 |
correctCount |
|
318 |
"deprecated - use #passedCount" |
|
319 |
||
320 |
^self passedCount |
|
321 |
! ! |
|
322 |
||
323 |
!TestResult methodsFor:'initialize-release'! |
|
0 | 324 |
|
325 |
initialize |
|
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
0
diff
changeset
|
326 |
! ! |
0 | 327 |
|
347 | 328 |
!TestResult methodsFor:'outcome'! |
329 |
||
330 |
createOutcome |
|
331 |
||
332 |
^TestCaseOutcome new. |
|
0 | 333 |
|
347 | 334 |
"Created: / 16-08-2011 / 17:14:11 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
335 |
! |
|
297
87eb8f911bcf
changed: #exceptionInfoStringFor:in:
Claus Gittinger <cg@exept.de>
parents:
292
diff
changeset
|
336 |
|
347 | 337 |
rememberEndTime |
338 |
||
339 |
^nil |
|
292 | 340 |
|
347 | 341 |
"Created: / 16-08-2011 / 17:31:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
342 |
! |
|
343 |
||
344 |
rememberException:detail |
|
345 |
||
346 |
"Created: / 16-08-2011 / 17:35:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
347 |
! |
|
292 | 348 |
|
347 | 349 |
rememberStartTime |
350 |
||
351 |
^nil |
|
292 | 352 |
|
347 | 353 |
"Created: / 16-08-2011 / 17:31:38 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
354 |
! ! |
|
355 |
||
356 |
!TestResult methodsFor:'printing'! |
|
292 | 357 |
|
0 | 358 |
printOn: aStream |
104 | 359 |
|
360 |
aStream |
|
361 |
nextPutAll: self runCount printString; |
|
362 |
nextPutAll: ' run, '; |
|
363 |
nextPutAll: self correctCount printString; |
|
364 |
nextPutAll: ' passed, '; |
|
365 |
nextPutAll: self failureCount printString; |
|
366 |
nextPutAll: ' failed, '; |
|
367 |
nextPutAll: self errorCount printString; |
|
368 |
nextPutAll: ' error'. |
|
369 |
||
370 |
self errorCount ~= 1 |
|
371 |
ifTrue: [aStream nextPut: $s] |
|
0 | 372 |
! ! |
373 |
||
68 | 374 |
!TestResult methodsFor:'running'! |
0 | 375 |
|
303 | 376 |
performCase:aTestCase |
377 |
"Actually performs the case. The TestCase>>runCase itself calls |
|
300
570aed392231
TestResult refactoring - now it allow for more fine-grained customization
vrany
parents:
297
diff
changeset
|
378 |
a setUp/tearDown methods. The possible error/failure is handled |
570aed392231
TestResult refactoring - now it allow for more fine-grained customization
vrany
parents:
297
diff
changeset
|
379 |
in TestResult>>runCase:. This method is meant to be overriden by |
570aed392231
TestResult refactoring - now it allow for more fine-grained customization
vrany
parents:
297
diff
changeset
|
380 |
custom TestResult subclasses." |
303 | 381 |
|
300
570aed392231
TestResult refactoring - now it allow for more fine-grained customization
vrany
parents:
297
diff
changeset
|
382 |
aTestCase runCase. |
570aed392231
TestResult refactoring - now it allow for more fine-grained customization
vrany
parents:
297
diff
changeset
|
383 |
|
570aed392231
TestResult refactoring - now it allow for more fine-grained customization
vrany
parents:
297
diff
changeset
|
384 |
"Modified: / 02-08-2011 / 18:10:09 / cg" |
570aed392231
TestResult refactoring - now it allow for more fine-grained customization
vrany
parents:
297
diff
changeset
|
385 |
"Created: / 03-08-2011 / 14:02:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
570aed392231
TestResult refactoring - now it allow for more fine-grained customization
vrany
parents:
297
diff
changeset
|
386 |
! |
570aed392231
TestResult refactoring - now it allow for more fine-grained customization
vrany
parents:
297
diff
changeset
|
387 |
|
303 | 388 |
runCase:aTestCase |
316 | 389 |
"run a testcase, catching exceptions" |
390 |
||
429 | 391 |
self runCase:aTestCase debugged:false |
392 |
||
393 |
"Modified: / 16-08-2011 / 17:35:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
394 |
"Modified: / 21-08-2011 / 17:48:28 / cg" |
|
395 |
! |
|
396 |
||
397 |
runCase:aTestCase debugged:debugged |
|
398 |
"run a testcase, debugging exceptions" |
|
399 |
||
438 | 400 |
|
401 |
[ |
|
402 |
[ |
|
403 |
outcome := self createOutcome. |
|
404 |
outcome testCase: aTestCase. |
|
405 |
self rememberStartTime. |
|
406 |
self performCase:aTestCase. |
|
407 |
self rememberEndTime. |
|
408 |
self addPass:aTestCase. |
|
409 |
outcome := nil. |
|
410 |
] sunitOn:self exceptions do: [:ex | |
|
411 |
self rememberEndTime. |
|
412 |
self rememberException: ex. |
|
444 | 413 |
(AbortSignal accepts: ex signal) ifTrue:[ex reject]. |
446 | 414 |
(TerminateProcessRequest accepts: ex signal) ifTrue:[ex reject]. |
438 | 415 |
debugged ifTrue:[ ex reject ]. |
446 | 416 |
|
438 | 417 |
ex sunitAnnounce:aTestCase toResult:self. |
418 |
]. |
|
419 |
] sunitOn: self exceptions do:[:ex| |
|
444 | 420 |
(AbortSignal accepts: ex signal) ifTrue:[ex reject]. |
446 | 421 |
(TerminateProcessRequest accepts: ex signal) ifTrue:[ex reject]. |
422 |
||
438 | 423 |
self remove: aTestCase. |
431 | 424 |
debugged ifTrue:[ ex reject ]. |
438 | 425 |
ex sunitAnnounce:aTestCase toResult:self. |
426 |
] |
|
292 | 427 |
|
429 | 428 |
"Created: / 21-08-2011 / 17:48:19 / cg" |
438 | 429 |
"Modified: / 16-01-2012 / 20:37:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
446 | 430 |
"Modified: / 04-06-2012 / 18:50:15 / cg" |
0 | 431 |
! ! |
432 |
||
68 | 433 |
!TestResult methodsFor:'testing'! |
0 | 434 |
|
53 | 435 |
hasErrors |
436 |
||
104 | 437 |
^self errors size > 0 |
53 | 438 |
! |
439 |
||
440 |
hasFailures |
|
441 |
||
104 | 442 |
^self failures size > 0 |
53 | 443 |
! |
444 |
||
446 | 445 |
hasFailuresOrErrors |
446 |
^ self hasFailures or:[self hasErrors] |
|
447 |
||
448 |
"Created: / 04-06-2012 / 19:06:52 / cg" |
|
449 |
! |
|
450 |
||
0 | 451 |
hasPassed |
104 | 452 |
|
453 |
^self hasErrors not and: [self hasFailures not] |
|
53 | 454 |
! |
455 |
||
456 |
isError: aTestCase |
|
457 |
||
104 | 458 |
^self errors includes: aTestCase |
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
0
diff
changeset
|
459 |
! |
0 | 460 |
|
461 |
isFailure: aTestCase |
|
104 | 462 |
^self failures includes: aTestCase |
53 | 463 |
! |
464 |
||
465 |
isPassed: aTestCase |
|
466 |
||
104 | 467 |
^self passed includes: aTestCase |
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
0
diff
changeset
|
468 |
! ! |
0 | 469 |
|
14 | 470 |
!TestResult class methodsFor:'documentation'! |
471 |
||
472 |
version |
|
462 | 473 |
^ '$Header: /cvs/stx/stx/goodies/sunit/TestResult.st,v 1.43 2012-10-24 15:32:52 cg Exp $' |
297
87eb8f911bcf
changed: #exceptionInfoStringFor:in:
Claus Gittinger <cg@exept.de>
parents:
292
diff
changeset
|
474 |
! |
87eb8f911bcf
changed: #exceptionInfoStringFor:in:
Claus Gittinger <cg@exept.de>
parents:
292
diff
changeset
|
475 |
|
87eb8f911bcf
changed: #exceptionInfoStringFor:in:
Claus Gittinger <cg@exept.de>
parents:
292
diff
changeset
|
476 |
version_CVS |
462 | 477 |
^ '$Header: /cvs/stx/stx/goodies/sunit/TestResult.st,v 1.43 2012-10-24 15:32:52 cg Exp $' |
222 | 478 |
! |
479 |
||
480 |
version_SVN |
|
481 |
^ '§Id: TestResult.st 205 2010-09-11 15:23:01Z vranyj1 §' |
|
14 | 482 |
! ! |