The Trunk: CollectionsTests-mt.325.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: CollectionsTests-mt.325.mcz

commits-2
Marcel Taeumel uploaded a new version of CollectionsTests to project The Trunk:
http://source.squeak.org/trunk/CollectionsTests-mt.325.mcz

==================== Summary ====================

Name: CollectionsTests-mt.325
Author: mt
Time: 18 November 2019, 11:45:39.130051 am
UUID: 50fb1883-f0a9-0644-bf62-1f634815b433
Ancestors: CollectionsTests-mt.324

Adds test for #findSelector, which is used in text editor's "implementors/senders of it".

=============== Diff against CollectionsTests-mt.324 ===============

Item was added:
+ ----- Method: StringTest>>testFindSelector (in category 'tests - finding') -----
+ testFindSelector
+
+ #(
+ #negated 'negated' "Simplest case."
+ #negated '#negated' "Ignore leading #"
+ #negated '   negated' "Ignore leading whitespace"
+
+ nil 'shouldnotexist42' "Do not intern new symbols."
+
+ #copy 'self copy' "Ignore leading receiver."
+ #copyWithout: 'self copyWithout: 42' "Ignore leading receiver."
+ #negated 'self copy negated' "Choose last selector if several."
+
+ #drawOn: 'drawOn:'
+ nil 'drawOn' "Do not add colons."
+ #drawOn: 'drawOn: aCanvas' "Ignore argument"
+
+ #at:put: 'at: 42 put: nil' "Ignore arguments"
+ #at:put: 'at: #drawOn: put: 42' "Ignore colons in arguments."
+ #at:put: 'at:42 put:43' "Scarce whitepsace"
+
+ #ifTrue: 'ifTrue: [self open]'
+ #ifTrue:ifFalse: 'ifTrue: [] ifFalse: [self close]'
+ #ifNotEmpty: 'ifNotEmpty: [:all | all sum]'
+
+ #+ '+'
+ #+ '1 +'
+ nil '+ 2'
+ nil '1 + 2'
+
+ ) pairsDo: [:selector :string |
+ self assert: selector equals: string findSelector].!