Nicolas Cellier uploaded a new version of CollectionsTests to project The Trunk:
http://source.squeak.org/trunk/CollectionsTests-nice.200.mcz ==================== Summary ==================== Name: CollectionsTests-nice.200 Author: nice Time: 11 March 2013, 11:40:07.355 pm UUID: 1a65f82a-6a1c-465f-b111-72b99e08ec14 Ancestors: CollectionsTests-nice.199 Change StringTest>>testNumArgs to reflect that an empty keyword message (composed uniquely of colons $: or with a single empty key #'a::') is not a valid Smalltalk pattern (I have a doubt about previous test, was it ever valid?). =============== Diff against CollectionsTests-nice.199 =============== Item was changed: ----- Method: StringTest>>testNumArgs (in category 'testing') ----- testNumArgs | binary punctuation | binary := '+-*/<=>&|,?\~@'. 1 to: 3 do: [:length | binary combinations: length atATimeDo: [:each | self assert: each numArgs = 1]]. self assert: 'foo' numArgs = 0. self assert: 'bar:' numArgs = 1. self assert: 'foo:bar:' numArgs = 2. self assert: 'foo2:bar1:' numArgs = 2. + self assert: '::' numArgs = -1 description: 'empty keywords are forbidden'. - self assert: '::' numArgs = 2 description: 'empty keywords are authorized'. punctuation := '.;()[]{}"`''#$'. punctuation , Character separators do: [:letter | self assert: ('foo' copyWith: letter) numArgs = -1 description: 'Smalltalk punctuation and separators are illegal in a selector']. self assert: 'nextPut:andCR' numArgs = -1 description: 'terminal colon is missing'. self assert: 'a0:1:' numArgs = -1 description: 'a keyword cannot begin with a digit'. self assert: '123' numArgs = -1. self assert: '' numArgs = -1.! |
On 11 March 2013 22:40, <[hidden email]> wrote:
> Nicolas Cellier uploaded a new version of CollectionsTests to project The Trunk: > http://source.squeak.org/trunk/CollectionsTests-nice.200.mcz > > ==================== Summary ==================== > > Name: CollectionsTests-nice.200 > Author: nice > Time: 11 March 2013, 11:40:07.355 pm > UUID: 1a65f82a-6a1c-465f-b111-72b99e08ec14 > Ancestors: CollectionsTests-nice.199 > > Change StringTest>>testNumArgs to reflect that an empty keyword message (composed uniquely of colons $: or with a single empty key #'a::') is not a valid Smalltalk pattern (I have a doubt about previous test, was it ever valid?). I had wondered about this. But didn't we discuss this the other day? I'm pretty sure Yoshiki said that it _was_ valid, because it's the "anonymous selector" in [ : a : b | a + b] (hideous whitespacing deliberate, to show the selector). frank |
2013/3/11 Frank Shearar <[hidden email]>:
> On 11 March 2013 22:40, <[hidden email]> wrote: >> Nicolas Cellier uploaded a new version of CollectionsTests to project The Trunk: >> http://source.squeak.org/trunk/CollectionsTests-nice.200.mcz >> >> ==================== Summary ==================== >> >> Name: CollectionsTests-nice.200 >> Author: nice >> Time: 11 March 2013, 11:40:07.355 pm >> UUID: 1a65f82a-6a1c-465f-b111-72b99e08ec14 >> Ancestors: CollectionsTests-nice.199 >> >> Change StringTest>>testNumArgs to reflect that an empty keyword message (composed uniquely of colons $: or with a single empty key #'a::') is not a valid Smalltalk pattern (I have a doubt about previous test, was it ever valid?). > > I had wondered about this. But didn't we discuss this the other day? > I'm pretty sure Yoshiki said that it _was_ valid, because it's the > "anonymous selector" in [ : a : b | a + b] (hideous whitespacing > deliberate, to show the selector). > > frank > Well, it was pure theory... Outside a block - and I just checked down to Squeak 2.X - the Parser does not consider ': x' as a valid pattern. Also these changes break other tests from Colin (whose aim seems to burry defunct alternate syntax). Nicolas |
Free forum by Nabble | Edit this page |