The Trunk: CollectionsTests-mt.315.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.315.mcz

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

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

Name: CollectionsTests-mt.315
Author: mt
Time: 19 August 2019, 1:55:25.792443 pm
UUID: ec93455a-eea0-334e-9efa-242e29b5d8c8
Ancestors: CollectionsTests-pre.314

Updates a test for Colletions-mt.849 (inbox). I think it is best to call #printString on a delimiter if desired but use #asString by default. This is more flexible.

=============== Diff against CollectionsTests-pre.314 ===============

Item was changed:
  ----- Method: CollectionTest>>testPrintOnDelimiter (in category 'tests') -----
  testPrintOnDelimiter
  | delim |
  delim := ', '.
  {OrderedCollection new. Set new.} do:
  [ :coll | | emptyStream oneItemStream multiItemStream |
  emptyStream := String new writeStream.
  coll printOn: emptyStream delimiter: delim.
  self assert: emptyStream contents = ''.
 
  coll add: 1.
  oneItemStream := String new writeStream.
  coll printOn: oneItemStream delimiter: delim.
  self assert: oneItemStream contents = '1'.
 
  coll add: 2; add: 3.
  multiItemStream := String new writeStream.
  coll printOn: multiItemStream delimiter: ', '.
+ self assert: multiItemStream contents = '1, 2, 3'.
+
+ multiItemStream := String new writeStream.
+ coll printOn: multiItemStream delimiter: ', ' printString.
  self assert: multiItemStream contents = '1'', ''2'', ''3'.]!