0
|
1 |
'From Smalltalk/X, Version:4.1.1 on 24-oct-2000 at 08:10:32 pm' !
|
|
2 |
|
|
3 |
"{ Package: 'stx:goodies/sunit' }"
|
|
4 |
|
|
5 |
Object subclass:#TestSuite
|
|
6 |
instanceVariableNames:'tests'
|
|
7 |
classVariableNames:''
|
|
8 |
poolDictionaries:''
|
|
9 |
category:'SUnit'
|
|
10 |
!
|
|
11 |
|
|
12 |
!TestSuite methodsFor:'Accessing'!
|
|
13 |
|
|
14 |
addTest: aTest
|
|
15 |
self tests add: aTest!
|
|
16 |
|
|
17 |
addTests: aCollection
|
|
18 |
aCollection do: [:eachTest | self addTest: eachTest]!
|
|
19 |
|
|
20 |
tests
|
|
21 |
tests isNil ifTrue: [tests := OrderedCollection new].
|
|
22 |
^tests! !
|
|
23 |
|
|
24 |
!TestSuite methodsFor:'Dependencies'!
|
|
25 |
|
|
26 |
addDependentToHierachy: anObject
|
|
27 |
self sunitAddDependent: anObject.
|
|
28 |
self tests do: [:each | each addDependentToHierachy: anObject]
|
|
29 |
|
|
30 |
"Modified: / 21.6.2000 / 10:13:35 / Sames"
|
|
31 |
!
|
|
32 |
|
|
33 |
removeDependentFromHierachy: anObject
|
|
34 |
self sunitRemoveDependent: anObject.
|
|
35 |
self tests do: [:each | each removeDependentFromHierachy: anObject]
|
|
36 |
|
|
37 |
"Modified: / 21.6.2000 / 10:13:27 / Sames"
|
|
38 |
! !
|
|
39 |
|
|
40 |
!TestSuite methodsFor:'Running'!
|
|
41 |
|
|
42 |
run
|
|
43 |
| result |
|
|
44 |
result := TestResult new.
|
|
45 |
self run: result.
|
|
46 |
^result!
|
|
47 |
|
|
48 |
run: aResult
|
|
49 |
self tests do:
|
|
50 |
[:each |
|
|
51 |
self sunitChanged: each.
|
|
52 |
each run: aResult]
|
|
53 |
|
|
54 |
"Modified: / 21.6.2000 / 10:14:01 / Sames"
|
|
55 |
! !
|
|
56 |
|