[Pkg] The Trunk: CollectionsTests-nice.199.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Mar 10 14:15:15 UTC 2013


Nicolas Cellier uploaded a new version of CollectionsTests to project The Trunk:
http://source.squeak.org/trunk/CollectionsTests-nice.199.mcz

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

Name: CollectionsTests-nice.199
Author: nice
Time: 10 March 2013, 3:14:33.963 pm
UUID: 134bbe86-17ef-4f99-ae34-b118eba311e1
Ancestors: CollectionsTests-nice.198

Provide tests for String>>numArgs

=============== Diff against CollectionsTests-nice.198 ===============

Item was added:
+ ----- 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 = 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.!



More information about the Packages mailing list