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

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

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

Name: CollectionsTests-mt.261
Author: mt
Time: 12 April 2016, 11:27:49.454799 am
UUID: 3b951241-c308-9446-92a3-4fdc63949e47
Ancestors: CollectionsTests-mt.260

Adds test for flatten across nesten streams and collections.

=============== Diff against CollectionsTests-mt.260 ===============

Item was added:
+ ----- Method: ReadStreamTest>>testFlatten (in category 'tests - enumerating') -----
+ testFlatten
+
+ | stream |
+ stream := (self streamOn: {3 .4 .{2 .4 .{'hi'} .'ho'}}) flatten.
+ self assert: (stream next: 6) asArray = {3 .4 .2 .4 .'hi' .'ho'}.!

Item was added:
+ ----- Method: ReadStreamTest>>testFlatten2 (in category 'tests - enumerating') -----
+ testFlatten2
+
+ | stream |
+ stream := (self streamOn: {3 .4 . self streamOn: {2 .4 .{'hi'} .'ho'} }) flatten.
+ self assert: (stream next: 6) asArray = {3 .4 .2 .4 .'hi' .'ho'}.!

Item was added:
+ ----- Method: SequenceableCollectionTest>>testFlatten2 (in category 'tests - converting') -----
+ testFlatten2
+
+ self
+ assert: {3 .4 .2 .4 .'hi' .'ho'}
+ equals: {3 .4 .{2 .4 .{'hi'} .'ho'} readStream } flatten
+ description: '#flatten should deeply inline all collection-like elements and work with streams'.!