author | Claus Gittinger <cg@exept.de> |
Mon, 11 Dec 2000 16:28:15 +0100 | |
changeset 15 | 1c20b41c61a6 |
parent 11 | fd4882a6997f |
child 16 | 906572f0088a |
permissions | -rw-r--r-- |
0 | 1 |
"{ Package: 'stx:goodies/sunit' }" |
2 |
||
3 |
ApplicationModel subclass:#TestRunner |
|
4 |
instanceVariableNames:'result lastPass defect allDefects defectMenu details mode |
|
5 |
scriptModel script' |
|
6 |
classVariableNames:'' |
|
7 |
poolDictionaries:'' |
|
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
8 |
category:'SUnit-UI' |
0 | 9 |
! |
10 |
||
11 | 11 |
|
8 | 12 |
!TestRunner class methodsFor:'defaults'! |
13 |
||
14 |
defaultIcon |
|
15 |
"This resource specification was automatically generated |
|
16 |
by the ImageEditor of ST/X." |
|
17 |
||
18 |
"Do not manually edit this!! If it is corrupted, |
|
19 |
the ImageEditor may not be able to read the specification." |
|
20 |
||
21 |
" |
|
22 |
self defaultIcon inspect |
|
23 |
ImageEditor openOnClass:self andSelector:#defaultIcon |
|
24 |
" |
|
25 |
||
26 |
<resource: #image> |
|
27 |
||
28 |
^Icon |
|
29 |
constantNamed:#'TestRunner class defaultIcon' |
|
30 |
ifAbsentPut:[(Depth4Image new) width: 28; height: 28; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
31 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O??C???????C?<O?0@@??<O??????<O?0??@@@@@@@@@@@@@@@@@@@@@BH"H"H" |
|
32 |
H"H"H#L3L0@@H"H"H"H"H"H#L3L3@@@"H"H"H"H"H#L3L3L@@BH"H"H"H"H#L3L3L0@@H"H"H"H@@@L1L3L3@@@"H"H"HO??<A@3L3L@@BH"H"HO???1@3L3 |
|
33 |
L0@@H"H"HO???1@@L3L3@@@"H"H <_?1@O@3L3L@@BH"H"C0G1@O<CL3L0@@H"H"HO@A@O?0L3L3@@@"H"H ?0@O??@3L3L@@BH"H#LO<O??@3L3L0@@H"H# |
|
34 |
L3C???@3L3L3@@@"H#L3L0@@@3L3L3L@@BH#L3L3L3L3L3L3L0@@H#L3L3L3L3L3L3L3@@@#L3L3L3L3L3L3L3L@@CL3L3L3L3L3L3L3L0@@@@@@@@@@@@@@ |
|
35 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255 255 0 0 0 255 0 0 0 255 0 255 255 255 255 0 255 0 255 127 0 0 0 127 0 0 0 127 0 127 127 127 127 0 127 0 127 127 127 127 170 170 170]; mask:((Depth1Image new) width: 28; height: 28; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
36 |
@@@@@@@@@@A???? _???8G???>A???? _???8G???>A???? _???8G???>A???? _???8G???>A???? _???8G???>A???? _???8G???>A???? _???8G?? |
|
37 |
?>A???? _???8G???>@@@@@@@@@@@@@a') ; yourself); yourself] |
|
38 |
! ! |
|
39 |
||
0 | 40 |
!TestRunner class methodsFor:'interface specs'! |
41 |
||
42 |
windowSpec |
|
43 |
"This resource specification was automatically generated |
|
44 |
by the UIPainter of ST/X." |
|
45 |
||
46 |
"Do not manually edit this!! If it is corrupted, |
|
47 |
the UIPainter may not be able to read the specification." |
|
48 |
||
49 |
" |
|
50 |
UIPainter new openOnClass:TestRunner andSelector:#windowSpec |
|
51 |
TestRunner new openInterface:#windowSpec |
|
52 |
TestRunner open |
|
53 |
" |
|
54 |
||
55 |
<resource: #canvas> |
|
56 |
||
57 |
^ |
|
58 |
#(#FullSpec |
|
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
59 |
#name: #windowSpec |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
60 |
#window: |
0 | 61 |
#(#WindowSpec |
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
62 |
#label: 'SUnit Camp Smalltalk 2.7b TestRunner' |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
63 |
#name: 'SUnit Camp Smalltalk 2.7b TestRunner' |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
64 |
#min: #(#Point 362 122) |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
65 |
#bounds: #(#Rectangle 16 46 509 221) |
8 | 66 |
#icon: #defaultIcon |
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
67 |
) |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
68 |
#component: |
0 | 69 |
#(#SpecCollection |
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
70 |
#collection: #( |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
71 |
#(#ActionButtonSpec |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
72 |
#label: 'Refresh' |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
73 |
#name: 'Button3' |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
74 |
#layout: #(#LayoutFrame 0 0 0 0 75 0 24 0) |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
75 |
#model: #refreshSuites |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
76 |
) |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
77 |
#(#MenuButtonSpec |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
78 |
#label: 'ExampleSetTest' |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
79 |
#name: #tests |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
80 |
#layout: #(#LayoutFrame 76 0 0 0 -216 1 24 0) |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
81 |
#model: #script |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
82 |
#menu: #scriptModel |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
83 |
#useIndex: true |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
84 |
) |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
85 |
#(#ActionButtonSpec |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
86 |
#label: 'Run' |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
87 |
#name: 'Button1' |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
88 |
#layout: #(#LayoutFrame -215 1 0 0 -160 1 24 0) |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
89 |
#model: #runTests |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
90 |
#enableChannel: #enableRunButton |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
91 |
) |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
92 |
#(#ActionButtonSpec |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
93 |
#label: 'ReRun Defects' |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
94 |
#name: 'Button5' |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
95 |
#layout: #(#LayoutFrame -159 1 0 0 -57 1 24 0) |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
96 |
#model: #runDefects |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
97 |
#enableChannel: #enableRunDefectsButton |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
98 |
) |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
99 |
#(#ActionButtonSpec |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
100 |
#label: 'Run All' |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
101 |
#name: 'Button2' |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
102 |
#layout: #(#LayoutFrame -56 1 0 0 0 1 24 0) |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
103 |
#model: #runAllTests |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
104 |
) |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
105 |
#(#LabelSpec |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
106 |
#label: 'N/A' |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
107 |
#name: 'mode' |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
108 |
#layout: #(#LayoutFrame 0 0 25 0 0 1 0 0.5) |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
109 |
#style: #(#FontDescription #Arial #bold #roman 14) |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
110 |
#labelChannel: #mode |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
111 |
) |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
112 |
#(#LabelSpec |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
113 |
#label: '...' |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
114 |
#name: 'details' |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
115 |
#layout: #(#LayoutFrame 0 0 0 0.5 0 1 -24 1) |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
116 |
#labelChannel: #details |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
117 |
) |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
118 |
#(#MenuButtonSpec |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
119 |
#name: #defects |
10 | 120 |
#layout: #(#LayoutFrame 0 0 -24 1 -152 1 0 1) |
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
121 |
#isOpaque: true |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
122 |
#flags: 40 |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
123 |
#model: #selectionHolder |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
124 |
#initiallyDisabled: true |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
125 |
#enableChannel: #enableDefectsList |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
126 |
#menu: #defectMenu |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
127 |
) |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
128 |
#(#ActionButtonSpec |
10 | 129 |
#label: 'Browse' |
130 |
#name: 'Button4' |
|
131 |
#layout: #(#LayoutFrame -151 1 -24 1 -76 1 0 1) |
|
132 |
#model: #browseSelectedTestCase |
|
133 |
#initiallyDisabled: true |
|
134 |
#enableChannel: #enableRunButton |
|
135 |
) |
|
136 |
#(#ActionButtonSpec |
|
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
137 |
#label: 'Debug' |
10 | 138 |
#name: 'Button6' |
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
139 |
#layout: #(#LayoutFrame -75 1 -24 1 0 1 0 1) |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
140 |
#model: #debugSelectedFailure |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
141 |
#initiallyDisabled: true |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
142 |
#enableChannel: #enableDebugButton |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
143 |
) |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
144 |
) |
0 | 145 |
|
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
146 |
) |
0 | 147 |
) |
148 |
! ! |
|
149 |
||
150 |
!TestRunner class methodsFor:'opening'! |
|
151 |
||
152 |
open |
|
153 |
||
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
154 |
^super open |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
155 |
! |
5 | 156 |
|
157 |
openOnTestCase:aTestCaseSubclass |
|
158 |
|runner idx| |
|
159 |
||
160 |
runner := self new. |
|
161 |
runner open. |
|
162 |
runner window waitUntilVisible. |
|
15 | 163 |
|
5 | 164 |
idx := runner scriptModel value indexOf:aTestCaseSubclass name. |
165 |
runner script value:idx. |
|
166 |
||
167 |
" |
|
168 |
self openOnTestCase:CompilerTest |
|
169 |
" |
|
170 |
! ! |
|
0 | 171 |
|
172 |
!TestRunner class methodsFor:'plugIn spec'! |
|
173 |
||
174 |
aspectSelectors |
|
175 |
"This resource specification was automatically generated |
|
176 |
by the UIPainter of ST/X." |
|
177 |
||
178 |
"Do not manually edit this. If it is corrupted, |
|
179 |
the UIPainter may not be able to read the specification." |
|
180 |
||
181 |
"Return a description of exported aspects; |
|
182 |
these can be connected to aspects of an embedding application |
|
183 |
(if this app is embedded in a subCanvas)." |
|
184 |
||
185 |
^ #( |
|
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
186 |
#script |
0 | 187 |
). |
188 |
||
189 |
! ! |
|
190 |
||
191 |
!TestRunner methodsFor:'Accessing'! |
|
192 |
||
193 |
defectMenu |
|
194 |
"automatically generated by UIPainter ..." |
|
195 |
||
196 |
"*** the code below creates a default model when invoked." |
|
197 |
"*** (which may not be the one you wanted)" |
|
198 |
"*** Please change as required and accept it in the browser." |
|
199 |
||
200 |
^defectMenu isNil |
|
201 |
ifTrue: [defectMenu := OrderedCollection new asValue] |
|
202 |
ifFalse: [defectMenu] |
|
203 |
||
204 |
"Modified: / 4.4.2000 / 20:00:31 / Sames" |
|
205 |
! |
|
206 |
||
207 |
defects |
|
208 |
||
209 |
^self builder componentAt: #defects |
|
210 |
||
211 |
"Created: / 21.6.2000 / 12:19:29 / Sames" |
|
212 |
! |
|
213 |
||
214 |
details |
|
215 |
"This method was generated by UIDefiner. Any edits made here |
|
216 |
may be lost whenever methods are automatically defined. The |
|
217 |
initialization provided below may have been preempted by an |
|
218 |
initialize method." |
|
219 |
||
220 |
^details isNil |
|
221 |
ifTrue: |
|
222 |
[details := '...' asValue] |
|
223 |
ifFalse: |
|
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
224 |
[details] |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
225 |
! |
0 | 226 |
|
227 |
mode |
|
228 |
"This method was generated by UIDefiner. Any edits made here |
|
229 |
may be lost whenever methods are automatically defined. The |
|
230 |
initialization provided below may have been preempted by an |
|
231 |
initialize method." |
|
232 |
||
233 |
^mode isNil |
|
234 |
ifTrue: |
|
235 |
[mode := 'N/A' asValue] |
|
236 |
ifFalse: |
|
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
237 |
[mode] |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
238 |
! |
0 | 239 |
|
240 |
script |
|
241 |
"automatically generated by UIPainter ..." |
|
242 |
||
243 |
"*** the code below creates a default model when invoked." |
|
244 |
"*** (which may not be the one you wanted)" |
|
245 |
"*** Please change as required and accept it in the browser." |
|
246 |
||
247 |
|holder| |
|
248 |
||
249 |
(holder := builder bindingAt:#script) isNil ifTrue:[ |
|
11 | 250 |
holder := ValueHolder new. |
251 |
builder aspectAt:#script put:holder. |
|
252 |
holder onChangeSend:#scriptSelectionChanged to:self. |
|
0 | 253 |
"/ holder addDependent:self. |
254 |
]. |
|
255 |
^ holder. |
|
256 |
||
257 |
"Created: / 21.6.2000 / 12:04:36 / Sames" |
|
258 |
! |
|
259 |
||
260 |
script:something |
|
261 |
"automatically generated by UIPainter ..." |
|
262 |
||
263 |
"This method is used when I am embedded as subApplication," |
|
264 |
"and the mainApp wants to connect its aspects to mine." |
|
265 |
||
266 |
"/ |holder| |
|
267 |
||
268 |
"/ (holder := builder bindingAt:#script) notNil ifTrue:[ |
|
269 |
"/ holder removeDependent:self. |
|
270 |
"/ ]. |
|
271 |
builder aspectAt:#script put:something. |
|
272 |
"/ something notNil ifTrue:[ |
|
273 |
"/ something addDependent:self. |
|
274 |
"/ ]. |
|
275 |
^ self. |
|
276 |
||
277 |
"Created: / 21.6.2000 / 12:04:36 / Sames" |
|
278 |
! |
|
279 |
||
280 |
scriptModel |
|
281 |
"This method was generated by UIDefiner. Any edits made here |
|
282 |
may be lost whenever methods are automatically defined. The |
|
283 |
initialization provided below may have been preempted by an |
|
284 |
initialize method." |
|
285 |
||
286 |
^scriptModel isNil |
|
287 |
ifTrue: [scriptModel := (TestCase allSubclasses collect: [:each | each name]) asValue] |
|
288 |
ifFalse: [scriptModel] |
|
289 |
||
290 |
"Modified: / 2.4.2000 / 14:37:51 / Sames" |
|
291 |
! |
|
292 |
||
293 |
selection |
|
294 |
||
295 |
^defect |
|
296 |
||
297 |
"Created: / 4.4.2000 / 18:50:55 / Sames" |
|
298 |
! |
|
299 |
||
300 |
selectionHolder |
|
301 |
"automatically generated by UIPainter ..." |
|
302 |
||
303 |
"*** the code below creates a default model when invoked." |
|
304 |
"*** (which may not be the one you wanted)" |
|
305 |
"*** Please change as required and accept it in the browser." |
|
306 |
||
307 |
|holder| |
|
308 |
||
309 |
(holder := builder bindingAt:#selectionHolder) isNil ifTrue:[ |
|
310 |
holder := AspectAdaptor new subject:self; forAspect:#selection. |
|
311 |
builder aspectAt:#selectionHolder put:holder. |
|
312 |
"/ holder addDependent:self. |
|
313 |
]. |
|
314 |
^ holder. |
|
315 |
||
316 |
"Created: / 4.4.2000 / 18:46:08 / Sames" |
|
317 |
"Modified: / 4.4.2000 / 18:47:31 / Sames" |
|
318 |
! |
|
319 |
||
320 |
tests |
|
321 |
||
322 |
^self builder componentAt: #tests |
|
323 |
||
324 |
"Created: / 4.4.2000 / 19:57:37 / Sames" |
|
325 |
! ! |
|
326 |
||
327 |
!TestRunner methodsFor:'Actions'! |
|
328 |
||
10 | 329 |
browseSelectedTestCase |
330 |
|testCaseName testCase| |
|
331 |
||
332 |
testCaseName := self scriptModel value at:(self script value). |
|
333 |
testCase := Smalltalk at:testCaseName asSymbol. |
|
334 |
testCase notNil ifTrue:[ |
|
335 |
UserPreferences default systemBrowserClass openInClass:testCase |
|
336 |
] |
|
337 |
! |
|
338 |
||
0 | 339 |
debugSelectedFailure |
340 |
self debugTest: self selection |
|
341 |
||
342 |
"Created: / 21.6.2000 / 10:58:58 / Sames" |
|
343 |
"Modified: / 21.6.2000 / 12:21:05 / Sames" |
|
344 |
! |
|
345 |
||
346 |
debugTest: aTestCaseName |
|
347 |
| testCase | |
|
348 |
defect := aTestCaseName. |
|
349 |
testCase := allDefects at: aTestCaseName ifAbsent: [nil]. |
|
350 |
testCase isNil ifTrue: [^self enableDebugButton value: false]. |
|
351 |
self enableDebugButton value: true. |
|
352 |
self displayMode: 'Debugging'. |
|
353 |
(result isFailure: testCase) |
|
354 |
ifTrue: [testCase debugAsFailure] |
|
355 |
ifFalse: [testCase debug] |
|
356 |
||
357 |
"Modified: / 21.6.2000 / 12:12:09 / Sames" |
|
358 |
! |
|
359 |
||
360 |
enableDebugButton |
|
361 |
"automatically generated by UIPainter ..." |
|
362 |
"*** the code below creates a default model when invoked." |
|
363 |
"*** (which may not be the one you wanted)" |
|
364 |
"*** Please change as required and accept it in the browser." |
|
365 |
||
366 |
| holder | |
|
367 |
(holder := builder bindingAt: #enableDebugButton) isNil |
|
368 |
ifTrue: |
|
369 |
[holder := true asValue. |
|
370 |
builder aspectAt: #enableDebugButton put: holder |
|
371 |
" holder addDependent:self."]. |
|
372 |
^holder |
|
373 |
||
374 |
"Created: / 21.6.2000 / 10:47:34 / Sames" |
|
375 |
"Modified: / 21.6.2000 / 10:51:07 / Sames" |
|
376 |
! |
|
377 |
||
378 |
enableDefectsList |
|
379 |
"automatically generated by UIPainter ..." |
|
380 |
||
381 |
"*** the code below creates a default model when invoked." |
|
382 |
"*** (which may not be the one you wanted)" |
|
383 |
"*** Please change as required and accept it in the browser." |
|
384 |
||
385 |
|holder| |
|
386 |
||
387 |
(holder := builder bindingAt:#enableDefectsList) isNil ifTrue:[ |
|
388 |
holder := true asValue. |
|
389 |
builder aspectAt:#enableDefectsList put:holder. |
|
390 |
"/ holder addDependent:self. |
|
391 |
]. |
|
392 |
^ holder. |
|
393 |
||
394 |
"Created: / 21.6.2000 / 10:47:34 / Sames" |
|
395 |
! |
|
396 |
||
397 |
enableRunButton |
|
398 |
"automatically generated by UIPainter ..." |
|
399 |
||
400 |
"*** the code below creates a default model when invoked." |
|
401 |
"*** (which may not be the one you wanted)" |
|
402 |
"*** Please change as required and accept it in the browser." |
|
403 |
||
404 |
|holder| |
|
405 |
||
406 |
(holder := builder bindingAt:#enableRunButton) isNil ifTrue:[ |
|
407 |
holder := true asValue. |
|
408 |
builder aspectAt:#enableRunButton put:holder. |
|
409 |
"/ holder addDependent:self. |
|
410 |
]. |
|
411 |
^ holder. |
|
412 |
||
413 |
"Created: / 21.6.2000 / 10:47:34 / Sames" |
|
414 |
! |
|
415 |
||
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
416 |
enableRunDefectsButton |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
417 |
"automatically generated by UIPainter ..." |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
418 |
|
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
419 |
"*** the code below creates a default model when invoked." |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
420 |
"*** (which may not be the one you wanted)" |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
421 |
"*** Please change as required and accept it in the browser." |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
422 |
|
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
423 |
|holder| |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
424 |
|
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
425 |
(holder := builder bindingAt:#enableRunDefectsButton) isNil ifTrue:[ |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
426 |
holder := true asValue. |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
427 |
builder aspectAt:#enableRunDefectsButton put:holder. |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
428 |
"/ holder addDependent:self. |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
429 |
]. |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
430 |
^ holder. |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
431 |
! |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
432 |
|
0 | 433 |
refreshSuites |
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
434 |
self scriptModel value: (TestCase allSubclasses collect: [:each | each name]). |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
435 |
self script value:nil. |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
436 |
self tests selection: 0. |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
437 |
self defects selection: 0. |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
438 |
result := TestResult new. |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
439 |
self displayRefresh |
0 | 440 |
|
441 |
"Created: / 21.6.2000 / 10:58:34 / Sames" |
|
442 |
"Modified: / 21.6.2000 / 12:19:54 / Sames" |
|
443 |
! |
|
444 |
||
445 |
runAllTests |
|
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
446 |
self runSuite: self allTestSuite |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
447 |
! |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
448 |
|
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
449 |
runDefectTests |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
450 |
| testSuite | |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
451 |
(testSuite := self defectTestSuite) notNil ifTrue: |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
452 |
[self runSuite: testSuite] |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
453 |
! |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
454 |
|
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
455 |
runDefects |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
456 |
allDefects size > 0 ifTrue:[ |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
457 |
^ self runDefectTests |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
458 |
]. |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
459 |
self runTests |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
460 |
! |
0 | 461 |
|
462 |
runSuite: aTestSuite |
|
463 |
Cursor wait |
|
464 |
showWhile: |
|
465 |
[self displayRunning. |
|
466 |
aTestSuite addDependentToHierachy: self. |
|
467 |
[result := aTestSuite run] |
|
468 |
ensure: [aTestSuite removeDependentFromHierachy: self]. |
|
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
469 |
self updateWindow] |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
470 |
! |
0 | 471 |
|
472 |
runTests |
|
473 |
| testSuite | |
|
474 |
(testSuite := self freshTestSuite) notNil ifTrue: |
|
475 |
[self runSuite: testSuite] |
|
476 |
||
477 |
"Modified: / 2.4.2000 / 14:16:10 / Sames" |
|
478 |
! |
|
479 |
||
11 | 480 |
scriptSelectionChanged |
15 | 481 |
self enableRunButton value:(self script value notNil). |
11 | 482 |
! |
483 |
||
0 | 484 |
selection: aValue |
485 |
||
486 |
self debugTest: aValue |
|
487 |
||
488 |
"Created: / 4.4.2000 / 18:54:09 / Sames" |
|
489 |
"Modified: / 4.4.2000 / 19:01:33 / Sames" |
|
490 |
! |
|
491 |
||
492 |
suiteSelectionChanged |
|
8 | 493 |
|ok className description cls| |
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
494 |
|
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
495 |
self enableRunButton value:(ok := self freshTestSuite notNil). |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
496 |
self enableRunDefectsButton value:(ok and:[allDefects size > 0]). |
0 | 497 |
|
8 | 498 |
self script value notNil ifTrue:[ |
499 |
className := self scriptModel value at:(self script value) ifAbsent:nil. |
|
500 |
(ok and:[className notNil]) ifTrue:[ |
|
501 |
cls := Smalltalk at:className. |
|
502 |
description := cls perform:#description ifNotUnderstood:nil. |
|
503 |
description notNil ifTrue:[ |
|
504 |
self displayMode: description. |
|
505 |
self displayDetails:nil. |
|
506 |
] |
|
507 |
]. |
|
508 |
]. |
|
509 |
||
0 | 510 |
"Created: / 21.6.2000 / 11:31:25 / Sames" |
511 |
"Modified: / 21.6.2000 / 11:32:54 / Sames" |
|
512 |
! ! |
|
513 |
||
514 |
!TestRunner methodsFor:'Private'! |
|
515 |
||
516 |
allTestSuite |
|
517 |
| tokens stream | |
|
518 |
tokens := (TestCase subclasses collect: [:each | each name , '* ']) |
|
519 |
copyWithout: 'SUnitTest* '. |
|
520 |
stream := WriteStream on: String new. |
|
521 |
tokens do: [:each | stream nextPutAll: each]. |
|
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
522 |
^TestSuitesScripter run: stream contents |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
523 |
! |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
524 |
|
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
525 |
defectTestSuite |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
526 |
|suite| |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
527 |
|
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
528 |
suite := TestSuite new. |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
529 |
allDefects keysAndValuesDo:[:nm :test | |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
530 |
suite addTest:test. |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
531 |
]. |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
532 |
^suite |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
533 |
|
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
534 |
! |
0 | 535 |
|
536 |
formatTime: aTime |
|
537 |
aTime hours > 0 ifTrue: [^aTime hours printString , 'h']. |
|
538 |
aTime minutes > 0 ifTrue: [^aTime minutes printString , 'min']. |
|
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
539 |
^aTime seconds printString , ' sec' |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
540 |
! |
0 | 541 |
|
542 |
freshTestSuite |
|
543 |
||
544 |
^TestSuitesScripter run: self tests contents |
|
545 |
||
546 |
"Modified: / 4.4.2000 / 20:13:41 / Sames" |
|
547 |
! |
|
548 |
||
549 |
postOpenWith: aBuilder |
|
550 |
"automatically generated by UIPainter ..." |
|
551 |
||
552 |
super postOpenWith: aBuilder. |
|
553 |
self tests defaultLabel: ''. |
|
11 | 554 |
"/ self tests selection: 'ExampleSetTest'. self script value:1. |
15 | 555 |
|
556 |
self enableRunButton value: (self script value notNil). |
|
10 | 557 |
self enableRunDefectsButton value: false. |
0 | 558 |
self enableDebugButton value: false. |
559 |
self enableDefectsList value: false. |
|
560 |
self script onChangeSend: #suiteSelectionChanged to: self |
|
561 |
||
562 |
"Created: / 2.4.2000 / 14:44:32 / Sames" |
|
563 |
"Modified: / 21.6.2000 / 12:06:30 / Sames" |
|
564 |
! |
|
565 |
||
566 |
timeSinceLastPassAsString |
|
567 |
lastPass isNil ifTrue: [^'']. |
|
568 |
^', ' , (self formatTime: (Time now subtractTime: lastPass getSeconds)) , ' since last Pass' |
|
569 |
||
570 |
"Modified: / 3.4.2000 / 19:17:11 / Sames" |
|
571 |
! ! |
|
572 |
||
573 |
!TestRunner methodsFor:'Updating'! |
|
574 |
||
575 |
displayColor: aColorValue |
|
576 |
||
577 |
(builder componentAt: #mode) widget insideColor: aColorValue. |
|
578 |
(builder componentAt: #details) widget insideColor: aColorValue. |
|
579 |
||
580 |
"Modified: / 2.4.2000 / 14:21:42 / Sames" |
|
581 |
! |
|
582 |
||
583 |
displayDefault |
|
584 |
self displayColor: self tests backgroundColor |
|
585 |
||
586 |
"Created: / 21.6.2000 / 12:28:06 / Sames" |
|
587 |
"Modified: / 21.6.2000 / 12:35:09 / Sames" |
|
588 |
! |
|
589 |
||
590 |
displayDefects: aCollection |
|
591 |
| menuButton | |
|
592 |
menuButton := self builder componentAt: #defects. |
|
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
593 |
aCollection isEmpty ifTrue: [ |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
594 |
menuButton disable. |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
595 |
self enableRunDefectsButton value:false. |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
596 |
^ self |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
597 |
]. |
0 | 598 |
allDefects := Dictionary new. |
599 |
aCollection do: [:each | allDefects at: each printString put: each]. |
|
600 |
self defectMenu value: allDefects keys asOrderedCollection. |
|
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
601 |
menuButton enable. |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
602 |
self enableRunDefectsButton value:(allDefects size > 0). |
0 | 603 |
|
604 |
"Modified: / 4.4.2000 / 20:11:06 / Sames" |
|
605 |
! |
|
606 |
||
607 |
displayDetails: aString |
|
608 |
self details value: aString. |
|
609 |
||
610 |
"Modified: / 21.6.2000 / 11:10:14 / Sames" |
|
611 |
! |
|
612 |
||
613 |
displayFail |
|
614 |
self displayRed. |
|
615 |
self displayMode: 'Fail'. |
|
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
616 |
self displayDetails: result printString. |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
617 |
! |
0 | 618 |
|
619 |
displayGreen |
|
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
620 |
self displayColor: ColorValue green |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
621 |
! |
0 | 622 |
|
623 |
displayMode: aString |
|
624 |
self mode value: aString |
|
625 |
||
626 |
"Modified: / 21.6.2000 / 11:14:19 / Sames" |
|
627 |
! |
|
628 |
||
629 |
displayPass |
|
630 |
self displayMode: 'Pass'. |
|
631 |
self displayDetails: result runCount printString , ' run' , self timeSinceLastPassAsString. |
|
632 |
self displayGreen. |
|
633 |
lastPass := Time now |
|
634 |
||
635 |
"Modified: / 21.6.2000 / 12:14:52 / Sames" |
|
636 |
! |
|
637 |
||
638 |
displayRed |
|
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
639 |
self displayColor: ColorValue red. |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
640 |
! |
0 | 641 |
|
642 |
displayRefresh |
|
643 |
self displayMode: 'N/A'. |
|
644 |
self displayDetails:'...'. |
|
645 |
self updateDefects. |
|
646 |
self enableRunButton value: false. |
|
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
647 |
self enableRunDefectsButton value: false. |
0 | 648 |
self enableDebugButton value: false. |
649 |
self displayDefault |
|
650 |
||
651 |
"Created: / 21.6.2000 / 12:14:11 / Sames" |
|
652 |
"Modified: / 21.6.2000 / 12:28:24 / Sames" |
|
653 |
! |
|
654 |
||
655 |
displayRunning |
|
656 |
self displayYellow. |
|
657 |
self displayMode: 'running'. |
|
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
658 |
self displayDetails: '...'. |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
659 |
! |
0 | 660 |
|
661 |
displayYellow |
|
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
662 |
self displayColor: ColorValue yellow |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
663 |
! |
0 | 664 |
|
665 |
update: anObject |
|
666 |
(anObject isKindOf: TestCase) |
|
667 |
ifTrue: [self displayDetails: anObject printString] |
|
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
668 |
ifFalse: [super update: anObject] |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
669 |
! |
0 | 670 |
|
671 |
updateDefects |
|
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
672 |
self displayDefects: result defects |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
673 |
! |
0 | 674 |
|
675 |
updateWindow |
|
676 |
result hasPassed |
|
677 |
ifTrue: [self displayPass] |
|
678 |
ifFalse: [self displayFail]. |
|
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
679 |
self updateDefects |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
5
diff
changeset
|
680 |
! ! |
0 | 681 |
|
11 | 682 |
!TestRunner class methodsFor:'documentation'! |
683 |
||
684 |
version |
|
15 | 685 |
^ '$Header: /cvs/stx/stx/goodies/sunit/TestRunner.st,v 1.7 2000-12-11 15:28:15 cg Exp $' |
11 | 686 |
! ! |