[squeak-dev] The Trunk: CollectionsTests-ul.236.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Apr 5 20:30:10 UTC 2015


Levente Uzonyi uploaded a new version of CollectionsTests to project The Trunk:
http://source.squeak.org/trunk/CollectionsTests-ul.236.mcz

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

Name: CollectionsTests-ul.236
Author: ul
Time: 5 April 2015, 10:25:52.113 pm
UUID: 4fea2b80-99a8-41c5-9475-ff40295127f0
Ancestors: CollectionsTests-mt.235

Added more tests for String >> #format:.

=============== Diff against CollectionsTests-mt.235 ===============

Item was changed:
  ----- Method: StringTest>>testFormat (in category 'tests - formatting') -----
  testFormat
  
+ 	#(
+ 		'\{ \} \\ foo {1} bar {2}' #(12 'string') '{ } \ foo 12 bar string'
+ 		'\{ \} \\ foo {2} bar {1}' #('string' 12) '{ } \ foo 12 bar string'
+ 		'\{1}' #() '{1}'
+ 		'\{1}{1}' #($a) '{1}a'
+ 		'foo' #() 'foo'
+ 	) groupsDo: [ :receiver :argument :expectedResult |
+ 		self assert: expectedResult equals: (receiver format: argument) ].
+ 	#(
+ 		'{1 }'
+ 		'{1abc}'
+ 		'{ 1}'
+ 		'{ 1.0 }'
+ 		'{1'
+ 		'{1 foo'
+ 		'{2}'
+ 		'{0}'
+ 		'{-0}'
+ 		'{-1}'
+ 	) do: [ :each |
+ 		self should: [ each format: { 'x' } ] raise: Error ]!
- 	{ 
- 		[ '\{ \} \\ foo {1} bar {2}' format: { 12. 'string' } ] -> '{ } \ foo 12 bar string'.
- 		[ '\{ \} \\ foo {2} bar {1}' format: { 'string'. 12 } ] -> '{ } \ foo 12 bar string'.
- 		[ '\{1}' format: {} ] -> '{1}'.
- 		[ '\{1}{1}' format: { $a } ] -> '{1}a'.
- 	} do: [ :each |
- 		self assert: each key value = each value ]!



More information about the Squeak-dev mailing list