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

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

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

Name: CollectionsTests-mt.262
Author: mt
Time: 13 April 2016, 10:22:24.408044 am
UUID: 8c0ca403-4c4d-fc4f-88b2-245a00b65b80
Ancestors: CollectionsTests-mt.261

Remove infinite generators on streams due to lack of use cases.

=============== Diff against CollectionsTests-mt.261 ===============

Item was removed:
- ----- Method: ReadStreamTest>>testCollectInfinitely (in category 'tests - enumerating - infinitely') -----
- testCollectInfinitely
-
- | stream |
- stream := (self streamOn: #(1 2 3 4)) collectInfinitely: [:num | 2 * num].
- self
- assert: stream upToNil asArray = #(2 4 6 8);
- deny: stream atEnd;
- assert: stream next isNil.!

Item was removed:
- ----- Method: ReadStreamTest>>testGatherInfinitely (in category 'tests - enumerating - infinitely') -----
- testGatherInfinitely
-
- | stream |
- stream := (self streamOn: #(1 2 3 4)) gatherInfinitely: [:num | 1 to: num].
- self
- assert: stream upToNil asArray = #(1 1 2 1 2 3 1 2 3 4);
- deny: stream atEnd;
- assert: stream next isNil.!

Item was removed:
- ----- Method: ReadStreamTest>>testGatherInfinitely2 (in category 'tests - enumerating - infinitely') -----
- testGatherInfinitely2
- "Try gathering infinite streams as results."
-
- | stream |
- stream := (self streamOn: #(1 2 3 4)) gatherInfinitely: [:num | (self streamOn: (1 to: num)) collectInfinitely: [:ea | ea * ea]].
- self
- assert: stream upToNil asArray = #(1 1 4 1 4 9 1 4 9 16);
- deny: stream atEnd;
- assert: stream next isNil.!

Item was removed:
- ----- Method: ReadStreamTest>>testRejectInfinitely (in category 'tests - enumerating - infinitely') -----
- testRejectInfinitely
-
- | stream |
- stream := (self streamOn: #(1 2 3 4)) rejectInfinitely: [:num | num even].
- self
- assert: stream upToNil asArray = #(1 3);
- deny: stream atEnd;
- assert: stream next isNil.!

Item was removed:
- ----- Method: ReadStreamTest>>testSelectInfinitely (in category 'tests - enumerating - infinitely') -----
- testSelectInfinitely
-
- | stream |
- stream := (self streamOn: #(1 2 3 4)) selectInfinitely: [:num | num even].
- self
- assert: stream upToNil asArray = #(2 4);
- deny: stream atEnd;
- assert: stream next isNil.!

Item was removed:
- ----- Method: ReadStreamTest>>testUpToNil (in category 'tests - accessing') -----
- testUpToNil
-
- | stream |
- stream := self streamOn: #(1 2 3 4).
- self assert: stream upToNil asArray = #(1 2 3 4).
- self assert: stream atEnd.!

Item was removed:
- ----- Method: ReadStreamTest>>testUpToNil2 (in category 'tests - accessing') -----
- testUpToNil2
-
- | stream |
- stream := (self streamOn: #(1 2 3 4)) collect: [:ea | 2 * ea].
- self assert: stream upToNil asArray = #(2 4 6 8).
- self assert: stream atEnd.!