author | Claus Gittinger <cg@exept.de> |
Wed, 06 Dec 2000 16:25:04 +0100 | |
changeset 6 | 78bb1397e43d |
parent 0 | 9365d5753f11 |
child 14 | a4a5478621e3 |
permissions | -rw-r--r-- |
0 | 1 |
"{ Package: 'stx:goodies/sunit' }" |
2 |
||
3 |
Object subclass:#TestSuite |
|
4 |
instanceVariableNames:'tests' |
|
5 |
classVariableNames:'' |
|
6 |
poolDictionaries:'' |
|
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
0
diff
changeset
|
7 |
category:'SUnit-Base' |
0 | 8 |
! |
9 |
||
10 |
!TestSuite methodsFor:'Accessing'! |
|
11 |
||
12 |
addTest: aTest |
|
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
0
diff
changeset
|
13 |
self tests add: aTest |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
0
diff
changeset
|
14 |
! |
0 | 15 |
|
16 |
addTests: aCollection |
|
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
0
diff
changeset
|
17 |
aCollection do: [:eachTest | self addTest: eachTest] |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
0
diff
changeset
|
18 |
! |
0 | 19 |
|
20 |
tests |
|
21 |
tests isNil ifTrue: [tests := OrderedCollection new]. |
|
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
0
diff
changeset
|
22 |
^tests |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
0
diff
changeset
|
23 |
! ! |
0 | 24 |
|
25 |
!TestSuite methodsFor:'Dependencies'! |
|
26 |
||
27 |
addDependentToHierachy: anObject |
|
28 |
self sunitAddDependent: anObject. |
|
29 |
self tests do: [:each | each addDependentToHierachy: anObject] |
|
30 |
||
31 |
"Modified: / 21.6.2000 / 10:13:35 / Sames" |
|
32 |
! |
|
33 |
||
34 |
removeDependentFromHierachy: anObject |
|
35 |
self sunitRemoveDependent: anObject. |
|
36 |
self tests do: [:each | each removeDependentFromHierachy: anObject] |
|
37 |
||
38 |
"Modified: / 21.6.2000 / 10:13:27 / Sames" |
|
39 |
! ! |
|
40 |
||
41 |
!TestSuite methodsFor:'Running'! |
|
42 |
||
43 |
run |
|
44 |
| result | |
|
45 |
result := TestResult new. |
|
46 |
self run: result. |
|
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
0
diff
changeset
|
47 |
^result |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
0
diff
changeset
|
48 |
! |
0 | 49 |
|
50 |
run: aResult |
|
51 |
self tests do: |
|
52 |
[:each | |
|
53 |
self sunitChanged: each. |
|
54 |
each run: aResult] |
|
55 |
||
56 |
"Modified: / 21.6.2000 / 10:14:01 / Sames" |
|
57 |
! ! |
|
58 |