236
|
1 |
"{ Package: 'stx:goodies/sunit' }"!
|
220
|
2 |
|
|
3 |
!Behavior methodsFor:'Camp Smalltalk'!
|
|
4 |
|
|
5 |
sunitSelectors
|
222
|
6 |
|
|
7 |
^self selectors
|
|
8 |
|
|
9 |
"Modified: / 11-09-2010 / 15:07:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
10 |
! !
|
236
|
11 |
|
222
|
12 |
!Block methodsFor:'Camp Smalltalk'!
|
|
13 |
|
|
14 |
sunitEnsure: aBlock
|
|
15 |
|
|
16 |
^self ensure: aBlock
|
|
17 |
! !
|
236
|
18 |
|
222
|
19 |
!Block methodsFor:'Camp Smalltalk'!
|
|
20 |
|
|
21 |
sunitOn: aSignal do: anExceptionBlock
|
|
22 |
|
|
23 |
^self on: aSignal do: anExceptionBlock
|
|
24 |
! !
|
220
|
25 |
|
244
|
26 |
!Class methodsFor:'Camp Smalltalk'!
|
|
27 |
|
|
28 |
sunitName
|
|
29 |
|
|
30 |
^self name
|
|
31 |
! !
|
|
32 |
|
222
|
33 |
!Exception methodsFor:'Camp Smalltalk'!
|
|
34 |
|
|
35 |
sunitAnnounce: aTestCase toResult: aTestResult
|
|
36 |
aTestResult addError: aTestCase.
|
|
37 |
self sunitExitWith: false.
|
220
|
38 |
! !
|
236
|
39 |
|
222
|
40 |
!Exception methodsFor:'Camp Smalltalk'!
|
|
41 |
|
|
42 |
sunitExitWith: aValue
|
|
43 |
|
|
44 |
^self return: aValue
|
|
45 |
! !
|
236
|
46 |
|
|
47 |
!GenericException class methodsFor:'Camp Smalltalk'!
|
|
48 |
|
|
49 |
sunitSignalWith: aString
|
|
50 |
|
|
51 |
<resource: #skipInDebuggersWalkBack>
|
|
52 |
|
|
53 |
^self raiseSignal: aString
|
|
54 |
|
|
55 |
"Modified: / 05-12-2009 / 18:29:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
56 |
! !
|
|
57 |
|
222
|
58 |
!Object methodsFor:'Camp Smalltalk'!
|
|
59 |
|
|
60 |
sunitAddDependent: anObject
|
|
61 |
|
|
62 |
self addDependent: anObject
|
|
63 |
! !
|
236
|
64 |
|
222
|
65 |
!Object methodsFor:'Camp Smalltalk'!
|
|
66 |
|
|
67 |
sunitChanged: aspect
|
|
68 |
|
|
69 |
self changed: aspect
|
|
70 |
! !
|
236
|
71 |
|
222
|
72 |
!Object methodsFor:'Camp Smalltalk'!
|
220
|
73 |
|
222
|
74 |
sunitRemoveDependent: anObject
|
|
75 |
|
|
76 |
self removeDependent: anObject
|
|
77 |
! !
|
236
|
78 |
|
222
|
79 |
!String methodsFor:'Camp Smalltalk'!
|
|
80 |
|
|
81 |
sunitAsSymbol
|
|
82 |
|
|
83 |
^self asSymbol
|
|
84 |
! !
|
236
|
85 |
|
222
|
86 |
!String methodsFor:'Camp Smalltalk'!
|
|
87 |
|
|
88 |
sunitMatch: aString
|
|
89 |
|
|
90 |
^self match: aString
|
|
91 |
! !
|
236
|
92 |
|
222
|
93 |
!String methodsFor:'deprecated'!
|
|
94 |
|
|
95 |
sunitSubStrings
|
220
|
96 |
|
222
|
97 |
<resource: #obsolete>
|
|
98 |
|
|
99 |
| stream answer index |
|
|
100 |
answer := OrderedCollection new.
|
|
101 |
stream := ReadStream on: self.
|
|
102 |
[stream atEnd]
|
|
103 |
whileFalse:
|
|
104 |
[[stream atEnd ifTrue: [^answer asArray].
|
|
105 |
stream peek > Character space] whileFalse: [stream next].
|
|
106 |
index := stream position + 1.
|
|
107 |
[stream atEnd or: [stream peek <= Character space]] whileFalse: [stream next].
|
|
108 |
answer
|
|
109 |
add:
|
|
110 |
(self
|
|
111 |
copyFrom: index
|
|
112 |
to: stream position)].
|
|
113 |
^answer asArray
|
|
114 |
|
|
115 |
"Modified: / 11-09-2010 / 15:14:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
116 |
! !
|
236
|
117 |
|
222
|
118 |
!Symbol methodsFor:'Camp Smalltalk'!
|
|
119 |
|
|
120 |
sunitAsClass
|
|
121 |
|
|
122 |
^SUnitNameResolver classNamed: self
|
|
123 |
! !
|
|
124 |
|
236
|
125 |
!stx_goodies_sunit class methodsFor:'documentation'!
|
222
|
126 |
|
236
|
127 |
extensionsVersion_CVS
|
244
|
128 |
^ '$Header: /cvs/stx/stx/goodies/sunit/extensions.st,v 1.11 2011-07-06 14:26:11 cg Exp $'
|
236
|
129 |
! ! |