8000 Added <return:...> pragma to examples. · feenkcom/gtoolkit-spotter@f5e77e7 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit f5e77e7

Browse files
committed
Added <return:...> pragma to examples.
1 parent 8d22c53 commit f5e77e7

7 files changed

+249
-274
lines changed

src/GToolkit-Spotter-Examples/GtSpotterByCharacterQuerySplitterExamples.class.st

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ GtSpotterByCharacterQuerySplitterExamples >> createQuerySplitter [
1212
{ #category : #examples }
1313
GtSpotterByCharacterQuerySplitterExamples >> splitQueryWithNonDigitCharacters [
1414
<gtExample>
15-
self
15+
<return: #GtSpotterByCharacterQuerySplitterExamples>
16+
self
1617
assertSplitOf: 'One***Two---Three!@$Four'
17-
equals: #('One***Two---Three!@$Four').
18+
equals: #('One***Two---Three!@$Four')
1819
]

src/GToolkit-Spotter-Examples/GtSpotterByScripterExamples.class.st

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ GtSpotterByScripterExamples >> elementOnStartWithExceptionsInSearch [
3030
{ #category : #accessing }
3131
GtSpotterByScripterExamples >> scripter [
3232
<gtExample>
33-
33+
<return: #BlScripter>
3434
^ BlScripter new
3535
]
3636

3737
{ #category : #accessing }
3838
GtSpotterByScripterExamples >> spotterElementOnStart [
3939
<gtExample>
40-
40+
<return: #BlScripter>
4141
^ self spotterElementOnStart: GtWorldSpotterSearchStart new
4242
]
4343

@@ -57,13 +57,14 @@ GtSpotterByScripterExamples >> spotterElementOnStart: aStartObject [
5757
{ #category : #accessing }
5858
GtSpotterByScripterExamples >> spotterElementOnStartSample [
5959
<gtExample>
60-
60+
<return: #BlScripter>
6161
^ self spotterElementOnStart: GtSpotterStartSample new
6262
]
6363

6464
{ #category : #accessing }
6565
GtSpotterByScripterExamples >> spotterElementOnStartSampleActOnFirstCandidate [
6666
<gtExample>
67+
<return: #BlScripter>
6768
| scripter actOnEvents actOn actOnHandler |
6869
scripter := self spotterElementOnStartSample.
6970

@@ -76,10 +77,7 @@ GtSpotterByScripterExamples >> spotterElementOnStartSampleActOnFirstCandidate [
7677
send: #onActed:
7778
to: actOnHandler.
7879

79-
scripter
80-
mouseMoveOverStep: [ :s |
81-
s
82-
id: GtSpotterCandidateElementId index: 1 ].
80+
scripter mouseMoveOverStep: [ :s | s id: GtSpotterCandidateElementId index: 1 ].
8381

8482
scripter
8583
mouseMoveOverStep: [ :s |
@@ -123,6 +121,7 @@ GtSpotterByScripterExamples >> spotterElementOnStartSampleActOnFirstCandidate [
123121
{ #category : #accessing }
124122
GtSpotterByScripterExamples >> spotterElementOnStartSampleActOnFirstCategory [
125123
<gtExample>
124+
<return: #BlScripter>
126125
| scripter actOnEvents actOn actOnHandler |
127126
scripter := self spotterElementOnStartSample.
128127

@@ -135,10 +134,7 @@ GtSpotterByScripterExamples >> spotterElementOnStartSampleActOnFirstCategory [
135134
send: #onActed:
136135
to: actOnHandler.
137136

138-
scripter
139-
mouseMoveOverStep: [ :s |
140-
s
141-
id: GtSpotterCategoryElementId index: 1 ].
137+
scripter mouseMoveOverStep: [ :s | s id: GtSpotterCategoryElementId index: 1 ].
142138

143139
scripter
144140
mouseMoveOverStep: [ :s |
@@ -184,6 +180,7 @@ GtSpotterByScripterExamples >> spotterElementOnStartSampleActOnFirstCategory [
184180
{ #category : #accessing }
185181
GtSpotterByScripterExamples >> spotterElementOnStartSampleActOnSecondCandidateWithDefaultObjectActOn [
186182
<gtExample>
183+
<return: #BlScripter>
187184
| scripter actOnEvents actOn actOnHandler |
188185
scripter := self spotterElementOnStartSample.
189186

@@ -196,10 +193,7 @@ GtSpotterByScripterExamples >> spotterElementOnStartSampleActOnSecondCandidateWi
196193
send: #onActed:
197194
to: actOnHandler.
198195

199-
scripter
200-
mouseMoveOverStep: [ :s |
201-
s
202-
id: GtSpotterCandidateElementId index: 2 ].
196+
scripter mouseMoveOverStep: [ :s | s id: GtSpotterCandidateElementId index: 2 ].
203197

204198
scripter
205199
mouseMoveOverStep: [ :s |
@@ -231,6 +225,7 @@ GtSpotterByScripterExamples >> spotterElementOnStartSampleActOnSecondCandidateWi
231225
{ #category : #accessing }
232226
GtSpotterByScripterExamples >> spotterElementOnStartSampleActOnSecondCategoryWithDefaultCategoryActOn [
233227
<gtExample>
228+
<return: #BlScripter>
234229
| scripter actOnEvents actOn actOnHandler |
235230
scripter := self spotterElementOnStartSample.
236231

@@ -243,10 +238,7 @@ GtSpotterByScripterExamples >> spotterElementOnStartSampleActOnSecondCategoryWit
243238
send: #onActed:
244239
to: actOnHandler.
245240

246-
scripter
247-
mouseMoveOverStep: [ :s |
248-
s
249-
id: GtSpotterCategoryElementId index: 2 ].
241+
scripter mouseMoveOverStep: [ :s | s id: GtSpotterCategoryElementId index: 2 ].
250242

251243
scripter
252244
mouseMoveOverStep: [ :s |
@@ -278,6 +270,7 @@ GtSpotterByScripterExamples >> spotterElementOnStartSampleActOnSecondCategoryWit
278270
{ #category : #accessing }
279271
GtSpotterByScripterExamples >> spotterElementOnStartSampleCheckCandidates [
280272
<gtExample>
273+
<return: #BlScripter>
281274
| scripter |
282275
scripter := self spotterElementOnStartSample.
283276

@@ -301,6 +294,7 @@ GtSpotterByScripterExamples >> spotterElementOnStartSampleCheckCandidates [
301294
{ #category : #accessing }
302295
GtSpotterByScripterExamples >> spotterElementOnStartSampleCheckCategories [
303296
<gtExample>
297+
<return: #BlScripter>
304298
| scripter |
305299
scripter := self spotterElementOnStartSample.
306300

@@ -331,6 +325,7 @@ GtSpotterByScripterExamples >> spotterElementOnStartSampleCheckCategories [
331325
{ #category : #accessing }
332326
GtSpotterByScripterExamples >> spotterElementOnStartSampleCheckSelection [
333327
<gtExample>
328+
<return: #BlScripter>
334329
| scripter |
335330
scripter := self spotterElementOnStartSample.
336331

@@ -366,6 +361,7 @@ GtSpotterByScripterExamples >> spotterElementOnStartSampleCheckSelection [
366361
{ #category : #accessing }
367362
GtSpotterByScripterExamples >> spotterElementOnStartWithAPIHasPreview [
368363
<gtExample>
364+
<return: #BlScripter>
369365
| scripter |
370366
scripter := self spotterElementOnStart: GtSpotterStartWithAPI new.
371367

@@ -394,6 +390,7 @@ GtSpotterByScripterExamples >> spotterElementOnStartWithAPIHasPreview [
394390
{ #category : #accessing }
395391
GtSpotterByScripterExamples >> spotterElementOnStartWithExceptionInItemName [
396392
<gtExample>
393+
<return: #BlScripter>
397394
| scripter |
398395
scripter := self
399396
spotterElementOnStart: GtSpotterStartWithExceptionInItemName new.
@@ -412,6 +409,7 @@ GtSpotterByScripterExamples >> spotterElementOnStartWithExceptionInItemName [
412409
{ #category : #accessing }
413410
GtSpotterByScripterExamples >> spotterElementOnStartWithExceptionsInSearch [
414411
<gtExample>
412+
<return: #BlScripter>
415413
| scripter |
416414
scripter := self spotterElementOnStart: GtSpotterStartWithExceptionInSearch new.
417415

@@ -468,6 +466,7 @@ GtSpotterByScripterExamples >> spotterElementOnStartWithExceptionsInSearch [
468466
{ #category : #accessing }
469467
GtSpotterByScripterExamples >> spotterElementOnStartWithNilItems [
470468
<gtExample>
469+
<return: #BlScripter>
471470
| scripter |
472471
scripter := self spotterElementOnStart: GtSpotterStartWithNilItems new.
473472

src/GToolkit-Spotter-Examples/GtSpotterByWordsQuerySplitterExamples.class.st

Lines changed: 20 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -12,65 +12,56 @@ GtSpotterByWordsQuerySplitterExamples >> createQuerySplitter [
1212
{ #category : #examples }
1313
GtSpotterByWordsQuerySplitterExamples >> splitQueryWithConsecutiveUpperCaseLettersAndOneLowercaseAtEnd [
1414
<gtExample>
15-
^ self
16-
assertSplitOf: 'ABCDe'
17-
equals: #('ABCDe').
15+
<return: #OrderedCollection>
16+
^ self assertSplitOf: 'ABCDe' equals: #('ABCDe')
1817
]
1918

2019
{ #category : #examples }
2120
GtSpotterByWordsQuerySplitterExamples >> splitQueryWithConsecutiveUpperCaseLettersAndOneLowercaseInTheMiddle [
2221
<gtExample>
23-
self
24-
assertSplitOf: 'ABcDE'
25-
equals: #('ABc' 'DE').
26-
self
27-
assertSplitOf: 'ABcDEfGh'
28-
equals: #('ABc' 'DEf' 'Gh').
22+
<return: #GtSpotterByWordsQuerySplitterExamples>
23+
self assertSplitOf: 'ABcDE' equals: #('ABc' 'DE').
24+
self assertSplitOf: 'ABcDEfGh' equals: #('ABc' 'DEf' 'Gh')
2925
]
3026

3127
{ #category : #examples }
3228
GtSpotterByWordsQuerySplitterExamples >> splitQueryWithInitialLowercaseAndFollowingUppercase [
3329
<gtExample>
34-
^ self
35-
assertSplitOf: 'oneTwo'
36-
equals: #('one' 'Two').
30+
<return: #OrderedCollection>
31+
^ self assertSplitOf: 'oneTwo' equals: #('one' 'Two')
3732
]
3833

3934
{ #category : #examples }
4035
GtSpotterByWordsQuerySplitterExamples >> splitQueryWithMixedCapitalizationAndMultipleWords [
4136
<gtExample>
42-
^ self
37+
<return: #OrderedCollection>
38+
^ self
4339
assertSplitOf: 'one111 Two22Three AB'
44-
equals: #('one111' 'Two22' 'Three' 'AB').
40+
equals: #('one111' 'Two22' 'Three' 'AB')
4541
]
4642

47< BE96 code>43
{ #category : #examples }
4844
GtSpotterByWordsQuerySplitterExamples >> splitQueryWithMultipleCapitalizedWords [
4945
<gtExample>
50-
self
51-
assertSplitOf: 'OneTwo'
52-
equals: #('One' 'Two').
53-
self
54-
assertSplitOf: 'OneTwoThree'
55-
equals: #('One' 'Two' 'Three').
46+
<return: #GtSpotterByWordsQuerySplitterExamples>
47+
self assertSplitOf: 'OneTwo' equals: #('One' 'Two').
48+
self assertSplitOf: 'OneTwoThree' equals: #('One' 'Two' 'Three')
5649
]
5750

5851
{ #category : #examples }
5952
GtSpotterByWordsQuerySplitterExamples >> splitQueryWithNonDigitCharacters [
6053
<gtExample>
61-
self
54+
<return: #GtSpotterByWordsQuerySplitterExamples>
55+
self
6256
assertSplitOf: 'One***Two---Three!@$Four'
63-
equals: #('One' 'Two' 'Three' 'Four').
57+
equals: #('One' 'Two' 'Three' 'Four')
6458
]
6559

6660
{ #category : #examples }
6761
GtSpotterByWordsQuerySplitterExamples >> splitQueryWithTwoCapitalizedWordsWithNumbers [
6862
<gtExample>
69-
self
70-
assertSplitOf: 'One111Two22'
71-
equals: #('One111' 'Two22').
72-
73-
self
74-
assertSplitOf: 'one111Two22'
75-
equals: #('one111' 'Two22').
63+
<return: #GtSpotterByWordsQuerySplitterExamples>
64+
self assertSplitOf: 'One111Two22' equals: #('One111' 'Two22').
65+
66+
self assertSplitOf: 'one111Two22' equals: #('one111' 'Two22')
7667
]

src/GToolkit-Spotter-Examples/GtSpotterCustomSubstringsFilterStreamExamples.class.st

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -49,64 +49,64 @@ GtSpotterCustomSubstringsFilterStreamExamples >> createFilterWithQuerySearch: aQ
4949
{ #category : #examples }
5050
GtSpotterCustomSubstringsFilterStreamExamples >> testExactFullMatch [
5151
<gtExample>
52-
53-
self
54-
assertQuerySearch: 'StringOne'
55-
in: #('StringOne' 'StringTwo' 'StringThree')
52+
<return: #GtSpotterCustomSubstringsFilterStreamExamples>
53+
self
54+
assertQuerySearch: 'StringOne'
55+
in: #('StringOne' 'StringTwo' 'StringThree')
5656
equals: #('StringOne').
57-
58-
self
59-
assertQuerySearch: 'StringTwo'
60-
in: #('StringOne' 'StringTwo' 'StringThree')
57+
58+
self
59+
assertQuerySearch: 'StringTwo'
60+
in: #('StringOne' 'StringTwo' 'StringThree')
6161
equals: #('StringTwo')
6262
]
6363

6464
{ #category : #examples }
6565
GtSpotterCustomSubstringsFilterStreamExamples >> testPrefixMatch_exactMatch [
6666
<gtExample>
67-
68-
self
69-
assertQuerySearch: 'One'
70-
in: #('OneString' 'TwoString' 'ThreeString')
67+
<return: #GtSpotterCustomSubstringsFilterStreamExamples>
68+
self
69+
assertQuerySearch: 'One'
70+
in: #('OneString' 'TwoString' 'ThreeString')
7171
equals: #('OneString').
72-
73-
self
74-
assertQuerySearch: 'Two'
75-
in: #('OneString' 'TwoString' 'ThreeString')
76-
equals: #('TwoString').
72+
73+
self
74+
assertQuerySearch: 'Two'
75+
in: #('OneString' 'TwoString' 'ThreeString')
76+
equals: #('TwoString')
7777
]
7878

7979
{ #category : #examples }
8080
GtSpotterCustomSubstringsFilterStreamExamples >> testPrefixMatch_multipleMatches [
8181
<gtExample>
82-
83-
self
84-
assertQuerySearch: 'String'
85-
in: #('StringOne' 'StringTwo' 'StringThree')
82+
<return: #GtSpotterCustomSubstringsFilterStreamExamples>
83+
self
84+
assertQuerySearch: 'String'
85+
in: #('StringOne' 'StringTwo' 'StringThree')
8686
equals: #('StringOne' 'StringTwo' 'StringThree')
8787
]
8888

8989
{ #category : #examples }
9090
GtSpotterCustomSubstringsFilterStreamExamples >> testSuffixMatch_exactMatch [
9191
<gtExample>
92-
93-
self
94-
assertQuerySearch: 'One'
95-
in: #('StringOne' 'StringTwo' 'StringThree')
92+
<return: #GtSpotterCustomSubstringsFilterStreamExamples>
93+
self
94+
assertQuerySearch: 'One'
95+
in: #('StringOne' 'StringTwo' 'StringThree')
9696
equals: #('StringOne').
97-
98-
self
99-
assertQuerySearch: 'Two'
100-
in: #('StringOne' 'StringTwo' 'StringThree')
97+
98+
self
99+
assertQuerySearch: 'Two'
100+
in: #('StringOne' 'StringTwo' 'StringThree')
101101
equals: #('StringTwo')
102102
]
103103

104104
{ #category : #examples }
105105
GtSpotterCustomSubstringsFilterStreamExamples >> testSuffixMatch_multipleMatches [
106106
<gtExample>
107-
108-
self
109-
assertQuerySearch: 'String'
110-
in: #('OneString' 'TwoString' 'ThreeString')
107+
<return: #GtSpotterCustomSubstringsFilterStreamExamples>
108+
self
109+
assertQuerySearch: 'String'
110+
in: #('OneString' 'TwoString' 'ThreeString')
111111
equals: #('OneString' 'TwoString' 'ThreeString')
112112
]

0 commit comments

Comments
 (0)
0