Skip to content

Commit dea3b37

Browse files
committed
Pushing changes present in Pharo repository, mostly code style.
1 parent a65ad38 commit dea3b37

12 files changed

+143
-70
lines changed

Sindarin-Tests/SindarinDebugSessionMock.class.st

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Class {
99
'selector',
1010
'receiver'
1111
],
12-
#category : #'Sindarin-Tests'
12+
#category : #'Sindarin-Tests-Mocks'
1313
}
1414

1515
{ #category : #accessing }

Sindarin-Tests/SindarinDebugSessionTest.class.st

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Class {
55
'debugSession',
66
'sindarinSession'
77
],
8-
#category : #'Sindarin-Tests'
8+
#category : #'Sindarin-Tests-Base'
99
}
1010

1111
{ #category : #running }
@@ -14,26 +14,35 @@ SindarinDebugSessionTest >> setUp [
1414

1515
super setUp.
1616
debugSession := DebugSession new.
17-
sindarinSession := debugSession asSindarinDebugSession.
17+
sindarinSession := debugSession asSindarinDebugSession
1818
]
1919

2020
{ #category : #tests }
2121
SindarinDebugSessionTest >> testDebugSessionAsSindarinDebugSession [
22+
2223
self assert: sindarinSession debugSession identicalTo: debugSession
2324
]
2425

2526
{ #category : #tests }
2627
SindarinDebugSessionTest >> testSindarinSessionAsSindarinDebugSession [
27-
self assert: sindarinSession asSindarinDebugSession identicalTo: sindarinSession
28+
29+
self
30+
assert: sindarinSession asSindarinDebugSession
31+
identicalTo: sindarinSession
2832
]
2933

3034
{ #category : #tests }
3135
SindarinDebugSessionTest >> testSindarinSessionInstantiation [
32-
|sessionName process|
36+
37+
| sessionName process |
3338
sessionName := 'TestSDS'.
34-
process := [] newProcess.
35-
sindarinSession := SindarinDebugSession newWithName: sessionName forProcess: process.
39+
process := [ ] newProcess.
40+
sindarinSession := SindarinDebugSession
41+
newWithName: sessionName
42+
forProcess: process.
3643
self assert: sindarinSession debugSession notNil.
3744
self assert: sindarinSession debugSession name equals: sessionName.
38-
self assert: sindarinSession debugSession process identicalTo: process.
45+
self
46+
assert: sindarinSession debugSession process
47+
identicalTo: process
3948
]

Sindarin-Tests/SindarinDebuggerTest.class.st

Lines changed: 55 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,29 @@ Class {
55
'breakpointsBeforeTest',
66
'testObjectPoint'
77
],
8-
#category : #'Sindarin-Tests'
8+
#category : #'Sindarin-Tests-Base'
99
}
1010

1111
{ #category : #helpers }
1212
SindarinDebuggerTest >> helperMethod1 [
13+
1314
| a |
1415
a := 1.
1516
a := 5.
16-
^ Point x: 5 y: '3' asInteger.
17+
^ Point x: 5 y: '3' asInteger
1718
]
1819

1920
{ #category : #helpers }
2021
SindarinDebuggerTest >> helperMethod10 [
22+
2123
| a |
2224
a := 5.
23-
^ Point x: 5 y: '3' asInteger.
25+
^ Point x: 5 y: '3' asInteger
2426
]
2527

2628
{ #category : #helpers }
2729
SindarinDebuggerTest >> helperMethod11 [
30+
2831
| a |
2932
a := 5.
3033
self helperMethod12.
@@ -34,140 +37,161 @@ SindarinDebuggerTest >> helperMethod11 [
3437

3538
{ #category : #helpers }
3639
SindarinDebuggerTest >> helperMethod12 [
40+
3741
| i |
3842
i := 5.
39-
[ i=0 ] whileFalse: [ i := i - 1 ].
43+
[ i = 0 ] whileFalse: [ i := i - 1 ]
4044
]
4145

4246
{ #category : #helpers }
4347
SindarinDebuggerTest >> helperMethod13 [
48+
4449
| a |
4550
a := 5.
46-
^ Point x: 5 y: '3' asInteger.
51+
^ Point x: 5 y: '3' asInteger
4752
]
4853

4954
{ #category : #helpers }
5055
SindarinDebuggerTest >> helperMethod14 [
56+
5157
| a |
5258
a := 5.
53-
^ Point x: 5 y: '3' asInteger.
59+
^ Point x: 5 y: '3' asInteger
5460
]
5561

5662
{ #category : #helpers }
5763
SindarinDebuggerTest >> helperMethod15 [
64+
5865
| a |
5966
a := 5.
60-
^ Point x: 5 y: '3' asInteger.
67+
^ Point x: 5 y: '3' asInteger
6168
]
6269

6370
{ #category : #helpers }
6471
SindarinDebuggerTest >> helperMethod16 [
65-
^ 1+1.
72+
73+
^ 1 + 1
6674
]
6775

6876
{ #category : #helpers }
6977
SindarinDebuggerTest >> helperMethod17: storeContextBlock [
78+
7079
storeContextBlock value: thisContext.
71-
Point x:5 y: 7.
80+
Point x: 5 y: 7
7281
]
7382

7483
{ #category : #helpers }
7584
SindarinDebuggerTest >> helperMethod18: anArg with: anotherArg [
76-
Point x: 5 y: 7.
85+
86+
Point x: 5 y: 7
7787
]
7888

7989
{ #category : #helpers }
8090
SindarinDebuggerTest >> helperMethod19 [
91+
8192
| a |
8293
a := 5.
83-
^ Point x: 5 y: '3' asInteger.
94+
^ Point x: 5 y: '3' asInteger
8495
]
8596

8697
{ #category : #helpers }
8798
SindarinDebuggerTest >> helperMethod2 [
99+
88100
| a |
89101
a := 5.
90-
^ Point x: 5 y: '3' asInteger.
102+
^ Point x: 5 y: '3' asInteger
91103
]
92104

93105
{ #category : #helpers }
94106
SindarinDebuggerTest >> helperMethod20 [
107+
95108
| a |
96109
a := 5.
97-
^ Point x: 5 y: '3' asInteger.
110+
^ Point x: 5 y: '3' asInteger
98111
]
99112

100113
{ #category : #helpers }
101114
SindarinDebuggerTest >> helperMethod21 [
115+
102116
self helperMethod22
103117
]
104118

105119
{ #category : #helpers }
106120
SindarinDebuggerTest >> helperMethod22 [
121+
107122
^ Point new
108123
]
109124

110125
{ #category : #helpers }
111126
SindarinDebuggerTest >> helperMethod23 [
127+
112128
testObjectPoint sign.
113-
testObjectPoint extent: (Point x:3 y: 4).
114-
Point new.
129+
testObjectPoint extent: (Point x: 3 y: 4).
130+
Point new
115131
]
116132

117133
{ #category : #helpers }
118134
SindarinDebuggerTest >> helperMethod24 [
135+
119136
| p |
120137
p := Point new.
121-
p sign.
138+
p sign
122139
]
123140

124141
{ #category : #helpers }
125142
SindarinDebuggerTest >> helperMethod3 [
143+
126144
| a |
127145
a := 5.
128-
^ Point x: 5 y: '3' asInteger.
146+
^ Point x: 5 y: '3' asInteger
129147
]
130148

131149
{ #category : #helpers }
132150
SindarinDebuggerTest >> helperMethod4 [
151+
133152
| a |
134153
a := 5.
135-
^ Point x: 5 y: '3' asInteger.
154+
^ Point x: 5 y: '3' asInteger
136155
]
137156

138157
{ #category : #helpers }
139158
SindarinDebuggerTest >> helperMethod5 [
159+
140160
| a |
141161
a := 5.
142-
^ Point x: 5 y: '3' asInteger.
162+
^ Point x: 5 y: '3' asInteger
143163
]
144164

145165
{ #category : #helpers }
146166
SindarinDebuggerTest >> helperMethod6 [
167+
147168
| a |
148169
a := 5.
149-
^ Point x: 5 y: '3' asInteger.
170+
^ Point x: 5 y: '3' asInteger
150171
]
151172

152173
{ #category : #helpers }
153174
SindarinDebuggerTest >> helperMethod7 [
175+
154176
| a |
155177
a := 5.
156-
^ Point x: 5 y: '3' asInteger.
178+
^ Point x: 5 y: '3' asInteger
157179
]
158180

159181
{ #category : #helpers }
160182
SindarinDebuggerTest >> helperMethod8 [
183+
161184
| a |
162185
a := 5.
163-
^ Point x: 5 y: '3' asInteger.
186+
^ Point x: 5 y: '3' asInteger
164187
]
165188

166189
{ #category : #helpers }
167190
SindarinDebuggerTest >> helperMethod9 [
191+
168192
| a |
169193
a := 5.
170-
^ Point x: 5 y: '3' asInteger.
194+
^ Point x: 5 y: '3' asInteger
171195
]
172196

173197
{ #category : #helpers }
@@ -180,24 +204,26 @@ SindarinDebuggerTest >> helperMethodNonLocalReturn [
180204

181205
{ #category : #helpers }
182206
SindarinDebuggerTest >> helperMethodReturn: bool [
207+
183208
| a |
184209
a := bool.
185-
a
186-
ifTrue: [ ^ 1 ].
210+
a ifTrue: [ ^ 1 ].
187211
^ 2
188212
]
189213

190214
{ #category : #helpers }
191215
SindarinDebuggerTest >> helperMethodReturnWithException [
216+
192217
| a |
193218
a := 0.
194-
1/0.
195-
^a + 1
219+
1 / 0.
220+
^ a + 1
196221
]
197222

198223
{ #category : #helpers }
199224
SindarinDebuggerTest >> helperMethodReturnWithHalt [
200225
<haltOrBreakpointForTesting>
226+
201227
| a |
202228
a := 0.
203229
self halt.
@@ -223,7 +249,7 @@ SindarinDebuggerTest >> setUp [
223249
SindarinDebuggerTest >> tearDown [
224250

225251
VirtualBreakpoint all removeAll.
226-
breakpointsBeforeTest do: [ :brkpt | VirtualBreakpoint all add: brkpt ].
252+
breakpointsBeforeTest do: [ :breakPoint | VirtualBreakpoint all add: breakPoint ].
227253
super tearDown
228254
]
229255

@@ -669,7 +695,7 @@ SindarinDebuggerTest >> testStepOver [
669695
| scdbg |
670696
scdbg := SindarinDebugger debug: [ self helperMethod14 ].
671697
scdbg step. "Enters the call of helperMethod14. Current node should be: a:=5"
672-
scdbg stepOver. "After this, current node shoud be: '3' asInteger"
698+
scdbg stepOver. "After this, current node should be: '3' asInteger"
673699
scdbg stepOver. "After this, current node should be: Point x:5 y:'3' asInteger"
674700
self assert: scdbg node isMessage.
675701
self assert: scdbg node selector equals: #x:y:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Class {
22
#name : #ContextNotOnStack,
33
#superclass : #Error,
4-
#category : #Sindarin
4+
#category : #'Sindarin-Exceptions'
55
}

Sindarin/DebuggedExecutionException.class.st

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Class {
22
#name : #DebuggedExecutionException,
33
#superclass : #Error,
4-
#category : #Sindarin
4+
#category : #'Sindarin-Exceptions'
55
}
66

77
{ #category : #testing }
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Class {
22
#name : #DebuggedExecutionIsFinished,
33
#superclass : #DebuggedExecutionException,
4-
#category : #Sindarin
4+
#category : #'Sindarin-Exceptions'
55
}

0 commit comments

Comments
 (0)