[squeak-dev] The Trunk: CollectionsTests-cmm.381.mcz
commits at source.squeak.org
commits at source.squeak.org
Thu Jul 7 04:21:24 UTC 2022
Chris Muller uploaded a new version of CollectionsTests to project The Trunk:
http://source.squeak.org/trunk/CollectionsTests-cmm.381.mcz
==================== Summary ====================
Name: CollectionsTests-cmm.381
Author: cmm
Time: 6 July 2022, 11:21:23.316148 pm
UUID: 64a6790a-15cc-4630-bd51-e156f50b0bff
Ancestors: CollectionsTests-ct.380
The test for String>>#format: now includes the new alphanumeric token capability.
=============== Diff against CollectionsTests-ct.380 ===============
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 {ONE} bar {TWO}'. {'ONE'->12. 'TWO'->'string'} as: Dictionary. '{ } \ foo 12 bar string'.
+ '\{ \} \\ foo {TWO} bar {ONE}'. {'ONE'->'string'. 'TWO'->12} as: Dictionary. '{ } \ foo 12 bar string'.
+ '\{ \} \\ foo {TWO} bar {ONE}'. {'ONE'->'string'. 'TWO'->[3*4]} as: Dictionary. '{ } \ foo 12 bar string'.
+ '\{ONE}'. #(). '{ONE}'.
+ '\{ONE}{ONE}'. {'ONE'->$a} as: Dictionary. '{ONE}a'.
+ 'foo'. #(). 'foo'
+ } groupsDo: [ :receiver :argument :expectedResult |
- #(
- '\{ \} \\ 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 ]!
More information about the Squeak-dev
mailing list
|